@uncarved/jade 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/session.js +9 -3
- package/dist/session.js.map +1 -1
- package/package.json +2 -2
- package/plugins/models/configure.ts +37 -3
- package/plugins/models/provider.ts +24 -0
- package/plugins/models/saved.ts +1 -1
- package/plugins/prompts/index.ts +0 -0
- package/plugins/schedule/index.ts +3 -1
- package/plugins/shell/index.ts +8 -4
- package/plugins/shell/plugin.json +2 -1
- package/plugins/undo/checkpoint.ts +3 -1
- package/plugins/undo/index.ts +132 -22
- package/plugins/undo/plugin.json +1 -0
- package/plugins/undo/snapshot.ts +87 -14
- package/plugins-dist/models/configure.js +30 -2
- package/plugins-dist/models/provider.js +21 -1
- package/plugins-dist/models/saved.js +1 -1
- package/plugins-dist/prompts/index.js +6 -1
- package/plugins-dist/schedule/index.js +1 -0
- package/plugins-dist/shell/index.js +12 -10
- package/plugins-dist/shell/plugin.json +2 -1
- package/plugins-dist/tui/vendor.js +1088 -1388
- package/plugins-dist/undo/checkpoint.js +3 -1
- package/plugins-dist/undo/index.js +111 -15
- package/plugins-dist/undo/plugin.json +3 -0
- package/plugins-dist/undo/snapshot.js +62 -11
- package/sdk/python/__pycache__/jade_plugin.cpython-312.pyc +0 -0
- package/src/api.ts +1 -1
- package/src/session.ts +8 -3
|
@@ -2,39 +2,124 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var { getPrototypeOf: __getProtoOf, defineProperty: __defProp, getOwnPropertyNames: __getOwnPropNames } = Object;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toESMCache_node, __toESMCache_esm, __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
var canCache = mod != null && typeof mod === "object";
|
|
10
|
+
if (canCache) {
|
|
11
|
+
var cache = isNodeMode ? __toESMCache_node ??= /* @__PURE__ */ new WeakMap : __toESMCache_esm ??= /* @__PURE__ */ new WeakMap, cached = cache.get(mod);
|
|
12
|
+
if (cached)
|
|
13
|
+
return cached;
|
|
14
|
+
}
|
|
6
15
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
7
|
-
let to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
let to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target;
|
|
17
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(mod))
|
|
19
|
+
if (!__hasOwnProp.call(to, key))
|
|
20
|
+
__defProp(to, key, {
|
|
21
|
+
get: __accessProp.bind(mod, key),
|
|
22
|
+
enumerable: !0
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (canCache)
|
|
26
|
+
cache.set(mod, to);
|
|
14
27
|
return to;
|
|
15
28
|
};
|
|
16
29
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
17
|
-
var
|
|
18
|
-
|
|
30
|
+
var __esm = (fn, res, err) => () => {
|
|
31
|
+
if (fn)
|
|
32
|
+
try {
|
|
33
|
+
res = fn(fn = 0);
|
|
34
|
+
} catch (e) {
|
|
35
|
+
err = [e];
|
|
36
|
+
}
|
|
37
|
+
if (err)
|
|
38
|
+
throw err[0];
|
|
39
|
+
return res;
|
|
40
|
+
};
|
|
41
|
+
var __exportCjs = (target, getters, setters) => {
|
|
42
|
+
for (var name in getters)
|
|
19
43
|
__defProp(target, name, {
|
|
20
|
-
get:
|
|
44
|
+
get: getters[name],
|
|
45
|
+
set: setters[name],
|
|
21
46
|
enumerable: !0,
|
|
22
|
-
configurable: !0
|
|
23
|
-
set: (newValue) => all[name] = () => newValue
|
|
47
|
+
configurable: !0
|
|
24
48
|
});
|
|
25
|
-
};
|
|
26
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
27
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
49
|
+
}, __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
28
50
|
|
|
29
51
|
// ../../node_modules/.bun/react@19.3.1/node_modules/react/cjs/react.production.js
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
function Component(props, context, updater) {
|
|
53
|
+
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
|
|
54
|
+
}
|
|
55
|
+
function ComponentDummy() {}
|
|
56
|
+
function PureComponent(props, context, updater) {
|
|
57
|
+
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
|
|
58
|
+
}
|
|
59
|
+
function ReactElement(type, key, props) {
|
|
60
|
+
var refProp = props.ref;
|
|
61
|
+
return {
|
|
62
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
63
|
+
type,
|
|
64
|
+
key,
|
|
65
|
+
ref: refProp !== void 0 ? refProp : null,
|
|
66
|
+
props
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
var REACT_ELEMENT_TYPE, REACT_CONSUMER_TYPE, REACT_CONTEXT_TYPE, REACT_FORWARD_REF_TYPE, ReactNoopUpdateQueue, assign, emptyObject, pureComponentPrototype, ReactSharedInternals, hasOwnProperty, $PureComponent, $__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $createContext = function(defaultValue) {
|
|
70
|
+
return defaultValue = {
|
|
71
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
72
|
+
_currentValue: defaultValue,
|
|
73
|
+
_currentValue2: defaultValue,
|
|
74
|
+
_threadCount: 0,
|
|
75
|
+
Provider: null,
|
|
76
|
+
Consumer: null
|
|
77
|
+
}, defaultValue.Provider = defaultValue, defaultValue.Consumer = {
|
|
78
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
79
|
+
_context: defaultValue
|
|
80
|
+
}, defaultValue;
|
|
81
|
+
}, $createElement = function(type, config, children) {
|
|
82
|
+
var propName, props = {}, key = null;
|
|
83
|
+
if (config != null)
|
|
84
|
+
for (propName in config.key !== void 0 && (key = "" + config.key), config)
|
|
85
|
+
hasOwnProperty.call(config, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (props[propName] = config[propName]);
|
|
86
|
+
var childrenLength = arguments.length - 2;
|
|
87
|
+
if (childrenLength === 1)
|
|
88
|
+
props.children = children;
|
|
89
|
+
else if (1 < childrenLength) {
|
|
90
|
+
for (var childArray = Array(childrenLength), i = 0;i < childrenLength; i++)
|
|
91
|
+
childArray[i] = arguments[i + 2];
|
|
92
|
+
props.children = childArray;
|
|
93
|
+
}
|
|
94
|
+
if (type && type.defaultProps)
|
|
95
|
+
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
96
|
+
props[propName] === void 0 && (props[propName] = childrenLength[propName]);
|
|
97
|
+
return ReactElement(type, key, props);
|
|
98
|
+
}, $forwardRef = function(render) {
|
|
99
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
100
|
+
}, $useCallback = function(callback, deps) {
|
|
101
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
102
|
+
}, $useContext = function(Context) {
|
|
103
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
104
|
+
}, $useEffect = function(create, deps) {
|
|
105
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
106
|
+
}, $useEffectEvent = function(callback) {
|
|
107
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
108
|
+
}, $useInsertionEffect = function(create, deps) {
|
|
109
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
110
|
+
}, $useMemo = function(create, deps) {
|
|
111
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
112
|
+
}, $useReducer = function(reducer, initialArg, init) {
|
|
113
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
114
|
+
}, $useRef = function(initialValue) {
|
|
115
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
116
|
+
}, $useState = function(initialState) {
|
|
117
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
118
|
+
}, $useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
119
|
+
return ReactSharedInternals.H.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
120
|
+
}, $version = "19.3.1";
|
|
121
|
+
var init_react_production = __esm(() => {
|
|
122
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), ReactNoopUpdateQueue = {
|
|
38
123
|
isMounted: function() {
|
|
39
124
|
return !1;
|
|
40
125
|
},
|
|
@@ -42,9 +127,6 @@ var require_react_production = __commonJS((exports) => {
|
|
|
42
127
|
enqueueReplaceState: function() {},
|
|
43
128
|
enqueueSetState: function() {}
|
|
44
129
|
}, assign = Object.assign, emptyObject = {};
|
|
45
|
-
function Component(props, context, updater) {
|
|
46
|
-
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
|
|
47
|
-
}
|
|
48
130
|
Component.prototype.isReactComponent = {};
|
|
49
131
|
Component.prototype.setState = function(partialState, callback) {
|
|
50
132
|
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null)
|
|
@@ -54,348 +136,17 @@ var require_react_production = __commonJS((exports) => {
|
|
|
54
136
|
Component.prototype.forceUpdate = function(callback) {
|
|
55
137
|
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
56
138
|
};
|
|
57
|
-
function ComponentDummy() {}
|
|
58
139
|
ComponentDummy.prototype = Component.prototype;
|
|
59
|
-
|
|
60
|
-
this.props = props, this.context = context, this.refs = emptyObject, this.updater = updater || ReactNoopUpdateQueue;
|
|
61
|
-
}
|
|
62
|
-
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy;
|
|
140
|
+
pureComponentPrototype = PureComponent.prototype = new ComponentDummy;
|
|
63
141
|
pureComponentPrototype.constructor = PureComponent;
|
|
64
142
|
assign(pureComponentPrototype, Component.prototype);
|
|
65
143
|
pureComponentPrototype.isPureReactComponent = !0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
69
|
-
function ReactElement(type, key, props) {
|
|
70
|
-
var refProp = props.ref;
|
|
71
|
-
return {
|
|
72
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
73
|
-
type,
|
|
74
|
-
key,
|
|
75
|
-
ref: refProp !== void 0 ? refProp : null,
|
|
76
|
-
props
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
80
|
-
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
81
|
-
}
|
|
82
|
-
function isValidElement(object) {
|
|
83
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
84
|
-
}
|
|
85
|
-
function escape(key) {
|
|
86
|
-
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
87
|
-
return "$" + key.replace(/[=:]/g, function(match) {
|
|
88
|
-
return escaperLookup[match];
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
92
|
-
function getElementKey(element, index) {
|
|
93
|
-
return typeof element === "object" && element !== null && element.key != null ? escape("" + element.key) : index.toString(36);
|
|
94
|
-
}
|
|
95
|
-
function resolveThenable(thenable) {
|
|
96
|
-
switch (thenable.status) {
|
|
97
|
-
case "fulfilled":
|
|
98
|
-
return thenable.value;
|
|
99
|
-
case "rejected":
|
|
100
|
-
throw thenable.reason;
|
|
101
|
-
default:
|
|
102
|
-
switch (typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
|
|
103
|
-
thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
104
|
-
}, function(error) {
|
|
105
|
-
thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error);
|
|
106
|
-
})), thenable.status) {
|
|
107
|
-
case "fulfilled":
|
|
108
|
-
return thenable.value;
|
|
109
|
-
case "rejected":
|
|
110
|
-
throw thenable.reason;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
throw thenable;
|
|
114
|
-
}
|
|
115
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
116
|
-
var type = typeof children;
|
|
117
|
-
if (type === "undefined" || type === "boolean")
|
|
118
|
-
children = null;
|
|
119
|
-
var invokeCallback = !1;
|
|
120
|
-
if (children === null)
|
|
121
|
-
invokeCallback = !0;
|
|
122
|
-
else
|
|
123
|
-
switch (type) {
|
|
124
|
-
case "bigint":
|
|
125
|
-
case "string":
|
|
126
|
-
case "number":
|
|
127
|
-
invokeCallback = !0;
|
|
128
|
-
break;
|
|
129
|
-
case "object":
|
|
130
|
-
switch (children.$$typeof) {
|
|
131
|
-
case REACT_ELEMENT_TYPE:
|
|
132
|
-
case REACT_PORTAL_TYPE:
|
|
133
|
-
invokeCallback = !0;
|
|
134
|
-
break;
|
|
135
|
-
case REACT_LAZY_TYPE:
|
|
136
|
-
return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (invokeCallback)
|
|
140
|
-
return callback = callback(children), invokeCallback = nameSoFar === "" ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", invokeCallback != null && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
141
|
-
return c;
|
|
142
|
-
})) : callback != null && (isValidElement(callback) && (callback = cloneAndReplaceKey(callback, escapedPrefix + (callback.key == null || children && children.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + invokeCallback)), array.push(callback)), 1;
|
|
143
|
-
invokeCallback = 0;
|
|
144
|
-
var nextNamePrefix = nameSoFar === "" ? "." : nameSoFar + ":";
|
|
145
|
-
if (isArrayImpl(children))
|
|
146
|
-
for (var i = 0;i < children.length; i++)
|
|
147
|
-
nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
148
|
-
else if (i = getIteratorFn(children), typeof i === "function")
|
|
149
|
-
for (children = i.call(children), i = 0;!(nameSoFar = children.next()).done; )
|
|
150
|
-
nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
151
|
-
else if (type === "object") {
|
|
152
|
-
if (typeof children.then === "function")
|
|
153
|
-
return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
|
|
154
|
-
throw array = String(children), Error("Objects are not valid as a React child (found: " + (array === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
|
155
|
-
}
|
|
156
|
-
return invokeCallback;
|
|
157
|
-
}
|
|
158
|
-
function mapChildren(children, func, context) {
|
|
159
|
-
if (children == null)
|
|
160
|
-
return children;
|
|
161
|
-
var result = [], count = 0;
|
|
162
|
-
return mapIntoArray(children, result, "", "", function(child) {
|
|
163
|
-
return func.call(context, child, count++);
|
|
164
|
-
}), result;
|
|
165
|
-
}
|
|
166
|
-
function lazyInitializer(payload) {
|
|
167
|
-
if (payload._status === -1) {
|
|
168
|
-
var ctor = payload._result, thenable = ctor();
|
|
169
|
-
thenable.then(function(moduleObject) {
|
|
170
|
-
if (payload._status === 0 || payload._status === -1)
|
|
171
|
-
payload._status = 1, payload._result = moduleObject, thenable.status === void 0 && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
172
|
-
}, function(error) {
|
|
173
|
-
if (payload._status === 0 || payload._status === -1)
|
|
174
|
-
payload._status = 2, payload._result = error, thenable.status === void 0 && (thenable.status = "rejected", thenable.reason = error);
|
|
175
|
-
}), payload._status === -1 && (payload._status = 0, payload._result = thenable);
|
|
176
|
-
}
|
|
177
|
-
if (payload._status === 1)
|
|
178
|
-
return payload._result.default;
|
|
179
|
-
throw payload._result;
|
|
180
|
-
}
|
|
181
|
-
var reportGlobalError = typeof reportError === "function" ? reportError : function(error) {
|
|
182
|
-
if (typeof window === "object" && typeof window.ErrorEvent === "function") {
|
|
183
|
-
var event = new window.ErrorEvent("error", {
|
|
184
|
-
bubbles: !0,
|
|
185
|
-
cancelable: !0,
|
|
186
|
-
message: typeof error === "object" && error !== null && typeof error.message === "string" ? String(error.message) : String(error),
|
|
187
|
-
error
|
|
188
|
-
});
|
|
189
|
-
if (!window.dispatchEvent(event))
|
|
190
|
-
return;
|
|
191
|
-
} else if (typeof process === "object" && typeof process.emit === "function") {
|
|
192
|
-
process.emit("uncaughtException", error);
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
console.error(error);
|
|
196
|
-
};
|
|
197
|
-
function startTransition(scope) {
|
|
198
|
-
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
199
|
-
currentTransition.types = prevTransition !== null ? prevTransition.types : null, ReactSharedInternals.T = currentTransition;
|
|
200
|
-
try {
|
|
201
|
-
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
202
|
-
onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue), typeof returnValue === "object" && returnValue !== null && typeof returnValue.then === "function" && returnValue.then(noop, reportGlobalError);
|
|
203
|
-
} catch (error) {
|
|
204
|
-
reportGlobalError(error);
|
|
205
|
-
} finally {
|
|
206
|
-
prevTransition !== null && currentTransition.types !== null && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
function addTransitionType(type) {
|
|
210
|
-
var transition = ReactSharedInternals.T;
|
|
211
|
-
if (transition !== null) {
|
|
212
|
-
var transitionTypes = transition.types;
|
|
213
|
-
transitionTypes === null ? transition.types = [type] : transitionTypes.indexOf(type) === -1 && transitionTypes.push(type);
|
|
214
|
-
} else
|
|
215
|
-
startTransition(addTransitionType.bind(null, type));
|
|
216
|
-
}
|
|
217
|
-
var Children = {
|
|
218
|
-
map: mapChildren,
|
|
219
|
-
forEach: function(children, forEachFunc, forEachContext) {
|
|
220
|
-
mapChildren(children, function() {
|
|
221
|
-
forEachFunc.apply(this, arguments);
|
|
222
|
-
}, forEachContext);
|
|
223
|
-
},
|
|
224
|
-
count: function(children) {
|
|
225
|
-
var n = 0;
|
|
226
|
-
return mapChildren(children, function() {
|
|
227
|
-
n++;
|
|
228
|
-
}), n;
|
|
229
|
-
},
|
|
230
|
-
toArray: function(children) {
|
|
231
|
-
return mapChildren(children, function(child) {
|
|
232
|
-
return child;
|
|
233
|
-
}) || [];
|
|
234
|
-
},
|
|
235
|
-
only: function(children) {
|
|
236
|
-
if (!isValidElement(children))
|
|
237
|
-
throw Error("React.Children.only expected to receive a single React element child.");
|
|
238
|
-
return children;
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
242
|
-
exports.Children = Children;
|
|
243
|
-
exports.Component = Component;
|
|
244
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
245
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
246
|
-
exports.PureComponent = PureComponent;
|
|
247
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
248
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
249
|
-
exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
|
|
250
|
-
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
251
|
-
exports.__COMPILER_RUNTIME = {
|
|
252
|
-
__proto__: null,
|
|
253
|
-
c: function(size) {
|
|
254
|
-
return ReactSharedInternals.H.useMemoCache(size);
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
exports.addTransitionType = addTransitionType;
|
|
258
|
-
exports.cache = function(fn) {
|
|
259
|
-
return function() {
|
|
260
|
-
return fn.apply(null, arguments);
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
exports.cacheSignal = function() {
|
|
264
|
-
return null;
|
|
265
|
-
};
|
|
266
|
-
exports.cloneElement = function(element, config, children) {
|
|
267
|
-
if (element === null || element === void 0)
|
|
268
|
-
throw Error("The argument must be a React element, but you passed " + element + ".");
|
|
269
|
-
var props = assign({}, element.props), key = element.key;
|
|
270
|
-
if (config != null)
|
|
271
|
-
for (propName in config.key !== void 0 && (key = "" + config.key), config)
|
|
272
|
-
!hasOwnProperty.call(config, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config.ref === void 0 || (props[propName] = config[propName]);
|
|
273
|
-
var propName = arguments.length - 2;
|
|
274
|
-
if (propName === 1)
|
|
275
|
-
props.children = children;
|
|
276
|
-
else if (1 < propName) {
|
|
277
|
-
for (var childArray = Array(propName), i = 0;i < propName; i++)
|
|
278
|
-
childArray[i] = arguments[i + 2];
|
|
279
|
-
props.children = childArray;
|
|
280
|
-
}
|
|
281
|
-
return ReactElement(element.type, key, props);
|
|
282
|
-
};
|
|
283
|
-
exports.createContext = function(defaultValue) {
|
|
284
|
-
return defaultValue = {
|
|
285
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
286
|
-
_currentValue: defaultValue,
|
|
287
|
-
_currentValue2: defaultValue,
|
|
288
|
-
_threadCount: 0,
|
|
289
|
-
Provider: null,
|
|
290
|
-
Consumer: null
|
|
291
|
-
}, defaultValue.Provider = defaultValue, defaultValue.Consumer = {
|
|
292
|
-
$$typeof: REACT_CONSUMER_TYPE,
|
|
293
|
-
_context: defaultValue
|
|
294
|
-
}, defaultValue;
|
|
295
|
-
};
|
|
296
|
-
exports.createElement = function(type, config, children) {
|
|
297
|
-
var propName, props = {}, key = null;
|
|
298
|
-
if (config != null)
|
|
299
|
-
for (propName in config.key !== void 0 && (key = "" + config.key), config)
|
|
300
|
-
hasOwnProperty.call(config, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (props[propName] = config[propName]);
|
|
301
|
-
var childrenLength = arguments.length - 2;
|
|
302
|
-
if (childrenLength === 1)
|
|
303
|
-
props.children = children;
|
|
304
|
-
else if (1 < childrenLength) {
|
|
305
|
-
for (var childArray = Array(childrenLength), i = 0;i < childrenLength; i++)
|
|
306
|
-
childArray[i] = arguments[i + 2];
|
|
307
|
-
props.children = childArray;
|
|
308
|
-
}
|
|
309
|
-
if (type && type.defaultProps)
|
|
310
|
-
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
311
|
-
props[propName] === void 0 && (props[propName] = childrenLength[propName]);
|
|
312
|
-
return ReactElement(type, key, props);
|
|
313
|
-
};
|
|
314
|
-
exports.createRef = function() {
|
|
315
|
-
return { current: null };
|
|
316
|
-
};
|
|
317
|
-
exports.forwardRef = function(render) {
|
|
318
|
-
return { $$typeof: REACT_FORWARD_REF_TYPE, render };
|
|
319
|
-
};
|
|
320
|
-
exports.isValidElement = isValidElement;
|
|
321
|
-
exports.lazy = function(ctor) {
|
|
322
|
-
return {
|
|
323
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
324
|
-
_payload: { _status: -1, _result: ctor },
|
|
325
|
-
_init: lazyInitializer
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
exports.memo = function(type, compare) {
|
|
329
|
-
return {
|
|
330
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
331
|
-
type,
|
|
332
|
-
compare: compare === void 0 ? null : compare
|
|
333
|
-
};
|
|
334
|
-
};
|
|
335
|
-
exports.startTransition = startTransition;
|
|
336
|
-
exports.unstable_useCacheRefresh = function() {
|
|
337
|
-
return ReactSharedInternals.H.useCacheRefresh();
|
|
338
|
-
};
|
|
339
|
-
exports.use = function(usable) {
|
|
340
|
-
return ReactSharedInternals.H.use(usable);
|
|
341
|
-
};
|
|
342
|
-
exports.useActionState = function(action, initialState, permalink) {
|
|
343
|
-
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
344
|
-
};
|
|
345
|
-
exports.useCallback = function(callback, deps) {
|
|
346
|
-
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
347
|
-
};
|
|
348
|
-
exports.useContext = function(Context) {
|
|
349
|
-
return ReactSharedInternals.H.useContext(Context);
|
|
350
|
-
};
|
|
351
|
-
exports.useDebugValue = function() {};
|
|
352
|
-
exports.useDeferredValue = function(value, initialValue) {
|
|
353
|
-
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
354
|
-
};
|
|
355
|
-
exports.useEffect = function(create, deps) {
|
|
356
|
-
return ReactSharedInternals.H.useEffect(create, deps);
|
|
357
|
-
};
|
|
358
|
-
exports.useEffectEvent = function(callback) {
|
|
359
|
-
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
360
|
-
};
|
|
361
|
-
exports.useId = function() {
|
|
362
|
-
return ReactSharedInternals.H.useId();
|
|
363
|
-
};
|
|
364
|
-
exports.useImperativeHandle = function(ref, create, deps) {
|
|
365
|
-
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
366
|
-
};
|
|
367
|
-
exports.useInsertionEffect = function(create, deps) {
|
|
368
|
-
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
369
|
-
};
|
|
370
|
-
exports.useLayoutEffect = function(create, deps) {
|
|
371
|
-
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
372
|
-
};
|
|
373
|
-
exports.useMemo = function(create, deps) {
|
|
374
|
-
return ReactSharedInternals.H.useMemo(create, deps);
|
|
375
|
-
};
|
|
376
|
-
exports.useOptimistic = function(passthrough, reducer) {
|
|
377
|
-
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
378
|
-
};
|
|
379
|
-
exports.useReducer = function(reducer, initialArg, init) {
|
|
380
|
-
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
381
|
-
};
|
|
382
|
-
exports.useRef = function(initialValue) {
|
|
383
|
-
return ReactSharedInternals.H.useRef(initialValue);
|
|
384
|
-
};
|
|
385
|
-
exports.useState = function(initialState) {
|
|
386
|
-
return ReactSharedInternals.H.useState(initialState);
|
|
387
|
-
};
|
|
388
|
-
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
389
|
-
return ReactSharedInternals.H.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
390
|
-
};
|
|
391
|
-
exports.useTransition = function() {
|
|
392
|
-
return ReactSharedInternals.H.useTransition();
|
|
393
|
-
};
|
|
394
|
-
exports.version = "19.3.1";
|
|
144
|
+
ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
145
|
+
$PureComponent = PureComponent, $__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
395
146
|
});
|
|
396
147
|
|
|
397
148
|
// ../../node_modules/.bun/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
398
|
-
var require_signals = __commonJS((exports, module)
|
|
149
|
+
var require_signals = __commonJS(function(exports, module) {
|
|
399
150
|
module.exports = [
|
|
400
151
|
"SIGABRT",
|
|
401
152
|
"SIGALRM",
|
|
@@ -410,21 +161,21 @@ var require_signals = __commonJS((exports, module) => {
|
|
|
410
161
|
});
|
|
411
162
|
|
|
412
163
|
// ../../node_modules/.bun/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
413
|
-
var require_signal_exit = __commonJS((exports, module)
|
|
414
|
-
var
|
|
415
|
-
return
|
|
164
|
+
var require_signal_exit = __commonJS(function(exports, module) {
|
|
165
|
+
var process2 = global.process, processOk = function(process2) {
|
|
166
|
+
return process2 && typeof process2 === "object" && typeof process2.removeListener === "function" && typeof process2.emit === "function" && typeof process2.reallyExit === "function" && typeof process2.listeners === "function" && typeof process2.kill === "function" && typeof process2.pid === "number" && typeof process2.on === "function";
|
|
416
167
|
};
|
|
417
|
-
if (!processOk(
|
|
168
|
+
if (!processOk(process2))
|
|
418
169
|
module.exports = function() {
|
|
419
170
|
return function() {};
|
|
420
171
|
};
|
|
421
172
|
else {
|
|
422
|
-
if (assert = __require("assert"), signals = require_signals(), isWin = /^win/i.test(
|
|
173
|
+
if (assert = __require("assert"), signals = require_signals(), isWin = /^win/i.test(process2.platform), EE = __require("events"), typeof EE !== "function")
|
|
423
174
|
EE = EE.EventEmitter;
|
|
424
|
-
if (
|
|
425
|
-
emitter =
|
|
175
|
+
if (process2.__signal_exit_emitter__)
|
|
176
|
+
emitter = process2.__signal_exit_emitter__;
|
|
426
177
|
else
|
|
427
|
-
emitter =
|
|
178
|
+
emitter = process2.__signal_exit_emitter__ = new EE, emitter.count = 0, emitter.emitted = {};
|
|
428
179
|
if (!emitter.infinite)
|
|
429
180
|
emitter.setMaxListeners(1 / 0), emitter.infinite = !0;
|
|
430
181
|
module.exports = function(cb, opts) {
|
|
@@ -445,9 +196,9 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
445
196
|
return;
|
|
446
197
|
loaded = !1, signals.forEach(function(sig) {
|
|
447
198
|
try {
|
|
448
|
-
|
|
199
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
449
200
|
} catch (er) {}
|
|
450
|
-
}),
|
|
201
|
+
}), process2.emit = originalProcessEmit, process2.reallyExit = originalProcessReallyExit, emitter.count -= 1;
|
|
451
202
|
}, module.exports.unload = unload, emit = function(event, code, signal) {
|
|
452
203
|
if (emitter.emitted[event])
|
|
453
204
|
return;
|
|
@@ -456,11 +207,11 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
456
207
|
sigListeners[sig] = function() {
|
|
457
208
|
if (!processOk(global.process))
|
|
458
209
|
return;
|
|
459
|
-
var listeners =
|
|
210
|
+
var listeners = process2.listeners(sig);
|
|
460
211
|
if (listeners.length === emitter.count) {
|
|
461
212
|
if (unload(), emit("exit", null, sig), emit("afterexit", null, sig), isWin && sig === "SIGHUP")
|
|
462
213
|
sig = "SIGINT";
|
|
463
|
-
|
|
214
|
+
process2.kill(process2.pid, sig);
|
|
464
215
|
}
|
|
465
216
|
};
|
|
466
217
|
}), module.exports.signals = function() {
|
|
@@ -470,21 +221,21 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
470
221
|
return;
|
|
471
222
|
loaded = !0, emitter.count += 1, signals = signals.filter(function(sig) {
|
|
472
223
|
try {
|
|
473
|
-
return
|
|
224
|
+
return process2.on(sig, sigListeners[sig]), !0;
|
|
474
225
|
} catch (er) {
|
|
475
226
|
return !1;
|
|
476
227
|
}
|
|
477
|
-
}),
|
|
478
|
-
}, module.exports.load = load, originalProcessReallyExit =
|
|
228
|
+
}), process2.emit = processEmit, process2.reallyExit = processReallyExit;
|
|
229
|
+
}, module.exports.load = load, originalProcessReallyExit = process2.reallyExit, processReallyExit = function(code) {
|
|
479
230
|
if (!processOk(global.process))
|
|
480
231
|
return;
|
|
481
|
-
|
|
482
|
-
}, originalProcessEmit =
|
|
232
|
+
process2.exitCode = code || 0, emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), originalProcessReallyExit.call(process2, process2.exitCode);
|
|
233
|
+
}, originalProcessEmit = process2.emit, processEmit = function(ev, arg) {
|
|
483
234
|
if (ev === "exit" && processOk(global.process)) {
|
|
484
235
|
if (arg !== void 0)
|
|
485
|
-
|
|
236
|
+
process2.exitCode = arg;
|
|
486
237
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
487
|
-
return emit("exit",
|
|
238
|
+
return emit("exit", process2.exitCode, null), emit("afterexit", process2.exitCode, null), ret;
|
|
488
239
|
} else
|
|
489
240
|
return originalProcessEmit.apply(this, arguments);
|
|
490
241
|
};
|
|
@@ -493,6 +244,42 @@ var require_signal_exit = __commonJS((exports, module) => {
|
|
|
493
244
|
});
|
|
494
245
|
|
|
495
246
|
// ../../node_modules/.bun/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js
|
|
247
|
+
var exports_scheduler_production = {};
|
|
248
|
+
__exportCjs(exports_scheduler_production, {
|
|
249
|
+
unstable_now: () => $unstable_now,
|
|
250
|
+
unstable_IdlePriority: () => $unstable_IdlePriority,
|
|
251
|
+
unstable_ImmediatePriority: () => $unstable_ImmediatePriority,
|
|
252
|
+
unstable_LowPriority: () => $unstable_LowPriority,
|
|
253
|
+
unstable_NormalPriority: () => $unstable_NormalPriority,
|
|
254
|
+
unstable_Profiling: () => $unstable_Profiling,
|
|
255
|
+
unstable_UserBlockingPriority: () => $unstable_UserBlockingPriority,
|
|
256
|
+
unstable_cancelCallback: () => $unstable_cancelCallback,
|
|
257
|
+
unstable_forceFrameRate: () => $unstable_forceFrameRate,
|
|
258
|
+
unstable_getCurrentPriorityLevel: () => $unstable_getCurrentPriorityLevel,
|
|
259
|
+
unstable_next: () => $unstable_next,
|
|
260
|
+
unstable_requestPaint: () => $unstable_requestPaint,
|
|
261
|
+
unstable_runWithPriority: () => $unstable_runWithPriority,
|
|
262
|
+
unstable_scheduleCallback: () => $unstable_scheduleCallback,
|
|
263
|
+
unstable_shouldYield: () => $unstable_shouldYield,
|
|
264
|
+
unstable_wrapCallback: () => $unstable_wrapCallback
|
|
265
|
+
}, {
|
|
266
|
+
unstable_now: (value) => $unstable_now = value,
|
|
267
|
+
unstable_IdlePriority: (value) => $unstable_IdlePriority = value,
|
|
268
|
+
unstable_ImmediatePriority: (value) => $unstable_ImmediatePriority = value,
|
|
269
|
+
unstable_LowPriority: (value) => $unstable_LowPriority = value,
|
|
270
|
+
unstable_NormalPriority: (value) => $unstable_NormalPriority = value,
|
|
271
|
+
unstable_Profiling: (value) => $unstable_Profiling = value,
|
|
272
|
+
unstable_UserBlockingPriority: (value) => $unstable_UserBlockingPriority = value,
|
|
273
|
+
unstable_cancelCallback: (value) => $unstable_cancelCallback = value,
|
|
274
|
+
unstable_forceFrameRate: (value) => $unstable_forceFrameRate = value,
|
|
275
|
+
unstable_getCurrentPriorityLevel: (value) => $unstable_getCurrentPriorityLevel = value,
|
|
276
|
+
unstable_next: (value) => $unstable_next = value,
|
|
277
|
+
unstable_requestPaint: (value) => $unstable_requestPaint = value,
|
|
278
|
+
unstable_runWithPriority: (value) => $unstable_runWithPriority = value,
|
|
279
|
+
unstable_scheduleCallback: (value) => $unstable_scheduleCallback = value,
|
|
280
|
+
unstable_shouldYield: (value) => $unstable_shouldYield = value,
|
|
281
|
+
unstable_wrapCallback: (value) => $unstable_wrapCallback = value
|
|
282
|
+
});
|
|
496
283
|
function push(heap, node) {
|
|
497
284
|
var index = heap.length;
|
|
498
285
|
heap.push(node);
|
|
@@ -552,11 +339,11 @@ function handleTimeout(currentTime) {
|
|
|
552
339
|
}
|
|
553
340
|
}
|
|
554
341
|
function shouldYieldToHost() {
|
|
555
|
-
return needsPaint ? !0 :
|
|
342
|
+
return needsPaint ? !0 : exports_scheduler_production.unstable_now() - startTime < frameInterval ? !1 : !0;
|
|
556
343
|
}
|
|
557
344
|
function performWorkUntilDeadline() {
|
|
558
345
|
if (needsPaint = !1, isMessageLoopRunning) {
|
|
559
|
-
var currentTime =
|
|
346
|
+
var currentTime = exports_scheduler_production.unstable_now();
|
|
560
347
|
startTime = currentTime;
|
|
561
348
|
var hasMoreWork = !0;
|
|
562
349
|
try {
|
|
@@ -571,7 +358,7 @@ function performWorkUntilDeadline() {
|
|
|
571
358
|
if (typeof callback === "function") {
|
|
572
359
|
currentTask.callback = null, currentPriorityLevel = currentTask.priorityLevel;
|
|
573
360
|
var continuationCallback = callback(currentTask.expirationTime <= currentTime);
|
|
574
|
-
if (currentTime =
|
|
361
|
+
if (currentTime = exports_scheduler_production.unstable_now(), typeof continuationCallback === "function") {
|
|
575
362
|
currentTask.callback = continuationCallback, advanceTimers(currentTime), hasMoreWork = !0;
|
|
576
363
|
break b;
|
|
577
364
|
}
|
|
@@ -600,15 +387,54 @@ function performWorkUntilDeadline() {
|
|
|
600
387
|
}
|
|
601
388
|
function requestHostTimeout(callback, ms) {
|
|
602
389
|
taskTimeoutID = localSetTimeout(function() {
|
|
603
|
-
callback(
|
|
390
|
+
callback(exports_scheduler_production.unstable_now());
|
|
604
391
|
}, ms);
|
|
605
392
|
}
|
|
606
|
-
var $unstable_now = void 0, localPerformance, localDate, initialTime, taskQueue, timerQueue, taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1, needsPaint = !1, localSetTimeout, localClearTimeout, localSetImmediate, isMessageLoopRunning = !1, taskTimeoutID = -1, frameInterval = 5, startTime = -1, schedulePerformWorkUntilDeadline, channel, port, $unstable_IdlePriority = 5, $unstable_ImmediatePriority = 1, $unstable_NormalPriority = 3, $unstable_UserBlockingPriority = 2, $unstable_cancelCallback = function(task) {
|
|
393
|
+
var $unstable_now = void 0, localPerformance, localDate, initialTime, taskQueue, timerQueue, taskIdCounter = 1, currentTask = null, currentPriorityLevel = 3, isPerformingWork = !1, isHostCallbackScheduled = !1, isHostTimeoutScheduled = !1, needsPaint = !1, localSetTimeout, localClearTimeout, localSetImmediate, isMessageLoopRunning = !1, taskTimeoutID = -1, frameInterval = 5, startTime = -1, schedulePerformWorkUntilDeadline, channel, port, $unstable_IdlePriority = 5, $unstable_ImmediatePriority = 1, $unstable_LowPriority = 4, $unstable_NormalPriority = 3, $unstable_Profiling = null, $unstable_UserBlockingPriority = 2, $unstable_cancelCallback = function(task) {
|
|
607
394
|
task.callback = null;
|
|
395
|
+
}, $unstable_forceFrameRate = function(fps) {
|
|
396
|
+
0 > fps || 125 < fps ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : frameInterval = 0 < fps ? Math.floor(1000 / fps) : 5;
|
|
397
|
+
}, $unstable_getCurrentPriorityLevel = function() {
|
|
398
|
+
return currentPriorityLevel;
|
|
399
|
+
}, $unstable_next = function(eventHandler) {
|
|
400
|
+
switch (currentPriorityLevel) {
|
|
401
|
+
case 1:
|
|
402
|
+
case 2:
|
|
403
|
+
case 3:
|
|
404
|
+
var priorityLevel = 3;
|
|
405
|
+
break;
|
|
406
|
+
default:
|
|
407
|
+
priorityLevel = currentPriorityLevel;
|
|
408
|
+
}
|
|
409
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
410
|
+
currentPriorityLevel = priorityLevel;
|
|
411
|
+
try {
|
|
412
|
+
return eventHandler();
|
|
413
|
+
} finally {
|
|
414
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
415
|
+
}
|
|
608
416
|
}, $unstable_requestPaint = function() {
|
|
609
417
|
needsPaint = !0;
|
|
418
|
+
}, $unstable_runWithPriority = function(priorityLevel, eventHandler) {
|
|
419
|
+
switch (priorityLevel) {
|
|
420
|
+
case 1:
|
|
421
|
+
case 2:
|
|
422
|
+
case 3:
|
|
423
|
+
case 4:
|
|
424
|
+
case 5:
|
|
425
|
+
break;
|
|
426
|
+
default:
|
|
427
|
+
priorityLevel = 3;
|
|
428
|
+
}
|
|
429
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
430
|
+
currentPriorityLevel = priorityLevel;
|
|
431
|
+
try {
|
|
432
|
+
return eventHandler();
|
|
433
|
+
} finally {
|
|
434
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
435
|
+
}
|
|
610
436
|
}, $unstable_scheduleCallback = function(priorityLevel, callback, options) {
|
|
611
|
-
var currentTime =
|
|
437
|
+
var currentTime = exports_scheduler_production.unstable_now();
|
|
612
438
|
switch (typeof options === "object" && options !== null ? (options = options.delay, options = typeof options === "number" && 0 < options ? currentTime + options : currentTime) : options = currentTime, priorityLevel) {
|
|
613
439
|
case 1:
|
|
614
440
|
var timeout = -1;
|
|
@@ -633,7 +459,18 @@ var $unstable_now = void 0, localPerformance, localDate, initialTime, taskQueue,
|
|
|
633
459
|
expirationTime: timeout,
|
|
634
460
|
sortIndex: -1
|
|
635
461
|
}, options > currentTime ? (priorityLevel.sortIndex = options, push(timerQueue, priorityLevel), peek(taskQueue) === null && priorityLevel === peek(timerQueue) && (isHostTimeoutScheduled ? (localClearTimeout(taskTimeoutID), taskTimeoutID = -1) : isHostTimeoutScheduled = !0, requestHostTimeout(handleTimeout, options - currentTime))) : (priorityLevel.sortIndex = timeout, push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || (isHostCallbackScheduled = !0, isMessageLoopRunning || (isMessageLoopRunning = !0, schedulePerformWorkUntilDeadline()))), priorityLevel;
|
|
636
|
-
}, $unstable_shouldYield
|
|
462
|
+
}, $unstable_shouldYield, $unstable_wrapCallback = function(callback) {
|
|
463
|
+
var parentPriorityLevel = currentPriorityLevel;
|
|
464
|
+
return function() {
|
|
465
|
+
var previousPriorityLevel = currentPriorityLevel;
|
|
466
|
+
currentPriorityLevel = parentPriorityLevel;
|
|
467
|
+
try {
|
|
468
|
+
return callback.apply(this, arguments);
|
|
469
|
+
} finally {
|
|
470
|
+
currentPriorityLevel = previousPriorityLevel;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
};
|
|
637
474
|
var init_scheduler_production = __esm(() => {
|
|
638
475
|
if (typeof performance === "object" && typeof performance.now === "function")
|
|
639
476
|
localPerformance = performance, $unstable_now = function() {
|
|
@@ -660,9 +497,9 @@ var init_scheduler_production = __esm(() => {
|
|
|
660
497
|
});
|
|
661
498
|
|
|
662
499
|
// ../../node_modules/.bun/react-reconciler@0.33.0+0441d6f8f57aca1e/node_modules/react-reconciler/cjs/react-reconciler.production.js
|
|
663
|
-
var require_react_reconciler_production = __commonJS((exports, module)
|
|
500
|
+
var require_react_reconciler_production = __commonJS(function(exports, module) {
|
|
501
|
+
init_react_production();
|
|
664
502
|
init_scheduler_production();
|
|
665
|
-
var React = __toESM(require_react_production());
|
|
666
503
|
module.exports = function($$$config) {
|
|
667
504
|
function createFiber(tag, pendingProps, key, mode) {
|
|
668
505
|
return new FiberNode(tag, pendingProps, key, mode);
|
|
@@ -832,10 +669,10 @@ var require_react_reconciler_production = __commonJS((exports, module) => {
|
|
|
832
669
|
function createCursor(defaultValue) {
|
|
833
670
|
return { current: defaultValue };
|
|
834
671
|
}
|
|
835
|
-
function
|
|
672
|
+
function pop(cursor) {
|
|
836
673
|
0 > index$jscomp$0 || (cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, index$jscomp$0--);
|
|
837
674
|
}
|
|
838
|
-
function
|
|
675
|
+
function push(cursor, value) {
|
|
839
676
|
index$jscomp$0++, valueStack[index$jscomp$0] = cursor.current, cursor.current = value;
|
|
840
677
|
}
|
|
841
678
|
function clz32Fallback(x) {
|
|
@@ -906,8 +743,8 @@ var require_react_reconciler_production = __commonJS((exports, module) => {
|
|
|
906
743
|
var nonIdlePendingLanes = pendingLanes & 134217727;
|
|
907
744
|
return nonIdlePendingLanes !== 0 ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, pendingLanes !== 0 ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, pingedLanes !== 0 ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root, rootHasPendingCommit !== 0 && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, nonIdlePendingLanes !== 0 ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : pingedLanes !== 0 ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root, rootHasPendingCommit !== 0 && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))), nextLanes === 0 ? 0 : wipLanes !== 0 && wipLanes !== nextLanes && (wipLanes & suspendedLanes) === 0 && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || suspendedLanes === 32 && (rootHasPendingCommit & 4194048) !== 0) ? wipLanes : nextLanes;
|
|
908
745
|
}
|
|
909
|
-
function checkIfRootIsPrerendering(root,
|
|
910
|
-
return (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) &
|
|
746
|
+
function checkIfRootIsPrerendering(root, renderLanes) {
|
|
747
|
+
return (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & renderLanes) === 0;
|
|
911
748
|
}
|
|
912
749
|
function computeExpirationTime(lane, currentTime) {
|
|
913
750
|
switch (lane) {
|
|
@@ -991,9 +828,9 @@ var require_react_reconciler_production = __commonJS((exports, module) => {
|
|
|
991
828
|
lane & entangledLanes | root[index$6] & entangledLanes && (root[index$6] |= entangledLanes), rootEntangledLanes &= ~lane;
|
|
992
829
|
}
|
|
993
830
|
}
|
|
994
|
-
function getBumpedLaneForHydration(root,
|
|
995
|
-
var renderLane =
|
|
996
|
-
return renderLane = (renderLane & 42) !== 0 ? 1 : getBumpedLaneForHydrationByLane(renderLane), (renderLane & (root.suspendedLanes |
|
|
831
|
+
function getBumpedLaneForHydration(root, renderLanes) {
|
|
832
|
+
var renderLane = renderLanes & -renderLanes;
|
|
833
|
+
return renderLane = (renderLane & 42) !== 0 ? 1 : getBumpedLaneForHydrationByLane(renderLane), (renderLane & (root.suspendedLanes | renderLanes)) !== 0 ? 0 : renderLane;
|
|
997
834
|
}
|
|
998
835
|
function getBumpedLaneForHydrationByLane(lane) {
|
|
999
836
|
switch (lane) {
|
|
@@ -1164,12 +1001,12 @@ var require_react_reconciler_production = __commonJS((exports, module) => {
|
|
|
1164
1001
|
return "";
|
|
1165
1002
|
}
|
|
1166
1003
|
}
|
|
1167
|
-
function getStackByFiberInDevAndProd(
|
|
1004
|
+
function getStackByFiberInDevAndProd(workInProgress) {
|
|
1168
1005
|
try {
|
|
1169
1006
|
var info = "", previous = null;
|
|
1170
1007
|
do
|
|
1171
|
-
info += describeFiber(
|
|
1172
|
-
while (
|
|
1008
|
+
info += describeFiber(workInProgress, previous), previous = workInProgress, workInProgress = workInProgress.return;
|
|
1009
|
+
while (workInProgress);
|
|
1173
1010
|
return info;
|
|
1174
1011
|
} catch (x) {
|
|
1175
1012
|
return `
|
|
@@ -1194,47 +1031,47 @@ Error generating stack: ` + x.message + `
|
|
|
1194
1031
|
stack: getStackByFiberInDevAndProd(source)
|
|
1195
1032
|
};
|
|
1196
1033
|
}
|
|
1197
|
-
function pushTreeFork(
|
|
1198
|
-
forkStack[forkStackIndex++] = treeForkCount, forkStack[forkStackIndex++] = treeForkProvider, treeForkProvider =
|
|
1034
|
+
function pushTreeFork(workInProgress, totalChildren) {
|
|
1035
|
+
forkStack[forkStackIndex++] = treeForkCount, forkStack[forkStackIndex++] = treeForkProvider, treeForkProvider = workInProgress, treeForkCount = totalChildren;
|
|
1199
1036
|
}
|
|
1200
|
-
function pushTreeId(
|
|
1201
|
-
idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextProvider =
|
|
1037
|
+
function pushTreeId(workInProgress, totalChildren, index) {
|
|
1038
|
+
idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextProvider = workInProgress;
|
|
1202
1039
|
var baseIdWithLeadingBit = treeContextId;
|
|
1203
|
-
|
|
1040
|
+
workInProgress = treeContextOverflow;
|
|
1204
1041
|
var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
|
|
1205
1042
|
baseIdWithLeadingBit &= ~(1 << baseLength), index += 1;
|
|
1206
1043
|
var length = 32 - clz32(totalChildren) + baseLength;
|
|
1207
1044
|
if (30 < length) {
|
|
1208
1045
|
var numberOfOverflowBits = baseLength - baseLength % 5;
|
|
1209
|
-
length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32), baseIdWithLeadingBit >>= numberOfOverflowBits, baseLength -= numberOfOverflowBits, treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = length +
|
|
1046
|
+
length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32), baseIdWithLeadingBit >>= numberOfOverflowBits, baseLength -= numberOfOverflowBits, treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = length + workInProgress;
|
|
1210
1047
|
} else
|
|
1211
|
-
treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow =
|
|
1048
|
+
treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress;
|
|
1212
1049
|
}
|
|
1213
|
-
function pushMaterializedTreeId(
|
|
1214
|
-
|
|
1050
|
+
function pushMaterializedTreeId(workInProgress) {
|
|
1051
|
+
workInProgress.return !== null && (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
|
|
1215
1052
|
}
|
|
1216
|
-
function popTreeContext(
|
|
1217
|
-
for (;
|
|
1053
|
+
function popTreeContext(workInProgress) {
|
|
1054
|
+
for (;workInProgress === treeForkProvider; )
|
|
1218
1055
|
treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
|
|
1219
|
-
for (;
|
|
1056
|
+
for (;workInProgress === treeContextProvider; )
|
|
1220
1057
|
treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
|
|
1221
1058
|
}
|
|
1222
|
-
function restoreSuspendedTreeContext(
|
|
1223
|
-
idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = suspendedContext.id, treeContextOverflow = suspendedContext.overflow, treeContextProvider =
|
|
1059
|
+
function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
|
|
1060
|
+
idStack[idStackIndex++] = treeContextId, idStack[idStackIndex++] = treeContextOverflow, idStack[idStackIndex++] = treeContextProvider, treeContextId = suspendedContext.id, treeContextOverflow = suspendedContext.overflow, treeContextProvider = workInProgress;
|
|
1224
1061
|
}
|
|
1225
1062
|
function pushHostContainer(fiber, nextRootInstance) {
|
|
1226
|
-
|
|
1063
|
+
push(rootInstanceStackCursor, nextRootInstance), push(contextFiberStackCursor, fiber), push(contextStackCursor, null), fiber = getRootHostContext(nextRootInstance), pop(contextStackCursor), push(contextStackCursor, fiber);
|
|
1227
1064
|
}
|
|
1228
1065
|
function popHostContainer() {
|
|
1229
|
-
|
|
1066
|
+
pop(contextStackCursor), pop(contextFiberStackCursor), pop(rootInstanceStackCursor);
|
|
1230
1067
|
}
|
|
1231
1068
|
function pushHostContext(fiber) {
|
|
1232
|
-
fiber.memoizedState !== null &&
|
|
1069
|
+
fiber.memoizedState !== null && push(hostTransitionProviderCursor, fiber);
|
|
1233
1070
|
var context = contextStackCursor.current, nextContext = getChildHostContext(context, fiber.type);
|
|
1234
|
-
context !== nextContext && (
|
|
1071
|
+
context !== nextContext && (push(contextFiberStackCursor, fiber), push(contextStackCursor, nextContext));
|
|
1235
1072
|
}
|
|
1236
1073
|
function popHostContext(fiber) {
|
|
1237
|
-
contextFiberStackCursor.current === fiber && (
|
|
1074
|
+
contextFiberStackCursor.current === fiber && (pop(contextStackCursor), pop(contextFiberStackCursor)), hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), isPrimaryRenderer ? HostTransitionContext._currentValue = NotPendingTransition : HostTransitionContext._currentValue2 = NotPendingTransition);
|
|
1238
1075
|
}
|
|
1239
1076
|
function throwOnHydrationMismatch(fiber) {
|
|
1240
1077
|
var error = Error(formatProdErrorMessage(418, 1 < arguments.length && arguments[1] !== void 0 && arguments[1] ? "text" : "HTML", ""));
|
|
@@ -1292,23 +1129,23 @@ Error generating stack: ` + x.message + `
|
|
|
1292
1129
|
hydrationErrors === null ? hydrationErrors = [error] : hydrationErrors.push(error);
|
|
1293
1130
|
}
|
|
1294
1131
|
function pushProvider(providerFiber, context, nextValue) {
|
|
1295
|
-
isPrimaryRenderer ? (
|
|
1132
|
+
isPrimaryRenderer ? (push(valueCursor, context._currentValue), context._currentValue = nextValue) : (push(valueCursor, context._currentValue2), context._currentValue2 = nextValue);
|
|
1296
1133
|
}
|
|
1297
1134
|
function popProvider(context) {
|
|
1298
1135
|
var currentValue = valueCursor.current;
|
|
1299
|
-
isPrimaryRenderer ? context._currentValue = currentValue : context._currentValue2 = currentValue,
|
|
1136
|
+
isPrimaryRenderer ? context._currentValue = currentValue : context._currentValue2 = currentValue, pop(valueCursor);
|
|
1300
1137
|
}
|
|
1301
|
-
function scheduleContextWorkOnParentPath(parent,
|
|
1138
|
+
function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
|
|
1302
1139
|
for (;parent !== null; ) {
|
|
1303
1140
|
var alternate = parent.alternate;
|
|
1304
|
-
if ((parent.childLanes &
|
|
1141
|
+
if ((parent.childLanes & renderLanes) !== renderLanes ? (parent.childLanes |= renderLanes, alternate !== null && (alternate.childLanes |= renderLanes)) : alternate !== null && (alternate.childLanes & renderLanes) !== renderLanes && (alternate.childLanes |= renderLanes), parent === propagationRoot)
|
|
1305
1142
|
break;
|
|
1306
1143
|
parent = parent.return;
|
|
1307
1144
|
}
|
|
1308
1145
|
}
|
|
1309
|
-
function propagateContextChanges(
|
|
1310
|
-
var fiber =
|
|
1311
|
-
fiber !== null && (fiber.return =
|
|
1146
|
+
function propagateContextChanges(workInProgress, contexts, renderLanes, forcePropagateEntireTree) {
|
|
1147
|
+
var fiber = workInProgress.child;
|
|
1148
|
+
fiber !== null && (fiber.return = workInProgress);
|
|
1312
1149
|
for (;fiber !== null; ) {
|
|
1313
1150
|
var list = fiber.dependencies;
|
|
1314
1151
|
if (list !== null) {
|
|
@@ -1320,7 +1157,7 @@ Error generating stack: ` + x.message + `
|
|
|
1320
1157
|
list = fiber;
|
|
1321
1158
|
for (var i = 0;i < contexts.length; i++)
|
|
1322
1159
|
if (dependency.context === contexts[i]) {
|
|
1323
|
-
list.lanes |=
|
|
1160
|
+
list.lanes |= renderLanes, dependency = list.alternate, dependency !== null && (dependency.lanes |= renderLanes), scheduleContextWorkOnParentPath(list.return, renderLanes, workInProgress), forcePropagateEntireTree || (nextFiber = null);
|
|
1324
1161
|
break a;
|
|
1325
1162
|
}
|
|
1326
1163
|
list = dependency.next;
|
|
@@ -1328,14 +1165,14 @@ Error generating stack: ` + x.message + `
|
|
|
1328
1165
|
} else if (fiber.tag === 18) {
|
|
1329
1166
|
if (nextFiber = fiber.return, nextFiber === null)
|
|
1330
1167
|
throw Error(formatProdErrorMessage(341));
|
|
1331
|
-
nextFiber.lanes |=
|
|
1168
|
+
nextFiber.lanes |= renderLanes, list = nextFiber.alternate, list !== null && (list.lanes |= renderLanes), scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress), nextFiber = null;
|
|
1332
1169
|
} else
|
|
1333
1170
|
nextFiber = fiber.child;
|
|
1334
1171
|
if (nextFiber !== null)
|
|
1335
1172
|
nextFiber.return = fiber;
|
|
1336
1173
|
else
|
|
1337
1174
|
for (nextFiber = fiber;nextFiber !== null; ) {
|
|
1338
|
-
if (nextFiber ===
|
|
1175
|
+
if (nextFiber === workInProgress) {
|
|
1339
1176
|
nextFiber = null;
|
|
1340
1177
|
break;
|
|
1341
1178
|
}
|
|
@@ -1348,9 +1185,9 @@ Error generating stack: ` + x.message + `
|
|
|
1348
1185
|
fiber = nextFiber;
|
|
1349
1186
|
}
|
|
1350
1187
|
}
|
|
1351
|
-
function propagateParentContextChanges(current,
|
|
1188
|
+
function propagateParentContextChanges(current, workInProgress, renderLanes, forcePropagateEntireTree) {
|
|
1352
1189
|
current = null;
|
|
1353
|
-
for (var parent =
|
|
1190
|
+
for (var parent = workInProgress, isInsidePropagationBailout = !1;parent !== null; ) {
|
|
1354
1191
|
if (!isInsidePropagationBailout) {
|
|
1355
1192
|
if ((parent.flags & 524288) !== 0)
|
|
1356
1193
|
isInsidePropagationBailout = !0;
|
|
@@ -1372,7 +1209,7 @@ Error generating stack: ` + x.message + `
|
|
|
1372
1209
|
}
|
|
1373
1210
|
parent = parent.return;
|
|
1374
1211
|
}
|
|
1375
|
-
current !== null && propagateContextChanges(
|
|
1212
|
+
current !== null && propagateContextChanges(workInProgress, current, renderLanes, forcePropagateEntireTree), workInProgress.flags |= 262144;
|
|
1376
1213
|
}
|
|
1377
1214
|
function checkIfContextChanged(currentDependencies) {
|
|
1378
1215
|
for (currentDependencies = currentDependencies.firstContext;currentDependencies !== null; ) {
|
|
@@ -1383,8 +1220,8 @@ Error generating stack: ` + x.message + `
|
|
|
1383
1220
|
}
|
|
1384
1221
|
return !1;
|
|
1385
1222
|
}
|
|
1386
|
-
function prepareToReadContext(
|
|
1387
|
-
currentlyRenderingFiber$1 =
|
|
1223
|
+
function prepareToReadContext(workInProgress) {
|
|
1224
|
+
currentlyRenderingFiber$1 = workInProgress, lastContextDependency = null, workInProgress = workInProgress.dependencies, workInProgress !== null && (workInProgress.firstContext = null);
|
|
1388
1225
|
}
|
|
1389
1226
|
function readContext(context) {
|
|
1390
1227
|
return readContextForConsumer(currentlyRenderingFiber$1, context);
|
|
@@ -1430,7 +1267,7 @@ Error generating stack: ` + x.message + `
|
|
|
1430
1267
|
if (pendingLanes === 0)
|
|
1431
1268
|
var JSCompiler_inline_result = 0;
|
|
1432
1269
|
else {
|
|
1433
|
-
var
|
|
1270
|
+
var suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes;
|
|
1434
1271
|
JSCompiler_inline_result = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1, JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes), JSCompiler_inline_result = JSCompiler_inline_result & 201326741 ? JSCompiler_inline_result & 201326741 | 1 : JSCompiler_inline_result ? JSCompiler_inline_result | 2 : 0;
|
|
1435
1272
|
}
|
|
1436
1273
|
JSCompiler_inline_result !== 0 && (didPerformSomeWork = !0, performSyncWorkOnRoot(root, JSCompiler_inline_result));
|
|
@@ -1566,7 +1403,7 @@ Error generating stack: ` + x.message + `
|
|
|
1566
1403
|
return cacheResumedFromPreviousRender !== null ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
|
|
1567
1404
|
}
|
|
1568
1405
|
function pushTransition(offscreenWorkInProgress, prevCachePool) {
|
|
1569
|
-
prevCachePool === null ?
|
|
1406
|
+
prevCachePool === null ? push(resumedCache, resumedCache.current) : push(resumedCache, prevCachePool.pool);
|
|
1570
1407
|
}
|
|
1571
1408
|
function getSuspendedCache() {
|
|
1572
1409
|
var cacheFromPool = peekCacheFromPool();
|
|
@@ -1593,19 +1430,19 @@ Error generating stack: ` + x.message + `
|
|
|
1593
1430
|
function isThenableResolved(thenable) {
|
|
1594
1431
|
return thenable = thenable.status, thenable === "fulfilled" || thenable === "rejected";
|
|
1595
1432
|
}
|
|
1596
|
-
function trackUsedThenable(
|
|
1597
|
-
switch (index =
|
|
1433
|
+
function trackUsedThenable(thenableState, thenable, index) {
|
|
1434
|
+
switch (index = thenableState[index], index === void 0 ? thenableState.push(thenable) : index !== thenable && (thenable.then(noop$1, noop$1), thenable = index), thenable.status) {
|
|
1598
1435
|
case "fulfilled":
|
|
1599
1436
|
return thenable.value;
|
|
1600
1437
|
case "rejected":
|
|
1601
|
-
throw
|
|
1438
|
+
throw thenableState = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState), thenableState;
|
|
1602
1439
|
default:
|
|
1603
1440
|
if (typeof thenable.status === "string")
|
|
1604
1441
|
thenable.then(noop$1, noop$1);
|
|
1605
1442
|
else {
|
|
1606
|
-
if (
|
|
1443
|
+
if (thenableState = workInProgressRoot, thenableState !== null && 100 < thenableState.shellSuspendCounter)
|
|
1607
1444
|
throw Error(formatProdErrorMessage(482));
|
|
1608
|
-
|
|
1445
|
+
thenableState = thenable, thenableState.status = "pending", thenableState.then(function(fulfilledValue) {
|
|
1609
1446
|
if (thenable.status === "pending") {
|
|
1610
1447
|
var fulfilledThenable = thenable;
|
|
1611
1448
|
fulfilledThenable.status = "fulfilled", fulfilledThenable.value = fulfilledValue;
|
|
@@ -1621,7 +1458,7 @@ Error generating stack: ` + x.message + `
|
|
|
1621
1458
|
case "fulfilled":
|
|
1622
1459
|
return thenable.value;
|
|
1623
1460
|
case "rejected":
|
|
1624
|
-
throw
|
|
1461
|
+
throw thenableState = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState), thenableState;
|
|
1625
1462
|
}
|
|
1626
1463
|
throw suspendedThenable = thenable, SuspenseException;
|
|
1627
1464
|
}
|
|
@@ -1650,8 +1487,8 @@ Error generating stack: ` + x.message + `
|
|
|
1650
1487
|
var index = thenableIndexCounter$1;
|
|
1651
1488
|
return thenableIndexCounter$1 += 1, thenableState$1 === null && (thenableState$1 = []), trackUsedThenable(thenableState$1, thenable, index);
|
|
1652
1489
|
}
|
|
1653
|
-
function coerceRef(
|
|
1654
|
-
element = element.props.ref,
|
|
1490
|
+
function coerceRef(workInProgress, element) {
|
|
1491
|
+
element = element.props.ref, workInProgress.ref = element !== void 0 ? element : null;
|
|
1655
1492
|
}
|
|
1656
1493
|
function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
|
|
1657
1494
|
if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
|
|
@@ -1951,8 +1788,8 @@ Error generating stack: ` + x.message + `
|
|
|
1951
1788
|
callbacks: null
|
|
1952
1789
|
};
|
|
1953
1790
|
}
|
|
1954
|
-
function cloneUpdateQueue(current,
|
|
1955
|
-
current = current.updateQueue,
|
|
1791
|
+
function cloneUpdateQueue(current, workInProgress) {
|
|
1792
|
+
current = current.updateQueue, workInProgress.updateQueue === current && (workInProgress.updateQueue = {
|
|
1956
1793
|
baseState: current.baseState,
|
|
1957
1794
|
firstBaseUpdate: current.firstBaseUpdate,
|
|
1958
1795
|
lastBaseUpdate: current.lastBaseUpdate,
|
|
@@ -1979,8 +1816,8 @@ Error generating stack: ` + x.message + `
|
|
|
1979
1816
|
queueLanes &= root.pendingLanes, lane |= queueLanes, fiber.lanes = lane, markRootEntangled(root, lane);
|
|
1980
1817
|
}
|
|
1981
1818
|
}
|
|
1982
|
-
function enqueueCapturedUpdate(
|
|
1983
|
-
var
|
|
1819
|
+
function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
|
|
1820
|
+
var queue = workInProgress.updateQueue, current = workInProgress.alternate;
|
|
1984
1821
|
if (current !== null && (current = current.updateQueue, queue === current)) {
|
|
1985
1822
|
var newFirst = null, newLast = null;
|
|
1986
1823
|
if (queue = queue.firstBaseUpdate, queue !== null) {
|
|
@@ -2003,10 +1840,10 @@ Error generating stack: ` + x.message + `
|
|
|
2003
1840
|
lastBaseUpdate: newLast,
|
|
2004
1841
|
shared: current.shared,
|
|
2005
1842
|
callbacks: current.callbacks
|
|
2006
|
-
},
|
|
1843
|
+
}, workInProgress.updateQueue = queue;
|
|
2007
1844
|
return;
|
|
2008
1845
|
}
|
|
2009
|
-
|
|
1846
|
+
workInProgress = queue.lastBaseUpdate, workInProgress === null ? queue.firstBaseUpdate = capturedUpdate : workInProgress.next = capturedUpdate, queue.lastBaseUpdate = capturedUpdate;
|
|
2010
1847
|
}
|
|
2011
1848
|
function suspendIfUpdateReadFromEntangledAsyncAction() {
|
|
2012
1849
|
if (didReadFromEntangledAsyncAction) {
|
|
@@ -2015,7 +1852,7 @@ Error generating stack: ` + x.message + `
|
|
|
2015
1852
|
throw entangledActionThenable;
|
|
2016
1853
|
}
|
|
2017
1854
|
}
|
|
2018
|
-
function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0,
|
|
1855
|
+
function processUpdateQueue(workInProgress$jscomp$0, props, instance$jscomp$0, renderLanes) {
|
|
2019
1856
|
didReadFromEntangledAsyncAction = !1;
|
|
2020
1857
|
var queue = workInProgress$jscomp$0.updateQueue;
|
|
2021
1858
|
hasForceUpdate = !1;
|
|
@@ -2032,7 +1869,7 @@ Error generating stack: ` + x.message + `
|
|
|
2032
1869
|
lastBaseUpdate = 0, current = firstPendingUpdate = lastPendingUpdate = null, pendingQueue = firstBaseUpdate;
|
|
2033
1870
|
do {
|
|
2034
1871
|
var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
|
|
2035
|
-
if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (
|
|
1872
|
+
if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
|
|
2036
1873
|
updateLane !== 0 && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = !0), current !== null && (current = current.next = {
|
|
2037
1874
|
lane: 0,
|
|
2038
1875
|
tag: pendingQueue.tag,
|
|
@@ -2041,21 +1878,21 @@ Error generating stack: ` + x.message + `
|
|
|
2041
1878
|
next: null
|
|
2042
1879
|
});
|
|
2043
1880
|
a: {
|
|
2044
|
-
var
|
|
1881
|
+
var workInProgress = workInProgress$jscomp$0, update = pendingQueue;
|
|
2045
1882
|
updateLane = props;
|
|
2046
1883
|
var instance = instance$jscomp$0;
|
|
2047
1884
|
switch (update.tag) {
|
|
2048
1885
|
case 1:
|
|
2049
|
-
if (
|
|
2050
|
-
newState =
|
|
1886
|
+
if (workInProgress = update.payload, typeof workInProgress === "function") {
|
|
1887
|
+
newState = workInProgress.call(instance, newState, updateLane);
|
|
2051
1888
|
break a;
|
|
2052
1889
|
}
|
|
2053
|
-
newState =
|
|
1890
|
+
newState = workInProgress;
|
|
2054
1891
|
break a;
|
|
2055
1892
|
case 3:
|
|
2056
|
-
|
|
1893
|
+
workInProgress.flags = workInProgress.flags & -65537 | 128;
|
|
2057
1894
|
case 0:
|
|
2058
|
-
if (
|
|
1895
|
+
if (workInProgress = update.payload, updateLane = typeof workInProgress === "function" ? workInProgress.call(instance, newState, updateLane) : workInProgress, updateLane === null || updateLane === void 0)
|
|
2059
1896
|
break a;
|
|
2060
1897
|
newState = assign({}, newState, updateLane);
|
|
2061
1898
|
break a;
|
|
@@ -2093,29 +1930,29 @@ Error generating stack: ` + x.message + `
|
|
|
2093
1930
|
callCallback(callbacks[updateQueue], context);
|
|
2094
1931
|
}
|
|
2095
1932
|
function pushHiddenContext(fiber, context) {
|
|
2096
|
-
fiber = entangledRenderLanes,
|
|
1933
|
+
fiber = entangledRenderLanes, push(prevEntangledRenderLanesCursor, fiber), push(currentTreeHiddenStackCursor, context), entangledRenderLanes = fiber | context.baseLanes;
|
|
2097
1934
|
}
|
|
2098
1935
|
function reuseHiddenContextOnStack() {
|
|
2099
|
-
|
|
1936
|
+
push(prevEntangledRenderLanesCursor, entangledRenderLanes), push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
|
|
2100
1937
|
}
|
|
2101
1938
|
function popHiddenContext() {
|
|
2102
|
-
entangledRenderLanes = prevEntangledRenderLanesCursor.current,
|
|
1939
|
+
entangledRenderLanes = prevEntangledRenderLanesCursor.current, pop(currentTreeHiddenStackCursor), pop(prevEntangledRenderLanesCursor);
|
|
2103
1940
|
}
|
|
2104
1941
|
function pushPrimaryTreeSuspenseHandler(handler) {
|
|
2105
1942
|
var current = handler.alternate;
|
|
2106
|
-
|
|
1943
|
+
push(suspenseStackCursor, suspenseStackCursor.current & 1), push(suspenseHandlerStackCursor, handler), shellBoundary === null && (current === null || currentTreeHiddenStackCursor.current !== null ? shellBoundary = handler : current.memoizedState !== null && (shellBoundary = handler));
|
|
2107
1944
|
}
|
|
2108
1945
|
function pushDehydratedActivitySuspenseHandler(fiber) {
|
|
2109
|
-
|
|
1946
|
+
push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), shellBoundary === null && (shellBoundary = fiber);
|
|
2110
1947
|
}
|
|
2111
1948
|
function pushOffscreenSuspenseHandler(fiber) {
|
|
2112
|
-
fiber.tag === 22 ? (
|
|
1949
|
+
fiber.tag === 22 ? (push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, fiber), shellBoundary === null && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
|
|
2113
1950
|
}
|
|
2114
1951
|
function reuseSuspenseHandlerOnStack() {
|
|
2115
|
-
|
|
1952
|
+
push(suspenseStackCursor, suspenseStackCursor.current), push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
|
|
2116
1953
|
}
|
|
2117
1954
|
function popSuspenseHandler(fiber) {
|
|
2118
|
-
|
|
1955
|
+
pop(suspenseHandlerStackCursor), shellBoundary === fiber && (shellBoundary = null), pop(suspenseStackCursor);
|
|
2119
1956
|
}
|
|
2120
1957
|
function findFirstSuspended(row) {
|
|
2121
1958
|
for (var node = row;node !== null; ) {
|
|
@@ -2152,8 +1989,8 @@ Error generating stack: ` + x.message + `
|
|
|
2152
1989
|
return !1;
|
|
2153
1990
|
return !0;
|
|
2154
1991
|
}
|
|
2155
|
-
function renderWithHooks(current,
|
|
2156
|
-
return renderLanes = nextRenderLanes, currentlyRenderingFiber =
|
|
1992
|
+
function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
|
|
1993
|
+
return renderLanes = nextRenderLanes, currentlyRenderingFiber = workInProgress, workInProgress.memoizedState = null, workInProgress.updateQueue = null, workInProgress.lanes = 0, ReactSharedInternals.H = current === null || current.memoizedState === null ? HooksDispatcherOnMount : HooksDispatcherOnUpdate, shouldDoubleInvokeUserFnsInHooksDEV = !1, nextRenderLanes = Component(props, secondArg), shouldDoubleInvokeUserFnsInHooksDEV = !1, didScheduleRenderPhaseUpdateDuringThisPass && (nextRenderLanes = renderWithHooksAgain(workInProgress, Component, props, secondArg)), finishRenderingHooks(current), nextRenderLanes;
|
|
2157
1994
|
}
|
|
2158
1995
|
function finishRenderingHooks(current) {
|
|
2159
1996
|
ReactSharedInternals.H = ContextOnlyDispatcher;
|
|
@@ -2162,14 +1999,14 @@ Error generating stack: ` + x.message + `
|
|
|
2162
1999
|
throw Error(formatProdErrorMessage(300));
|
|
2163
2000
|
current === null || didReceiveUpdate || (current = current.dependencies, current !== null && checkIfContextChanged(current) && (didReceiveUpdate = !0));
|
|
2164
2001
|
}
|
|
2165
|
-
function renderWithHooksAgain(
|
|
2166
|
-
currentlyRenderingFiber =
|
|
2002
|
+
function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
|
|
2003
|
+
currentlyRenderingFiber = workInProgress;
|
|
2167
2004
|
var numberOfReRenders = 0;
|
|
2168
2005
|
do {
|
|
2169
2006
|
if (didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null), thenableIndexCounter = 0, didScheduleRenderPhaseUpdateDuringThisPass = !1, 25 <= numberOfReRenders)
|
|
2170
2007
|
throw Error(formatProdErrorMessage(301));
|
|
2171
|
-
if (numberOfReRenders += 1, workInProgressHook = currentHook = null,
|
|
2172
|
-
var children =
|
|
2008
|
+
if (numberOfReRenders += 1, workInProgressHook = currentHook = null, workInProgress.updateQueue != null) {
|
|
2009
|
+
var children = workInProgress.updateQueue;
|
|
2173
2010
|
children.lastEffect = null, children.events = null, children.stores = null, children.memoCache != null && (children.memoCache.index = 0);
|
|
2174
2011
|
}
|
|
2175
2012
|
ReactSharedInternals.H = HooksDispatcherOnRerender, children = Component(props, secondArg);
|
|
@@ -2184,14 +2021,14 @@ Error generating stack: ` + x.message + `
|
|
|
2184
2021
|
var didRenderIdHook = localIdCounter !== 0;
|
|
2185
2022
|
return localIdCounter = 0, didRenderIdHook;
|
|
2186
2023
|
}
|
|
2187
|
-
function bailoutHooks(current,
|
|
2188
|
-
|
|
2024
|
+
function bailoutHooks(current, workInProgress, lanes) {
|
|
2025
|
+
workInProgress.updateQueue = current.updateQueue, workInProgress.flags &= -2053, current.lanes &= ~lanes;
|
|
2189
2026
|
}
|
|
2190
|
-
function resetHooksOnUnwind(
|
|
2027
|
+
function resetHooksOnUnwind(workInProgress) {
|
|
2191
2028
|
if (didScheduleRenderPhaseUpdate) {
|
|
2192
|
-
for (
|
|
2193
|
-
var queue =
|
|
2194
|
-
queue !== null && (queue.pending = null),
|
|
2029
|
+
for (workInProgress = workInProgress.memoizedState;workInProgress !== null; ) {
|
|
2030
|
+
var queue = workInProgress.queue;
|
|
2031
|
+
queue !== null && (queue.pending = null), workInProgress = workInProgress.next;
|
|
2195
2032
|
}
|
|
2196
2033
|
didScheduleRenderPhaseUpdate = !1;
|
|
2197
2034
|
}
|
|
@@ -2552,27 +2389,27 @@ Error generating stack: ` + x.message + `
|
|
|
2552
2389
|
var dispatch = currentStateHook.queue.dispatch;
|
|
2553
2390
|
return currentStateHook.memoizedState = action, [stateHook, dispatch, !1];
|
|
2554
2391
|
}
|
|
2555
|
-
function pushSimpleEffect(tag, inst,
|
|
2556
|
-
return tag = { tag, create
|
|
2392
|
+
function pushSimpleEffect(tag, inst, create, deps) {
|
|
2393
|
+
return tag = { tag, create, deps, inst, next: null }, inst = currentlyRenderingFiber.updateQueue, inst === null && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst), create = inst.lastEffect, create === null ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag), tag;
|
|
2557
2394
|
}
|
|
2558
2395
|
function updateRef() {
|
|
2559
2396
|
return updateWorkInProgressHook().memoizedState;
|
|
2560
2397
|
}
|
|
2561
|
-
function mountEffectImpl(fiberFlags, hookFlags,
|
|
2398
|
+
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
|
|
2562
2399
|
var hook = mountWorkInProgressHook();
|
|
2563
|
-
currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(1 | hookFlags, { destroy: void 0 },
|
|
2400
|
+
currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(1 | hookFlags, { destroy: void 0 }, create, deps === void 0 ? null : deps);
|
|
2564
2401
|
}
|
|
2565
|
-
function updateEffectImpl(fiberFlags, hookFlags,
|
|
2402
|
+
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
|
|
2566
2403
|
var hook = updateWorkInProgressHook();
|
|
2567
2404
|
deps = deps === void 0 ? null : deps;
|
|
2568
2405
|
var inst = hook.memoizedState.inst;
|
|
2569
|
-
currentHook !== null && deps !== null && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst,
|
|
2406
|
+
currentHook !== null && deps !== null && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(1 | hookFlags, inst, create, deps));
|
|
2570
2407
|
}
|
|
2571
|
-
function mountEffect(
|
|
2572
|
-
mountEffectImpl(8390656, 8,
|
|
2408
|
+
function mountEffect(create, deps) {
|
|
2409
|
+
mountEffectImpl(8390656, 8, create, deps);
|
|
2573
2410
|
}
|
|
2574
|
-
function updateEffect(
|
|
2575
|
-
updateEffectImpl(2048, 8,
|
|
2411
|
+
function updateEffect(create, deps) {
|
|
2412
|
+
updateEffectImpl(2048, 8, create, deps);
|
|
2576
2413
|
}
|
|
2577
2414
|
function useEffectEventImpl(payload) {
|
|
2578
2415
|
currentlyRenderingFiber.flags |= 4;
|
|
@@ -2592,27 +2429,27 @@ Error generating stack: ` + x.message + `
|
|
|
2592
2429
|
return ref.impl.apply(void 0, arguments);
|
|
2593
2430
|
};
|
|
2594
2431
|
}
|
|
2595
|
-
function updateInsertionEffect(
|
|
2596
|
-
return updateEffectImpl(4, 2,
|
|
2432
|
+
function updateInsertionEffect(create, deps) {
|
|
2433
|
+
return updateEffectImpl(4, 2, create, deps);
|
|
2597
2434
|
}
|
|
2598
|
-
function updateLayoutEffect(
|
|
2599
|
-
return updateEffectImpl(4, 4,
|
|
2435
|
+
function updateLayoutEffect(create, deps) {
|
|
2436
|
+
return updateEffectImpl(4, 4, create, deps);
|
|
2600
2437
|
}
|
|
2601
|
-
function imperativeHandleEffect(
|
|
2438
|
+
function imperativeHandleEffect(create, ref) {
|
|
2602
2439
|
if (typeof ref === "function") {
|
|
2603
|
-
|
|
2604
|
-
var refCleanup = ref(
|
|
2440
|
+
create = create();
|
|
2441
|
+
var refCleanup = ref(create);
|
|
2605
2442
|
return function() {
|
|
2606
2443
|
typeof refCleanup === "function" ? refCleanup() : ref(null);
|
|
2607
2444
|
};
|
|
2608
2445
|
}
|
|
2609
2446
|
if (ref !== null && ref !== void 0)
|
|
2610
|
-
return
|
|
2447
|
+
return create = create(), ref.current = create, function() {
|
|
2611
2448
|
ref.current = null;
|
|
2612
2449
|
};
|
|
2613
2450
|
}
|
|
2614
|
-
function updateImperativeHandle(ref,
|
|
2615
|
-
deps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null, updateEffectImpl(4, 4, imperativeHandleEffect.bind(null,
|
|
2451
|
+
function updateImperativeHandle(ref, create, deps) {
|
|
2452
|
+
deps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null, updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
|
|
2616
2453
|
}
|
|
2617
2454
|
function mountDebugValue() {}
|
|
2618
2455
|
function updateCallback(callback, deps) {
|
|
@@ -2797,14 +2634,14 @@ Error generating stack: ` + x.message + `
|
|
|
2797
2634
|
queueLanes &= root.pendingLanes, lane |= queueLanes, queue.lanes = lane, markRootEntangled(root, lane);
|
|
2798
2635
|
}
|
|
2799
2636
|
}
|
|
2800
|
-
function applyDerivedStateFromProps(
|
|
2801
|
-
ctor =
|
|
2637
|
+
function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
|
|
2638
|
+
ctor = workInProgress.memoizedState, getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor), getDerivedStateFromProps = getDerivedStateFromProps === null || getDerivedStateFromProps === void 0 ? ctor : assign({}, ctor, getDerivedStateFromProps), workInProgress.memoizedState = getDerivedStateFromProps, workInProgress.lanes === 0 && (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
|
|
2802
2639
|
}
|
|
2803
|
-
function checkShouldComponentUpdate(
|
|
2804
|
-
return
|
|
2640
|
+
function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
|
|
2641
|
+
return workInProgress = workInProgress.stateNode, typeof workInProgress.shouldComponentUpdate === "function" ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext) : ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0;
|
|
2805
2642
|
}
|
|
2806
|
-
function callComponentWillReceiveProps(
|
|
2807
|
-
|
|
2643
|
+
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
|
|
2644
|
+
workInProgress = instance.state, typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps(newProps, nextContext), typeof instance.UNSAFE_componentWillReceiveProps === "function" && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext), instance.state !== workInProgress && classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
|
2808
2645
|
}
|
|
2809
2646
|
function resolveClassComponentProps(Component, baseProps) {
|
|
2810
2647
|
var newProps = baseProps;
|
|
@@ -2908,278 +2745,278 @@ Error generating stack: ` + x.message + `
|
|
|
2908
2745
|
} while (sourceFiber !== null);
|
|
2909
2746
|
return !1;
|
|
2910
2747
|
}
|
|
2911
|
-
function reconcileChildren(current,
|
|
2912
|
-
|
|
2748
|
+
function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
|
|
2749
|
+
workInProgress.child = current === null ? mountChildFibers(workInProgress, null, nextChildren, renderLanes) : reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
|
|
2913
2750
|
}
|
|
2914
|
-
function updateForwardRef(current,
|
|
2751
|
+
function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
|
|
2915
2752
|
Component = Component.render;
|
|
2916
|
-
var ref =
|
|
2753
|
+
var ref = workInProgress.ref;
|
|
2917
2754
|
if ("ref" in nextProps) {
|
|
2918
2755
|
var propsWithoutRef = {};
|
|
2919
2756
|
for (var key in nextProps)
|
|
2920
2757
|
key !== "ref" && (propsWithoutRef[key] = nextProps[key]);
|
|
2921
2758
|
} else
|
|
2922
2759
|
propsWithoutRef = nextProps;
|
|
2923
|
-
if (prepareToReadContext(
|
|
2924
|
-
return bailoutHooks(current,
|
|
2925
|
-
return isHydrating && key && pushMaterializedTreeId(
|
|
2760
|
+
if (prepareToReadContext(workInProgress), nextProps = renderWithHooks(current, workInProgress, Component, propsWithoutRef, ref, renderLanes), key = checkDidRenderIdHook(), current !== null && !didReceiveUpdate)
|
|
2761
|
+
return bailoutHooks(current, workInProgress, renderLanes), bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
2762
|
+
return isHydrating && key && pushMaterializedTreeId(workInProgress), workInProgress.flags |= 1, reconcileChildren(current, workInProgress, nextProps, renderLanes), workInProgress.child;
|
|
2926
2763
|
}
|
|
2927
|
-
function updateMemoComponent(current,
|
|
2764
|
+
function updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
|
|
2928
2765
|
if (current === null) {
|
|
2929
2766
|
var type = Component.type;
|
|
2930
2767
|
if (typeof type === "function" && !shouldConstruct(type) && type.defaultProps === void 0 && Component.compare === null)
|
|
2931
|
-
return
|
|
2932
|
-
return current = createFiberFromTypeAndProps(Component.type, null, nextProps,
|
|
2768
|
+
return workInProgress.tag = 15, workInProgress.type = type, updateSimpleMemoComponent(current, workInProgress, type, nextProps, renderLanes);
|
|
2769
|
+
return current = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes), current.ref = workInProgress.ref, current.return = workInProgress, workInProgress.child = current;
|
|
2933
2770
|
}
|
|
2934
|
-
if (type = current.child, !checkScheduledUpdateOrContext(current,
|
|
2771
|
+
if (type = current.child, !checkScheduledUpdateOrContext(current, renderLanes)) {
|
|
2935
2772
|
var prevProps = type.memoizedProps;
|
|
2936
|
-
if (Component = Component.compare, Component = Component !== null ? Component : shallowEqual, Component(prevProps, nextProps) && current.ref ===
|
|
2937
|
-
return bailoutOnAlreadyFinishedWork(current,
|
|
2773
|
+
if (Component = Component.compare, Component = Component !== null ? Component : shallowEqual, Component(prevProps, nextProps) && current.ref === workInProgress.ref)
|
|
2774
|
+
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
2938
2775
|
}
|
|
2939
|
-
return
|
|
2776
|
+
return workInProgress.flags |= 1, current = createWorkInProgress(type, nextProps), current.ref = workInProgress.ref, current.return = workInProgress, workInProgress.child = current;
|
|
2940
2777
|
}
|
|
2941
|
-
function updateSimpleMemoComponent(current,
|
|
2778
|
+
function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {
|
|
2942
2779
|
if (current !== null) {
|
|
2943
2780
|
var prevProps = current.memoizedProps;
|
|
2944
|
-
if (shallowEqual(prevProps, nextProps) && current.ref ===
|
|
2945
|
-
if (didReceiveUpdate = !1,
|
|
2781
|
+
if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref)
|
|
2782
|
+
if (didReceiveUpdate = !1, workInProgress.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current, renderLanes))
|
|
2946
2783
|
(current.flags & 131072) !== 0 && (didReceiveUpdate = !0);
|
|
2947
2784
|
else
|
|
2948
|
-
return
|
|
2785
|
+
return workInProgress.lanes = current.lanes, bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
2949
2786
|
}
|
|
2950
|
-
return updateFunctionComponent(current,
|
|
2787
|
+
return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
|
|
2951
2788
|
}
|
|
2952
|
-
function updateOffscreenComponent(current,
|
|
2789
|
+
function updateOffscreenComponent(current, workInProgress, renderLanes, nextProps) {
|
|
2953
2790
|
var nextChildren = nextProps.children, prevState = current !== null ? current.memoizedState : null;
|
|
2954
|
-
if (current === null &&
|
|
2791
|
+
if (current === null && workInProgress.stateNode === null && (workInProgress.stateNode = {
|
|
2955
2792
|
_visibility: 1,
|
|
2956
2793
|
_pendingMarkers: null,
|
|
2957
2794
|
_retryCache: null,
|
|
2958
2795
|
_transitions: null
|
|
2959
2796
|
}), nextProps.mode === "hidden") {
|
|
2960
|
-
if ((
|
|
2961
|
-
if (prevState = prevState !== null ? prevState.baseLanes |
|
|
2962
|
-
nextProps =
|
|
2797
|
+
if ((workInProgress.flags & 128) !== 0) {
|
|
2798
|
+
if (prevState = prevState !== null ? prevState.baseLanes | renderLanes : renderLanes, current !== null) {
|
|
2799
|
+
nextProps = workInProgress.child = current.child;
|
|
2963
2800
|
for (nextChildren = 0;nextProps !== null; )
|
|
2964
2801
|
nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
|
|
2965
2802
|
nextProps = nextChildren & ~prevState;
|
|
2966
2803
|
} else
|
|
2967
|
-
nextProps = 0,
|
|
2968
|
-
return deferHiddenOffscreenComponent(current,
|
|
2804
|
+
nextProps = 0, workInProgress.child = null;
|
|
2805
|
+
return deferHiddenOffscreenComponent(current, workInProgress, prevState, renderLanes, nextProps);
|
|
2969
2806
|
}
|
|
2970
|
-
if ((
|
|
2971
|
-
|
|
2807
|
+
if ((renderLanes & 536870912) !== 0)
|
|
2808
|
+
workInProgress.memoizedState = { baseLanes: 0, cachePool: null }, current !== null && pushTransition(workInProgress, prevState !== null ? prevState.cachePool : null), prevState !== null ? pushHiddenContext(workInProgress, prevState) : reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress);
|
|
2972
2809
|
else
|
|
2973
|
-
return nextProps =
|
|
2810
|
+
return nextProps = workInProgress.lanes = 536870912, deferHiddenOffscreenComponent(current, workInProgress, prevState !== null ? prevState.baseLanes | renderLanes : renderLanes, renderLanes, nextProps);
|
|
2974
2811
|
} else
|
|
2975
|
-
prevState !== null ? (pushTransition(
|
|
2976
|
-
return reconcileChildren(current,
|
|
2812
|
+
prevState !== null ? (pushTransition(workInProgress, prevState.cachePool), pushHiddenContext(workInProgress, prevState), reuseSuspenseHandlerOnStack(workInProgress), workInProgress.memoizedState = null) : (current !== null && pushTransition(workInProgress, null), reuseHiddenContextOnStack(), reuseSuspenseHandlerOnStack(workInProgress));
|
|
2813
|
+
return reconcileChildren(current, workInProgress, nextChildren, renderLanes), workInProgress.child;
|
|
2977
2814
|
}
|
|
2978
|
-
function bailoutOffscreenComponent(current,
|
|
2979
|
-
return current !== null && current.tag === 22 ||
|
|
2815
|
+
function bailoutOffscreenComponent(current, workInProgress) {
|
|
2816
|
+
return current !== null && current.tag === 22 || workInProgress.stateNode !== null || (workInProgress.stateNode = {
|
|
2980
2817
|
_visibility: 1,
|
|
2981
2818
|
_pendingMarkers: null,
|
|
2982
2819
|
_retryCache: null,
|
|
2983
2820
|
_transitions: null
|
|
2984
|
-
}),
|
|
2821
|
+
}), workInProgress.sibling;
|
|
2985
2822
|
}
|
|
2986
|
-
function deferHiddenOffscreenComponent(current,
|
|
2823
|
+
function deferHiddenOffscreenComponent(current, workInProgress, nextBaseLanes, renderLanes, remainingChildLanes) {
|
|
2987
2824
|
var JSCompiler_inline_result = peekCacheFromPool();
|
|
2988
2825
|
return JSCompiler_inline_result = JSCompiler_inline_result === null ? null : {
|
|
2989
2826
|
parent: isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2,
|
|
2990
2827
|
pool: JSCompiler_inline_result
|
|
2991
|
-
},
|
|
2828
|
+
}, workInProgress.memoizedState = {
|
|
2992
2829
|
baseLanes: nextBaseLanes,
|
|
2993
2830
|
cachePool: JSCompiler_inline_result
|
|
2994
|
-
}, current !== null && pushTransition(
|
|
2831
|
+
}, current !== null && pushTransition(workInProgress, null), reuseHiddenContextOnStack(), pushOffscreenSuspenseHandler(workInProgress), current !== null && propagateParentContextChanges(current, workInProgress, renderLanes, !0), workInProgress.childLanes = remainingChildLanes, null;
|
|
2995
2832
|
}
|
|
2996
|
-
function mountActivityChildren(
|
|
2997
|
-
return nextProps = mountWorkInProgressOffscreenFiber({ mode: nextProps.mode, children: nextProps.children },
|
|
2833
|
+
function mountActivityChildren(workInProgress, nextProps) {
|
|
2834
|
+
return nextProps = mountWorkInProgressOffscreenFiber({ mode: nextProps.mode, children: nextProps.children }, workInProgress.mode), nextProps.ref = workInProgress.ref, workInProgress.child = nextProps, nextProps.return = workInProgress, nextProps;
|
|
2998
2835
|
}
|
|
2999
|
-
function retryActivityComponentWithoutHydrating(current,
|
|
3000
|
-
return reconcileChildFibers(
|
|
2836
|
+
function retryActivityComponentWithoutHydrating(current, workInProgress, renderLanes) {
|
|
2837
|
+
return reconcileChildFibers(workInProgress, current.child, null, renderLanes), current = mountActivityChildren(workInProgress, workInProgress.pendingProps), current.flags |= 2, popSuspenseHandler(workInProgress), workInProgress.memoizedState = null, current;
|
|
3001
2838
|
}
|
|
3002
|
-
function updateActivityComponent(current,
|
|
3003
|
-
var nextProps =
|
|
3004
|
-
if (
|
|
2839
|
+
function updateActivityComponent(current, workInProgress, renderLanes) {
|
|
2840
|
+
var nextProps = workInProgress.pendingProps, didSuspend = (workInProgress.flags & 128) !== 0;
|
|
2841
|
+
if (workInProgress.flags &= -129, current === null) {
|
|
3005
2842
|
if (isHydrating) {
|
|
3006
2843
|
if (nextProps.mode === "hidden")
|
|
3007
|
-
return current = mountActivityChildren(
|
|
3008
|
-
if (pushDehydratedActivitySuspenseHandler(
|
|
2844
|
+
return current = mountActivityChildren(workInProgress, nextProps), workInProgress.lanes = 536870912, bailoutOffscreenComponent(null, current);
|
|
2845
|
+
if (pushDehydratedActivitySuspenseHandler(workInProgress), (current = nextHydratableInstance) ? (current = canHydrateActivityInstance(current, rootOrSingletonContext), current !== null && (workInProgress.memoizedState = {
|
|
3009
2846
|
dehydrated: current,
|
|
3010
2847
|
treeContext: treeContextProvider !== null ? { id: treeContextId, overflow: treeContextOverflow } : null,
|
|
3011
2848
|
retryLane: 536870912,
|
|
3012
2849
|
hydrationErrors: null
|
|
3013
|
-
},
|
|
3014
|
-
throw throwOnHydrationMismatch(
|
|
3015
|
-
return
|
|
2850
|
+
}, renderLanes = createFiberFromDehydratedFragment(current), renderLanes.return = workInProgress, workInProgress.child = renderLanes, hydrationParentFiber = workInProgress, nextHydratableInstance = null)) : current = null, current === null)
|
|
2851
|
+
throw throwOnHydrationMismatch(workInProgress);
|
|
2852
|
+
return workInProgress.lanes = 536870912, null;
|
|
3016
2853
|
}
|
|
3017
|
-
return mountActivityChildren(
|
|
2854
|
+
return mountActivityChildren(workInProgress, nextProps);
|
|
3018
2855
|
}
|
|
3019
2856
|
var prevState = current.memoizedState;
|
|
3020
2857
|
if (prevState !== null) {
|
|
3021
2858
|
var dehydrated = prevState.dehydrated;
|
|
3022
|
-
if (pushDehydratedActivitySuspenseHandler(
|
|
3023
|
-
if (
|
|
3024
|
-
|
|
3025
|
-
else if (
|
|
3026
|
-
|
|
2859
|
+
if (pushDehydratedActivitySuspenseHandler(workInProgress), didSuspend)
|
|
2860
|
+
if (workInProgress.flags & 256)
|
|
2861
|
+
workInProgress.flags &= -257, workInProgress = retryActivityComponentWithoutHydrating(current, workInProgress, renderLanes);
|
|
2862
|
+
else if (workInProgress.memoizedState !== null)
|
|
2863
|
+
workInProgress.child = current.child, workInProgress.flags |= 128, workInProgress = null;
|
|
3027
2864
|
else
|
|
3028
2865
|
throw Error(formatProdErrorMessage(558));
|
|
3029
|
-
else if (didReceiveUpdate || propagateParentContextChanges(current,
|
|
3030
|
-
if (nextProps = workInProgressRoot, nextProps !== null && (dehydrated = getBumpedLaneForHydration(nextProps,
|
|
2866
|
+
else if (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), didSuspend = (renderLanes & current.childLanes) !== 0, didReceiveUpdate || didSuspend) {
|
|
2867
|
+
if (nextProps = workInProgressRoot, nextProps !== null && (dehydrated = getBumpedLaneForHydration(nextProps, renderLanes), dehydrated !== 0 && dehydrated !== prevState.retryLane))
|
|
3031
2868
|
throw prevState.retryLane = dehydrated, enqueueConcurrentRenderForLane(current, dehydrated), scheduleUpdateOnFiber(nextProps, current, dehydrated), SelectiveHydrationException;
|
|
3032
|
-
renderDidSuspendDelayIfPossible(),
|
|
2869
|
+
renderDidSuspendDelayIfPossible(), workInProgress = retryActivityComponentWithoutHydrating(current, workInProgress, renderLanes);
|
|
3033
2870
|
} else
|
|
3034
|
-
current = prevState.treeContext, supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinActivityInstance(dehydrated), hydrationParentFiber =
|
|
3035
|
-
return
|
|
2871
|
+
current = prevState.treeContext, supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinActivityInstance(dehydrated), hydrationParentFiber = workInProgress, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !1, current !== null && restoreSuspendedTreeContext(workInProgress, current)), workInProgress = mountActivityChildren(workInProgress, nextProps), workInProgress.flags |= 4096;
|
|
2872
|
+
return workInProgress;
|
|
3036
2873
|
}
|
|
3037
2874
|
return current = createWorkInProgress(current.child, {
|
|
3038
2875
|
mode: nextProps.mode,
|
|
3039
2876
|
children: nextProps.children
|
|
3040
|
-
}), current.ref =
|
|
2877
|
+
}), current.ref = workInProgress.ref, workInProgress.child = current, current.return = workInProgress, current;
|
|
3041
2878
|
}
|
|
3042
|
-
function markRef(current,
|
|
3043
|
-
var ref =
|
|
2879
|
+
function markRef(current, workInProgress) {
|
|
2880
|
+
var ref = workInProgress.ref;
|
|
3044
2881
|
if (ref === null)
|
|
3045
|
-
current !== null && current.ref !== null && (
|
|
2882
|
+
current !== null && current.ref !== null && (workInProgress.flags |= 4194816);
|
|
3046
2883
|
else {
|
|
3047
2884
|
if (typeof ref !== "function" && typeof ref !== "object")
|
|
3048
2885
|
throw Error(formatProdErrorMessage(284));
|
|
3049
2886
|
if (current === null || current.ref !== ref)
|
|
3050
|
-
|
|
2887
|
+
workInProgress.flags |= 4194816;
|
|
3051
2888
|
}
|
|
3052
2889
|
}
|
|
3053
|
-
function updateFunctionComponent(current,
|
|
3054
|
-
if (prepareToReadContext(
|
|
3055
|
-
return bailoutHooks(current,
|
|
3056
|
-
return isHydrating && nextProps && pushMaterializedTreeId(
|
|
2890
|
+
function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
|
|
2891
|
+
if (prepareToReadContext(workInProgress), Component = renderWithHooks(current, workInProgress, Component, nextProps, void 0, renderLanes), nextProps = checkDidRenderIdHook(), current !== null && !didReceiveUpdate)
|
|
2892
|
+
return bailoutHooks(current, workInProgress, renderLanes), bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
2893
|
+
return isHydrating && nextProps && pushMaterializedTreeId(workInProgress), workInProgress.flags |= 1, reconcileChildren(current, workInProgress, Component, renderLanes), workInProgress.child;
|
|
3057
2894
|
}
|
|
3058
|
-
function replayFunctionComponent(current,
|
|
3059
|
-
if (prepareToReadContext(
|
|
3060
|
-
return bailoutHooks(current,
|
|
3061
|
-
return isHydrating && Component && pushMaterializedTreeId(
|
|
2895
|
+
function replayFunctionComponent(current, workInProgress, nextProps, Component, secondArg, renderLanes) {
|
|
2896
|
+
if (prepareToReadContext(workInProgress), workInProgress.updateQueue = null, nextProps = renderWithHooksAgain(workInProgress, Component, nextProps, secondArg), finishRenderingHooks(current), Component = checkDidRenderIdHook(), current !== null && !didReceiveUpdate)
|
|
2897
|
+
return bailoutHooks(current, workInProgress, renderLanes), bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
2898
|
+
return isHydrating && Component && pushMaterializedTreeId(workInProgress), workInProgress.flags |= 1, reconcileChildren(current, workInProgress, nextProps, renderLanes), workInProgress.child;
|
|
3062
2899
|
}
|
|
3063
|
-
function updateClassComponent(current,
|
|
3064
|
-
if (prepareToReadContext(
|
|
2900
|
+
function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
|
|
2901
|
+
if (prepareToReadContext(workInProgress), workInProgress.stateNode === null) {
|
|
3065
2902
|
var context = emptyContextObject, contextType = Component.contextType;
|
|
3066
|
-
typeof contextType === "object" && contextType !== null && (context = readContext(contextType)), context = new Component(nextProps, context),
|
|
2903
|
+
typeof contextType === "object" && contextType !== null && (context = readContext(contextType)), context = new Component(nextProps, context), workInProgress.memoizedState = context.state !== null && context.state !== void 0 ? context.state : null, context.updater = classComponentUpdater, workInProgress.stateNode = context, context._reactInternals = workInProgress, context = workInProgress.stateNode, context.props = nextProps, context.state = workInProgress.memoizedState, context.refs = {}, initializeUpdateQueue(workInProgress), contextType = Component.contextType, context.context = typeof contextType === "object" && contextType !== null ? readContext(contextType) : emptyContextObject, context.state = workInProgress.memoizedState, contextType = Component.getDerivedStateFromProps, typeof contextType === "function" && (applyDerivedStateFromProps(workInProgress, Component, contextType, nextProps), context.state = workInProgress.memoizedState), typeof Component.getDerivedStateFromProps === "function" || typeof context.getSnapshotBeforeUpdate === "function" || typeof context.UNSAFE_componentWillMount !== "function" && typeof context.componentWillMount !== "function" || (contextType = context.state, typeof context.componentWillMount === "function" && context.componentWillMount(), typeof context.UNSAFE_componentWillMount === "function" && context.UNSAFE_componentWillMount(), contextType !== context.state && classComponentUpdater.enqueueReplaceState(context, context.state, null), processUpdateQueue(workInProgress, nextProps, context, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction(), context.state = workInProgress.memoizedState), typeof context.componentDidMount === "function" && (workInProgress.flags |= 4194308), nextProps = !0;
|
|
3067
2904
|
} else if (current === null) {
|
|
3068
|
-
context =
|
|
3069
|
-
var unresolvedOldProps =
|
|
2905
|
+
context = workInProgress.stateNode;
|
|
2906
|
+
var unresolvedOldProps = workInProgress.memoizedProps, oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
|
|
3070
2907
|
context.props = oldProps;
|
|
3071
2908
|
var oldContext = context.context, contextType$jscomp$0 = Component.contextType;
|
|
3072
2909
|
contextType = emptyContextObject, typeof contextType$jscomp$0 === "object" && contextType$jscomp$0 !== null && (contextType = readContext(contextType$jscomp$0));
|
|
3073
2910
|
var getDerivedStateFromProps = Component.getDerivedStateFromProps;
|
|
3074
|
-
contextType$jscomp$0 = typeof getDerivedStateFromProps === "function" || typeof context.getSnapshotBeforeUpdate === "function", unresolvedOldProps =
|
|
3075
|
-
var oldState =
|
|
3076
|
-
context.state = oldState, processUpdateQueue(
|
|
2911
|
+
contextType$jscomp$0 = typeof getDerivedStateFromProps === "function" || typeof context.getSnapshotBeforeUpdate === "function", unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps, contextType$jscomp$0 || typeof context.UNSAFE_componentWillReceiveProps !== "function" && typeof context.componentWillReceiveProps !== "function" || (unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps(workInProgress, context, nextProps, contextType), hasForceUpdate = !1;
|
|
2912
|
+
var oldState = workInProgress.memoizedState;
|
|
2913
|
+
context.state = oldState, processUpdateQueue(workInProgress, nextProps, context, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction(), oldContext = workInProgress.memoizedState, unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? (typeof getDerivedStateFromProps === "function" && (applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, nextProps), oldContext = workInProgress.memoizedState), (oldProps = hasForceUpdate || checkShouldComponentUpdate(workInProgress, Component, oldProps, nextProps, oldState, oldContext, contextType)) ? (contextType$jscomp$0 || typeof context.UNSAFE_componentWillMount !== "function" && typeof context.componentWillMount !== "function" || (typeof context.componentWillMount === "function" && context.componentWillMount(), typeof context.UNSAFE_componentWillMount === "function" && context.UNSAFE_componentWillMount()), typeof context.componentDidMount === "function" && (workInProgress.flags |= 4194308)) : (typeof context.componentDidMount === "function" && (workInProgress.flags |= 4194308), workInProgress.memoizedProps = nextProps, workInProgress.memoizedState = oldContext), context.props = nextProps, context.state = oldContext, context.context = contextType, nextProps = oldProps) : (typeof context.componentDidMount === "function" && (workInProgress.flags |= 4194308), nextProps = !1);
|
|
3077
2914
|
} else {
|
|
3078
|
-
context =
|
|
3079
|
-
var newState =
|
|
3080
|
-
contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || current !== null && current.dependencies !== null && checkIfContextChanged(current.dependencies) ? (typeof unresolvedOldProps === "function" && (applyDerivedStateFromProps(
|
|
2915
|
+
context = workInProgress.stateNode, cloneUpdateQueue(current, workInProgress), contextType = workInProgress.memoizedProps, contextType$jscomp$0 = resolveClassComponentProps(Component, contextType), context.props = contextType$jscomp$0, getDerivedStateFromProps = workInProgress.pendingProps, oldState = context.context, oldContext = Component.contextType, oldProps = emptyContextObject, typeof oldContext === "object" && oldContext !== null && (oldProps = readContext(oldContext)), unresolvedOldProps = Component.getDerivedStateFromProps, (oldContext = typeof unresolvedOldProps === "function" || typeof context.getSnapshotBeforeUpdate === "function") || typeof context.UNSAFE_componentWillReceiveProps !== "function" && typeof context.componentWillReceiveProps !== "function" || (contextType !== getDerivedStateFromProps || oldState !== oldProps) && callComponentWillReceiveProps(workInProgress, context, nextProps, oldProps), hasForceUpdate = !1, oldState = workInProgress.memoizedState, context.state = oldState, processUpdateQueue(workInProgress, nextProps, context, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction();
|
|
2916
|
+
var newState = workInProgress.memoizedState;
|
|
2917
|
+
contextType !== getDerivedStateFromProps || oldState !== newState || hasForceUpdate || current !== null && current.dependencies !== null && checkIfContextChanged(current.dependencies) ? (typeof unresolvedOldProps === "function" && (applyDerivedStateFromProps(workInProgress, Component, unresolvedOldProps, nextProps), newState = workInProgress.memoizedState), (contextType$jscomp$0 = hasForceUpdate || checkShouldComponentUpdate(workInProgress, Component, contextType$jscomp$0, nextProps, oldState, newState, oldProps) || current !== null && current.dependencies !== null && checkIfContextChanged(current.dependencies)) ? (oldContext || typeof context.UNSAFE_componentWillUpdate !== "function" && typeof context.componentWillUpdate !== "function" || (typeof context.componentWillUpdate === "function" && context.componentWillUpdate(nextProps, newState, oldProps), typeof context.UNSAFE_componentWillUpdate === "function" && context.UNSAFE_componentWillUpdate(nextProps, newState, oldProps)), typeof context.componentDidUpdate === "function" && (workInProgress.flags |= 4), typeof context.getSnapshotBeforeUpdate === "function" && (workInProgress.flags |= 1024)) : (typeof context.componentDidUpdate !== "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress.flags |= 4), typeof context.getSnapshotBeforeUpdate !== "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress.flags |= 1024), workInProgress.memoizedProps = nextProps, workInProgress.memoizedState = newState), context.props = nextProps, context.state = newState, context.context = oldProps, nextProps = contextType$jscomp$0) : (typeof context.componentDidUpdate !== "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress.flags |= 4), typeof context.getSnapshotBeforeUpdate !== "function" || contextType === current.memoizedProps && oldState === current.memoizedState || (workInProgress.flags |= 1024), nextProps = !1);
|
|
3081
2918
|
}
|
|
3082
|
-
return context = nextProps, markRef(current,
|
|
2919
|
+
return context = nextProps, markRef(current, workInProgress), nextProps = (workInProgress.flags & 128) !== 0, context || nextProps ? (context = workInProgress.stateNode, Component = nextProps && typeof Component.getDerivedStateFromError !== "function" ? null : context.render(), workInProgress.flags |= 1, current !== null && nextProps ? (workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes), workInProgress.child = reconcileChildFibers(workInProgress, null, Component, renderLanes)) : reconcileChildren(current, workInProgress, Component, renderLanes), workInProgress.memoizedState = context.state, current = workInProgress.child) : current = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes), current;
|
|
3083
2920
|
}
|
|
3084
|
-
function mountHostRootWithoutHydrating(current,
|
|
3085
|
-
return resetHydrationState(),
|
|
2921
|
+
function mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes) {
|
|
2922
|
+
return resetHydrationState(), workInProgress.flags |= 256, reconcileChildren(current, workInProgress, nextChildren, renderLanes), workInProgress.child;
|
|
3086
2923
|
}
|
|
3087
|
-
function mountSuspenseOffscreenState(
|
|
3088
|
-
return { baseLanes:
|
|
2924
|
+
function mountSuspenseOffscreenState(renderLanes) {
|
|
2925
|
+
return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
|
|
3089
2926
|
}
|
|
3090
|
-
function getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer,
|
|
3091
|
-
return current = current !== null ? current.childLanes & ~
|
|
2927
|
+
function getRemainingWorkInPrimaryTree(current, primaryTreeDidDefer, renderLanes) {
|
|
2928
|
+
return current = current !== null ? current.childLanes & ~renderLanes : 0, primaryTreeDidDefer && (current |= workInProgressDeferredLane), current;
|
|
3092
2929
|
}
|
|
3093
|
-
function updateSuspenseComponent(current,
|
|
3094
|
-
var nextProps =
|
|
3095
|
-
if ((JSCompiler_temp = didSuspend) || (JSCompiler_temp = current !== null && current.memoizedState === null ? !1 : (suspenseStackCursor.current & 2) !== 0), JSCompiler_temp && (showFallback = !0,
|
|
2930
|
+
function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
|
2931
|
+
var nextProps = workInProgress.pendingProps, showFallback = !1, didSuspend = (workInProgress.flags & 128) !== 0, JSCompiler_temp;
|
|
2932
|
+
if ((JSCompiler_temp = didSuspend) || (JSCompiler_temp = current !== null && current.memoizedState === null ? !1 : (suspenseStackCursor.current & 2) !== 0), JSCompiler_temp && (showFallback = !0, workInProgress.flags &= -129), JSCompiler_temp = (workInProgress.flags & 32) !== 0, workInProgress.flags &= -33, current === null) {
|
|
3096
2933
|
if (isHydrating) {
|
|
3097
|
-
if (showFallback ? pushPrimaryTreeSuspenseHandler(
|
|
2934
|
+
if (showFallback ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress), (current = nextHydratableInstance) ? (current = canHydrateSuspenseInstance(current, rootOrSingletonContext), current !== null && (workInProgress.memoizedState = {
|
|
3098
2935
|
dehydrated: current,
|
|
3099
2936
|
treeContext: treeContextProvider !== null ? { id: treeContextId, overflow: treeContextOverflow } : null,
|
|
3100
2937
|
retryLane: 536870912,
|
|
3101
2938
|
hydrationErrors: null
|
|
3102
|
-
},
|
|
3103
|
-
throw throwOnHydrationMismatch(
|
|
3104
|
-
return isSuspenseInstanceFallback(current) ?
|
|
2939
|
+
}, renderLanes = createFiberFromDehydratedFragment(current), renderLanes.return = workInProgress, workInProgress.child = renderLanes, hydrationParentFiber = workInProgress, nextHydratableInstance = null)) : current = null, current === null)
|
|
2940
|
+
throw throwOnHydrationMismatch(workInProgress);
|
|
2941
|
+
return isSuspenseInstanceFallback(current) ? workInProgress.lanes = 32 : workInProgress.lanes = 536870912, null;
|
|
3105
2942
|
}
|
|
3106
2943
|
var nextPrimaryChildren = nextProps.children;
|
|
3107
2944
|
if (nextProps = nextProps.fallback, showFallback)
|
|
3108
|
-
return reuseSuspenseHandlerOnStack(
|
|
3109
|
-
return pushPrimaryTreeSuspenseHandler(
|
|
2945
|
+
return reuseSuspenseHandlerOnStack(workInProgress), showFallback = workInProgress.mode, nextPrimaryChildren = mountWorkInProgressOffscreenFiber({ mode: "hidden", children: nextPrimaryChildren }, showFallback), nextProps = createFiberFromFragment(nextProps, showFallback, renderLanes, null), nextPrimaryChildren.return = workInProgress, nextProps.return = workInProgress, nextPrimaryChildren.sibling = nextProps, workInProgress.child = nextPrimaryChildren, nextProps = workInProgress.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes), nextProps.childLanes = getRemainingWorkInPrimaryTree(current, JSCompiler_temp, renderLanes), workInProgress.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(null, nextProps);
|
|
2946
|
+
return pushPrimaryTreeSuspenseHandler(workInProgress), mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);
|
|
3110
2947
|
}
|
|
3111
2948
|
var prevState = current.memoizedState;
|
|
3112
2949
|
if (prevState !== null && (nextPrimaryChildren = prevState.dehydrated, nextPrimaryChildren !== null)) {
|
|
3113
2950
|
if (didSuspend)
|
|
3114
|
-
|
|
3115
|
-
else if (pushPrimaryTreeSuspenseHandler(
|
|
3116
|
-
JSCompiler_temp = getSuspenseInstanceFallbackErrorDetails(nextPrimaryChildren).digest, nextProps = Error(formatProdErrorMessage(419)), nextProps.stack = "", nextProps.digest = JSCompiler_temp, queueHydrationError({ value: nextProps, source: null, stack: null }),
|
|
3117
|
-
else if (didReceiveUpdate || propagateParentContextChanges(current,
|
|
3118
|
-
if (JSCompiler_temp = workInProgressRoot, JSCompiler_temp !== null && (nextProps = getBumpedLaneForHydration(JSCompiler_temp,
|
|
2951
|
+
workInProgress.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress), workInProgress.flags &= -257, workInProgress = retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes)) : workInProgress.memoizedState !== null ? (reuseSuspenseHandlerOnStack(workInProgress), workInProgress.child = current.child, workInProgress.flags |= 128, workInProgress = null) : (reuseSuspenseHandlerOnStack(workInProgress), nextPrimaryChildren = nextProps.fallback, showFallback = workInProgress.mode, nextProps = mountWorkInProgressOffscreenFiber({ mode: "visible", children: nextProps.children }, showFallback), nextPrimaryChildren = createFiberFromFragment(nextPrimaryChildren, showFallback, renderLanes, null), nextPrimaryChildren.flags |= 2, nextProps.return = workInProgress, nextPrimaryChildren.return = workInProgress, nextProps.sibling = nextPrimaryChildren, workInProgress.child = nextProps, reconcileChildFibers(workInProgress, current.child, null, renderLanes), nextProps = workInProgress.child, nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes), nextProps.childLanes = getRemainingWorkInPrimaryTree(current, JSCompiler_temp, renderLanes), workInProgress.memoizedState = SUSPENDED_MARKER, workInProgress = bailoutOffscreenComponent(null, nextProps));
|
|
2952
|
+
else if (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback(nextPrimaryChildren))
|
|
2953
|
+
JSCompiler_temp = getSuspenseInstanceFallbackErrorDetails(nextPrimaryChildren).digest, nextProps = Error(formatProdErrorMessage(419)), nextProps.stack = "", nextProps.digest = JSCompiler_temp, queueHydrationError({ value: nextProps, source: null, stack: null }), workInProgress = retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes);
|
|
2954
|
+
else if (didReceiveUpdate || propagateParentContextChanges(current, workInProgress, renderLanes, !1), JSCompiler_temp = (renderLanes & current.childLanes) !== 0, didReceiveUpdate || JSCompiler_temp) {
|
|
2955
|
+
if (JSCompiler_temp = workInProgressRoot, JSCompiler_temp !== null && (nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes), nextProps !== 0 && nextProps !== prevState.retryLane))
|
|
3119
2956
|
throw prevState.retryLane = nextProps, enqueueConcurrentRenderForLane(current, nextProps), scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), SelectiveHydrationException;
|
|
3120
|
-
isSuspenseInstancePending(nextPrimaryChildren) || renderDidSuspendDelayIfPossible(),
|
|
2957
|
+
isSuspenseInstancePending(nextPrimaryChildren) || renderDidSuspendDelayIfPossible(), workInProgress = retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes);
|
|
3121
2958
|
} else
|
|
3122
|
-
isSuspenseInstancePending(nextPrimaryChildren) ? (
|
|
3123
|
-
return
|
|
2959
|
+
isSuspenseInstancePending(nextPrimaryChildren) ? (workInProgress.flags |= 192, workInProgress.child = current.child, workInProgress = null) : (current = prevState.treeContext, supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(nextPrimaryChildren), hydrationParentFiber = workInProgress, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !1, current !== null && restoreSuspendedTreeContext(workInProgress, current)), workInProgress = mountSuspensePrimaryChildren(workInProgress, nextProps.children), workInProgress.flags |= 4096);
|
|
2960
|
+
return workInProgress;
|
|
3124
2961
|
}
|
|
3125
2962
|
if (showFallback)
|
|
3126
|
-
return reuseSuspenseHandlerOnStack(
|
|
2963
|
+
return reuseSuspenseHandlerOnStack(workInProgress), nextPrimaryChildren = nextProps.fallback, showFallback = workInProgress.mode, prevState = current.child, didSuspend = prevState.sibling, nextProps = createWorkInProgress(prevState, {
|
|
3127
2964
|
mode: "hidden",
|
|
3128
2965
|
children: nextProps.children
|
|
3129
|
-
}), nextProps.subtreeFlags = prevState.subtreeFlags & 65011712, didSuspend !== null ? nextPrimaryChildren = createWorkInProgress(didSuspend, nextPrimaryChildren) : (nextPrimaryChildren = createFiberFromFragment(nextPrimaryChildren, showFallback,
|
|
3130
|
-
baseLanes: nextPrimaryChildren.baseLanes |
|
|
2966
|
+
}), nextProps.subtreeFlags = prevState.subtreeFlags & 65011712, didSuspend !== null ? nextPrimaryChildren = createWorkInProgress(didSuspend, nextPrimaryChildren) : (nextPrimaryChildren = createFiberFromFragment(nextPrimaryChildren, showFallback, renderLanes, null), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress, nextProps.return = workInProgress, nextProps.sibling = nextPrimaryChildren, workInProgress.child = nextProps, bailoutOffscreenComponent(null, nextProps), nextProps = workInProgress.child, nextPrimaryChildren = current.child.memoizedState, nextPrimaryChildren === null ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes) : (showFallback = nextPrimaryChildren.cachePool, showFallback !== null ? (prevState = isPrimaryRenderer ? CacheContext._currentValue : CacheContext._currentValue2, showFallback = showFallback.parent !== prevState ? { parent: prevState, pool: prevState } : showFallback) : showFallback = getSuspendedCache(), nextPrimaryChildren = {
|
|
2967
|
+
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
|
|
3131
2968
|
cachePool: showFallback
|
|
3132
|
-
}), nextProps.memoizedState = nextPrimaryChildren, nextProps.childLanes = getRemainingWorkInPrimaryTree(current, JSCompiler_temp,
|
|
3133
|
-
return pushPrimaryTreeSuspenseHandler(
|
|
2969
|
+
}), nextProps.memoizedState = nextPrimaryChildren, nextProps.childLanes = getRemainingWorkInPrimaryTree(current, JSCompiler_temp, renderLanes), workInProgress.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(current.child, nextProps);
|
|
2970
|
+
return pushPrimaryTreeSuspenseHandler(workInProgress), renderLanes = current.child, current = renderLanes.sibling, renderLanes = createWorkInProgress(renderLanes, {
|
|
3134
2971
|
mode: "visible",
|
|
3135
2972
|
children: nextProps.children
|
|
3136
|
-
}),
|
|
2973
|
+
}), renderLanes.return = workInProgress, renderLanes.sibling = null, current !== null && (JSCompiler_temp = workInProgress.deletions, JSCompiler_temp === null ? (workInProgress.deletions = [current], workInProgress.flags |= 16) : JSCompiler_temp.push(current)), workInProgress.child = renderLanes, workInProgress.memoizedState = null, renderLanes;
|
|
3137
2974
|
}
|
|
3138
|
-
function mountSuspensePrimaryChildren(
|
|
3139
|
-
return primaryChildren = mountWorkInProgressOffscreenFiber({ mode: "visible", children: primaryChildren },
|
|
2975
|
+
function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
|
|
2976
|
+
return primaryChildren = mountWorkInProgressOffscreenFiber({ mode: "visible", children: primaryChildren }, workInProgress.mode), primaryChildren.return = workInProgress, workInProgress.child = primaryChildren;
|
|
3140
2977
|
}
|
|
3141
2978
|
function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
|
|
3142
2979
|
return offscreenProps = createFiber(22, offscreenProps, null, mode), offscreenProps.lanes = 0, offscreenProps;
|
|
3143
2980
|
}
|
|
3144
|
-
function retrySuspenseComponentWithoutHydrating(current,
|
|
3145
|
-
return reconcileChildFibers(
|
|
2981
|
+
function retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes) {
|
|
2982
|
+
return reconcileChildFibers(workInProgress, current.child, null, renderLanes), current = mountSuspensePrimaryChildren(workInProgress, workInProgress.pendingProps.children), current.flags |= 2, workInProgress.memoizedState = null, current;
|
|
3146
2983
|
}
|
|
3147
|
-
function scheduleSuspenseWorkOnFiber(fiber,
|
|
3148
|
-
fiber.lanes |=
|
|
2984
|
+
function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
|
|
2985
|
+
fiber.lanes |= renderLanes;
|
|
3149
2986
|
var alternate = fiber.alternate;
|
|
3150
|
-
alternate !== null && (alternate.lanes |=
|
|
2987
|
+
alternate !== null && (alternate.lanes |= renderLanes), scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
|
|
3151
2988
|
}
|
|
3152
|
-
function initSuspenseListRenderState(
|
|
3153
|
-
var renderState =
|
|
3154
|
-
renderState === null ?
|
|
2989
|
+
function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, treeForkCount) {
|
|
2990
|
+
var renderState = workInProgress.memoizedState;
|
|
2991
|
+
renderState === null ? workInProgress.memoizedState = {
|
|
3155
2992
|
isBackwards,
|
|
3156
2993
|
rendering: null,
|
|
3157
2994
|
renderingStartTime: 0,
|
|
3158
2995
|
last: lastContentRow,
|
|
3159
2996
|
tail,
|
|
3160
2997
|
tailMode,
|
|
3161
|
-
treeForkCount
|
|
3162
|
-
} : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount =
|
|
2998
|
+
treeForkCount
|
|
2999
|
+
} : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount);
|
|
3163
3000
|
}
|
|
3164
|
-
function updateSuspenseListComponent(current,
|
|
3165
|
-
var nextProps =
|
|
3001
|
+
function updateSuspenseListComponent(current, workInProgress, renderLanes) {
|
|
3002
|
+
var nextProps = workInProgress.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail;
|
|
3166
3003
|
nextProps = nextProps.children;
|
|
3167
3004
|
var suspenseContext = suspenseStackCursor.current, shouldForceFallback = (suspenseContext & 2) !== 0;
|
|
3168
|
-
if (shouldForceFallback ? (suspenseContext = suspenseContext & 1 | 2,
|
|
3005
|
+
if (shouldForceFallback ? (suspenseContext = suspenseContext & 1 | 2, workInProgress.flags |= 128) : suspenseContext &= 1, push(suspenseStackCursor, suspenseContext), reconcileChildren(current, workInProgress, nextProps, renderLanes), nextProps = isHydrating ? treeForkCount : 0, !shouldForceFallback && current !== null && (current.flags & 128) !== 0)
|
|
3169
3006
|
a:
|
|
3170
|
-
for (current =
|
|
3007
|
+
for (current = workInProgress.child;current !== null; ) {
|
|
3171
3008
|
if (current.tag === 13)
|
|
3172
|
-
current.memoizedState !== null && scheduleSuspenseWorkOnFiber(current,
|
|
3009
|
+
current.memoizedState !== null && scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
|
|
3173
3010
|
else if (current.tag === 19)
|
|
3174
|
-
scheduleSuspenseWorkOnFiber(current,
|
|
3011
|
+
scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
|
|
3175
3012
|
else if (current.child !== null) {
|
|
3176
3013
|
current.child.return = current, current = current.child;
|
|
3177
3014
|
continue;
|
|
3178
3015
|
}
|
|
3179
|
-
if (current ===
|
|
3016
|
+
if (current === workInProgress)
|
|
3180
3017
|
break a;
|
|
3181
3018
|
for (;current.sibling === null; ) {
|
|
3182
|
-
if (current.return === null || current.return ===
|
|
3019
|
+
if (current.return === null || current.return === workInProgress)
|
|
3183
3020
|
break a;
|
|
3184
3021
|
current = current.return;
|
|
3185
3022
|
}
|
|
@@ -3187,229 +3024,229 @@ Error generating stack: ` + x.message + `
|
|
|
3187
3024
|
}
|
|
3188
3025
|
switch (revealOrder) {
|
|
3189
3026
|
case "forwards":
|
|
3190
|
-
|
|
3191
|
-
for (revealOrder = null;
|
|
3192
|
-
current =
|
|
3193
|
-
|
|
3027
|
+
renderLanes = workInProgress.child;
|
|
3028
|
+
for (revealOrder = null;renderLanes !== null; )
|
|
3029
|
+
current = renderLanes.alternate, current !== null && findFirstSuspended(current) === null && (revealOrder = renderLanes), renderLanes = renderLanes.sibling;
|
|
3030
|
+
renderLanes = revealOrder, renderLanes === null ? (revealOrder = workInProgress.child, workInProgress.child = null) : (revealOrder = renderLanes.sibling, renderLanes.sibling = null), initSuspenseListRenderState(workInProgress, !1, revealOrder, renderLanes, tailMode, nextProps);
|
|
3194
3031
|
break;
|
|
3195
3032
|
case "backwards":
|
|
3196
3033
|
case "unstable_legacy-backwards":
|
|
3197
|
-
|
|
3198
|
-
for (
|
|
3034
|
+
renderLanes = null, revealOrder = workInProgress.child;
|
|
3035
|
+
for (workInProgress.child = null;revealOrder !== null; ) {
|
|
3199
3036
|
if (current = revealOrder.alternate, current !== null && findFirstSuspended(current) === null) {
|
|
3200
|
-
|
|
3037
|
+
workInProgress.child = revealOrder;
|
|
3201
3038
|
break;
|
|
3202
3039
|
}
|
|
3203
|
-
current = revealOrder.sibling, revealOrder.sibling =
|
|
3040
|
+
current = revealOrder.sibling, revealOrder.sibling = renderLanes, renderLanes = revealOrder, revealOrder = current;
|
|
3204
3041
|
}
|
|
3205
|
-
initSuspenseListRenderState(
|
|
3042
|
+
initSuspenseListRenderState(workInProgress, !0, renderLanes, null, tailMode, nextProps);
|
|
3206
3043
|
break;
|
|
3207
3044
|
case "together":
|
|
3208
|
-
initSuspenseListRenderState(
|
|
3045
|
+
initSuspenseListRenderState(workInProgress, !1, null, null, void 0, nextProps);
|
|
3209
3046
|
break;
|
|
3210
3047
|
default:
|
|
3211
|
-
|
|
3048
|
+
workInProgress.memoizedState = null;
|
|
3212
3049
|
}
|
|
3213
|
-
return
|
|
3050
|
+
return workInProgress.child;
|
|
3214
3051
|
}
|
|
3215
|
-
function bailoutOnAlreadyFinishedWork(current,
|
|
3216
|
-
if (current !== null && (
|
|
3052
|
+
function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
|
|
3053
|
+
if (current !== null && (workInProgress.dependencies = current.dependencies), workInProgressRootSkippedLanes |= workInProgress.lanes, (renderLanes & workInProgress.childLanes) === 0)
|
|
3217
3054
|
if (current !== null) {
|
|
3218
|
-
if (propagateParentContextChanges(current,
|
|
3055
|
+
if (propagateParentContextChanges(current, workInProgress, renderLanes, !1), (renderLanes & workInProgress.childLanes) === 0)
|
|
3219
3056
|
return null;
|
|
3220
3057
|
} else
|
|
3221
3058
|
return null;
|
|
3222
|
-
if (current !== null &&
|
|
3059
|
+
if (current !== null && workInProgress.child !== current.child)
|
|
3223
3060
|
throw Error(formatProdErrorMessage(153));
|
|
3224
|
-
if (
|
|
3225
|
-
current =
|
|
3226
|
-
for (
|
|
3227
|
-
current = current.sibling,
|
|
3228
|
-
|
|
3061
|
+
if (workInProgress.child !== null) {
|
|
3062
|
+
current = workInProgress.child, renderLanes = createWorkInProgress(current, current.pendingProps), workInProgress.child = renderLanes;
|
|
3063
|
+
for (renderLanes.return = workInProgress;current.sibling !== null; )
|
|
3064
|
+
current = current.sibling, renderLanes = renderLanes.sibling = createWorkInProgress(current, current.pendingProps), renderLanes.return = workInProgress;
|
|
3065
|
+
renderLanes.sibling = null;
|
|
3229
3066
|
}
|
|
3230
|
-
return
|
|
3067
|
+
return workInProgress.child;
|
|
3231
3068
|
}
|
|
3232
|
-
function checkScheduledUpdateOrContext(current,
|
|
3233
|
-
if ((current.lanes &
|
|
3069
|
+
function checkScheduledUpdateOrContext(current, renderLanes) {
|
|
3070
|
+
if ((current.lanes & renderLanes) !== 0)
|
|
3234
3071
|
return !0;
|
|
3235
3072
|
return current = current.dependencies, current !== null && checkIfContextChanged(current) ? !0 : !1;
|
|
3236
3073
|
}
|
|
3237
|
-
function attemptEarlyBailoutIfNoScheduledUpdate(current,
|
|
3238
|
-
switch (
|
|
3074
|
+
function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {
|
|
3075
|
+
switch (workInProgress.tag) {
|
|
3239
3076
|
case 3:
|
|
3240
|
-
pushHostContainer(
|
|
3077
|
+
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo), pushProvider(workInProgress, CacheContext, current.memoizedState.cache), resetHydrationState();
|
|
3241
3078
|
break;
|
|
3242
3079
|
case 27:
|
|
3243
3080
|
case 5:
|
|
3244
|
-
pushHostContext(
|
|
3081
|
+
pushHostContext(workInProgress);
|
|
3245
3082
|
break;
|
|
3246
3083
|
case 4:
|
|
3247
|
-
pushHostContainer(
|
|
3084
|
+
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
|
|
3248
3085
|
break;
|
|
3249
3086
|
case 10:
|
|
3250
|
-
pushProvider(
|
|
3087
|
+
pushProvider(workInProgress, workInProgress.type, workInProgress.memoizedProps.value);
|
|
3251
3088
|
break;
|
|
3252
3089
|
case 31:
|
|
3253
|
-
if (
|
|
3254
|
-
return
|
|
3090
|
+
if (workInProgress.memoizedState !== null)
|
|
3091
|
+
return workInProgress.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress), null;
|
|
3255
3092
|
break;
|
|
3256
3093
|
case 13:
|
|
3257
|
-
var state$82 =
|
|
3094
|
+
var state$82 = workInProgress.memoizedState;
|
|
3258
3095
|
if (state$82 !== null) {
|
|
3259
3096
|
if (state$82.dehydrated !== null)
|
|
3260
|
-
return pushPrimaryTreeSuspenseHandler(
|
|
3261
|
-
if ((
|
|
3262
|
-
return updateSuspenseComponent(current,
|
|
3263
|
-
return pushPrimaryTreeSuspenseHandler(
|
|
3097
|
+
return pushPrimaryTreeSuspenseHandler(workInProgress), workInProgress.flags |= 128, null;
|
|
3098
|
+
if ((renderLanes & workInProgress.child.childLanes) !== 0)
|
|
3099
|
+
return updateSuspenseComponent(current, workInProgress, renderLanes);
|
|
3100
|
+
return pushPrimaryTreeSuspenseHandler(workInProgress), current = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes), current !== null ? current.sibling : null;
|
|
3264
3101
|
}
|
|
3265
|
-
pushPrimaryTreeSuspenseHandler(
|
|
3102
|
+
pushPrimaryTreeSuspenseHandler(workInProgress);
|
|
3266
3103
|
break;
|
|
3267
3104
|
case 19:
|
|
3268
3105
|
var didSuspendBefore = (current.flags & 128) !== 0;
|
|
3269
|
-
if (state$82 = (
|
|
3106
|
+
if (state$82 = (renderLanes & workInProgress.childLanes) !== 0, state$82 || (propagateParentContextChanges(current, workInProgress, renderLanes, !1), state$82 = (renderLanes & workInProgress.childLanes) !== 0), didSuspendBefore) {
|
|
3270
3107
|
if (state$82)
|
|
3271
|
-
return updateSuspenseListComponent(current,
|
|
3272
|
-
|
|
3108
|
+
return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
|
3109
|
+
workInProgress.flags |= 128;
|
|
3273
3110
|
}
|
|
3274
|
-
if (didSuspendBefore =
|
|
3111
|
+
if (didSuspendBefore = workInProgress.memoizedState, didSuspendBefore !== null && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null), push(suspenseStackCursor, suspenseStackCursor.current), state$82)
|
|
3275
3112
|
break;
|
|
3276
3113
|
else
|
|
3277
3114
|
return null;
|
|
3278
3115
|
case 22:
|
|
3279
|
-
return
|
|
3116
|
+
return workInProgress.lanes = 0, updateOffscreenComponent(current, workInProgress, renderLanes, workInProgress.pendingProps);
|
|
3280
3117
|
case 24:
|
|
3281
|
-
pushProvider(
|
|
3118
|
+
pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
|
|
3282
3119
|
}
|
|
3283
|
-
return bailoutOnAlreadyFinishedWork(current,
|
|
3120
|
+
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
3284
3121
|
}
|
|
3285
|
-
function beginWork(current,
|
|
3122
|
+
function beginWork(current, workInProgress, renderLanes) {
|
|
3286
3123
|
if (current !== null)
|
|
3287
|
-
if (current.memoizedProps !==
|
|
3124
|
+
if (current.memoizedProps !== workInProgress.pendingProps)
|
|
3288
3125
|
didReceiveUpdate = !0;
|
|
3289
3126
|
else {
|
|
3290
|
-
if (!checkScheduledUpdateOrContext(current,
|
|
3291
|
-
return didReceiveUpdate = !1, attemptEarlyBailoutIfNoScheduledUpdate(current,
|
|
3127
|
+
if (!checkScheduledUpdateOrContext(current, renderLanes) && (workInProgress.flags & 128) === 0)
|
|
3128
|
+
return didReceiveUpdate = !1, attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);
|
|
3292
3129
|
didReceiveUpdate = (current.flags & 131072) !== 0 ? !0 : !1;
|
|
3293
3130
|
}
|
|
3294
3131
|
else
|
|
3295
|
-
didReceiveUpdate = !1, isHydrating && (
|
|
3296
|
-
switch (
|
|
3132
|
+
didReceiveUpdate = !1, isHydrating && (workInProgress.flags & 1048576) !== 0 && pushTreeId(workInProgress, treeForkCount, workInProgress.index);
|
|
3133
|
+
switch (workInProgress.lanes = 0, workInProgress.tag) {
|
|
3297
3134
|
case 16:
|
|
3298
3135
|
a: {
|
|
3299
|
-
var props =
|
|
3300
|
-
if (current = resolveLazy(
|
|
3301
|
-
shouldConstruct(current) ? (props = resolveClassComponentProps(current, props),
|
|
3136
|
+
var props = workInProgress.pendingProps;
|
|
3137
|
+
if (current = resolveLazy(workInProgress.elementType), workInProgress.type = current, typeof current === "function")
|
|
3138
|
+
shouldConstruct(current) ? (props = resolveClassComponentProps(current, props), workInProgress.tag = 1, workInProgress = updateClassComponent(null, workInProgress, current, props, renderLanes)) : (workInProgress.tag = 0, workInProgress = updateFunctionComponent(null, workInProgress, current, props, renderLanes));
|
|
3302
3139
|
else {
|
|
3303
3140
|
if (current !== void 0 && current !== null) {
|
|
3304
3141
|
var $$typeof = current.$$typeof;
|
|
3305
3142
|
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
|
3306
|
-
|
|
3143
|
+
workInProgress.tag = 11, workInProgress = updateForwardRef(null, workInProgress, current, props, renderLanes);
|
|
3307
3144
|
break a;
|
|
3308
3145
|
} else if ($$typeof === REACT_MEMO_TYPE) {
|
|
3309
|
-
|
|
3146
|
+
workInProgress.tag = 14, workInProgress = updateMemoComponent(null, workInProgress, current, props, renderLanes);
|
|
3310
3147
|
break a;
|
|
3311
3148
|
}
|
|
3312
3149
|
}
|
|
3313
|
-
throw
|
|
3150
|
+
throw workInProgress = getComponentNameFromType(current) || current, Error(formatProdErrorMessage(306, workInProgress, ""));
|
|
3314
3151
|
}
|
|
3315
3152
|
}
|
|
3316
|
-
return
|
|
3153
|
+
return workInProgress;
|
|
3317
3154
|
case 0:
|
|
3318
|
-
return updateFunctionComponent(current,
|
|
3155
|
+
return updateFunctionComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
|
|
3319
3156
|
case 1:
|
|
3320
|
-
return props =
|
|
3157
|
+
return props = workInProgress.type, $$typeof = resolveClassComponentProps(props, workInProgress.pendingProps), updateClassComponent(current, workInProgress, props, $$typeof, renderLanes);
|
|
3321
3158
|
case 3:
|
|
3322
3159
|
a: {
|
|
3323
|
-
if (pushHostContainer(
|
|
3160
|
+
if (pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo), current === null)
|
|
3324
3161
|
throw Error(formatProdErrorMessage(387));
|
|
3325
|
-
var nextProps =
|
|
3326
|
-
$$typeof =
|
|
3327
|
-
var nextState =
|
|
3328
|
-
if (nextProps = nextState.cache, pushProvider(
|
|
3162
|
+
var nextProps = workInProgress.pendingProps;
|
|
3163
|
+
$$typeof = workInProgress.memoizedState, props = $$typeof.element, cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, nextProps, null, renderLanes);
|
|
3164
|
+
var nextState = workInProgress.memoizedState;
|
|
3165
|
+
if (nextProps = nextState.cache, pushProvider(workInProgress, CacheContext, nextProps), nextProps !== $$typeof.cache && propagateContextChanges(workInProgress, [CacheContext], renderLanes, !0), suspendIfUpdateReadFromEntangledAsyncAction(), nextProps = nextState.element, supportsHydration && $$typeof.isDehydrated)
|
|
3329
3166
|
if ($$typeof = {
|
|
3330
3167
|
element: nextProps,
|
|
3331
3168
|
isDehydrated: !1,
|
|
3332
3169
|
cache: nextState.cache
|
|
3333
|
-
},
|
|
3334
|
-
|
|
3170
|
+
}, workInProgress.updateQueue.baseState = $$typeof, workInProgress.memoizedState = $$typeof, workInProgress.flags & 256) {
|
|
3171
|
+
workInProgress = mountHostRootWithoutHydrating(current, workInProgress, nextProps, renderLanes);
|
|
3335
3172
|
break a;
|
|
3336
3173
|
} else if (nextProps !== props) {
|
|
3337
|
-
props = createCapturedValueAtFiber(Error(formatProdErrorMessage(424)),
|
|
3174
|
+
props = createCapturedValueAtFiber(Error(formatProdErrorMessage(424)), workInProgress), queueHydrationError(props), workInProgress = mountHostRootWithoutHydrating(current, workInProgress, nextProps, renderLanes);
|
|
3338
3175
|
break a;
|
|
3339
3176
|
} else
|
|
3340
|
-
for (supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinContainer(
|
|
3341
|
-
|
|
3177
|
+
for (supportsHydration && (nextHydratableInstance = getFirstHydratableChildWithinContainer(workInProgress.stateNode.containerInfo), hydrationParentFiber = workInProgress, isHydrating = !0, hydrationErrors = null, rootOrSingletonContext = !0), renderLanes = mountChildFibers(workInProgress, null, nextProps, renderLanes), workInProgress.child = renderLanes;renderLanes; )
|
|
3178
|
+
renderLanes.flags = renderLanes.flags & -3 | 4096, renderLanes = renderLanes.sibling;
|
|
3342
3179
|
else {
|
|
3343
3180
|
if (resetHydrationState(), nextProps === props) {
|
|
3344
|
-
|
|
3181
|
+
workInProgress = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
|
|
3345
3182
|
break a;
|
|
3346
3183
|
}
|
|
3347
|
-
reconcileChildren(current,
|
|
3184
|
+
reconcileChildren(current, workInProgress, nextProps, renderLanes);
|
|
3348
3185
|
}
|
|
3349
|
-
|
|
3186
|
+
workInProgress = workInProgress.child;
|
|
3350
3187
|
}
|
|
3351
|
-
return
|
|
3188
|
+
return workInProgress;
|
|
3352
3189
|
case 26:
|
|
3353
3190
|
if (supportsResources)
|
|
3354
|
-
return markRef(current,
|
|
3191
|
+
return markRef(current, workInProgress), current === null ? (renderLanes = getResource(workInProgress.type, null, workInProgress.pendingProps, null)) ? workInProgress.memoizedState = renderLanes : isHydrating || (workInProgress.stateNode = createHoistableInstance(workInProgress.type, workInProgress.pendingProps, rootInstanceStackCursor.current, workInProgress)) : workInProgress.memoizedState = getResource(workInProgress.type, current.memoizedProps, workInProgress.pendingProps, current.memoizedState), null;
|
|
3355
3192
|
case 27:
|
|
3356
3193
|
if (supportsSingletons)
|
|
3357
|
-
return pushHostContext(
|
|
3194
|
+
return pushHostContext(workInProgress), current === null && supportsSingletons && isHydrating && (props = workInProgress.stateNode = resolveSingletonInstance(workInProgress.type, workInProgress.pendingProps, rootInstanceStackCursor.current, contextStackCursor.current, !1), hydrationParentFiber = workInProgress, rootOrSingletonContext = !0, nextHydratableInstance = getFirstHydratableChildWithinSingleton(workInProgress.type, props, nextHydratableInstance)), reconcileChildren(current, workInProgress, workInProgress.pendingProps.children, renderLanes), markRef(current, workInProgress), current === null && (workInProgress.flags |= 4194304), workInProgress.child;
|
|
3358
3195
|
case 5:
|
|
3359
3196
|
if (current === null && isHydrating) {
|
|
3360
|
-
if (validateHydratableInstance(
|
|
3361
|
-
props = canHydrateInstance(props,
|
|
3362
|
-
$$typeof || throwOnHydrationMismatch(
|
|
3197
|
+
if (validateHydratableInstance(workInProgress.type, workInProgress.pendingProps, contextStackCursor.current), $$typeof = props = nextHydratableInstance)
|
|
3198
|
+
props = canHydrateInstance(props, workInProgress.type, workInProgress.pendingProps, rootOrSingletonContext), props !== null ? (workInProgress.stateNode = props, hydrationParentFiber = workInProgress, nextHydratableInstance = getFirstHydratableChild(props), rootOrSingletonContext = !1, $$typeof = !0) : $$typeof = !1;
|
|
3199
|
+
$$typeof || throwOnHydrationMismatch(workInProgress);
|
|
3363
3200
|
}
|
|
3364
|
-
return pushHostContext(
|
|
3201
|
+
return pushHostContext(workInProgress), $$typeof = workInProgress.type, nextProps = workInProgress.pendingProps, nextState = current !== null ? current.memoizedProps : null, props = nextProps.children, shouldSetTextContent($$typeof, nextProps) ? props = null : nextState !== null && shouldSetTextContent($$typeof, nextState) && (workInProgress.flags |= 32), workInProgress.memoizedState !== null && ($$typeof = renderWithHooks(current, workInProgress, TransitionAwareHostComponent, null, null, renderLanes), isPrimaryRenderer ? HostTransitionContext._currentValue = $$typeof : HostTransitionContext._currentValue2 = $$typeof), markRef(current, workInProgress), reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child;
|
|
3365
3202
|
case 6:
|
|
3366
3203
|
if (current === null && isHydrating) {
|
|
3367
|
-
if (validateHydratableTextInstance(
|
|
3368
|
-
|
|
3369
|
-
current || throwOnHydrationMismatch(
|
|
3204
|
+
if (validateHydratableTextInstance(workInProgress.pendingProps, contextStackCursor.current), current = renderLanes = nextHydratableInstance)
|
|
3205
|
+
renderLanes = canHydrateTextInstance(renderLanes, workInProgress.pendingProps, rootOrSingletonContext), renderLanes !== null ? (workInProgress.stateNode = renderLanes, hydrationParentFiber = workInProgress, nextHydratableInstance = null, current = !0) : current = !1;
|
|
3206
|
+
current || throwOnHydrationMismatch(workInProgress);
|
|
3370
3207
|
}
|
|
3371
3208
|
return null;
|
|
3372
3209
|
case 13:
|
|
3373
|
-
return updateSuspenseComponent(current,
|
|
3210
|
+
return updateSuspenseComponent(current, workInProgress, renderLanes);
|
|
3374
3211
|
case 4:
|
|
3375
|
-
return pushHostContainer(
|
|
3212
|
+
return pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo), props = workInProgress.pendingProps, current === null ? workInProgress.child = reconcileChildFibers(workInProgress, null, props, renderLanes) : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child;
|
|
3376
3213
|
case 11:
|
|
3377
|
-
return updateForwardRef(current,
|
|
3214
|
+
return updateForwardRef(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
|
|
3378
3215
|
case 7:
|
|
3379
|
-
return reconcileChildren(current,
|
|
3216
|
+
return reconcileChildren(current, workInProgress, workInProgress.pendingProps, renderLanes), workInProgress.child;
|
|
3380
3217
|
case 8:
|
|
3381
|
-
return reconcileChildren(current,
|
|
3218
|
+
return reconcileChildren(current, workInProgress, workInProgress.pendingProps.children, renderLanes), workInProgress.child;
|
|
3382
3219
|
case 12:
|
|
3383
|
-
return reconcileChildren(current,
|
|
3220
|
+
return reconcileChildren(current, workInProgress, workInProgress.pendingProps.children, renderLanes), workInProgress.child;
|
|
3384
3221
|
case 10:
|
|
3385
|
-
return props =
|
|
3222
|
+
return props = workInProgress.pendingProps, pushProvider(workInProgress, workInProgress.type, props.value), reconcileChildren(current, workInProgress, props.children, renderLanes), workInProgress.child;
|
|
3386
3223
|
case 9:
|
|
3387
|
-
return $$typeof =
|
|
3224
|
+
return $$typeof = workInProgress.type._context, props = workInProgress.pendingProps.children, prepareToReadContext(workInProgress), $$typeof = readContext($$typeof), props = props($$typeof), workInProgress.flags |= 1, reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child;
|
|
3388
3225
|
case 14:
|
|
3389
|
-
return updateMemoComponent(current,
|
|
3226
|
+
return updateMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
|
|
3390
3227
|
case 15:
|
|
3391
|
-
return updateSimpleMemoComponent(current,
|
|
3228
|
+
return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);
|
|
3392
3229
|
case 19:
|
|
3393
|
-
return updateSuspenseListComponent(current,
|
|
3230
|
+
return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
|
3394
3231
|
case 31:
|
|
3395
|
-
return updateActivityComponent(current,
|
|
3232
|
+
return updateActivityComponent(current, workInProgress, renderLanes);
|
|
3396
3233
|
case 22:
|
|
3397
|
-
return updateOffscreenComponent(current,
|
|
3234
|
+
return updateOffscreenComponent(current, workInProgress, renderLanes, workInProgress.pendingProps);
|
|
3398
3235
|
case 24:
|
|
3399
|
-
return prepareToReadContext(
|
|
3236
|
+
return prepareToReadContext(workInProgress), props = readContext(CacheContext), current === null ? ($$typeof = peekCacheFromPool(), $$typeof === null && ($$typeof = workInProgressRoot, nextProps = createCache(), $$typeof.pooledCache = nextProps, nextProps.refCount++, nextProps !== null && ($$typeof.pooledCacheLanes |= renderLanes), $$typeof = nextProps), workInProgress.memoizedState = {
|
|
3400
3237
|
parent: props,
|
|
3401
3238
|
cache: $$typeof
|
|
3402
|
-
}, initializeUpdateQueue(
|
|
3239
|
+
}, initializeUpdateQueue(workInProgress), pushProvider(workInProgress, CacheContext, $$typeof)) : ((current.lanes & renderLanes) !== 0 && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), $$typeof = current.memoizedState, nextProps = workInProgress.memoizedState, $$typeof.parent !== props ? ($$typeof = { parent: props, cache: props }, workInProgress.memoizedState = $$typeof, workInProgress.lanes === 0 && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = $$typeof), pushProvider(workInProgress, CacheContext, props)) : (props = nextProps.cache, pushProvider(workInProgress, CacheContext, props), props !== $$typeof.cache && propagateContextChanges(workInProgress, [CacheContext], renderLanes, !0))), reconcileChildren(current, workInProgress, workInProgress.pendingProps.children, renderLanes), workInProgress.child;
|
|
3403
3240
|
case 29:
|
|
3404
|
-
throw
|
|
3241
|
+
throw workInProgress.pendingProps;
|
|
3405
3242
|
}
|
|
3406
|
-
throw Error(formatProdErrorMessage(156,
|
|
3243
|
+
throw Error(formatProdErrorMessage(156, workInProgress.tag));
|
|
3407
3244
|
}
|
|
3408
|
-
function markUpdate(
|
|
3409
|
-
|
|
3245
|
+
function markUpdate(workInProgress) {
|
|
3246
|
+
workInProgress.flags |= 4;
|
|
3410
3247
|
}
|
|
3411
|
-
function markCloned(
|
|
3412
|
-
supportsPersistence && (
|
|
3248
|
+
function markCloned(workInProgress) {
|
|
3249
|
+
supportsPersistence && (workInProgress.flags |= 8);
|
|
3413
3250
|
}
|
|
3414
3251
|
function doesRequireClone(current, completedWork) {
|
|
3415
3252
|
if (current !== null && current.child === completedWork.child)
|
|
@@ -3423,26 +3260,26 @@ Error generating stack: ` + x.message + `
|
|
|
3423
3260
|
}
|
|
3424
3261
|
return !1;
|
|
3425
3262
|
}
|
|
3426
|
-
function appendAllChildren(parent,
|
|
3263
|
+
function appendAllChildren(parent, workInProgress, needsVisibilityToggle, isHidden) {
|
|
3427
3264
|
if (supportsMutation)
|
|
3428
|
-
for (needsVisibilityToggle =
|
|
3265
|
+
for (needsVisibilityToggle = workInProgress.child;needsVisibilityToggle !== null; ) {
|
|
3429
3266
|
if (needsVisibilityToggle.tag === 5 || needsVisibilityToggle.tag === 6)
|
|
3430
3267
|
appendInitialChild(parent, needsVisibilityToggle.stateNode);
|
|
3431
3268
|
else if (!(needsVisibilityToggle.tag === 4 || supportsSingletons && needsVisibilityToggle.tag === 27) && needsVisibilityToggle.child !== null) {
|
|
3432
3269
|
needsVisibilityToggle.child.return = needsVisibilityToggle, needsVisibilityToggle = needsVisibilityToggle.child;
|
|
3433
3270
|
continue;
|
|
3434
3271
|
}
|
|
3435
|
-
if (needsVisibilityToggle ===
|
|
3272
|
+
if (needsVisibilityToggle === workInProgress)
|
|
3436
3273
|
break;
|
|
3437
3274
|
for (;needsVisibilityToggle.sibling === null; ) {
|
|
3438
|
-
if (needsVisibilityToggle.return === null || needsVisibilityToggle.return ===
|
|
3275
|
+
if (needsVisibilityToggle.return === null || needsVisibilityToggle.return === workInProgress)
|
|
3439
3276
|
return;
|
|
3440
3277
|
needsVisibilityToggle = needsVisibilityToggle.return;
|
|
3441
3278
|
}
|
|
3442
3279
|
needsVisibilityToggle.sibling.return = needsVisibilityToggle.return, needsVisibilityToggle = needsVisibilityToggle.sibling;
|
|
3443
3280
|
}
|
|
3444
3281
|
else if (supportsPersistence)
|
|
3445
|
-
for (var node$85 =
|
|
3282
|
+
for (var node$85 = workInProgress.child;node$85 !== null; ) {
|
|
3446
3283
|
if (node$85.tag === 5) {
|
|
3447
3284
|
var instance = node$85.stateNode;
|
|
3448
3285
|
needsVisibilityToggle && isHidden && (instance = cloneHiddenInstance(instance, node$85.type, node$85.memoizedProps)), appendInitialChild(parent, instance);
|
|
@@ -3456,20 +3293,20 @@ Error generating stack: ` + x.message + `
|
|
|
3456
3293
|
continue;
|
|
3457
3294
|
}
|
|
3458
3295
|
}
|
|
3459
|
-
if (node$85 ===
|
|
3296
|
+
if (node$85 === workInProgress)
|
|
3460
3297
|
break;
|
|
3461
3298
|
for (;node$85.sibling === null; ) {
|
|
3462
|
-
if (node$85.return === null || node$85.return ===
|
|
3299
|
+
if (node$85.return === null || node$85.return === workInProgress)
|
|
3463
3300
|
return;
|
|
3464
3301
|
node$85 = node$85.return;
|
|
3465
3302
|
}
|
|
3466
3303
|
node$85.sibling.return = node$85.return, node$85 = node$85.sibling;
|
|
3467
3304
|
}
|
|
3468
3305
|
}
|
|
3469
|
-
function appendAllChildrenToContainer(containerChildSet,
|
|
3306
|
+
function appendAllChildrenToContainer(containerChildSet, workInProgress, needsVisibilityToggle, isHidden) {
|
|
3470
3307
|
var hasOffscreenComponentChild = !1;
|
|
3471
3308
|
if (supportsPersistence)
|
|
3472
|
-
for (var node =
|
|
3309
|
+
for (var node = workInProgress.child;node !== null; ) {
|
|
3473
3310
|
if (node.tag === 5) {
|
|
3474
3311
|
var instance = node.stateNode;
|
|
3475
3312
|
needsVisibilityToggle && isHidden && (instance = cloneHiddenInstance(instance, node.type, node.memoizedProps)), appendChildToContainerChildSet(containerChildSet, instance);
|
|
@@ -3483,10 +3320,10 @@ Error generating stack: ` + x.message + `
|
|
|
3483
3320
|
continue;
|
|
3484
3321
|
}
|
|
3485
3322
|
}
|
|
3486
|
-
if (node ===
|
|
3323
|
+
if (node === workInProgress)
|
|
3487
3324
|
break;
|
|
3488
3325
|
for (;node.sibling === null; ) {
|
|
3489
|
-
if (node.return === null || node.return ===
|
|
3326
|
+
if (node.return === null || node.return === workInProgress)
|
|
3490
3327
|
return hasOffscreenComponentChild;
|
|
3491
3328
|
node = node.return;
|
|
3492
3329
|
}
|
|
@@ -3494,49 +3331,49 @@ Error generating stack: ` + x.message + `
|
|
|
3494
3331
|
}
|
|
3495
3332
|
return hasOffscreenComponentChild;
|
|
3496
3333
|
}
|
|
3497
|
-
function updateHostContainer(current,
|
|
3498
|
-
if (supportsPersistence && doesRequireClone(current,
|
|
3499
|
-
current =
|
|
3334
|
+
function updateHostContainer(current, workInProgress) {
|
|
3335
|
+
if (supportsPersistence && doesRequireClone(current, workInProgress)) {
|
|
3336
|
+
current = workInProgress.stateNode;
|
|
3500
3337
|
var container = current.containerInfo, newChildSet = createContainerChildSet();
|
|
3501
|
-
appendAllChildrenToContainer(newChildSet,
|
|
3338
|
+
appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1), current.pendingChildren = newChildSet, markUpdate(workInProgress), finalizeContainerChildren(container, newChildSet);
|
|
3502
3339
|
}
|
|
3503
3340
|
}
|
|
3504
|
-
function updateHostComponent(current,
|
|
3341
|
+
function updateHostComponent(current, workInProgress, type, newProps) {
|
|
3505
3342
|
if (supportsMutation)
|
|
3506
|
-
current.memoizedProps !== newProps && markUpdate(
|
|
3343
|
+
current.memoizedProps !== newProps && markUpdate(workInProgress);
|
|
3507
3344
|
else if (supportsPersistence) {
|
|
3508
|
-
var
|
|
3509
|
-
if ((current = doesRequireClone(current,
|
|
3345
|
+
var currentInstance = current.stateNode, oldProps$88 = current.memoizedProps;
|
|
3346
|
+
if ((current = doesRequireClone(current, workInProgress)) || oldProps$88 !== newProps) {
|
|
3510
3347
|
var currentHostContext = contextStackCursor.current;
|
|
3511
|
-
oldProps$88 = cloneInstance(currentInstance, type, oldProps$88, newProps, !current, null), oldProps$88 === currentInstance ?
|
|
3348
|
+
oldProps$88 = cloneInstance(currentInstance, type, oldProps$88, newProps, !current, null), oldProps$88 === currentInstance ? workInProgress.stateNode = currentInstance : (markCloned(workInProgress), finalizeInitialChildren(oldProps$88, type, newProps, currentHostContext) && markUpdate(workInProgress), workInProgress.stateNode = oldProps$88, current && appendAllChildren(oldProps$88, workInProgress, !1, !1));
|
|
3512
3349
|
} else
|
|
3513
|
-
|
|
3350
|
+
workInProgress.stateNode = currentInstance;
|
|
3514
3351
|
}
|
|
3515
3352
|
}
|
|
3516
|
-
function preloadInstanceAndSuspendIfNeeded(
|
|
3517
|
-
if ((
|
|
3518
|
-
if (
|
|
3519
|
-
if (preloadInstance(
|
|
3520
|
-
|
|
3353
|
+
function preloadInstanceAndSuspendIfNeeded(workInProgress, type, oldProps, newProps, renderLanes) {
|
|
3354
|
+
if ((workInProgress.mode & 32) !== 0 && (oldProps === null ? maySuspendCommit(type, newProps) : maySuspendCommitOnUpdate(type, oldProps, newProps))) {
|
|
3355
|
+
if (workInProgress.flags |= 16777216, (renderLanes & 335544128) === renderLanes || maySuspendCommitInSyncRender(type, newProps))
|
|
3356
|
+
if (preloadInstance(workInProgress.stateNode, type, newProps))
|
|
3357
|
+
workInProgress.flags |= 8192;
|
|
3521
3358
|
else if (shouldRemainOnPreviousScreen())
|
|
3522
|
-
|
|
3359
|
+
workInProgress.flags |= 8192;
|
|
3523
3360
|
else
|
|
3524
3361
|
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
|
|
3525
3362
|
} else
|
|
3526
|
-
|
|
3363
|
+
workInProgress.flags &= -16777217;
|
|
3527
3364
|
}
|
|
3528
|
-
function preloadResourceAndSuspendIfNeeded(
|
|
3365
|
+
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
|
|
3529
3366
|
if (mayResourceSuspendCommit(resource)) {
|
|
3530
|
-
if (
|
|
3367
|
+
if (workInProgress.flags |= 16777216, !preloadResource(resource))
|
|
3531
3368
|
if (shouldRemainOnPreviousScreen())
|
|
3532
|
-
|
|
3369
|
+
workInProgress.flags |= 8192;
|
|
3533
3370
|
else
|
|
3534
3371
|
throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
|
|
3535
3372
|
} else
|
|
3536
|
-
|
|
3373
|
+
workInProgress.flags &= -16777217;
|
|
3537
3374
|
}
|
|
3538
|
-
function scheduleRetryEffect(
|
|
3539
|
-
retryQueue !== null && (
|
|
3375
|
+
function scheduleRetryEffect(workInProgress, retryQueue) {
|
|
3376
|
+
retryQueue !== null && (workInProgress.flags |= 4), workInProgress.flags & 16384 && (retryQueue = workInProgress.tag !== 22 ? claimNextRetryLane() : 536870912, workInProgress.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
|
|
3540
3377
|
}
|
|
3541
3378
|
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
|
3542
3379
|
if (!isHydrating)
|
|
@@ -3564,9 +3401,9 @@ Error generating stack: ` + x.message + `
|
|
|
3564
3401
|
newChildLanes |= child$91.lanes | child$91.childLanes, subtreeFlags |= child$91.subtreeFlags, subtreeFlags |= child$91.flags, child$91.return = completedWork, child$91 = child$91.sibling;
|
|
3565
3402
|
return completedWork.subtreeFlags |= subtreeFlags, completedWork.childLanes = newChildLanes, didBailout;
|
|
3566
3403
|
}
|
|
3567
|
-
function completeWork(current,
|
|
3568
|
-
var newProps =
|
|
3569
|
-
switch (popTreeContext(
|
|
3404
|
+
function completeWork(current, workInProgress, renderLanes) {
|
|
3405
|
+
var newProps = workInProgress.pendingProps;
|
|
3406
|
+
switch (popTreeContext(workInProgress), workInProgress.tag) {
|
|
3570
3407
|
case 16:
|
|
3571
3408
|
case 15:
|
|
3572
3409
|
case 0:
|
|
@@ -3576,199 +3413,199 @@ Error generating stack: ` + x.message + `
|
|
|
3576
3413
|
case 12:
|
|
3577
3414
|
case 9:
|
|
3578
3415
|
case 14:
|
|
3579
|
-
return bubbleProperties(
|
|
3416
|
+
return bubbleProperties(workInProgress), null;
|
|
3580
3417
|
case 1:
|
|
3581
|
-
return bubbleProperties(
|
|
3418
|
+
return bubbleProperties(workInProgress), null;
|
|
3582
3419
|
case 3:
|
|
3583
|
-
if (
|
|
3584
|
-
popHydrationState(
|
|
3585
|
-
return updateHostContainer(current,
|
|
3420
|
+
if (renderLanes = workInProgress.stateNode, newProps = null, current !== null && (newProps = current.memoizedState.cache), workInProgress.memoizedState.cache !== newProps && (workInProgress.flags |= 2048), popProvider(CacheContext), popHostContainer(), renderLanes.pendingContext && (renderLanes.context = renderLanes.pendingContext, renderLanes.pendingContext = null), current === null || current.child === null)
|
|
3421
|
+
popHydrationState(workInProgress) ? markUpdate(workInProgress) : current === null || current.memoizedState.isDehydrated && (workInProgress.flags & 256) === 0 || (workInProgress.flags |= 1024, upgradeHydrationErrorsToRecoverable());
|
|
3422
|
+
return updateHostContainer(current, workInProgress), bubbleProperties(workInProgress), null;
|
|
3586
3423
|
case 26:
|
|
3587
3424
|
if (supportsResources) {
|
|
3588
|
-
var { type, memoizedState: nextResource } =
|
|
3589
|
-
return current === null ? (markUpdate(
|
|
3425
|
+
var { type, memoizedState: nextResource } = workInProgress;
|
|
3426
|
+
return current === null ? (markUpdate(workInProgress), nextResource !== null ? (bubbleProperties(workInProgress), preloadResourceAndSuspendIfNeeded(workInProgress, nextResource)) : (bubbleProperties(workInProgress), preloadInstanceAndSuspendIfNeeded(workInProgress, type, null, newProps, renderLanes))) : nextResource ? nextResource !== current.memoizedState ? (markUpdate(workInProgress), bubbleProperties(workInProgress), preloadResourceAndSuspendIfNeeded(workInProgress, nextResource)) : (bubbleProperties(workInProgress), workInProgress.flags &= -16777217) : (nextResource = current.memoizedProps, supportsMutation ? nextResource !== newProps && markUpdate(workInProgress) : updateHostComponent(current, workInProgress, type, newProps), bubbleProperties(workInProgress), preloadInstanceAndSuspendIfNeeded(workInProgress, type, nextResource, newProps, renderLanes)), null;
|
|
3590
3427
|
}
|
|
3591
3428
|
case 27:
|
|
3592
3429
|
if (supportsSingletons) {
|
|
3593
|
-
if (popHostContext(
|
|
3594
|
-
supportsMutation ? current.memoizedProps !== newProps && markUpdate(
|
|
3430
|
+
if (popHostContext(workInProgress), renderLanes = rootInstanceStackCursor.current, type = workInProgress.type, current !== null && workInProgress.stateNode != null)
|
|
3431
|
+
supportsMutation ? current.memoizedProps !== newProps && markUpdate(workInProgress) : updateHostComponent(current, workInProgress, type, newProps);
|
|
3595
3432
|
else {
|
|
3596
3433
|
if (!newProps) {
|
|
3597
|
-
if (
|
|
3434
|
+
if (workInProgress.stateNode === null)
|
|
3598
3435
|
throw Error(formatProdErrorMessage(166));
|
|
3599
|
-
return bubbleProperties(
|
|
3436
|
+
return bubbleProperties(workInProgress), null;
|
|
3600
3437
|
}
|
|
3601
|
-
current = contextStackCursor.current, popHydrationState(
|
|
3438
|
+
current = contextStackCursor.current, popHydrationState(workInProgress) ? prepareToHydrateHostInstance(workInProgress, current) : (current = resolveSingletonInstance(type, newProps, renderLanes, current, !0), workInProgress.stateNode = current, markUpdate(workInProgress));
|
|
3602
3439
|
}
|
|
3603
|
-
return bubbleProperties(
|
|
3440
|
+
return bubbleProperties(workInProgress), null;
|
|
3604
3441
|
}
|
|
3605
3442
|
case 5:
|
|
3606
|
-
if (popHostContext(
|
|
3607
|
-
updateHostComponent(current,
|
|
3443
|
+
if (popHostContext(workInProgress), type = workInProgress.type, current !== null && workInProgress.stateNode != null)
|
|
3444
|
+
updateHostComponent(current, workInProgress, type, newProps);
|
|
3608
3445
|
else {
|
|
3609
3446
|
if (!newProps) {
|
|
3610
|
-
if (
|
|
3447
|
+
if (workInProgress.stateNode === null)
|
|
3611
3448
|
throw Error(formatProdErrorMessage(166));
|
|
3612
|
-
return bubbleProperties(
|
|
3449
|
+
return bubbleProperties(workInProgress), null;
|
|
3613
3450
|
}
|
|
3614
|
-
if (nextResource = contextStackCursor.current, popHydrationState(
|
|
3615
|
-
prepareToHydrateHostInstance(
|
|
3451
|
+
if (nextResource = contextStackCursor.current, popHydrationState(workInProgress))
|
|
3452
|
+
prepareToHydrateHostInstance(workInProgress, nextResource), finalizeHydratedChildren(workInProgress.stateNode, type, newProps, nextResource) && (workInProgress.flags |= 64);
|
|
3616
3453
|
else {
|
|
3617
|
-
var instance$101 = createInstance(type, newProps, rootInstanceStackCursor.current, nextResource,
|
|
3618
|
-
markCloned(
|
|
3454
|
+
var instance$101 = createInstance(type, newProps, rootInstanceStackCursor.current, nextResource, workInProgress);
|
|
3455
|
+
markCloned(workInProgress), appendAllChildren(instance$101, workInProgress, !1, !1), workInProgress.stateNode = instance$101, finalizeInitialChildren(instance$101, type, newProps, nextResource) && markUpdate(workInProgress);
|
|
3619
3456
|
}
|
|
3620
3457
|
}
|
|
3621
|
-
return bubbleProperties(
|
|
3458
|
+
return bubbleProperties(workInProgress), preloadInstanceAndSuspendIfNeeded(workInProgress, workInProgress.type, current === null ? null : current.memoizedProps, workInProgress.pendingProps, renderLanes), null;
|
|
3622
3459
|
case 6:
|
|
3623
|
-
if (current &&
|
|
3624
|
-
|
|
3460
|
+
if (current && workInProgress.stateNode != null)
|
|
3461
|
+
renderLanes = current.memoizedProps, supportsMutation ? renderLanes !== newProps && markUpdate(workInProgress) : supportsPersistence && (renderLanes !== newProps ? (current = rootInstanceStackCursor.current, renderLanes = contextStackCursor.current, markCloned(workInProgress), workInProgress.stateNode = createTextInstance(newProps, current, renderLanes, workInProgress)) : workInProgress.stateNode = current.stateNode);
|
|
3625
3462
|
else {
|
|
3626
|
-
if (typeof newProps !== "string" &&
|
|
3463
|
+
if (typeof newProps !== "string" && workInProgress.stateNode === null)
|
|
3627
3464
|
throw Error(formatProdErrorMessage(166));
|
|
3628
|
-
if (current = rootInstanceStackCursor.current,
|
|
3465
|
+
if (current = rootInstanceStackCursor.current, renderLanes = contextStackCursor.current, popHydrationState(workInProgress)) {
|
|
3629
3466
|
if (!supportsHydration)
|
|
3630
3467
|
throw Error(formatProdErrorMessage(176));
|
|
3631
|
-
if (current =
|
|
3468
|
+
if (current = workInProgress.stateNode, renderLanes = workInProgress.memoizedProps, newProps = null, type = hydrationParentFiber, type !== null)
|
|
3632
3469
|
switch (type.tag) {
|
|
3633
3470
|
case 27:
|
|
3634
3471
|
case 5:
|
|
3635
3472
|
newProps = type.memoizedProps;
|
|
3636
3473
|
}
|
|
3637
|
-
hydrateTextInstance(current,
|
|
3474
|
+
hydrateTextInstance(current, renderLanes, workInProgress, newProps) || throwOnHydrationMismatch(workInProgress, !0);
|
|
3638
3475
|
} else
|
|
3639
|
-
markCloned(
|
|
3476
|
+
markCloned(workInProgress), workInProgress.stateNode = createTextInstance(newProps, current, renderLanes, workInProgress);
|
|
3640
3477
|
}
|
|
3641
|
-
return bubbleProperties(
|
|
3478
|
+
return bubbleProperties(workInProgress), null;
|
|
3642
3479
|
case 31:
|
|
3643
|
-
if (
|
|
3644
|
-
if (newProps = popHydrationState(
|
|
3480
|
+
if (renderLanes = workInProgress.memoizedState, current === null || current.memoizedState !== null) {
|
|
3481
|
+
if (newProps = popHydrationState(workInProgress), renderLanes !== null) {
|
|
3645
3482
|
if (current === null) {
|
|
3646
3483
|
if (!newProps)
|
|
3647
3484
|
throw Error(formatProdErrorMessage(318));
|
|
3648
3485
|
if (!supportsHydration)
|
|
3649
3486
|
throw Error(formatProdErrorMessage(556));
|
|
3650
|
-
if (current =
|
|
3487
|
+
if (current = workInProgress.memoizedState, current = current !== null ? current.dehydrated : null, !current)
|
|
3651
3488
|
throw Error(formatProdErrorMessage(557));
|
|
3652
|
-
hydrateActivityInstance(current,
|
|
3489
|
+
hydrateActivityInstance(current, workInProgress);
|
|
3653
3490
|
} else
|
|
3654
|
-
resetHydrationState(), (
|
|
3655
|
-
bubbleProperties(
|
|
3491
|
+
resetHydrationState(), (workInProgress.flags & 128) === 0 && (workInProgress.memoizedState = null), workInProgress.flags |= 4;
|
|
3492
|
+
bubbleProperties(workInProgress), current = !1;
|
|
3656
3493
|
} else
|
|
3657
|
-
|
|
3494
|
+
renderLanes = upgradeHydrationErrorsToRecoverable(), current !== null && current.memoizedState !== null && (current.memoizedState.hydrationErrors = renderLanes), current = !0;
|
|
3658
3495
|
if (!current) {
|
|
3659
|
-
if (
|
|
3660
|
-
return popSuspenseHandler(
|
|
3661
|
-
return popSuspenseHandler(
|
|
3496
|
+
if (workInProgress.flags & 256)
|
|
3497
|
+
return popSuspenseHandler(workInProgress), workInProgress;
|
|
3498
|
+
return popSuspenseHandler(workInProgress), null;
|
|
3662
3499
|
}
|
|
3663
|
-
if ((
|
|
3500
|
+
if ((workInProgress.flags & 128) !== 0)
|
|
3664
3501
|
throw Error(formatProdErrorMessage(558));
|
|
3665
3502
|
}
|
|
3666
|
-
return bubbleProperties(
|
|
3503
|
+
return bubbleProperties(workInProgress), null;
|
|
3667
3504
|
case 13:
|
|
3668
|
-
if (newProps =
|
|
3669
|
-
if (type = popHydrationState(
|
|
3505
|
+
if (newProps = workInProgress.memoizedState, current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {
|
|
3506
|
+
if (type = popHydrationState(workInProgress), newProps !== null && newProps.dehydrated !== null) {
|
|
3670
3507
|
if (current === null) {
|
|
3671
3508
|
if (!type)
|
|
3672
3509
|
throw Error(formatProdErrorMessage(318));
|
|
3673
3510
|
if (!supportsHydration)
|
|
3674
3511
|
throw Error(formatProdErrorMessage(344));
|
|
3675
|
-
if (type =
|
|
3512
|
+
if (type = workInProgress.memoizedState, type = type !== null ? type.dehydrated : null, !type)
|
|
3676
3513
|
throw Error(formatProdErrorMessage(317));
|
|
3677
|
-
hydrateSuspenseInstance(type,
|
|
3514
|
+
hydrateSuspenseInstance(type, workInProgress);
|
|
3678
3515
|
} else
|
|
3679
|
-
resetHydrationState(), (
|
|
3680
|
-
bubbleProperties(
|
|
3516
|
+
resetHydrationState(), (workInProgress.flags & 128) === 0 && (workInProgress.memoizedState = null), workInProgress.flags |= 4;
|
|
3517
|
+
bubbleProperties(workInProgress), type = !1;
|
|
3681
3518
|
} else
|
|
3682
3519
|
type = upgradeHydrationErrorsToRecoverable(), current !== null && current.memoizedState !== null && (current.memoizedState.hydrationErrors = type), type = !0;
|
|
3683
3520
|
if (!type) {
|
|
3684
|
-
if (
|
|
3685
|
-
return popSuspenseHandler(
|
|
3686
|
-
return popSuspenseHandler(
|
|
3521
|
+
if (workInProgress.flags & 256)
|
|
3522
|
+
return popSuspenseHandler(workInProgress), workInProgress;
|
|
3523
|
+
return popSuspenseHandler(workInProgress), null;
|
|
3687
3524
|
}
|
|
3688
3525
|
}
|
|
3689
|
-
if (popSuspenseHandler(
|
|
3690
|
-
return
|
|
3691
|
-
return
|
|
3526
|
+
if (popSuspenseHandler(workInProgress), (workInProgress.flags & 128) !== 0)
|
|
3527
|
+
return workInProgress.lanes = renderLanes, workInProgress;
|
|
3528
|
+
return renderLanes = newProps !== null, current = current !== null && current.memoizedState !== null, renderLanes && (newProps = workInProgress.child, type = null, newProps.alternate !== null && newProps.alternate.memoizedState !== null && newProps.alternate.memoizedState.cachePool !== null && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, newProps.memoizedState !== null && newProps.memoizedState.cachePool !== null && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048)), renderLanes !== current && renderLanes && (workInProgress.child.flags |= 8192), scheduleRetryEffect(workInProgress, workInProgress.updateQueue), bubbleProperties(workInProgress), null;
|
|
3692
3529
|
case 4:
|
|
3693
|
-
return popHostContainer(), updateHostContainer(current,
|
|
3530
|
+
return popHostContainer(), updateHostContainer(current, workInProgress), current === null && preparePortalMount(workInProgress.stateNode.containerInfo), bubbleProperties(workInProgress), null;
|
|
3694
3531
|
case 10:
|
|
3695
|
-
return popProvider(
|
|
3532
|
+
return popProvider(workInProgress.type), bubbleProperties(workInProgress), null;
|
|
3696
3533
|
case 19:
|
|
3697
|
-
if (
|
|
3698
|
-
return bubbleProperties(
|
|
3699
|
-
if (type = (
|
|
3534
|
+
if (pop(suspenseStackCursor), newProps = workInProgress.memoizedState, newProps === null)
|
|
3535
|
+
return bubbleProperties(workInProgress), null;
|
|
3536
|
+
if (type = (workInProgress.flags & 128) !== 0, nextResource = newProps.rendering, nextResource === null)
|
|
3700
3537
|
if (type)
|
|
3701
3538
|
cutOffTailIfNeeded(newProps, !1);
|
|
3702
3539
|
else {
|
|
3703
3540
|
if (workInProgressRootExitStatus !== 0 || current !== null && (current.flags & 128) !== 0)
|
|
3704
|
-
for (current =
|
|
3541
|
+
for (current = workInProgress.child;current !== null; ) {
|
|
3705
3542
|
if (nextResource = findFirstSuspended(current), nextResource !== null) {
|
|
3706
|
-
|
|
3707
|
-
for (
|
|
3708
|
-
resetWorkInProgress(
|
|
3709
|
-
return
|
|
3543
|
+
workInProgress.flags |= 128, cutOffTailIfNeeded(newProps, !1), current = nextResource.updateQueue, workInProgress.updateQueue = current, scheduleRetryEffect(workInProgress, current), workInProgress.subtreeFlags = 0, current = renderLanes;
|
|
3544
|
+
for (renderLanes = workInProgress.child;renderLanes !== null; )
|
|
3545
|
+
resetWorkInProgress(renderLanes, current), renderLanes = renderLanes.sibling;
|
|
3546
|
+
return push(suspenseStackCursor, suspenseStackCursor.current & 1 | 2), isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount), workInProgress.child;
|
|
3710
3547
|
}
|
|
3711
3548
|
current = current.sibling;
|
|
3712
3549
|
}
|
|
3713
|
-
newProps.tail !== null && now() > workInProgressRootRenderTargetTime && (
|
|
3550
|
+
newProps.tail !== null && now() > workInProgressRootRenderTargetTime && (workInProgress.flags |= 128, type = !0, cutOffTailIfNeeded(newProps, !1), workInProgress.lanes = 4194304);
|
|
3714
3551
|
}
|
|
3715
3552
|
else {
|
|
3716
3553
|
if (!type)
|
|
3717
3554
|
if (current = findFirstSuspended(nextResource), current !== null) {
|
|
3718
|
-
if (
|
|
3719
|
-
return bubbleProperties(
|
|
3555
|
+
if (workInProgress.flags |= 128, type = !0, current = current.updateQueue, workInProgress.updateQueue = current, scheduleRetryEffect(workInProgress, current), cutOffTailIfNeeded(newProps, !0), newProps.tail === null && newProps.tailMode === "hidden" && !nextResource.alternate && !isHydrating)
|
|
3556
|
+
return bubbleProperties(workInProgress), null;
|
|
3720
3557
|
} else
|
|
3721
|
-
2 * now() - newProps.renderingStartTime > workInProgressRootRenderTargetTime &&
|
|
3722
|
-
newProps.isBackwards ? (nextResource.sibling =
|
|
3558
|
+
2 * now() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && renderLanes !== 536870912 && (workInProgress.flags |= 128, type = !0, cutOffTailIfNeeded(newProps, !1), workInProgress.lanes = 4194304);
|
|
3559
|
+
newProps.isBackwards ? (nextResource.sibling = workInProgress.child, workInProgress.child = nextResource) : (current = newProps.last, current !== null ? current.sibling = nextResource : workInProgress.child = nextResource, newProps.last = nextResource);
|
|
3723
3560
|
}
|
|
3724
3561
|
if (newProps.tail !== null)
|
|
3725
|
-
return current = newProps.tail, newProps.rendering = current, newProps.tail = current.sibling, newProps.renderingStartTime = now(), current.sibling = null,
|
|
3726
|
-
return bubbleProperties(
|
|
3562
|
+
return current = newProps.tail, newProps.rendering = current, newProps.tail = current.sibling, newProps.renderingStartTime = now(), current.sibling = null, renderLanes = suspenseStackCursor.current, push(suspenseStackCursor, type ? renderLanes & 1 | 2 : renderLanes & 1), isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount), current;
|
|
3563
|
+
return bubbleProperties(workInProgress), null;
|
|
3727
3564
|
case 22:
|
|
3728
3565
|
case 23:
|
|
3729
|
-
return popSuspenseHandler(
|
|
3566
|
+
return popSuspenseHandler(workInProgress), popHiddenContext(), newProps = workInProgress.memoizedState !== null, current !== null ? current.memoizedState !== null !== newProps && (workInProgress.flags |= 8192) : newProps && (workInProgress.flags |= 8192), newProps ? (renderLanes & 536870912) !== 0 && (workInProgress.flags & 128) === 0 && (bubbleProperties(workInProgress), workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), renderLanes = workInProgress.updateQueue, renderLanes !== null && scheduleRetryEffect(workInProgress, renderLanes.retryQueue), renderLanes = null, current !== null && current.memoizedState !== null && current.memoizedState.cachePool !== null && (renderLanes = current.memoizedState.cachePool.pool), newProps = null, workInProgress.memoizedState !== null && workInProgress.memoizedState.cachePool !== null && (newProps = workInProgress.memoizedState.cachePool.pool), newProps !== renderLanes && (workInProgress.flags |= 2048), current !== null && pop(resumedCache), null;
|
|
3730
3567
|
case 24:
|
|
3731
|
-
return
|
|
3568
|
+
return renderLanes = null, current !== null && (renderLanes = current.memoizedState.cache), workInProgress.memoizedState.cache !== renderLanes && (workInProgress.flags |= 2048), popProvider(CacheContext), bubbleProperties(workInProgress), null;
|
|
3732
3569
|
case 25:
|
|
3733
3570
|
return null;
|
|
3734
3571
|
case 30:
|
|
3735
3572
|
return null;
|
|
3736
3573
|
}
|
|
3737
|
-
throw Error(formatProdErrorMessage(156,
|
|
3574
|
+
throw Error(formatProdErrorMessage(156, workInProgress.tag));
|
|
3738
3575
|
}
|
|
3739
|
-
function unwindWork(current,
|
|
3740
|
-
switch (popTreeContext(
|
|
3576
|
+
function unwindWork(current, workInProgress) {
|
|
3577
|
+
switch (popTreeContext(workInProgress), workInProgress.tag) {
|
|
3741
3578
|
case 1:
|
|
3742
|
-
return current =
|
|
3579
|
+
return current = workInProgress.flags, current & 65536 ? (workInProgress.flags = current & -65537 | 128, workInProgress) : null;
|
|
3743
3580
|
case 3:
|
|
3744
|
-
return popProvider(CacheContext), popHostContainer(), current =
|
|
3581
|
+
return popProvider(CacheContext), popHostContainer(), current = workInProgress.flags, (current & 65536) !== 0 && (current & 128) === 0 ? (workInProgress.flags = current & -65537 | 128, workInProgress) : null;
|
|
3745
3582
|
case 26:
|
|
3746
3583
|
case 27:
|
|
3747
3584
|
case 5:
|
|
3748
|
-
return popHostContext(
|
|
3585
|
+
return popHostContext(workInProgress), null;
|
|
3749
3586
|
case 31:
|
|
3750
|
-
if (
|
|
3751
|
-
if (popSuspenseHandler(
|
|
3587
|
+
if (workInProgress.memoizedState !== null) {
|
|
3588
|
+
if (popSuspenseHandler(workInProgress), workInProgress.alternate === null)
|
|
3752
3589
|
throw Error(formatProdErrorMessage(340));
|
|
3753
3590
|
resetHydrationState();
|
|
3754
3591
|
}
|
|
3755
|
-
return current =
|
|
3592
|
+
return current = workInProgress.flags, current & 65536 ? (workInProgress.flags = current & -65537 | 128, workInProgress) : null;
|
|
3756
3593
|
case 13:
|
|
3757
|
-
if (popSuspenseHandler(
|
|
3758
|
-
if (
|
|
3594
|
+
if (popSuspenseHandler(workInProgress), current = workInProgress.memoizedState, current !== null && current.dehydrated !== null) {
|
|
3595
|
+
if (workInProgress.alternate === null)
|
|
3759
3596
|
throw Error(formatProdErrorMessage(340));
|
|
3760
3597
|
resetHydrationState();
|
|
3761
3598
|
}
|
|
3762
|
-
return current =
|
|
3599
|
+
return current = workInProgress.flags, current & 65536 ? (workInProgress.flags = current & -65537 | 128, workInProgress) : null;
|
|
3763
3600
|
case 19:
|
|
3764
|
-
return
|
|
3601
|
+
return pop(suspenseStackCursor), null;
|
|
3765
3602
|
case 4:
|
|
3766
3603
|
return popHostContainer(), null;
|
|
3767
3604
|
case 10:
|
|
3768
|
-
return popProvider(
|
|
3605
|
+
return popProvider(workInProgress.type), null;
|
|
3769
3606
|
case 22:
|
|
3770
3607
|
case 23:
|
|
3771
|
-
return popSuspenseHandler(
|
|
3608
|
+
return popSuspenseHandler(workInProgress), popHiddenContext(), current !== null && pop(resumedCache), current = workInProgress.flags, current & 65536 ? (workInProgress.flags = current & -65537 | 128, workInProgress) : null;
|
|
3772
3609
|
case 24:
|
|
3773
3610
|
return popProvider(CacheContext), null;
|
|
3774
3611
|
case 25:
|
|
@@ -3797,14 +3634,14 @@ Error generating stack: ` + x.message + `
|
|
|
3797
3634
|
popSuspenseHandler(interruptedWork);
|
|
3798
3635
|
break;
|
|
3799
3636
|
case 19:
|
|
3800
|
-
|
|
3637
|
+
pop(suspenseStackCursor);
|
|
3801
3638
|
break;
|
|
3802
3639
|
case 10:
|
|
3803
3640
|
popProvider(interruptedWork.type);
|
|
3804
3641
|
break;
|
|
3805
3642
|
case 22:
|
|
3806
3643
|
case 23:
|
|
3807
|
-
popSuspenseHandler(interruptedWork), popHiddenContext(), current !== null &&
|
|
3644
|
+
popSuspenseHandler(interruptedWork), popHiddenContext(), current !== null && pop(resumedCache);
|
|
3808
3645
|
break;
|
|
3809
3646
|
case 24:
|
|
3810
3647
|
popProvider(CacheContext);
|
|
@@ -3819,8 +3656,8 @@ Error generating stack: ` + x.message + `
|
|
|
3819
3656
|
do {
|
|
3820
3657
|
if ((updateQueue.tag & flags) === flags) {
|
|
3821
3658
|
lastEffect = void 0;
|
|
3822
|
-
var
|
|
3823
|
-
lastEffect =
|
|
3659
|
+
var create = updateQueue.create, inst = updateQueue.inst;
|
|
3660
|
+
lastEffect = create(), inst.destroy = lastEffect;
|
|
3824
3661
|
}
|
|
3825
3662
|
updateQueue = updateQueue.next;
|
|
3826
3663
|
} while (updateQueue !== firstEffect);
|
|
@@ -3897,7 +3734,7 @@ Error generating stack: ` + x.message + `
|
|
|
3897
3734
|
}
|
|
3898
3735
|
}
|
|
3899
3736
|
function safelyDetachRef(current, nearestMountedAncestor) {
|
|
3900
|
-
var
|
|
3737
|
+
var ref = current.ref, refCleanup = current.refCleanup;
|
|
3901
3738
|
if (ref !== null)
|
|
3902
3739
|
if (typeof refCleanup === "function")
|
|
3903
3740
|
try {
|
|
@@ -4279,7 +4116,7 @@ Error generating stack: ` + x.message + `
|
|
|
4279
4116
|
commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
|
|
4280
4117
|
}
|
|
4281
4118
|
function commitMutationEffectsOnFiber(finishedWork, root) {
|
|
4282
|
-
var
|
|
4119
|
+
var current = finishedWork.alternate, flags = finishedWork.flags;
|
|
4283
4120
|
switch (finishedWork.tag) {
|
|
4284
4121
|
case 0:
|
|
4285
4122
|
case 11:
|
|
@@ -4365,7 +4202,7 @@ Error generating stack: ` + x.message + `
|
|
|
4365
4202
|
case 22:
|
|
4366
4203
|
hoistableRoot = finishedWork.memoizedState !== null;
|
|
4367
4204
|
var wasHidden = current !== null && current.memoizedState !== null, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
|
|
4368
|
-
if (offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot, offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden, recursivelyTraverseMutationEffects(root, finishedWork), offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden, offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden, commitReconciliationEffects(finishedWork), flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (current === null || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation))
|
|
4205
|
+
if (offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot, offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden, recursivelyTraverseMutationEffects(root, finishedWork), offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden, offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden, commitReconciliationEffects(finishedWork), flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (current === null || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation)) {
|
|
4369
4206
|
a:
|
|
4370
4207
|
if (current = null, supportsMutation)
|
|
4371
4208
|
for (root = finishedWork;; ) {
|
|
@@ -4411,6 +4248,7 @@ Error generating stack: ` + x.message + `
|
|
|
4411
4248
|
}
|
|
4412
4249
|
current === root && (current = null), root.sibling.return = root.return, root = root.sibling;
|
|
4413
4250
|
}
|
|
4251
|
+
}
|
|
4414
4252
|
flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (current = flags.retryQueue, current !== null && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current))));
|
|
4415
4253
|
break;
|
|
4416
4254
|
case 19:
|
|
@@ -4678,7 +4516,7 @@ Error generating stack: ` + x.message + `
|
|
|
4678
4516
|
if (fiber.memoizedState !== null)
|
|
4679
4517
|
suspendResource(suspendedState, currentHoistableRoot, fiber.memoizedState, fiber.memoizedProps);
|
|
4680
4518
|
else {
|
|
4681
|
-
var
|
|
4519
|
+
var instance = fiber.stateNode, type = fiber.type;
|
|
4682
4520
|
fiber = fiber.memoizedProps, ((committedLanes & 335544128) === committedLanes || maySuspendCommitInSyncRender(type, fiber)) && suspendInstance(suspendedState, instance, type, fiber);
|
|
4683
4521
|
}
|
|
4684
4522
|
break;
|
|
@@ -4791,7 +4629,7 @@ Error generating stack: ` + x.message + `
|
|
|
4791
4629
|
a:
|
|
4792
4630
|
for (fiber = deletedSubtreeRoot;nextEffect !== null; ) {
|
|
4793
4631
|
cache = nextEffect;
|
|
4794
|
-
var
|
|
4632
|
+
var sibling = cache.sibling, returnFiber = cache.return;
|
|
4795
4633
|
if (detachFiberAfterEffects(cache), cache === fiber) {
|
|
4796
4634
|
nextEffect = null;
|
|
4797
4635
|
break a;
|
|
@@ -5017,10 +4855,10 @@ Error generating stack: ` + x.message + `
|
|
|
5017
4855
|
var tag = node.tag;
|
|
5018
4856
|
if ((tag === 0 || tag === 11 || tag === 15) && node.flags & 16384 && (tag = node.updateQueue, tag !== null && (tag = tag.stores, tag !== null)))
|
|
5019
4857
|
for (var i = 0;i < tag.length; i++) {
|
|
5020
|
-
var
|
|
5021
|
-
|
|
4858
|
+
var check = tag[i], getSnapshot = check.getSnapshot;
|
|
4859
|
+
check = check.value;
|
|
5022
4860
|
try {
|
|
5023
|
-
if (!objectIs(getSnapshot(),
|
|
4861
|
+
if (!objectIs(getSnapshot(), check))
|
|
5024
4862
|
return !1;
|
|
5025
4863
|
} catch (error) {
|
|
5026
4864
|
return !1;
|
|
@@ -5178,7 +5016,7 @@ Error generating stack: ` + x.message + `
|
|
|
5178
5016
|
resource = workInProgress.memoizedState;
|
|
5179
5017
|
case 5:
|
|
5180
5018
|
case 27:
|
|
5181
|
-
var hostFiber = workInProgress,
|
|
5019
|
+
var hostFiber = workInProgress, { type, pendingProps: props } = hostFiber;
|
|
5182
5020
|
if (resource ? preloadResource(resource) : preloadInstance(hostFiber.stateNode, type, props)) {
|
|
5183
5021
|
workInProgressSuspendedReason = 0, workInProgressThrownValue = null;
|
|
5184
5022
|
var sibling = hostFiber.sibling;
|
|
@@ -5486,19 +5324,19 @@ Error generating stack: ` + x.message + `
|
|
|
5486
5324
|
return Component = Component.prototype, !(!Component || !Component.isReactComponent);
|
|
5487
5325
|
}
|
|
5488
5326
|
function createWorkInProgress(current, pendingProps) {
|
|
5489
|
-
var
|
|
5490
|
-
return
|
|
5327
|
+
var workInProgress = current.alternate;
|
|
5328
|
+
return workInProgress === null ? (workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode), workInProgress.elementType = current.elementType, workInProgress.type = current.type, workInProgress.stateNode = current.stateNode, workInProgress.alternate = current, current.alternate = workInProgress) : (workInProgress.pendingProps = pendingProps, workInProgress.type = current.type, workInProgress.flags = 0, workInProgress.subtreeFlags = 0, workInProgress.deletions = null), workInProgress.flags = current.flags & 65011712, workInProgress.childLanes = current.childLanes, workInProgress.lanes = current.lanes, workInProgress.child = current.child, workInProgress.memoizedProps = current.memoizedProps, workInProgress.memoizedState = current.memoizedState, workInProgress.updateQueue = current.updateQueue, pendingProps = current.dependencies, workInProgress.dependencies = pendingProps === null ? null : {
|
|
5491
5329
|
lanes: pendingProps.lanes,
|
|
5492
5330
|
firstContext: pendingProps.firstContext
|
|
5493
|
-
},
|
|
5331
|
+
}, workInProgress.sibling = current.sibling, workInProgress.index = current.index, workInProgress.ref = current.ref, workInProgress.refCleanup = current.refCleanup, workInProgress;
|
|
5494
5332
|
}
|
|
5495
|
-
function resetWorkInProgress(
|
|
5496
|
-
|
|
5497
|
-
var current =
|
|
5498
|
-
return current === null ? (
|
|
5499
|
-
lanes:
|
|
5500
|
-
firstContext:
|
|
5501
|
-
}),
|
|
5333
|
+
function resetWorkInProgress(workInProgress, renderLanes) {
|
|
5334
|
+
workInProgress.flags &= 65011714;
|
|
5335
|
+
var current = workInProgress.alternate;
|
|
5336
|
+
return current === null ? (workInProgress.childLanes = 0, workInProgress.lanes = renderLanes, workInProgress.child = null, workInProgress.subtreeFlags = 0, workInProgress.memoizedProps = null, workInProgress.memoizedState = null, workInProgress.updateQueue = null, workInProgress.dependencies = null, workInProgress.stateNode = null) : (workInProgress.childLanes = current.childLanes, workInProgress.lanes = current.lanes, workInProgress.child = current.child, workInProgress.subtreeFlags = 0, workInProgress.deletions = null, workInProgress.memoizedProps = current.memoizedProps, workInProgress.memoizedState = current.memoizedState, workInProgress.updateQueue = current.updateQueue, workInProgress.type = current.type, renderLanes = current.dependencies, workInProgress.dependencies = renderLanes === null ? null : {
|
|
5337
|
+
lanes: renderLanes.lanes,
|
|
5338
|
+
firstContext: renderLanes.firstContext
|
|
5339
|
+
}), workInProgress;
|
|
5502
5340
|
}
|
|
5503
5341
|
function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
|
|
5504
5342
|
var fiberTag = 0;
|
|
@@ -5598,7 +5436,7 @@ Error generating stack: ` + x.message + `
|
|
|
5598
5436
|
function markRetryLaneIfNotHydrated(fiber, retryLane) {
|
|
5599
5437
|
markRetryLaneImpl(fiber, retryLane), (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
|
|
5600
5438
|
}
|
|
5601
|
-
var exports2 = {}, assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals =
|
|
5439
|
+
var exports2 = {}, assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = $__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, { rendererVersion, rendererPackageName, extraDevToolsConfig, getPublicInstance, getRootHostContext, getChildHostContext, prepareForCommit, resetAfterCommit, createInstance } = $$$config;
|
|
5602
5440
|
$$$config.cloneMutableInstance;
|
|
5603
5441
|
var { appendInitialChild, finalizeInitialChildren, shouldSetTextContent, createTextInstance } = $$$config;
|
|
5604
5442
|
$$$config.cloneMutableTextInstance;
|
|
@@ -5628,7 +5466,7 @@ Error generating stack: ` + x.message + `
|
|
|
5628
5466
|
$$$config.clearActivityBoundaryFromContainer;
|
|
5629
5467
|
var { clearSuspenseBoundaryFromContainer, hideDehydratedBoundary, unhideDehydratedBoundary, shouldDeleteUnhydratedTailInstances } = $$$config;
|
|
5630
5468
|
$$$config.diffHydratedPropsForDevWarnings, $$$config.diffHydratedTextForDevWarnings, $$$config.describeHydratableInstanceForDevWarnings;
|
|
5631
|
-
var { validateHydratableInstance, validateHydratableTextInstance, supportsResources, isHostHoistableType, getHoistableRoot, getResource, acquireResource, releaseResource, hydrateHoistable, mountHoistable, unmountHoistable, createHoistableInstance, prepareToCommitHoistables, mayResourceSuspendCommit, preloadResource, suspendResource, supportsSingletons, resolveSingletonInstance, acquireSingletonInstance, releaseSingletonInstance, isHostSingletonType, isSingletonScope } = $$$config, valueStack = [], index$jscomp$0 = -1, emptyContextObject = {}, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log$1
|
|
5469
|
+
var { validateHydratableInstance, validateHydratableTextInstance, supportsResources, isHostHoistableType, getHoistableRoot, getResource, acquireResource, releaseResource, hydrateHoistable, mountHoistable, unmountHoistable, createHoistableInstance, prepareToCommitHoistables, mayResourceSuspendCommit, preloadResource, suspendResource, supportsSingletons, resolveSingletonInstance, acquireSingletonInstance, releaseSingletonInstance, isHostSingletonType, isSingletonScope } = $$$config, valueStack = [], index$jscomp$0 = -1, emptyContextObject = {}, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, { log: log$1, LN2 } = Math, nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, nextRetryLane = 4194304, scheduleCallback$3 = $unstable_scheduleCallback, cancelCallback$1 = $unstable_cancelCallback, shouldYield = $unstable_shouldYield, requestPaint = $unstable_requestPaint, now = $unstable_now, ImmediatePriority = $unstable_ImmediatePriority, UserBlockingPriority = $unstable_UserBlockingPriority, NormalPriority$1 = $unstable_NormalPriority, IdlePriority = $unstable_IdlePriority, log2 = void 0, unstable_setDisableYieldValue2 = void 0, rendererID = null, injectedHook = null, objectIs = typeof Object.is === "function" ? Object.is : is, reportGlobalError = typeof reportError === "function" ? reportError : function(error) {
|
|
5632
5470
|
if (typeof window === "object" && typeof window.ErrorEvent === "function") {
|
|
5633
5471
|
var event = new window.ErrorEvent("error", {
|
|
5634
5472
|
bubbles: !0,
|
|
@@ -5703,14 +5541,14 @@ Error generating stack: ` + x.message + `
|
|
|
5703
5541
|
},
|
|
5704
5542
|
useContext: readContext,
|
|
5705
5543
|
useEffect: mountEffect,
|
|
5706
|
-
useImperativeHandle: function(ref,
|
|
5707
|
-
deps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null, mountEffectImpl(4194308, 4, imperativeHandleEffect.bind(null,
|
|
5544
|
+
useImperativeHandle: function(ref, create, deps) {
|
|
5545
|
+
deps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null, mountEffectImpl(4194308, 4, imperativeHandleEffect.bind(null, create, ref), deps);
|
|
5708
5546
|
},
|
|
5709
|
-
useLayoutEffect: function(
|
|
5710
|
-
return mountEffectImpl(4194308, 4,
|
|
5547
|
+
useLayoutEffect: function(create, deps) {
|
|
5548
|
+
return mountEffectImpl(4194308, 4, create, deps);
|
|
5711
5549
|
},
|
|
5712
|
-
useInsertionEffect: function(
|
|
5713
|
-
mountEffectImpl(4, 2,
|
|
5550
|
+
useInsertionEffect: function(create, deps) {
|
|
5551
|
+
mountEffectImpl(4, 2, create, deps);
|
|
5714
5552
|
},
|
|
5715
5553
|
useMemo: function(nextCreate, deps) {
|
|
5716
5554
|
var hook = mountWorkInProgressHook();
|
|
@@ -6155,17 +5993,10 @@ No matching component was found for:
|
|
|
6155
5993
|
});
|
|
6156
5994
|
|
|
6157
5995
|
// stub:./devtools.js
|
|
6158
|
-
var
|
|
6159
|
-
__export(exports_devtools, {
|
|
6160
|
-
default: () => devtools_default
|
|
6161
|
-
});
|
|
6162
|
-
var devtools_default;
|
|
6163
|
-
var init_devtools = __esm(() => {
|
|
6164
|
-
devtools_default = {};
|
|
6165
|
-
});
|
|
5996
|
+
var init_devtools = () => {};
|
|
6166
5997
|
|
|
6167
5998
|
// ../../node_modules/.bun/mimic-fn@2.1.0/node_modules/mimic-fn/index.js
|
|
6168
|
-
var require_mimic_fn = __commonJS((exports, module)
|
|
5999
|
+
var require_mimic_fn = __commonJS(function(exports, module) {
|
|
6169
6000
|
var mimicFn = (to, from) => {
|
|
6170
6001
|
for (let prop of Reflect.ownKeys(from))
|
|
6171
6002
|
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
@@ -6176,18 +6007,18 @@ var require_mimic_fn = __commonJS((exports, module) => {
|
|
|
6176
6007
|
});
|
|
6177
6008
|
|
|
6178
6009
|
// ../../node_modules/.bun/onetime@5.1.2/node_modules/onetime/index.js
|
|
6179
|
-
var require_onetime = __commonJS((exports, module)
|
|
6010
|
+
var require_onetime = __commonJS(function(exports, module) {
|
|
6180
6011
|
var mimicFn = require_mimic_fn(), calledFunctions = /* @__PURE__ */ new WeakMap, onetime = (function_, options = {}) => {
|
|
6181
6012
|
if (typeof function_ !== "function")
|
|
6182
6013
|
throw TypeError("Expected a function");
|
|
6183
|
-
let returnValue, callCount = 0, functionName = function_.displayName || function_.name || "<anonymous>",
|
|
6184
|
-
if (calledFunctions.set(
|
|
6014
|
+
let returnValue, callCount = 0, functionName = function_.displayName || function_.name || "<anonymous>", onetime = function(...arguments_) {
|
|
6015
|
+
if (calledFunctions.set(onetime, ++callCount), callCount === 1)
|
|
6185
6016
|
returnValue = function_.apply(this, arguments_), function_ = null;
|
|
6186
6017
|
else if (options.throw === !0)
|
|
6187
6018
|
throw Error(`Function \`${functionName}\` can only be called once`);
|
|
6188
6019
|
return returnValue;
|
|
6189
6020
|
};
|
|
6190
|
-
return mimicFn(
|
|
6021
|
+
return mimicFn(onetime, function_), calledFunctions.set(onetime, callCount), onetime;
|
|
6191
6022
|
};
|
|
6192
6023
|
module.exports = onetime;
|
|
6193
6024
|
module.exports.default = onetime;
|
|
@@ -6199,7 +6030,7 @@ var require_onetime = __commonJS((exports, module) => {
|
|
|
6199
6030
|
});
|
|
6200
6031
|
|
|
6201
6032
|
// ../../node_modules/.bun/escape-string-regexp@2.0.0/node_modules/escape-string-regexp/index.js
|
|
6202
|
-
var require_escape_string_regexp = __commonJS((exports, module)
|
|
6033
|
+
var require_escape_string_regexp = __commonJS(function(exports, module) {
|
|
6203
6034
|
var matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
|
|
6204
6035
|
module.exports = (string) => {
|
|
6205
6036
|
if (typeof string !== "string")
|
|
@@ -6209,7 +6040,7 @@ var require_escape_string_regexp = __commonJS((exports, module) => {
|
|
|
6209
6040
|
});
|
|
6210
6041
|
|
|
6211
6042
|
// ../../node_modules/.bun/stack-utils@2.0.6/node_modules/stack-utils/index.js
|
|
6212
|
-
var require_stack_utils = __commonJS((exports, module)
|
|
6043
|
+
var require_stack_utils = __commonJS(function(exports, module) {
|
|
6213
6044
|
var escapeStringRegexp = require_escape_string_regexp(), cwd = typeof process === "object" && process && typeof process.cwd === "function" ? process.cwd() : ".", natives = [].concat(__require("module").builtinModules, "bootstrap_node", "node").map((n) => new RegExp(`(?:\\((?:node:)?${n}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${n}(?:\\.js)?:\\d+:\\d+$)`));
|
|
6214
6045
|
natives.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/, /\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/, /\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);
|
|
6215
6046
|
|
|
@@ -6267,7 +6098,7 @@ var require_stack_utils = __commonJS((exports, module) => {
|
|
|
6267
6098
|
if (typeof limit === "function")
|
|
6268
6099
|
fn = limit, limit = 1 / 0;
|
|
6269
6100
|
let { prepareStackTrace, stackTraceLimit } = Error;
|
|
6270
|
-
if (Error.prepareStackTrace = (
|
|
6101
|
+
if (Error.prepareStackTrace = (obj, site) => {
|
|
6271
6102
|
if (this._wrapCallSite)
|
|
6272
6103
|
return site.map(this._wrapCallSite);
|
|
6273
6104
|
return site;
|
|
@@ -6352,10 +6183,10 @@ var require_stack_utils = __commonJS((exports, module) => {
|
|
|
6352
6183
|
return res;
|
|
6353
6184
|
}
|
|
6354
6185
|
}
|
|
6355
|
-
function setFile(result, filename,
|
|
6186
|
+
function setFile(result, filename, cwd) {
|
|
6356
6187
|
if (filename) {
|
|
6357
|
-
if (filename = filename.replace(/\\/g, "/"), filename.startsWith(`${
|
|
6358
|
-
filename = filename.slice(
|
|
6188
|
+
if (filename = filename.replace(/\\/g, "/"), filename.startsWith(`${cwd}/`))
|
|
6189
|
+
filename = filename.slice(cwd.length + 1);
|
|
6359
6190
|
result.file = filename;
|
|
6360
6191
|
}
|
|
6361
6192
|
}
|
|
@@ -6374,9 +6205,8 @@ import { Stream } from "node:stream";
|
|
|
6374
6205
|
import process13 from "node:process";
|
|
6375
6206
|
|
|
6376
6207
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/ink.js
|
|
6377
|
-
|
|
6208
|
+
init_react_production();
|
|
6378
6209
|
import process12 from "node:process";
|
|
6379
|
-
|
|
6380
6210
|
// ../../node_modules/.bun/es-toolkit@1.53.1/node_modules/es-toolkit/dist/function/debounce.mjs
|
|
6381
6211
|
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
6382
6212
|
let pendingThis = void 0, pendingArgs = null, leading = edges != null && edges.includes("leading"), trailing = edges == null || edges.includes("trailing"), invoke = () => {
|
|
@@ -6432,9 +6262,7 @@ function debounce2(func, debounceMs = 0, options = {}) {
|
|
|
6432
6262
|
}
|
|
6433
6263
|
}
|
|
6434
6264
|
return _debounced.apply(this, args), result;
|
|
6435
|
-
}, flush = () =>
|
|
6436
|
-
return _debounced.flush(), result;
|
|
6437
|
-
};
|
|
6265
|
+
}, flush = () => (_debounced.flush(), result);
|
|
6438
6266
|
return debounced.cancel = _debounced.cancel, debounced.flush = flush, debounced;
|
|
6439
6267
|
}
|
|
6440
6268
|
|
|
@@ -6447,48 +6275,7 @@ function throttle(func, throttleMs = 0, options = {}) {
|
|
|
6447
6275
|
trailing
|
|
6448
6276
|
});
|
|
6449
6277
|
}
|
|
6450
|
-
|
|
6451
6278
|
// ../../node_modules/.bun/ansi-escapes@7.3.0/node_modules/ansi-escapes/base.js
|
|
6452
|
-
var exports_base = {};
|
|
6453
|
-
__export(exports_base, {
|
|
6454
|
-
synchronizedOutput: () => synchronizedOutput,
|
|
6455
|
-
setCwd: () => setCwd,
|
|
6456
|
-
scrollUp: () => scrollUp,
|
|
6457
|
-
scrollDown: () => scrollDown,
|
|
6458
|
-
link: () => link,
|
|
6459
|
-
image: () => image,
|
|
6460
|
-
iTerm: () => iTerm,
|
|
6461
|
-
exitAlternativeScreen: () => exitAlternativeScreen,
|
|
6462
|
-
eraseUp: () => eraseUp,
|
|
6463
|
-
eraseStartLine: () => eraseStartLine,
|
|
6464
|
-
eraseScreen: () => eraseScreen,
|
|
6465
|
-
eraseLines: () => eraseLines,
|
|
6466
|
-
eraseLine: () => eraseLine,
|
|
6467
|
-
eraseEndLine: () => eraseEndLine,
|
|
6468
|
-
eraseDown: () => eraseDown,
|
|
6469
|
-
enterAlternativeScreen: () => enterAlternativeScreen,
|
|
6470
|
-
endSynchronizedOutput: () => endSynchronizedOutput,
|
|
6471
|
-
cursorUp: () => cursorUp,
|
|
6472
|
-
cursorTo: () => cursorTo,
|
|
6473
|
-
cursorShow: () => cursorShow,
|
|
6474
|
-
cursorSavePosition: () => cursorSavePosition,
|
|
6475
|
-
cursorRestorePosition: () => cursorRestorePosition,
|
|
6476
|
-
cursorPrevLine: () => cursorPrevLine,
|
|
6477
|
-
cursorNextLine: () => cursorNextLine,
|
|
6478
|
-
cursorMove: () => cursorMove,
|
|
6479
|
-
cursorLeft: () => cursorLeft,
|
|
6480
|
-
cursorHide: () => cursorHide,
|
|
6481
|
-
cursorGetPosition: () => cursorGetPosition,
|
|
6482
|
-
cursorForward: () => cursorForward,
|
|
6483
|
-
cursorDown: () => cursorDown,
|
|
6484
|
-
cursorBackward: () => cursorBackward,
|
|
6485
|
-
clearViewport: () => clearViewport,
|
|
6486
|
-
clearTerminal: () => clearTerminal,
|
|
6487
|
-
clearScreen: () => clearScreen,
|
|
6488
|
-
beginSynchronizedOutput: () => beginSynchronizedOutput,
|
|
6489
|
-
beep: () => beep,
|
|
6490
|
-
ConEmu: () => ConEmu
|
|
6491
|
-
});
|
|
6492
6279
|
import process2 from "node:process";
|
|
6493
6280
|
import os from "node:os";
|
|
6494
6281
|
|
|
@@ -6496,39 +6283,27 @@ import os from "node:os";
|
|
|
6496
6283
|
var isBrowser = globalThis.window?.document !== void 0, isNode = globalThis.process?.versions?.node !== void 0, isBun = globalThis.process?.versions?.bun !== void 0, isDeno = globalThis.Deno?.version?.deno !== void 0, isElectron = globalThis.process?.versions?.electron !== void 0, isJsDom = globalThis.navigator?.userAgent?.includes("jsdom") === !0, isWebWorker = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, isDedicatedWorker = typeof DedicatedWorkerGlobalScope < "u" && globalThis instanceof DedicatedWorkerGlobalScope, isSharedWorker = typeof SharedWorkerGlobalScope < "u" && globalThis instanceof SharedWorkerGlobalScope, isServiceWorker = typeof ServiceWorkerGlobalScope < "u" && globalThis instanceof ServiceWorkerGlobalScope, platform = globalThis.navigator?.userAgentData?.platform, isMacOs = platform === "macOS" || globalThis.navigator?.platform === "MacIntel" || globalThis.navigator?.userAgent?.includes(" Mac ") === !0 || globalThis.process?.platform === "darwin", isWindows = platform === "Windows" || globalThis.navigator?.platform === "Win32" || globalThis.process?.platform === "win32", isLinux = platform === "Linux" || globalThis.navigator?.platform?.startsWith("Linux") === !0 || globalThis.navigator?.userAgent?.includes(" Linux ") === !0 || globalThis.process?.platform === "linux", isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform), isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === !0 || globalThis.process?.platform === "android";
|
|
6497
6284
|
|
|
6498
6285
|
// ../../node_modules/.bun/ansi-escapes@7.3.0/node_modules/ansi-escapes/base.js
|
|
6499
|
-
var ESC = "\x1B["
|
|
6286
|
+
var ESC = "\x1B[";
|
|
6287
|
+
var SEP = ";", isTerminalApp = !isBrowser && process2.env.TERM_PROGRAM === "Apple_Terminal", isWindows2 = !isBrowser && process2.platform === "win32", isTmux = !isBrowser && (process2.env.TERM?.startsWith("screen") || process2.env.TERM?.startsWith("tmux") || process2.env.TMUX !== void 0), cwdFunction = isBrowser ? () => {
|
|
6500
6288
|
throw Error("`process.cwd()` only works in Node.js, not the browser.");
|
|
6501
|
-
} : process2.cwd
|
|
6502
|
-
|
|
6503
|
-
return "\x1BPtmux;" + sequence.replaceAll("\x1B", "\x1B\x1B") + "\x1B\\";
|
|
6504
|
-
return sequence;
|
|
6505
|
-
}, cursorTo = (x, y) => {
|
|
6289
|
+
} : process2.cwd;
|
|
6290
|
+
var cursorTo = (x, y) => {
|
|
6506
6291
|
if (typeof x !== "number")
|
|
6507
6292
|
throw TypeError("The `x` argument is required");
|
|
6508
6293
|
if (typeof y !== "number")
|
|
6509
6294
|
return ESC + (x + 1) + "G";
|
|
6510
6295
|
return ESC + (y + 1) + SEP + (x + 1) + "H";
|
|
6511
|
-
}
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
let returnValue = "";
|
|
6515
|
-
if (x < 0)
|
|
6516
|
-
returnValue += ESC + -x + "D";
|
|
6517
|
-
else if (x > 0)
|
|
6518
|
-
returnValue += ESC + x + "C";
|
|
6519
|
-
if (y < 0)
|
|
6520
|
-
returnValue += ESC + -y + "A";
|
|
6521
|
-
else if (y > 0)
|
|
6522
|
-
returnValue += ESC + y + "B";
|
|
6523
|
-
return returnValue;
|
|
6524
|
-
}, cursorUp = (count = 1) => ESC + count + "A", cursorDown = (count = 1) => ESC + count + "B", cursorForward = (count = 1) => ESC + count + "C", cursorBackward = (count = 1) => ESC + count + "D", cursorLeft = ESC + "G", cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s", cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u", cursorGetPosition = ESC + "6n", cursorNextLine = ESC + "E", cursorPrevLine = ESC + "F", cursorHide = ESC + "?25l", cursorShow = ESC + "?25h", eraseLines = (count) => {
|
|
6296
|
+
};
|
|
6297
|
+
var cursorUp = (count = 1) => ESC + count + "A", cursorDown = (count = 1) => ESC + count + "B";
|
|
6298
|
+
var cursorLeft = ESC + "G", cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s", cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u", cursorGetPosition = ESC + "6n", cursorNextLine = ESC + "E", cursorPrevLine = ESC + "F", cursorHide = ESC + "?25l", cursorShow = ESC + "?25h", eraseLines = (count) => {
|
|
6525
6299
|
let clear = "";
|
|
6526
6300
|
for (let i = 0;i < count; i++)
|
|
6527
6301
|
clear += eraseLine + (i < count - 1 ? cursorUp() : "");
|
|
6528
6302
|
if (count)
|
|
6529
6303
|
clear += cursorLeft;
|
|
6530
6304
|
return clear;
|
|
6531
|
-
}, eraseEndLine = ESC + "K", eraseStartLine = ESC + "1K", eraseLine = ESC + "2K", eraseDown = ESC + "J", eraseUp = ESC + "1J", eraseScreen = ESC + "2J", scrollUp = ESC + "S", scrollDown = ESC + "T"
|
|
6305
|
+
}, eraseEndLine = ESC + "K", eraseStartLine = ESC + "1K", eraseLine = ESC + "2K", eraseDown = ESC + "J", eraseUp = ESC + "1J", eraseScreen = ESC + "2J", scrollUp = ESC + "S", scrollDown = ESC + "T";
|
|
6306
|
+
var clearViewport = `${eraseScreen}${ESC}H`, isOldWindows = () => {
|
|
6532
6307
|
if (isBrowser || !isWindows2)
|
|
6533
6308
|
return !1;
|
|
6534
6309
|
let parts = os.release().split("."), major = Number(parts[0]), build = Number(parts[2] ?? 0);
|
|
@@ -6537,34 +6312,7 @@ var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isTerminalApp = !isBr
|
|
|
6537
6312
|
if (major === 10 && build < 10586)
|
|
6538
6313
|
return !0;
|
|
6539
6314
|
return !1;
|
|
6540
|
-
}, clearTerminal = isOldWindows() ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`, enterAlternativeScreen = ESC + "?1049h", exitAlternativeScreen = ESC + "?1049l", beginSynchronizedOutput = ESC + "?2026h", endSynchronizedOutput = ESC + "?2026l"
|
|
6541
|
-
let openLink = wrapOsc(`${OSC}8${SEP}${SEP}${url}${BEL}`), closeLink = wrapOsc(`${OSC}8${SEP}${SEP}${BEL}`);
|
|
6542
|
-
return openLink + text + closeLink;
|
|
6543
|
-
}, image = (data, options = {}) => {
|
|
6544
|
-
let returnValue = `${OSC}1337;File=inline=1`;
|
|
6545
|
-
if (options.width)
|
|
6546
|
-
returnValue += `;width=${options.width}`;
|
|
6547
|
-
if (options.height)
|
|
6548
|
-
returnValue += `;height=${options.height}`;
|
|
6549
|
-
if (options.preserveAspectRatio === !1)
|
|
6550
|
-
returnValue += ";preserveAspectRatio=0";
|
|
6551
|
-
let imageBuffer = Buffer.from(data);
|
|
6552
|
-
return wrapOsc(returnValue + `;size=${imageBuffer.byteLength}:` + imageBuffer.toString("base64") + BEL);
|
|
6553
|
-
}, iTerm = {
|
|
6554
|
-
setCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}50;CurrentDir=${cwd}${BEL}`),
|
|
6555
|
-
annotation(message, options = {}) {
|
|
6556
|
-
let returnValue = `${OSC}1337;`, hasX = options.x !== void 0, hasY = options.y !== void 0;
|
|
6557
|
-
if ((hasX || hasY) && !(hasX && hasY && options.length !== void 0))
|
|
6558
|
-
throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
|
6559
|
-
if (message = message.replaceAll("|", ""), returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=", options.length > 0)
|
|
6560
|
-
returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
|
6561
|
-
else
|
|
6562
|
-
returnValue += message;
|
|
6563
|
-
return wrapOsc(returnValue + BEL);
|
|
6564
|
-
}
|
|
6565
|
-
}, ConEmu = {
|
|
6566
|
-
setCwd: (cwd = cwdFunction()) => wrapOsc(`${OSC}9;9;${cwd}${BEL}`)
|
|
6567
|
-
}, setCwd = (cwd = cwdFunction()) => iTerm.setCwd(cwd) + ConEmu.setCwd(cwd);
|
|
6315
|
+
}, clearTerminal = isOldWindows() ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`, enterAlternativeScreen = ESC + "?1049h", exitAlternativeScreen = ESC + "?1049l", beginSynchronizedOutput = ESC + "?2026h", endSynchronizedOutput = ESC + "?2026l";
|
|
6568
6316
|
// ../../node_modules/.bun/is-in-ci@2.0.0/node_modules/is-in-ci/index.js
|
|
6569
6317
|
import { env } from "node:process";
|
|
6570
6318
|
var check = (key) => (key in env) && env[key] !== "0" && env[key] !== "false", isInCi = check("CI") || check("CONTINUOUS_INTEGRATION"), is_in_ci_default = isInCi;
|
|
@@ -6646,10 +6394,10 @@ var $LegacyRoot = 0, $NoEventPriority = 0;
|
|
|
6646
6394
|
// ../../node_modules/.bun/yoga-layout@3.2.1/node_modules/yoga-layout/dist/binaries/yoga-wasm-base64-esm.js
|
|
6647
6395
|
var loadYoga = (() => {
|
|
6648
6396
|
var _scriptDir = import.meta.url;
|
|
6649
|
-
return function(
|
|
6650
|
-
|
|
6397
|
+
return function(loadYoga) {
|
|
6398
|
+
loadYoga = loadYoga || {};
|
|
6651
6399
|
var h;
|
|
6652
|
-
h || (h = typeof
|
|
6400
|
+
h || (h = typeof loadYoga < "u" ? loadYoga : {});
|
|
6653
6401
|
var aa, ca;
|
|
6654
6402
|
h.ready = new Promise(function(a, b) {
|
|
6655
6403
|
aa = a, ca = b;
|
|
@@ -6771,9 +6519,7 @@ var loadYoga = (() => {
|
|
|
6771
6519
|
function L(a) {
|
|
6772
6520
|
throw new K(a);
|
|
6773
6521
|
}
|
|
6774
|
-
var M = (a) => {
|
|
6775
|
-
return a || L("Cannot use deleted val. handle = " + a), J[a].value;
|
|
6776
|
-
}, Ea = (a) => {
|
|
6522
|
+
var M = (a) => (a || L("Cannot use deleted val. handle = " + a), J[a].value), Ea = (a) => {
|
|
6777
6523
|
switch (a) {
|
|
6778
6524
|
case void 0:
|
|
6779
6525
|
return 1;
|
|
@@ -7257,7 +7003,7 @@ var loadYoga = (() => {
|
|
|
7257
7003
|
V([a], f, (g) => {
|
|
7258
7004
|
var k = {};
|
|
7259
7005
|
return e.forEach((m, l) => {
|
|
7260
|
-
var n = g[l],
|
|
7006
|
+
var n = g[l], { ra: p, sa: r } = m, u = g[l + e.length], { ya: t, Aa: y } = m;
|
|
7261
7007
|
k[m.oa] = { read: (B) => n.fromWireType(p(r, B)), write: (B, ba) => {
|
|
7262
7008
|
var I = [];
|
|
7263
7009
|
t(y, B, u.toWireType(I, ba)), Wa(I);
|
|
@@ -7693,47 +7439,47 @@ var loadYoga = (() => {
|
|
|
7693
7439
|
if (h.preInit)
|
|
7694
7440
|
for (typeof h.preInit == "function" && (h.preInit = [h.preInit]);0 < h.preInit.length; )
|
|
7695
7441
|
h.preInit.pop()();
|
|
7696
|
-
return Mb(),
|
|
7442
|
+
return Mb(), loadYoga.ready;
|
|
7697
7443
|
};
|
|
7698
7444
|
})(), yoga_wasm_base64_esm_default = loadYoga;
|
|
7699
7445
|
|
|
7700
7446
|
// ../../node_modules/.bun/yoga-layout@3.2.1/node_modules/yoga-layout/dist/src/generated/YGEnums.js
|
|
7701
|
-
var Align = /* @__PURE__ */ function(
|
|
7702
|
-
return
|
|
7703
|
-
}({}), BoxSizing = /* @__PURE__ */ function(
|
|
7704
|
-
return
|
|
7705
|
-
}({}), Dimension = /* @__PURE__ */ function(
|
|
7706
|
-
return
|
|
7707
|
-
}({}), Direction = /* @__PURE__ */ function(
|
|
7708
|
-
return
|
|
7709
|
-
}({}), Display = /* @__PURE__ */ function(
|
|
7710
|
-
return
|
|
7711
|
-
}({}), Edge = /* @__PURE__ */ function(
|
|
7712
|
-
return
|
|
7713
|
-
}({}), Errata = /* @__PURE__ */ function(
|
|
7714
|
-
return
|
|
7715
|
-
}({}), ExperimentalFeature = /* @__PURE__ */ function(
|
|
7716
|
-
return
|
|
7717
|
-
}({}), FlexDirection = /* @__PURE__ */ function(
|
|
7718
|
-
return
|
|
7719
|
-
}({}), Gutter = /* @__PURE__ */ function(
|
|
7720
|
-
return
|
|
7721
|
-
}({}), Justify = /* @__PURE__ */ function(
|
|
7722
|
-
return
|
|
7723
|
-
}({}), LogLevel = /* @__PURE__ */ function(
|
|
7724
|
-
return
|
|
7725
|
-
}({}), MeasureMode = /* @__PURE__ */ function(
|
|
7726
|
-
return
|
|
7727
|
-
}({}), NodeType = /* @__PURE__ */ function(
|
|
7728
|
-
return
|
|
7729
|
-
}({}), Overflow = /* @__PURE__ */ function(
|
|
7730
|
-
return
|
|
7731
|
-
}({}), PositionType = /* @__PURE__ */ function(
|
|
7732
|
-
return
|
|
7733
|
-
}({}), Unit = /* @__PURE__ */ function(
|
|
7734
|
-
return
|
|
7735
|
-
}({}), Wrap = /* @__PURE__ */ function(
|
|
7736
|
-
return
|
|
7447
|
+
var Align = /* @__PURE__ */ function(Align) {
|
|
7448
|
+
return Align[Align.Auto = 0] = "Auto", Align[Align.FlexStart = 1] = "FlexStart", Align[Align.Center = 2] = "Center", Align[Align.FlexEnd = 3] = "FlexEnd", Align[Align.Stretch = 4] = "Stretch", Align[Align.Baseline = 5] = "Baseline", Align[Align.SpaceBetween = 6] = "SpaceBetween", Align[Align.SpaceAround = 7] = "SpaceAround", Align[Align.SpaceEvenly = 8] = "SpaceEvenly", Align;
|
|
7449
|
+
}({}), BoxSizing = /* @__PURE__ */ function(BoxSizing) {
|
|
7450
|
+
return BoxSizing[BoxSizing.BorderBox = 0] = "BorderBox", BoxSizing[BoxSizing.ContentBox = 1] = "ContentBox", BoxSizing;
|
|
7451
|
+
}({}), Dimension = /* @__PURE__ */ function(Dimension) {
|
|
7452
|
+
return Dimension[Dimension.Width = 0] = "Width", Dimension[Dimension.Height = 1] = "Height", Dimension;
|
|
7453
|
+
}({}), Direction = /* @__PURE__ */ function(Direction) {
|
|
7454
|
+
return Direction[Direction.Inherit = 0] = "Inherit", Direction[Direction.LTR = 1] = "LTR", Direction[Direction.RTL = 2] = "RTL", Direction;
|
|
7455
|
+
}({}), Display = /* @__PURE__ */ function(Display) {
|
|
7456
|
+
return Display[Display.Flex = 0] = "Flex", Display[Display.None = 1] = "None", Display[Display.Contents = 2] = "Contents", Display;
|
|
7457
|
+
}({}), Edge = /* @__PURE__ */ function(Edge) {
|
|
7458
|
+
return Edge[Edge.Left = 0] = "Left", Edge[Edge.Top = 1] = "Top", Edge[Edge.Right = 2] = "Right", Edge[Edge.Bottom = 3] = "Bottom", Edge[Edge.Start = 4] = "Start", Edge[Edge.End = 5] = "End", Edge[Edge.Horizontal = 6] = "Horizontal", Edge[Edge.Vertical = 7] = "Vertical", Edge[Edge.All = 8] = "All", Edge;
|
|
7459
|
+
}({}), Errata = /* @__PURE__ */ function(Errata) {
|
|
7460
|
+
return Errata[Errata.None = 0] = "None", Errata[Errata.StretchFlexBasis = 1] = "StretchFlexBasis", Errata[Errata.AbsolutePositionWithoutInsetsExcludesPadding = 2] = "AbsolutePositionWithoutInsetsExcludesPadding", Errata[Errata.AbsolutePercentAgainstInnerSize = 4] = "AbsolutePercentAgainstInnerSize", Errata[Errata.All = 2147483647] = "All", Errata[Errata.Classic = 2147483646] = "Classic", Errata;
|
|
7461
|
+
}({}), ExperimentalFeature = /* @__PURE__ */ function(ExperimentalFeature) {
|
|
7462
|
+
return ExperimentalFeature[ExperimentalFeature.WebFlexBasis = 0] = "WebFlexBasis", ExperimentalFeature;
|
|
7463
|
+
}({}), FlexDirection = /* @__PURE__ */ function(FlexDirection) {
|
|
7464
|
+
return FlexDirection[FlexDirection.Column = 0] = "Column", FlexDirection[FlexDirection.ColumnReverse = 1] = "ColumnReverse", FlexDirection[FlexDirection.Row = 2] = "Row", FlexDirection[FlexDirection.RowReverse = 3] = "RowReverse", FlexDirection;
|
|
7465
|
+
}({}), Gutter = /* @__PURE__ */ function(Gutter) {
|
|
7466
|
+
return Gutter[Gutter.Column = 0] = "Column", Gutter[Gutter.Row = 1] = "Row", Gutter[Gutter.All = 2] = "All", Gutter;
|
|
7467
|
+
}({}), Justify = /* @__PURE__ */ function(Justify) {
|
|
7468
|
+
return Justify[Justify.FlexStart = 0] = "FlexStart", Justify[Justify.Center = 1] = "Center", Justify[Justify.FlexEnd = 2] = "FlexEnd", Justify[Justify.SpaceBetween = 3] = "SpaceBetween", Justify[Justify.SpaceAround = 4] = "SpaceAround", Justify[Justify.SpaceEvenly = 5] = "SpaceEvenly", Justify;
|
|
7469
|
+
}({}), LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
7470
|
+
return LogLevel[LogLevel.Error = 0] = "Error", LogLevel[LogLevel.Warn = 1] = "Warn", LogLevel[LogLevel.Info = 2] = "Info", LogLevel[LogLevel.Debug = 3] = "Debug", LogLevel[LogLevel.Verbose = 4] = "Verbose", LogLevel[LogLevel.Fatal = 5] = "Fatal", LogLevel;
|
|
7471
|
+
}({}), MeasureMode = /* @__PURE__ */ function(MeasureMode) {
|
|
7472
|
+
return MeasureMode[MeasureMode.Undefined = 0] = "Undefined", MeasureMode[MeasureMode.Exactly = 1] = "Exactly", MeasureMode[MeasureMode.AtMost = 2] = "AtMost", MeasureMode;
|
|
7473
|
+
}({}), NodeType = /* @__PURE__ */ function(NodeType) {
|
|
7474
|
+
return NodeType[NodeType.Default = 0] = "Default", NodeType[NodeType.Text = 1] = "Text", NodeType;
|
|
7475
|
+
}({}), Overflow = /* @__PURE__ */ function(Overflow) {
|
|
7476
|
+
return Overflow[Overflow.Visible = 0] = "Visible", Overflow[Overflow.Hidden = 1] = "Hidden", Overflow[Overflow.Scroll = 2] = "Scroll", Overflow;
|
|
7477
|
+
}({}), PositionType = /* @__PURE__ */ function(PositionType) {
|
|
7478
|
+
return PositionType[PositionType.Static = 0] = "Static", PositionType[PositionType.Relative = 1] = "Relative", PositionType[PositionType.Absolute = 2] = "Absolute", PositionType;
|
|
7479
|
+
}({}), Unit = /* @__PURE__ */ function(Unit) {
|
|
7480
|
+
return Unit[Unit.Undefined = 0] = "Undefined", Unit[Unit.Point = 1] = "Point", Unit[Unit.Percent = 2] = "Percent", Unit[Unit.Auto = 3] = "Auto", Unit;
|
|
7481
|
+
}({}), Wrap = /* @__PURE__ */ function(Wrap) {
|
|
7482
|
+
return Wrap[Wrap.NoWrap = 0] = "NoWrap", Wrap[Wrap.Wrap = 1] = "Wrap", Wrap[Wrap.WrapReverse = 2] = "WrapReverse", Wrap;
|
|
7737
7483
|
}({}), constants = {
|
|
7738
7484
|
ALIGN_AUTO: Align.Auto,
|
|
7739
7485
|
ALIGN_FLEX_START: Align.FlexStart,
|
|
@@ -7872,9 +7618,7 @@ function wrapAssembly(lib) {
|
|
|
7872
7618
|
original.call(this, wrapDirtiedFunc(dirtiedFunc));
|
|
7873
7619
|
}), patch(lib.Config.prototype, "free", function() {
|
|
7874
7620
|
lib.Config.destroy(this);
|
|
7875
|
-
}), patch(lib.Node, "create", (_, config) => {
|
|
7876
|
-
return config ? lib.Node.createWithConfig(config) : lib.Node.createDefault();
|
|
7877
|
-
}), patch(lib.Node.prototype, "free", function() {
|
|
7621
|
+
}), patch(lib.Node, "create", (_, config) => config ? lib.Node.createWithConfig(config) : lib.Node.createDefault()), patch(lib.Node.prototype, "free", function() {
|
|
7878
7622
|
lib.Node.destroy(this);
|
|
7879
7623
|
}), patch(lib.Node.prototype, "freeRecursive", function() {
|
|
7880
7624
|
for (let t = 0, T = this.getChildCount();t < T; ++t)
|
|
@@ -8537,17 +8281,17 @@ import process3 from "node:process";
|
|
|
8537
8281
|
import { execFileSync } from "node:child_process";
|
|
8538
8282
|
import fs from "node:fs";
|
|
8539
8283
|
import tty from "node:tty";
|
|
8540
|
-
var defaultColumns = 80, defaultRows = 24, exec2 = (command, arguments_, { shell, env
|
|
8284
|
+
var defaultColumns = 80, defaultRows = 24, exec2 = (command, arguments_, { shell, env } = {}) => execFileSync(command, arguments_, {
|
|
8541
8285
|
encoding: "utf8",
|
|
8542
8286
|
stdio: ["ignore", "pipe", "ignore"],
|
|
8543
8287
|
timeout: 500,
|
|
8544
8288
|
shell,
|
|
8545
|
-
env
|
|
8546
|
-
}).trim(),
|
|
8289
|
+
env
|
|
8290
|
+
}).trim(), create2 = (columns, rows) => ({
|
|
8547
8291
|
columns: Number.parseInt(columns, 10),
|
|
8548
8292
|
rows: Number.parseInt(rows, 10)
|
|
8549
8293
|
}), createIfNotDefault = (maybeColumns, maybeRows) => {
|
|
8550
|
-
let { columns, rows } =
|
|
8294
|
+
let { columns, rows } = create2(maybeColumns, maybeRows);
|
|
8551
8295
|
if (Number.isNaN(columns) || Number.isNaN(rows))
|
|
8552
8296
|
return;
|
|
8553
8297
|
if (columns === defaultColumns && rows === defaultRows)
|
|
@@ -8571,13 +8315,13 @@ var defaultColumns = 80, defaultRows = 24, exec2 = (command, arguments_, { shell
|
|
|
8571
8315
|
}
|
|
8572
8316
|
};
|
|
8573
8317
|
function terminalSize() {
|
|
8574
|
-
let { env
|
|
8318
|
+
let { env, stdout, stderr } = process3;
|
|
8575
8319
|
if (stdout?.columns && stdout?.rows)
|
|
8576
|
-
return
|
|
8320
|
+
return create2(stdout.columns, stdout.rows);
|
|
8577
8321
|
if (stderr?.columns && stderr?.rows)
|
|
8578
|
-
return
|
|
8579
|
-
if (
|
|
8580
|
-
return
|
|
8322
|
+
return create2(stderr.columns, stderr.rows);
|
|
8323
|
+
if (env.COLUMNS && env.LINES)
|
|
8324
|
+
return create2(env.COLUMNS, env.LINES);
|
|
8581
8325
|
let fallback = {
|
|
8582
8326
|
columns: defaultColumns,
|
|
8583
8327
|
rows: defaultRows
|
|
@@ -8625,7 +8369,7 @@ var getWindowSize = (stdout) => {
|
|
|
8625
8369
|
var import_react_reconciler = __toESM(require_react_reconciler_production(), 1);
|
|
8626
8370
|
import process4 from "node:process";
|
|
8627
8371
|
init_scheduler_production();
|
|
8628
|
-
|
|
8372
|
+
init_react_production();
|
|
8629
8373
|
|
|
8630
8374
|
// ../../node_modules/.bun/widest-line@6.0.0/node_modules/widest-line/index.js
|
|
8631
8375
|
function widestLine(string) {
|
|
@@ -8881,27 +8625,27 @@ function getSgrFragments(code) {
|
|
|
8881
8625
|
if (codeNumber === SGR_EXTENDED_FOREGROUND_CODE || codeNumber === SGR_EXTENDED_BACKGROUND_CODE) {
|
|
8882
8626
|
let colorType = Number.parseInt(rawCodes[index + 1], 10);
|
|
8883
8627
|
if (colorType === SGR_COLOR_TYPE_ANSI_256 && index + SGR_ANSI_256_LAST_PARAMETER_OFFSET < rawCodes.length) {
|
|
8884
|
-
let
|
|
8628
|
+
let openCode = createSgrCode(sgrPrefix, rawCodes.slice(index, index + SGR_ANSI_256_FRAGMENT_LENGTH));
|
|
8885
8629
|
fragments.push({
|
|
8886
8630
|
type: "start",
|
|
8887
|
-
code:
|
|
8631
|
+
code: openCode,
|
|
8888
8632
|
endCode: ansi_styles_default2.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE ? SGR_DEFAULT_FOREGROUND_CODE : SGR_DEFAULT_BACKGROUND_CODE)
|
|
8889
8633
|
}), index += SGR_ANSI_256_FRAGMENT_LENGTH;
|
|
8890
8634
|
continue;
|
|
8891
8635
|
}
|
|
8892
8636
|
if (colorType === SGR_COLOR_TYPE_TRUECOLOR && index + SGR_TRUECOLOR_LAST_PARAMETER_OFFSET < rawCodes.length) {
|
|
8893
|
-
let
|
|
8637
|
+
let openCode = createSgrCode(sgrPrefix, rawCodes.slice(index, index + SGR_TRUECOLOR_FRAGMENT_LENGTH));
|
|
8894
8638
|
fragments.push({
|
|
8895
8639
|
type: "start",
|
|
8896
|
-
code:
|
|
8640
|
+
code: openCode,
|
|
8897
8641
|
endCode: ansi_styles_default2.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE ? SGR_DEFAULT_FOREGROUND_CODE : SGR_DEFAULT_BACKGROUND_CODE)
|
|
8898
8642
|
}), index += SGR_TRUECOLOR_FRAGMENT_LENGTH;
|
|
8899
8643
|
continue;
|
|
8900
8644
|
}
|
|
8901
|
-
let
|
|
8645
|
+
let openCode = createSgrCode(sgrPrefix, [rawCodes[index]]);
|
|
8902
8646
|
fragments.push({
|
|
8903
8647
|
type: "start",
|
|
8904
|
-
code:
|
|
8648
|
+
code: openCode,
|
|
8905
8649
|
endCode: ansi_styles_default2.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE ? SGR_DEFAULT_FOREGROUND_CODE : SGR_DEFAULT_BACKGROUND_CODE)
|
|
8906
8650
|
}), index++;
|
|
8907
8651
|
continue;
|
|
@@ -8915,10 +8659,10 @@ function getSgrFragments(code) {
|
|
|
8915
8659
|
}
|
|
8916
8660
|
let mappedEndCode = ansi_styles_default2.codes.get(codeNumber);
|
|
8917
8661
|
if (mappedEndCode !== void 0) {
|
|
8918
|
-
let
|
|
8662
|
+
let openCode = createSgrCode(sgrPrefix, [rawCodes[index]]);
|
|
8919
8663
|
fragments.push({
|
|
8920
8664
|
type: "start",
|
|
8921
|
-
code:
|
|
8665
|
+
code: openCode,
|
|
8922
8666
|
endCode: ansi_styles_default2.color.ansi(mappedEndCode)
|
|
8923
8667
|
}), index++;
|
|
8924
8668
|
continue;
|
|
@@ -9490,8 +9234,8 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
9490
9234
|
}
|
|
9491
9235
|
if (position === "start") {
|
|
9492
9236
|
if (preferTruncationOnSpace) {
|
|
9493
|
-
let nearestSpace = getIndexOfNearestSpace(visibleColumns, length - columns + stringWidth(truncationCharacter), !0),
|
|
9494
|
-
return prependWithInheritedStyleFromStart(truncationCharacter,
|
|
9237
|
+
let nearestSpace = getIndexOfNearestSpace(visibleColumns, length - columns + stringWidth(truncationCharacter), !0), right = sliceAnsi(text, getIndexAfterSpaces(visibleColumns, nearestSpace), length);
|
|
9238
|
+
return prependWithInheritedStyleFromStart(truncationCharacter, right);
|
|
9495
9239
|
}
|
|
9496
9240
|
if (space)
|
|
9497
9241
|
truncationCharacter += " ";
|
|
@@ -9511,8 +9255,8 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
9511
9255
|
return sliceAnsi(text, 0, half) + truncationCharacter + sliceAnsi(text, length - (columns - half) + truncationWidth, length);
|
|
9512
9256
|
}
|
|
9513
9257
|
if (preferTruncationOnSpace) {
|
|
9514
|
-
let nearestSpace = getIndexOfNearestSpace(visibleColumns, columns - stringWidth(truncationCharacter)),
|
|
9515
|
-
return appendWithInheritedStyleFromEnd(
|
|
9258
|
+
let nearestSpace = getIndexOfNearestSpace(visibleColumns, columns - stringWidth(truncationCharacter)), left = sliceAnsi(text, 0, nearestSpace);
|
|
9259
|
+
return appendWithInheritedStyleFromEnd(left, truncationCharacter);
|
|
9516
9260
|
}
|
|
9517
9261
|
if (space)
|
|
9518
9262
|
truncationCharacter = ` ${truncationCharacter}`;
|
|
@@ -10103,7 +9847,7 @@ if (process4.env.DEV === "true") {
|
|
|
10103
9847
|
import.meta.resolve("react-devtools-core"), isDevtoolsInstalled = !0;
|
|
10104
9848
|
} catch {}
|
|
10105
9849
|
if (isDevtoolsInstalled)
|
|
10106
|
-
await Promise.resolve().then(() => (init_devtools(),
|
|
9850
|
+
await Promise.resolve().then(() => (init_devtools(), {}));
|
|
10107
9851
|
}
|
|
10108
9852
|
var diff = (before, after) => {
|
|
10109
9853
|
if (before === after)
|
|
@@ -10124,7 +9868,7 @@ var diff = (before, after) => {
|
|
|
10124
9868
|
node?.unsetMeasureFunc(), node?.freeRecursive();
|
|
10125
9869
|
}, currentUpdatePriority = $NoEventPriority, currentRootNode;
|
|
10126
9870
|
async function loadPackageJson() {
|
|
10127
|
-
let
|
|
9871
|
+
let fs = await import("node:fs"), content = fs.readFileSync(new URL("../package.json", import.meta.url), "utf8"), parsedContent = JSON.parse(content);
|
|
10128
9872
|
return {
|
|
10129
9873
|
name: parsedContent?.name,
|
|
10130
9874
|
version: parsedContent?.version
|
|
@@ -10132,7 +9876,7 @@ async function loadPackageJson() {
|
|
|
10132
9876
|
}
|
|
10133
9877
|
var packageInfo = {
|
|
10134
9878
|
name: "ink",
|
|
10135
|
-
version:
|
|
9879
|
+
version: $version
|
|
10136
9880
|
};
|
|
10137
9881
|
if (process4.env.DEV === "true")
|
|
10138
9882
|
try {
|
|
@@ -10292,7 +10036,7 @@ var reconciler_default = import_react_reconciler.default({
|
|
|
10292
10036
|
return !0;
|
|
10293
10037
|
},
|
|
10294
10038
|
NotPendingTransition: void 0,
|
|
10295
|
-
HostTransitionContext:
|
|
10039
|
+
HostTransitionContext: $createContext(null),
|
|
10296
10040
|
resetFormInstance() {},
|
|
10297
10041
|
requestPostPaintCallback() {},
|
|
10298
10042
|
shouldAttemptEagerTransition() {
|
|
@@ -10333,14 +10077,12 @@ function indentString(string, count = 1, options = {}) {
|
|
|
10333
10077
|
throw TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof indent}\``);
|
|
10334
10078
|
if (count === 0)
|
|
10335
10079
|
return string;
|
|
10336
|
-
let
|
|
10337
|
-
return string.replace(
|
|
10080
|
+
let regex = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
|
10081
|
+
return string.replace(regex, indent.repeat(count));
|
|
10338
10082
|
}
|
|
10339
10083
|
|
|
10340
10084
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/get-max-width.js
|
|
10341
|
-
var getMaxWidth = (yogaNode) =>
|
|
10342
|
-
return yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT);
|
|
10343
|
-
}, get_max_width_default = getMaxWidth;
|
|
10085
|
+
var getMaxWidth = (yogaNode) => yogaNode.getComputedWidth() - yogaNode.getComputedPadding(src_default.EDGE_LEFT) - yogaNode.getComputedPadding(src_default.EDGE_RIGHT) - yogaNode.getComputedBorder(src_default.EDGE_LEFT) - yogaNode.getComputedBorder(src_default.EDGE_RIGHT), get_max_width_default = getMaxWidth;
|
|
10344
10086
|
// ../../node_modules/.bun/cli-boxes@4.0.1/node_modules/cli-boxes/boxes.json
|
|
10345
10087
|
var boxes_default = {
|
|
10346
10088
|
single: {
|
|
@@ -10810,9 +10552,7 @@ var chalk = createChalk(), chalkStderr = createChalk({ level: stderrColor ? stde
|
|
|
10810
10552
|
var source_default = chalk;
|
|
10811
10553
|
|
|
10812
10554
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/colorize.js
|
|
10813
|
-
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/, ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/, isNamedColor = (color) => {
|
|
10814
|
-
return color in source_default;
|
|
10815
|
-
}, colorize = (str, color, type) => {
|
|
10555
|
+
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/, ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/, isNamedColor = (color) => (color in source_default), colorize = (str, color, type) => {
|
|
10816
10556
|
if (!color)
|
|
10817
10557
|
return str;
|
|
10818
10558
|
if (isNamedColor(color)) {
|
|
@@ -10911,12 +10651,10 @@ var applyPaddingToText = (node, text) => {
|
|
|
10911
10651
|
else if (node.nodeName === "ink-box" || node.nodeName === "ink-root") {
|
|
10912
10652
|
let separator = node.style.flexDirection === "row" || node.style.flexDirection === "row-reverse" ? " " : `
|
|
10913
10653
|
`;
|
|
10914
|
-
output = (node.style.flexDirection === "row-reverse" || node.style.flexDirection === "column-reverse" ? [...node.childNodes].reverse() : [...node.childNodes]).map((childNode) => {
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
});
|
|
10919
|
-
}).filter(Boolean).join(separator);
|
|
10654
|
+
output = (node.style.flexDirection === "row-reverse" || node.style.flexDirection === "column-reverse" ? [...node.childNodes].reverse() : [...node.childNodes]).map((childNode) => renderNodeToScreenReaderOutput(childNode, {
|
|
10655
|
+
parentRole: node.internal_accessibility?.role,
|
|
10656
|
+
skipStaticElements: options.skipStaticElements
|
|
10657
|
+
})).filter(Boolean).join(separator);
|
|
10920
10658
|
}
|
|
10921
10659
|
if (node.internal_accessibility) {
|
|
10922
10660
|
let { role, state } = node.internal_accessibility;
|
|
@@ -11074,27 +10812,27 @@ function getSgrFragments2(code) {
|
|
|
11074
10812
|
if (codeNumber === SGR_EXTENDED_FOREGROUND_CODE2 || codeNumber === SGR_EXTENDED_BACKGROUND_CODE2) {
|
|
11075
10813
|
let colorType = Number.parseInt(rawCodes[index + 1], 10);
|
|
11076
10814
|
if (colorType === SGR_COLOR_TYPE_ANSI_2562 && index + SGR_ANSI_256_LAST_PARAMETER_OFFSET2 < rawCodes.length) {
|
|
11077
|
-
let
|
|
10815
|
+
let openCode = createSgrCode2(sgrPrefix, rawCodes.slice(index, index + SGR_ANSI_256_FRAGMENT_LENGTH2));
|
|
11078
10816
|
fragments.push({
|
|
11079
10817
|
type: "start",
|
|
11080
|
-
code:
|
|
10818
|
+
code: openCode,
|
|
11081
10819
|
endCode: ansi_styles_default.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE2 ? SGR_DEFAULT_FOREGROUND_CODE2 : SGR_DEFAULT_BACKGROUND_CODE2)
|
|
11082
10820
|
}), index += SGR_ANSI_256_FRAGMENT_LENGTH2;
|
|
11083
10821
|
continue;
|
|
11084
10822
|
}
|
|
11085
10823
|
if (colorType === SGR_COLOR_TYPE_TRUECOLOR2 && index + SGR_TRUECOLOR_LAST_PARAMETER_OFFSET2 < rawCodes.length) {
|
|
11086
|
-
let
|
|
10824
|
+
let openCode = createSgrCode2(sgrPrefix, rawCodes.slice(index, index + SGR_TRUECOLOR_FRAGMENT_LENGTH2));
|
|
11087
10825
|
fragments.push({
|
|
11088
10826
|
type: "start",
|
|
11089
|
-
code:
|
|
10827
|
+
code: openCode,
|
|
11090
10828
|
endCode: ansi_styles_default.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE2 ? SGR_DEFAULT_FOREGROUND_CODE2 : SGR_DEFAULT_BACKGROUND_CODE2)
|
|
11091
10829
|
}), index += SGR_TRUECOLOR_FRAGMENT_LENGTH2;
|
|
11092
10830
|
continue;
|
|
11093
10831
|
}
|
|
11094
|
-
let
|
|
10832
|
+
let openCode = createSgrCode2(sgrPrefix, [rawCodes[index]]);
|
|
11095
10833
|
fragments.push({
|
|
11096
10834
|
type: "start",
|
|
11097
|
-
code:
|
|
10835
|
+
code: openCode,
|
|
11098
10836
|
endCode: ansi_styles_default.color.ansi(codeNumber === SGR_EXTENDED_FOREGROUND_CODE2 ? SGR_DEFAULT_FOREGROUND_CODE2 : SGR_DEFAULT_BACKGROUND_CODE2)
|
|
11099
10837
|
}), index++;
|
|
11100
10838
|
continue;
|
|
@@ -11108,10 +10846,10 @@ function getSgrFragments2(code) {
|
|
|
11108
10846
|
}
|
|
11109
10847
|
let mappedEndCode = ansi_styles_default.codes.get(codeNumber);
|
|
11110
10848
|
if (mappedEndCode !== void 0) {
|
|
11111
|
-
let
|
|
10849
|
+
let openCode = createSgrCode2(sgrPrefix, [rawCodes[index]]);
|
|
11112
10850
|
fragments.push({
|
|
11113
10851
|
type: "start",
|
|
11114
|
-
code:
|
|
10852
|
+
code: openCode,
|
|
11115
10853
|
endCode: ansi_styles_default.color.ansi(mappedEndCode)
|
|
11116
10854
|
}), index++;
|
|
11117
10855
|
continue;
|
|
@@ -11961,8 +11699,8 @@ class Output {
|
|
|
11961
11699
|
currentLine[offsetX] = character;
|
|
11962
11700
|
let characterWidth = Math.max(1, this.caches.getStringWidth(character.value));
|
|
11963
11701
|
if (characterWidth > 1)
|
|
11964
|
-
for (let
|
|
11965
|
-
currentLine[offsetX +
|
|
11702
|
+
for (let index = 1;index < characterWidth; index++)
|
|
11703
|
+
currentLine[offsetX + index] = {
|
|
11966
11704
|
type: "char",
|
|
11967
11705
|
value: "",
|
|
11968
11706
|
fullWidth: !1,
|
|
@@ -11991,18 +11729,18 @@ class Output {
|
|
|
11991
11729
|
var renderer = (node, isScreenReaderEnabled) => {
|
|
11992
11730
|
if (node.yogaNode) {
|
|
11993
11731
|
if (isScreenReaderEnabled) {
|
|
11994
|
-
let
|
|
11732
|
+
let output = renderNodeToScreenReaderOutput(node, {
|
|
11995
11733
|
skipStaticElements: !0
|
|
11996
|
-
}),
|
|
11997
|
-
`).length,
|
|
11734
|
+
}), outputHeight = output === "" ? 0 : output.split(`
|
|
11735
|
+
`).length, staticOutput = "";
|
|
11998
11736
|
if (node.staticNode)
|
|
11999
|
-
|
|
11737
|
+
staticOutput = renderNodeToScreenReaderOutput(node.staticNode, {
|
|
12000
11738
|
skipStaticElements: !1
|
|
12001
11739
|
});
|
|
12002
11740
|
return {
|
|
12003
|
-
output
|
|
12004
|
-
outputHeight
|
|
12005
|
-
staticOutput:
|
|
11741
|
+
output,
|
|
11742
|
+
outputHeight,
|
|
11743
|
+
staticOutput: staticOutput ? `${staticOutput}
|
|
12006
11744
|
` : ""
|
|
12007
11745
|
};
|
|
12008
11746
|
}
|
|
@@ -12042,12 +11780,12 @@ var cursorPositionChanged = (a, b) => a?.x !== b?.x || a?.y !== b?.y, buildCurso
|
|
|
12042
11780
|
if (!cursorPosition)
|
|
12043
11781
|
return "";
|
|
12044
11782
|
let moveUp = visibleLineCount - cursorPosition.y;
|
|
12045
|
-
return (moveUp > 0 ?
|
|
11783
|
+
return (moveUp > 0 ? cursorUp(moveUp) : "") + cursorTo(cursorPosition.x) + showCursorEscape;
|
|
12046
11784
|
}, buildReturnToBottom = (previousLineCount, previousCursorPosition) => {
|
|
12047
11785
|
if (!previousCursorPosition)
|
|
12048
11786
|
return "";
|
|
12049
11787
|
let down = previousLineCount - 1 - previousCursorPosition.y;
|
|
12050
|
-
return (down > 0 ?
|
|
11788
|
+
return (down > 0 ? cursorDown(down) : "") + cursorTo(0);
|
|
12051
11789
|
}, buildCursorOnlySequence = (input) => {
|
|
12052
11790
|
let hidePrefix = input.cursorWasShown ? hideCursorEscape : "", returnToBottom = buildReturnToBottom(input.previousLineCount, input.previousCursorPosition), cursorSuffix = buildCursorSuffix(input.visibleLineCount, input.cursorPosition);
|
|
12053
11791
|
return hidePrefix + returnToBottom + cursorSuffix;
|
|
@@ -12118,13 +11856,13 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
12118
11856
|
else {
|
|
12119
11857
|
previousOutput = str;
|
|
12120
11858
|
let returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
12121
|
-
stream.write(returnPrefix +
|
|
11859
|
+
stream.write(returnPrefix + eraseLines(previousLineCount) + str + cursorSuffix), previousLineCount = lines.length;
|
|
12122
11860
|
}
|
|
12123
11861
|
return previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, cursorWasShown = activeCursor !== void 0, !0;
|
|
12124
11862
|
};
|
|
12125
11863
|
return render.clear = () => {
|
|
12126
11864
|
let prefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
12127
|
-
stream.write(prefix +
|
|
11865
|
+
stream.write(prefix + eraseLines(previousLineCount)), previousOutput = "", previousLineCount = 0, previousCursorPosition = void 0, cursorWasShown = !1;
|
|
12128
11866
|
}, render.done = () => {
|
|
12129
11867
|
if (previousOutput = "", previousLineCount = 0, previousCursorPosition = void 0, cursorWasShown = !1, !showCursor)
|
|
12130
11868
|
cli_cursor_default.show(stream), hasHiddenCursor = !1;
|
|
@@ -12168,25 +11906,25 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
12168
11906
|
let returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
|
|
12169
11907
|
if (str === `
|
|
12170
11908
|
` || previousOutput.length === 0) {
|
|
12171
|
-
let
|
|
12172
|
-
return stream.write(returnPrefix +
|
|
11909
|
+
let cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
11910
|
+
return stream.write(returnPrefix + eraseLines(previousLines.length) + str + cursorSuffix), cursorWasShown = activeCursor !== void 0, previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, previousOutput = str, previousLines = nextLines, !0;
|
|
12173
11911
|
}
|
|
12174
11912
|
let hasTrailingNewline = str.endsWith(`
|
|
12175
11913
|
`), buffer = [];
|
|
12176
11914
|
if (buffer.push(returnPrefix), visibleCount < previousVisible) {
|
|
12177
11915
|
let extraSlot = previousOutput.endsWith(`
|
|
12178
11916
|
`) ? 1 : 0;
|
|
12179
|
-
buffer.push(
|
|
11917
|
+
buffer.push(eraseLines(previousVisible - visibleCount + extraSlot), cursorUp(visibleCount));
|
|
12180
11918
|
} else
|
|
12181
|
-
buffer.push(
|
|
11919
|
+
buffer.push(cursorUp(previousLines.length - 1));
|
|
12182
11920
|
for (let i = 0;i < visibleCount; i++) {
|
|
12183
11921
|
let isLastLine = i === visibleCount - 1;
|
|
12184
11922
|
if (nextLines[i] === previousLines[i]) {
|
|
12185
11923
|
if (!isLastLine || hasTrailingNewline)
|
|
12186
|
-
buffer.push(
|
|
11924
|
+
buffer.push(cursorNextLine);
|
|
12187
11925
|
continue;
|
|
12188
11926
|
}
|
|
12189
|
-
buffer.push(
|
|
11927
|
+
buffer.push(cursorTo(0) + nextLines[i] + eraseEndLine + (isLastLine && !hasTrailingNewline ? "" : `
|
|
12190
11928
|
`));
|
|
12191
11929
|
}
|
|
12192
11930
|
let cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
@@ -12194,7 +11932,7 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
12194
11932
|
};
|
|
12195
11933
|
return render.clear = () => {
|
|
12196
11934
|
let prefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
|
|
12197
|
-
stream.write(prefix +
|
|
11935
|
+
stream.write(prefix + eraseLines(previousLines.length)), previousOutput = "", previousLines = [], previousCursorPosition = void 0, cursorWasShown = !1;
|
|
12198
11936
|
}, render.done = () => {
|
|
12199
11937
|
if (previousOutput = "", previousLines = [], previousCursorPosition = void 0, cursorWasShown = !1, !showCursor)
|
|
12200
11938
|
cli_cursor_default.show(stream), hasHiddenCursor = !1;
|
|
@@ -12213,11 +11951,11 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
12213
11951
|
}, render.setCursorPosition = (position) => {
|
|
12214
11952
|
cursorPosition = position, cursorDirty = !0;
|
|
12215
11953
|
}, render.isCursorDirty = () => cursorDirty, render.willRender = (str) => hasChanges(str, getActiveCursor()), render;
|
|
12216
|
-
},
|
|
11954
|
+
}, create3 = (stream, { showCursor = !1, incremental = !1 } = {}) => {
|
|
12217
11955
|
if (incremental)
|
|
12218
11956
|
return createIncremental(stream, { showCursor });
|
|
12219
11957
|
return createStandard(stream, { showCursor });
|
|
12220
|
-
}, logUpdate = { create:
|
|
11958
|
+
}, logUpdate = { create: create3 }, log_update_default = logUpdate;
|
|
12221
11959
|
|
|
12222
11960
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/write-synchronized.js
|
|
12223
11961
|
var bsu = "\x1B[?2026h", esu = "\x1B[?2026l";
|
|
@@ -12229,18 +11967,12 @@ function shouldSynchronize(stream, interactive) {
|
|
|
12229
11967
|
var instances = /* @__PURE__ */ new WeakMap, instances_default = instances;
|
|
12230
11968
|
|
|
12231
11969
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/App.js
|
|
12232
|
-
|
|
11970
|
+
init_react_production();
|
|
12233
11971
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
12234
11972
|
import process11 from "node:process";
|
|
12235
11973
|
|
|
12236
11974
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/input-parser.js
|
|
12237
|
-
var isCsiParameterByte = (byte) => {
|
|
12238
|
-
return byte >= 48 && byte <= 63;
|
|
12239
|
-
}, isCsiIntermediateByte = (byte) => {
|
|
12240
|
-
return byte >= 32 && byte <= 47;
|
|
12241
|
-
}, isCsiFinalByte = (byte) => {
|
|
12242
|
-
return byte >= 64 && byte <= 126;
|
|
12243
|
-
}, parseCsiSequence = (input, startIndex, prefixLength) => {
|
|
11975
|
+
var isCsiParameterByte = (byte) => byte >= 48 && byte <= 63, isCsiIntermediateByte = (byte) => byte >= 32 && byte <= 47, isCsiFinalByte = (byte) => byte >= 64 && byte <= 126, parseCsiSequence = (input, startIndex, prefixLength) => {
|
|
12244
11976
|
let csiPayloadStart = startIndex + prefixLength + 1, index = csiPayloadStart;
|
|
12245
11977
|
for (;index < input.length; index++) {
|
|
12246
11978
|
let byte = input.codePointAt(index);
|
|
@@ -12371,7 +12103,8 @@ var isCsiParameterByte = (byte) => {
|
|
|
12371
12103
|
};
|
|
12372
12104
|
|
|
12373
12105
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/AppContext.js
|
|
12374
|
-
|
|
12106
|
+
init_react_production();
|
|
12107
|
+
var noopSuspension = {
|
|
12375
12108
|
async resume() {},
|
|
12376
12109
|
async[Symbol.asyncDispose]() {}
|
|
12377
12110
|
}, defaultValue = {
|
|
@@ -12384,15 +12117,15 @@ var import_react2 = __toESM(require_react_production(), 1), noopSuspension = {
|
|
|
12384
12117
|
}
|
|
12385
12118
|
return noopSuspension;
|
|
12386
12119
|
}
|
|
12387
|
-
}, AppContext =
|
|
12120
|
+
}, AppContext = $createContext(defaultValue);
|
|
12388
12121
|
AppContext.displayName = "InternalAppContext";
|
|
12389
12122
|
var AppContext_default = AppContext;
|
|
12390
12123
|
|
|
12391
12124
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/StdinContext.js
|
|
12392
|
-
|
|
12125
|
+
init_react_production();
|
|
12393
12126
|
import { EventEmitter } from "node:events";
|
|
12394
12127
|
import process8 from "node:process";
|
|
12395
|
-
var StdinContext =
|
|
12128
|
+
var StdinContext = $createContext({
|
|
12396
12129
|
stdin: process8.stdin,
|
|
12397
12130
|
internal_eventEmitter: new EventEmitter,
|
|
12398
12131
|
setRawMode() {},
|
|
@@ -12404,9 +12137,9 @@ StdinContext.displayName = "InternalStdinContext";
|
|
|
12404
12137
|
var StdinContext_default = StdinContext;
|
|
12405
12138
|
|
|
12406
12139
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/StdoutContext.js
|
|
12407
|
-
|
|
12140
|
+
init_react_production();
|
|
12408
12141
|
import process9 from "node:process";
|
|
12409
|
-
var StdoutContext =
|
|
12142
|
+
var StdoutContext = $createContext({
|
|
12410
12143
|
stdout: process9.stdout,
|
|
12411
12144
|
write() {}
|
|
12412
12145
|
});
|
|
@@ -12414,9 +12147,9 @@ StdoutContext.displayName = "InternalStdoutContext";
|
|
|
12414
12147
|
var StdoutContext_default = StdoutContext;
|
|
12415
12148
|
|
|
12416
12149
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/StderrContext.js
|
|
12417
|
-
|
|
12150
|
+
init_react_production();
|
|
12418
12151
|
import process10 from "node:process";
|
|
12419
|
-
var StderrContext =
|
|
12152
|
+
var StderrContext = $createContext({
|
|
12420
12153
|
stderr: process10.stderr,
|
|
12421
12154
|
write() {}
|
|
12422
12155
|
});
|
|
@@ -12424,7 +12157,8 @@ StderrContext.displayName = "InternalStderrContext";
|
|
|
12424
12157
|
var StderrContext_default = StderrContext;
|
|
12425
12158
|
|
|
12426
12159
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/FocusContext.js
|
|
12427
|
-
|
|
12160
|
+
init_react_production();
|
|
12161
|
+
var FocusContext = $createContext({
|
|
12428
12162
|
activeId: void 0,
|
|
12429
12163
|
add() {},
|
|
12430
12164
|
remove() {},
|
|
@@ -12440,7 +12174,8 @@ FocusContext.displayName = "InternalFocusContext";
|
|
|
12440
12174
|
var FocusContext_default = FocusContext;
|
|
12441
12175
|
|
|
12442
12176
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/AnimationContext.js
|
|
12443
|
-
|
|
12177
|
+
init_react_production();
|
|
12178
|
+
var animationContext = $createContext({
|
|
12444
12179
|
renderThrottleMs: 0,
|
|
12445
12180
|
subscribe() {
|
|
12446
12181
|
return {
|
|
@@ -12453,24 +12188,24 @@ animationContext.displayName = "InternalAnimationContext";
|
|
|
12453
12188
|
var AnimationContext_default = animationContext;
|
|
12454
12189
|
|
|
12455
12190
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/CursorContext.js
|
|
12456
|
-
|
|
12191
|
+
init_react_production();
|
|
12192
|
+
var CursorContext = $createContext({
|
|
12457
12193
|
setCursorPosition() {}
|
|
12458
12194
|
});
|
|
12459
12195
|
CursorContext.displayName = "InternalCursorContext";
|
|
12460
12196
|
var CursorContext_default = CursorContext;
|
|
12461
12197
|
|
|
12462
12198
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/ErrorBoundary.js
|
|
12463
|
-
|
|
12199
|
+
init_react_production();
|
|
12464
12200
|
|
|
12465
12201
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/ErrorOverview.js
|
|
12466
|
-
|
|
12202
|
+
init_react_production();
|
|
12203
|
+
var import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
12467
12204
|
import * as fs2 from "node:fs";
|
|
12468
12205
|
import { cwd } from "node:process";
|
|
12469
12206
|
|
|
12470
12207
|
// ../../node_modules/.bun/convert-to-spaces@2.0.1/node_modules/convert-to-spaces/dist/index.js
|
|
12471
|
-
var convertToSpaces = (input, spaces = 2) =>
|
|
12472
|
-
return input.replace(/^\t+/gm, ($1) => " ".repeat($1.length * spaces));
|
|
12473
|
-
}, dist_default2 = convertToSpaces;
|
|
12208
|
+
var convertToSpaces = (input, spaces = 2) => input.replace(/^\t+/gm, ($1) => " ".repeat($1.length * spaces)), dist_default2 = convertToSpaces;
|
|
12474
12209
|
|
|
12475
12210
|
// ../../node_modules/.bun/code-excerpt@4.0.0/node_modules/code-excerpt/dist/index.js
|
|
12476
12211
|
var generateLineNumbers = (line, around) => {
|
|
@@ -12487,26 +12222,28 @@ var generateLineNumbers = (line, around) => {
|
|
|
12487
12222
|
let lines = dist_default2(source).split(/\r?\n/);
|
|
12488
12223
|
if (line > lines.length)
|
|
12489
12224
|
return;
|
|
12490
|
-
return generateLineNumbers(line, (_a = options.around) !== null && _a !== void 0 ? _a : 3).filter((
|
|
12225
|
+
return generateLineNumbers(line, (_a = options.around) !== null && _a !== void 0 ? _a : 3).filter((line) => lines[line - 1] !== void 0).map((line) => ({ line, value: lines[line - 1] }));
|
|
12491
12226
|
}, dist_default3 = codeExcerpt;
|
|
12492
12227
|
|
|
12493
12228
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Box.js
|
|
12494
|
-
|
|
12229
|
+
init_react_production();
|
|
12495
12230
|
|
|
12496
12231
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/AccessibilityContext.js
|
|
12497
|
-
|
|
12232
|
+
init_react_production();
|
|
12233
|
+
var accessibilityContext = $createContext({
|
|
12498
12234
|
isScreenReaderEnabled: !1
|
|
12499
12235
|
});
|
|
12500
12236
|
|
|
12501
12237
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/BackgroundContext.js
|
|
12502
|
-
|
|
12238
|
+
init_react_production();
|
|
12239
|
+
var backgroundContext = $createContext(void 0);
|
|
12503
12240
|
|
|
12504
12241
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Box.js
|
|
12505
|
-
var Box =
|
|
12506
|
-
let { isScreenReaderEnabled } =
|
|
12242
|
+
var Box = $forwardRef(({ children, backgroundColor, "aria-label": ariaLabel, "aria-hidden": ariaHidden, "aria-role": role, "aria-state": ariaState, ...style }, ref) => {
|
|
12243
|
+
let { isScreenReaderEnabled } = $useContext(accessibilityContext), label = ariaLabel ? $createElement("ink-text", null, ariaLabel) : void 0;
|
|
12507
12244
|
if (isScreenReaderEnabled && ariaHidden)
|
|
12508
12245
|
return null;
|
|
12509
|
-
let boxElement =
|
|
12246
|
+
let boxElement = $createElement("ink-box", { ref, style: {
|
|
12510
12247
|
flexWrap: "nowrap",
|
|
12511
12248
|
flexDirection: "row",
|
|
12512
12249
|
flexGrow: 0,
|
|
@@ -12520,47 +12257,45 @@ var Box = import_react11.forwardRef(({ children, backgroundColor, "aria-label":
|
|
|
12520
12257
|
state: ariaState
|
|
12521
12258
|
} }, isScreenReaderEnabled && label ? label : children);
|
|
12522
12259
|
if (backgroundColor)
|
|
12523
|
-
return
|
|
12260
|
+
return $createElement(backgroundContext.Provider, { value: backgroundColor }, boxElement);
|
|
12524
12261
|
return boxElement;
|
|
12525
12262
|
});
|
|
12526
12263
|
Box.displayName = "Box";
|
|
12527
12264
|
var Box_default = Box;
|
|
12528
12265
|
|
|
12529
12266
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Text.js
|
|
12530
|
-
|
|
12267
|
+
init_react_production();
|
|
12531
12268
|
function Text({ color, backgroundColor, dimColor = !1, bold = !1, italic = !1, underline = !1, strikethrough = !1, inverse = !1, wrap = "wrap", children, "aria-label": ariaLabel, "aria-hidden": ariaHidden = !1 }) {
|
|
12532
|
-
let { isScreenReaderEnabled } =
|
|
12269
|
+
let { isScreenReaderEnabled } = $useContext(accessibilityContext), inheritedBackgroundColor = $useContext(backgroundContext), childrenOrAriaLabel = isScreenReaderEnabled && ariaLabel ? ariaLabel : children;
|
|
12533
12270
|
if (childrenOrAriaLabel === void 0 || childrenOrAriaLabel === null)
|
|
12534
12271
|
return null;
|
|
12535
|
-
let transform = (
|
|
12272
|
+
let transform = (children) => {
|
|
12536
12273
|
if (dimColor)
|
|
12537
|
-
|
|
12274
|
+
children = source_default.dim(children);
|
|
12538
12275
|
if (color)
|
|
12539
|
-
|
|
12276
|
+
children = colorize_default(children, color, "foreground");
|
|
12540
12277
|
let effectiveBackgroundColor = backgroundColor ?? inheritedBackgroundColor;
|
|
12541
12278
|
if (effectiveBackgroundColor)
|
|
12542
|
-
|
|
12279
|
+
children = colorize_default(children, effectiveBackgroundColor, "background");
|
|
12543
12280
|
if (bold)
|
|
12544
|
-
|
|
12281
|
+
children = source_default.bold(children);
|
|
12545
12282
|
if (italic)
|
|
12546
|
-
|
|
12283
|
+
children = source_default.italic(children);
|
|
12547
12284
|
if (underline)
|
|
12548
|
-
|
|
12285
|
+
children = source_default.underline(children);
|
|
12549
12286
|
if (strikethrough)
|
|
12550
|
-
|
|
12287
|
+
children = source_default.strikethrough(children);
|
|
12551
12288
|
if (inverse)
|
|
12552
|
-
|
|
12553
|
-
return
|
|
12289
|
+
children = source_default.inverse(children);
|
|
12290
|
+
return children;
|
|
12554
12291
|
};
|
|
12555
12292
|
if (isScreenReaderEnabled && ariaHidden)
|
|
12556
12293
|
return null;
|
|
12557
|
-
return
|
|
12294
|
+
return $createElement("ink-text", { style: { flexGrow: 0, flexShrink: 1, flexDirection: "row", textWrap: wrap }, internal_transform: transform }, childrenOrAriaLabel);
|
|
12558
12295
|
}
|
|
12559
12296
|
|
|
12560
12297
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/ErrorOverview.js
|
|
12561
|
-
var cleanupPath = (path) => {
|
|
12562
|
-
return path?.replace(`file://${cwd()}/`, "");
|
|
12563
|
-
}, stackUtils = new import_stack_utils.default({
|
|
12298
|
+
var cleanupPath = (path) => path?.replace(`file://${cwd()}/`, ""), stackUtils = new import_stack_utils.default({
|
|
12564
12299
|
cwd: cwd(),
|
|
12565
12300
|
internals: import_stack_utils.default.nodeInternals()
|
|
12566
12301
|
});
|
|
@@ -12573,19 +12308,19 @@ function ErrorOverview({ error }) {
|
|
|
12573
12308
|
for (let { line } of excerpt)
|
|
12574
12309
|
lineWidth = Math.max(lineWidth, String(line).length);
|
|
12575
12310
|
}
|
|
12576
|
-
return
|
|
12311
|
+
return $createElement(Box_default, { flexDirection: "column", padding: 1 }, $createElement(Box_default, null, $createElement(Text, { backgroundColor: "red", color: "white" }, " ", "ERROR", " "), $createElement(Text, null, " ", error.message)), origin && filePath ? $createElement(Box_default, { marginTop: 1 }, $createElement(Text, { dimColor: !0 }, filePath, ":", origin.line, ":", origin.column)) : null, origin && excerpt ? $createElement(Box_default, { marginTop: 1, flexDirection: "column" }, excerpt.map(({ line, value }) => $createElement(Box_default, { key: line }, $createElement(Box_default, { width: lineWidth + 1 }, $createElement(Text, { dimColor: line !== origin.line, backgroundColor: line === origin.line ? "red" : void 0, color: line === origin.line ? "white" : void 0, "aria-label": line === origin.line ? `Line ${line}, error` : `Line ${line}` }, String(line).padStart(lineWidth, " "), ":")), $createElement(Text, { key: line, backgroundColor: line === origin.line ? "red" : void 0, color: line === origin.line ? "white" : void 0 }, " " + value)))) : null, error.stack ? $createElement(Box_default, { marginTop: 1, flexDirection: "column" }, error.stack.split(`
|
|
12577
12312
|
`).slice(1).map((line) => {
|
|
12578
12313
|
let parsedLine = stackUtils.parseLine(line), lineCount = stackLineCounts.get(line) ?? 0;
|
|
12579
12314
|
stackLineCounts.set(line, lineCount + 1);
|
|
12580
12315
|
let key = `${line}-${lineCount}`;
|
|
12581
12316
|
if (!parsedLine?.file || !parsedLine.line || !parsedLine.column)
|
|
12582
|
-
return
|
|
12583
|
-
return
|
|
12317
|
+
return $createElement(Box_default, { key }, $createElement(Text, { dimColor: !0 }, "- "), $createElement(Text, { dimColor: !0, bold: !0 }, line, "\\t", " "));
|
|
12318
|
+
return $createElement(Box_default, { key }, $createElement(Text, { dimColor: !0 }, "- "), $createElement(Text, { dimColor: !0, bold: !0 }, parsedLine.function), $createElement(Text, { dimColor: !0, color: "gray", "aria-label": `at ${cleanupPath(parsedLine.file) ?? ""} line ${parsedLine.line} column ${parsedLine.column}` }, " ", "(", cleanupPath(parsedLine.file) ?? "", ":", parsedLine.line, ":", parsedLine.column, ")"));
|
|
12584
12319
|
})) : null);
|
|
12585
12320
|
}
|
|
12586
12321
|
|
|
12587
12322
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/ErrorBoundary.js
|
|
12588
|
-
class ErrorBoundary extends
|
|
12323
|
+
class ErrorBoundary extends $PureComponent {
|
|
12589
12324
|
static displayName = "InternalErrorBoundary";
|
|
12590
12325
|
static getDerivedStateFromError(error) {
|
|
12591
12326
|
return { error };
|
|
@@ -12598,25 +12333,25 @@ class ErrorBoundary extends import_react14.PureComponent {
|
|
|
12598
12333
|
}
|
|
12599
12334
|
render() {
|
|
12600
12335
|
if (this.state.error)
|
|
12601
|
-
return
|
|
12336
|
+
return $createElement(ErrorOverview, { error: this.state.error });
|
|
12602
12337
|
return this.props.children;
|
|
12603
12338
|
}
|
|
12604
12339
|
}
|
|
12605
12340
|
|
|
12606
12341
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/App.js
|
|
12607
|
-
var tab = "\t", shiftTab = "\x1B[Z",
|
|
12342
|
+
var tab = "\t", shiftTab = "\x1B[Z", escape2 = "\x1B";
|
|
12608
12343
|
function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, exitOnCtrlC, onExit, onWaitUntilRenderFlush, onSuspendTerminal, onRegisterInputControl, setCursorPosition, interactive, renderThrottleMs }) {
|
|
12609
|
-
let [isFocusEnabled, setIsFocusEnabled] =
|
|
12344
|
+
let [isFocusEnabled, setIsFocusEnabled] = $useState(!0), [activeFocusId, setActiveFocusId] = $useState(void 0), [, setFocusables] = $useState([]), focusablesCountRef = $useRef(0), animationSubscribersRef = $useRef(/* @__PURE__ */ new Map), animationTimerRef = $useRef(void 0), rawModeEnabledCount = $useRef(0), pendingDisableRawModeRef = $useRef(!1), bracketedPasteModeEnabledCount = $useRef(0), internal_eventEmitter = $useRef(new EventEmitter2);
|
|
12610
12345
|
internal_eventEmitter.current.setMaxListeners(1 / 0);
|
|
12611
|
-
let readableListenerRef =
|
|
12346
|
+
let readableListenerRef = $useRef(void 0), inputParserRef = $useRef(createInputParser()), pendingInputFlushRef = $useRef(void 0), pendingInputFlushDelayMilliseconds = 20, clearPendingInputFlush = $useCallback(() => {
|
|
12612
12347
|
if (!pendingInputFlushRef.current)
|
|
12613
12348
|
return;
|
|
12614
12349
|
clearTimeout(pendingInputFlushRef.current), pendingInputFlushRef.current = void 0;
|
|
12615
|
-
}, []), clearAnimationTimer =
|
|
12350
|
+
}, []), clearAnimationTimer = $useCallback(() => {
|
|
12616
12351
|
if (!animationTimerRef.current)
|
|
12617
12352
|
return;
|
|
12618
12353
|
clearTimeout(animationTimerRef.current), animationTimerRef.current = void 0;
|
|
12619
|
-
}, []), scheduleAnimationTick =
|
|
12354
|
+
}, []), scheduleAnimationTick = $useCallback(() => {
|
|
12620
12355
|
if (clearAnimationTimer(), animationSubscribersRef.current.size === 0)
|
|
12621
12356
|
return;
|
|
12622
12357
|
let nextDueTime = Number.POSITIVE_INFINITY;
|
|
@@ -12635,15 +12370,15 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
12635
12370
|
}
|
|
12636
12371
|
scheduleAnimationTick();
|
|
12637
12372
|
}, delay);
|
|
12638
|
-
}, [clearAnimationTimer]), animationSubscribe =
|
|
12639
|
-
let
|
|
12373
|
+
}, [clearAnimationTimer]), animationSubscribe = $useCallback((callback, interval) => {
|
|
12374
|
+
let startTime = performance.now();
|
|
12640
12375
|
return animationSubscribersRef.current.set(callback, {
|
|
12641
12376
|
callback,
|
|
12642
12377
|
interval,
|
|
12643
|
-
startTime
|
|
12644
|
-
nextDueTime:
|
|
12378
|
+
startTime,
|
|
12379
|
+
nextDueTime: startTime + interval
|
|
12645
12380
|
}), scheduleAnimationTick(), {
|
|
12646
|
-
startTime
|
|
12381
|
+
startTime,
|
|
12647
12382
|
unsubscribe() {
|
|
12648
12383
|
if (animationSubscribersRef.current.delete(callback), animationSubscribersRef.current.size === 0) {
|
|
12649
12384
|
clearAnimationTimer();
|
|
@@ -12653,33 +12388,31 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
12653
12388
|
}
|
|
12654
12389
|
};
|
|
12655
12390
|
}, [clearAnimationTimer, scheduleAnimationTick]);
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
clearAnimationTimer();
|
|
12659
|
-
};
|
|
12391
|
+
$useEffect(() => () => {
|
|
12392
|
+
clearAnimationTimer();
|
|
12660
12393
|
}, [clearAnimationTimer]);
|
|
12661
|
-
let isRawModeSupported = stdin.isTTY, detachReadableListener =
|
|
12394
|
+
let isRawModeSupported = stdin.isTTY, detachReadableListener = $useCallback(() => {
|
|
12662
12395
|
if (!readableListenerRef.current)
|
|
12663
12396
|
return;
|
|
12664
12397
|
stdin.removeListener("readable", readableListenerRef.current), readableListenerRef.current = void 0;
|
|
12665
|
-
}, [stdin]), clearInputState =
|
|
12398
|
+
}, [stdin]), clearInputState = $useCallback(() => {
|
|
12666
12399
|
inputParserRef.current.reset(), clearPendingInputFlush(), detachReadableListener();
|
|
12667
|
-
}, [clearPendingInputFlush, detachReadableListener]), disableRawMode =
|
|
12400
|
+
}, [clearPendingInputFlush, detachReadableListener]), disableRawMode = $useCallback(() => {
|
|
12668
12401
|
pendingDisableRawModeRef.current = !1, stdin.setRawMode(!1), stdin.unref(), rawModeEnabledCount.current = 0, clearInputState();
|
|
12669
|
-
}, [stdin, clearInputState]), handleExit =
|
|
12402
|
+
}, [stdin, clearInputState]), handleExit = $useCallback((errorOrResult) => {
|
|
12670
12403
|
if (isRawModeSupported && (rawModeEnabledCount.current > 0 || pendingDisableRawModeRef.current))
|
|
12671
12404
|
disableRawMode();
|
|
12672
12405
|
onExit(errorOrResult);
|
|
12673
|
-
}, [isRawModeSupported, disableRawMode, onExit]), handleInput =
|
|
12406
|
+
}, [isRawModeSupported, disableRawMode, onExit]), handleInput = $useCallback((input) => {
|
|
12674
12407
|
if (input === "\x03" && exitOnCtrlC) {
|
|
12675
12408
|
handleExit();
|
|
12676
12409
|
return;
|
|
12677
12410
|
}
|
|
12678
|
-
if (input ===
|
|
12411
|
+
if (input === escape2 && isFocusEnabled)
|
|
12679
12412
|
setActiveFocusId(void 0);
|
|
12680
|
-
}, [exitOnCtrlC, handleExit, isFocusEnabled]), emitInput =
|
|
12413
|
+
}, [exitOnCtrlC, handleExit, isFocusEnabled]), emitInput = $useCallback((input) => {
|
|
12681
12414
|
handleInput(input), internal_eventEmitter.current.emit("input", input);
|
|
12682
|
-
}, [handleInput]), schedulePendingInputFlush =
|
|
12415
|
+
}, [handleInput]), schedulePendingInputFlush = $useCallback(() => {
|
|
12683
12416
|
clearPendingInputFlush(), pendingInputFlushRef.current = setTimeout(() => {
|
|
12684
12417
|
pendingInputFlushRef.current = void 0;
|
|
12685
12418
|
let pendingEscape = inputParserRef.current.flushPendingEscape();
|
|
@@ -12687,7 +12420,7 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
12687
12420
|
return;
|
|
12688
12421
|
emitInput(pendingEscape);
|
|
12689
12422
|
}, pendingInputFlushDelayMilliseconds);
|
|
12690
|
-
}, [clearPendingInputFlush, emitInput]), handleReadable =
|
|
12423
|
+
}, [clearPendingInputFlush, emitInput]), handleReadable = $useCallback(() => {
|
|
12691
12424
|
clearPendingInputFlush();
|
|
12692
12425
|
let chunk;
|
|
12693
12426
|
while ((chunk = stdin.read()) !== null) {
|
|
@@ -12705,11 +12438,11 @@ function App({ children, stdin, stdout, stderr, writeToStdout, writeToStderr, ex
|
|
|
12705
12438
|
}
|
|
12706
12439
|
if (inputParserRef.current.hasPendingEscape())
|
|
12707
12440
|
schedulePendingInputFlush();
|
|
12708
|
-
}, [stdin, emitInput, clearPendingInputFlush, schedulePendingInputFlush]), attachReadableListener =
|
|
12441
|
+
}, [stdin, emitInput, clearPendingInputFlush, schedulePendingInputFlush]), attachReadableListener = $useCallback(() => {
|
|
12709
12442
|
if (readableListenerRef.current)
|
|
12710
12443
|
return;
|
|
12711
12444
|
readableListenerRef.current = handleReadable, stdin.addListener("readable", handleReadable);
|
|
12712
|
-
}, [stdin, handleReadable]), handleSetRawMode =
|
|
12445
|
+
}, [stdin, handleReadable]), handleSetRawMode = $useCallback((isEnabled) => {
|
|
12713
12446
|
if (!isRawModeSupported)
|
|
12714
12447
|
if (stdin === process11.stdin)
|
|
12715
12448
|
throw Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
@@ -12741,7 +12474,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12741
12474
|
attachReadableListener,
|
|
12742
12475
|
clearInputState,
|
|
12743
12476
|
disableRawMode
|
|
12744
|
-
]), handleSetBracketedPasteMode =
|
|
12477
|
+
]), handleSetBracketedPasteMode = $useCallback((isEnabled) => {
|
|
12745
12478
|
if (!stdout.isTTY)
|
|
12746
12479
|
return;
|
|
12747
12480
|
if (isEnabled) {
|
|
@@ -12754,10 +12487,10 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12754
12487
|
return;
|
|
12755
12488
|
if (--bracketedPasteModeEnabledCount.current === 0)
|
|
12756
12489
|
stdout.write("\x1B[?2004l");
|
|
12757
|
-
}, [stdout]), suspendedInputStateRef =
|
|
12490
|
+
}, [stdout]), suspendedInputStateRef = $useRef({
|
|
12758
12491
|
rawMode: !1,
|
|
12759
12492
|
bracketedPaste: !1
|
|
12760
|
-
}), pauseInput =
|
|
12493
|
+
}), pauseInput = $useCallback(() => {
|
|
12761
12494
|
let wasRawMode = isRawModeSupported && rawModeEnabledCount.current > 0, wasBracketedPaste = bracketedPasteModeEnabledCount.current > 0;
|
|
12762
12495
|
if (suspendedInputStateRef.current = {
|
|
12763
12496
|
rawMode: wasRawMode,
|
|
@@ -12768,7 +12501,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12768
12501
|
} catch {}
|
|
12769
12502
|
if (wasRawMode)
|
|
12770
12503
|
stdin.setRawMode(!1), stdin.unref(), clearInputState();
|
|
12771
|
-
}, [isRawModeSupported, stdin, stdout, clearInputState]), resumeInput =
|
|
12504
|
+
}, [isRawModeSupported, stdin, stdout, clearInputState]), resumeInput = $useCallback(() => {
|
|
12772
12505
|
let { rawMode, bracketedPaste } = suspendedInputStateRef.current;
|
|
12773
12506
|
if (rawMode)
|
|
12774
12507
|
stdin.setEncoding("utf8"), stdin.ref(), stdin.setRawMode(!0), attachReadableListener();
|
|
@@ -12777,45 +12510,37 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12777
12510
|
stdout.write("\x1B[?2004h");
|
|
12778
12511
|
} catch {}
|
|
12779
12512
|
}, [stdin, stdout, attachReadableListener]);
|
|
12780
|
-
|
|
12513
|
+
$useInsertionEffect(() => {
|
|
12781
12514
|
onRegisterInputControl(pauseInput, resumeInput);
|
|
12782
12515
|
}, [onRegisterInputControl, pauseInput, resumeInput]);
|
|
12783
|
-
let findNextFocusable =
|
|
12784
|
-
let activeIndex = currentFocusables.findIndex((focusable) =>
|
|
12785
|
-
return focusable.id === currentActiveFocusId;
|
|
12786
|
-
});
|
|
12516
|
+
let findNextFocusable = $useCallback((currentFocusables, currentActiveFocusId) => {
|
|
12517
|
+
let activeIndex = currentFocusables.findIndex((focusable) => focusable.id === currentActiveFocusId);
|
|
12787
12518
|
for (let index = activeIndex + 1;index < currentFocusables.length; index++) {
|
|
12788
12519
|
let focusable = currentFocusables[index];
|
|
12789
12520
|
if (focusable?.isActive)
|
|
12790
12521
|
return focusable.id;
|
|
12791
12522
|
}
|
|
12792
12523
|
return;
|
|
12793
|
-
}, []), findPreviousFocusable =
|
|
12794
|
-
let activeIndex = currentFocusables.findIndex((focusable) =>
|
|
12795
|
-
return focusable.id === currentActiveFocusId;
|
|
12796
|
-
});
|
|
12524
|
+
}, []), findPreviousFocusable = $useCallback((currentFocusables, currentActiveFocusId) => {
|
|
12525
|
+
let activeIndex = currentFocusables.findIndex((focusable) => focusable.id === currentActiveFocusId);
|
|
12797
12526
|
for (let index = activeIndex - 1;index >= 0; index--) {
|
|
12798
12527
|
let focusable = currentFocusables[index];
|
|
12799
12528
|
if (focusable?.isActive)
|
|
12800
12529
|
return focusable.id;
|
|
12801
12530
|
}
|
|
12802
12531
|
return;
|
|
12803
|
-
}, []), focusNext =
|
|
12804
|
-
setFocusables((currentFocusables) => {
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
let lastFocusableId = currentFocusables.findLast((focusable) => focusable.isActive)?.id;
|
|
12814
|
-
return findPreviousFocusable(currentFocusables, currentActiveFocusId) ?? lastFocusableId;
|
|
12815
|
-
}), currentFocusables;
|
|
12816
|
-
});
|
|
12532
|
+
}, []), focusNext = $useCallback(() => {
|
|
12533
|
+
setFocusables((currentFocusables) => (setActiveFocusId((currentActiveFocusId) => {
|
|
12534
|
+
let firstFocusableId = currentFocusables.find((focusable) => focusable.isActive)?.id;
|
|
12535
|
+
return findNextFocusable(currentFocusables, currentActiveFocusId) ?? firstFocusableId;
|
|
12536
|
+
}), currentFocusables));
|
|
12537
|
+
}, [findNextFocusable]), focusPrevious = $useCallback(() => {
|
|
12538
|
+
setFocusables((currentFocusables) => (setActiveFocusId((currentActiveFocusId) => {
|
|
12539
|
+
let lastFocusableId = currentFocusables.findLast((focusable) => focusable.isActive)?.id;
|
|
12540
|
+
return findPreviousFocusable(currentFocusables, currentActiveFocusId) ?? lastFocusableId;
|
|
12541
|
+
}), currentFocusables));
|
|
12817
12542
|
}, [findPreviousFocusable]);
|
|
12818
|
-
|
|
12543
|
+
$useEffect(() => {
|
|
12819
12544
|
let handleTabNavigation = (input) => {
|
|
12820
12545
|
if (!isFocusEnabled || focusablesCountRef.current === 0)
|
|
12821
12546
|
return;
|
|
@@ -12830,43 +12555,39 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12830
12555
|
emitter.off("input", handleTabNavigation);
|
|
12831
12556
|
};
|
|
12832
12557
|
}, [isFocusEnabled, focusNext, focusPrevious]);
|
|
12833
|
-
let enableFocus =
|
|
12558
|
+
let enableFocus = $useCallback(() => {
|
|
12834
12559
|
setIsFocusEnabled(!0);
|
|
12835
|
-
}, []), disableFocus =
|
|
12560
|
+
}, []), disableFocus = $useCallback(() => {
|
|
12836
12561
|
setIsFocusEnabled(!1);
|
|
12837
|
-
}, []), focus =
|
|
12562
|
+
}, []), focus = $useCallback((id) => {
|
|
12838
12563
|
setFocusables((currentFocusables) => {
|
|
12839
12564
|
if (currentFocusables.some((focusable) => focusable?.id === id))
|
|
12840
12565
|
setActiveFocusId(id);
|
|
12841
12566
|
return currentFocusables;
|
|
12842
12567
|
});
|
|
12843
|
-
}, []), addFocusable =
|
|
12844
|
-
if (setFocusables((currentFocusables) =>
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
];
|
|
12852
|
-
}), autoFocus)
|
|
12568
|
+
}, []), addFocusable = $useCallback((id, { autoFocus }) => {
|
|
12569
|
+
if (setFocusables((currentFocusables) => (focusablesCountRef.current = currentFocusables.length + 1, [
|
|
12570
|
+
...currentFocusables,
|
|
12571
|
+
{
|
|
12572
|
+
id,
|
|
12573
|
+
isActive: !0
|
|
12574
|
+
}
|
|
12575
|
+
])), autoFocus)
|
|
12853
12576
|
setActiveFocusId((currentActiveFocusId) => {
|
|
12854
12577
|
if (!currentActiveFocusId)
|
|
12855
12578
|
return id;
|
|
12856
12579
|
return currentActiveFocusId;
|
|
12857
12580
|
});
|
|
12858
|
-
}, []), removeFocusable =
|
|
12581
|
+
}, []), removeFocusable = $useCallback((id) => {
|
|
12859
12582
|
setActiveFocusId((currentActiveFocusId) => {
|
|
12860
12583
|
if (currentActiveFocusId === id)
|
|
12861
12584
|
return;
|
|
12862
12585
|
return currentActiveFocusId;
|
|
12863
12586
|
}), setFocusables((currentFocusables) => {
|
|
12864
|
-
let filtered = currentFocusables.filter((focusable) =>
|
|
12865
|
-
return focusable.id !== id;
|
|
12866
|
-
});
|
|
12587
|
+
let filtered = currentFocusables.filter((focusable) => focusable.id !== id);
|
|
12867
12588
|
return focusablesCountRef.current = filtered.length, filtered;
|
|
12868
12589
|
});
|
|
12869
|
-
}, []), activateFocusable =
|
|
12590
|
+
}, []), activateFocusable = $useCallback((id) => {
|
|
12870
12591
|
setFocusables((currentFocusables) => currentFocusables.map((focusable) => {
|
|
12871
12592
|
if (focusable.id !== id)
|
|
12872
12593
|
return focusable;
|
|
@@ -12875,7 +12596,7 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12875
12596
|
isActive: !0
|
|
12876
12597
|
};
|
|
12877
12598
|
}));
|
|
12878
|
-
}, []), deactivateFocusable =
|
|
12599
|
+
}, []), deactivateFocusable = $useCallback((id) => {
|
|
12879
12600
|
setActiveFocusId((currentActiveFocusId) => {
|
|
12880
12601
|
if (currentActiveFocusId === id)
|
|
12881
12602
|
return;
|
|
@@ -12889,25 +12610,23 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12889
12610
|
};
|
|
12890
12611
|
}));
|
|
12891
12612
|
}, []);
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
if (
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
}
|
|
12904
|
-
};
|
|
12613
|
+
$useEffect(() => () => {
|
|
12614
|
+
let canWriteToStdout = !stdout.destroyed && !stdout.writableEnded;
|
|
12615
|
+
if (interactive && canWriteToStdout)
|
|
12616
|
+
cli_cursor_default.show(stdout);
|
|
12617
|
+
if (isRawModeSupported && (rawModeEnabledCount.current > 0 || pendingDisableRawModeRef.current))
|
|
12618
|
+
disableRawMode();
|
|
12619
|
+
if (bracketedPasteModeEnabledCount.current > 0) {
|
|
12620
|
+
if (stdout.isTTY && canWriteToStdout)
|
|
12621
|
+
stdout.write("\x1B[?2004l");
|
|
12622
|
+
bracketedPasteModeEnabledCount.current = 0;
|
|
12623
|
+
}
|
|
12905
12624
|
}, [stdout, isRawModeSupported, disableRawMode, interactive]);
|
|
12906
|
-
let appContextValue =
|
|
12625
|
+
let appContextValue = $useMemo(() => ({
|
|
12907
12626
|
exit: handleExit,
|
|
12908
12627
|
waitUntilRenderFlush: onWaitUntilRenderFlush,
|
|
12909
12628
|
suspendTerminal: onSuspendTerminal
|
|
12910
|
-
}), [handleExit, onWaitUntilRenderFlush, onSuspendTerminal]), stdinContextValue =
|
|
12629
|
+
}), [handleExit, onWaitUntilRenderFlush, onSuspendTerminal]), stdinContextValue = $useMemo(() => ({
|
|
12911
12630
|
stdin,
|
|
12912
12631
|
setRawMode: handleSetRawMode,
|
|
12913
12632
|
setBracketedPasteMode: handleSetBracketedPasteMode,
|
|
@@ -12920,15 +12639,15 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12920
12639
|
handleSetBracketedPasteMode,
|
|
12921
12640
|
isRawModeSupported,
|
|
12922
12641
|
exitOnCtrlC
|
|
12923
|
-
]), stdoutContextValue =
|
|
12642
|
+
]), stdoutContextValue = $useMemo(() => ({
|
|
12924
12643
|
stdout,
|
|
12925
12644
|
write: writeToStdout
|
|
12926
|
-
}), [stdout, writeToStdout]), stderrContextValue =
|
|
12645
|
+
}), [stdout, writeToStdout]), stderrContextValue = $useMemo(() => ({
|
|
12927
12646
|
stderr,
|
|
12928
12647
|
write: writeToStderr
|
|
12929
|
-
}), [stderr, writeToStderr]), cursorContextValue =
|
|
12648
|
+
}), [stderr, writeToStderr]), cursorContextValue = $useMemo(() => ({
|
|
12930
12649
|
setCursorPosition
|
|
12931
|
-
}), [setCursorPosition]), focusContextValue =
|
|
12650
|
+
}), [setCursorPosition]), focusContextValue = $useMemo(() => ({
|
|
12932
12651
|
activeId: activeFocusId,
|
|
12933
12652
|
add: addFocusable,
|
|
12934
12653
|
remove: removeFocusable,
|
|
@@ -12950,11 +12669,11 @@ Read about how to prevent this error on https://github.com/vadimdemedes/ink/#isr
|
|
|
12950
12669
|
focusNext,
|
|
12951
12670
|
focusPrevious,
|
|
12952
12671
|
focus
|
|
12953
|
-
]), animationContextValue =
|
|
12672
|
+
]), animationContextValue = $useMemo(() => ({
|
|
12954
12673
|
renderThrottleMs,
|
|
12955
12674
|
subscribe: animationSubscribe
|
|
12956
12675
|
}), [animationSubscribe, renderThrottleMs]);
|
|
12957
|
-
return
|
|
12676
|
+
return $createElement(AppContext_default.Provider, { value: appContextValue }, $createElement(StdinContext_default.Provider, { value: stdinContextValue }, $createElement(StdoutContext_default.Provider, { value: stdoutContextValue }, $createElement(StderrContext_default.Provider, { value: stderrContextValue }, $createElement(FocusContext_default.Provider, { value: focusContextValue }, $createElement(AnimationContext_default.Provider, { value: animationContextValue }, $createElement(CursorContext_default.Provider, { value: cursorContextValue }, $createElement(ErrorBoundary, { onError: handleExit }, children))))))));
|
|
12958
12677
|
}
|
|
12959
12678
|
App.displayName = "InternalApp";
|
|
12960
12679
|
var App_default = App;
|
|
@@ -12985,7 +12704,7 @@ var kittyModifiers = {
|
|
|
12985
12704
|
};
|
|
12986
12705
|
|
|
12987
12706
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/ink.js
|
|
12988
|
-
var
|
|
12707
|
+
var noop2 = () => {}, textEncoder = /* @__PURE__ */ new TextEncoder, yieldImmediate = async () => new Promise((resolve) => {
|
|
12989
12708
|
setImmediate(resolve);
|
|
12990
12709
|
}), kittyQueryEscapeByte = 27, kittyQueryOpenBracketByte = 91, kittyQueryQuestionMarkByte = 63, kittyQueryLetterByte = 117, zeroByte = 48, nineByte = 57, isDigitByte = (byte) => byte >= zeroByte && byte <= nineByte, matchKittyQueryResponse = (buffer, startIndex) => {
|
|
12991
12710
|
if (buffer[startIndex] !== kittyQueryEscapeByte || buffer[startIndex + 1] !== kittyQueryOpenBracketByte || buffer[startIndex + 2] !== kittyQueryQuestionMarkByte)
|
|
@@ -13025,9 +12744,7 @@ var noop = () => {}, textEncoder = /* @__PURE__ */ new TextEncoder, yieldImmedia
|
|
|
13025
12744
|
if (isWindowsConsole && (wasFullscreen || isFullscreen))
|
|
13026
12745
|
return !0;
|
|
13027
12746
|
return wasOverflowing || isOverflowing && hadPreviousFrame || isLeavingFullscreen || shouldClearOnUnmount;
|
|
13028
|
-
}, isErrorInput = (value) => {
|
|
13029
|
-
return value instanceof Error || Object.prototype.toString.call(value) === "[object Error]";
|
|
13030
|
-
}, getWritableStreamState = (stdout) => {
|
|
12747
|
+
}, isErrorInput = (value) => value instanceof Error || Object.prototype.toString.call(value) === "[object Error]", getWritableStreamState = (stdout) => {
|
|
13031
12748
|
let canWriteToStdout = !stdout.destroyed && !stdout.writableEnded && (stdout.writable ?? !0), hasWritableState = stdout._writableState !== void 0 || stdout.writableLength !== void 0;
|
|
13032
12749
|
return {
|
|
13033
12750
|
canWriteToStdout,
|
|
@@ -13113,7 +12830,7 @@ class Ink {
|
|
|
13113
12830
|
};
|
|
13114
12831
|
this.initKittyKeyboard(), this.exitPromise = new Promise((resolve, reject) => {
|
|
13115
12832
|
this.resolveExitPromise = resolve, this.rejectExitPromise = reject;
|
|
13116
|
-
}), this.exitPromise.catch(
|
|
12833
|
+
}), this.exitPromise.catch(noop2);
|
|
13117
12834
|
}
|
|
13118
12835
|
resized = () => {
|
|
13119
12836
|
let currentWidth = getWindowSize(this.options.stdout).columns;
|
|
@@ -13159,8 +12876,8 @@ class Ink {
|
|
|
13159
12876
|
}
|
|
13160
12877
|
if (this.nextRenderCommit)
|
|
13161
12878
|
this.nextRenderCommit.resolve(), this.nextRenderCommit = void 0;
|
|
13162
|
-
let
|
|
13163
|
-
this.options.onRender?.({ renderTime: performance.now() -
|
|
12879
|
+
let startTime = performance.now(), { output, outputHeight, staticOutput } = renderer_default(this.rootNode, this.isScreenReaderEnabled);
|
|
12880
|
+
this.options.onRender?.({ renderTime: performance.now() - startTime });
|
|
13164
12881
|
let hasStaticOutput = staticOutput && staticOutput !== `
|
|
13165
12882
|
`;
|
|
13166
12883
|
if (this.options.debug) {
|
|
@@ -13181,7 +12898,7 @@ class Ink {
|
|
|
13181
12898
|
if (sync)
|
|
13182
12899
|
this.options.stdout.write(bsu);
|
|
13183
12900
|
if (hasStaticOutput) {
|
|
13184
|
-
let erase = this.lastOutputHeight > 0 ?
|
|
12901
|
+
let erase = this.lastOutputHeight > 0 ? eraseLines(this.lastOutputHeight) : "";
|
|
13185
12902
|
this.options.stdout.write(erase + staticOutput), this.lastOutputHeight = 0;
|
|
13186
12903
|
}
|
|
13187
12904
|
if (output === this.lastOutput && !hasStaticOutput) {
|
|
@@ -13196,7 +12913,7 @@ class Ink {
|
|
|
13196
12913
|
if (hasStaticOutput)
|
|
13197
12914
|
this.options.stdout.write(wrappedOutput);
|
|
13198
12915
|
else {
|
|
13199
|
-
let erase = this.lastOutputHeight > 0 ?
|
|
12916
|
+
let erase = this.lastOutputHeight > 0 ? eraseLines(this.lastOutputHeight) : "";
|
|
13200
12917
|
this.options.stdout.write(erase + wrappedOutput);
|
|
13201
12918
|
}
|
|
13202
12919
|
if (this.lastOutput = output, this.lastOutputToRender = wrappedOutput, this.lastOutputHeight = wrappedOutput === "" ? 0 : wrappedOutput.split(`
|
|
@@ -13209,11 +12926,11 @@ class Ink {
|
|
|
13209
12926
|
this.renderInteractiveFrame(output, outputHeight, hasStaticOutput ? staticOutput : "");
|
|
13210
12927
|
};
|
|
13211
12928
|
render(node) {
|
|
13212
|
-
let tree =
|
|
12929
|
+
let tree = $createElement(accessibilityContext.Provider, { value: { isScreenReaderEnabled: this.isScreenReaderEnabled } }, $createElement(App_default, { stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, exitOnCtrlC: this.options.exitOnCtrlC, interactive: this.interactive, renderThrottleMs: this.renderThrottleMs, writeToStdout: this.writeToStdout, writeToStderr: this.writeToStderr, setCursorPosition: this.setCursorPosition, onExit: this.handleAppExit, onWaitUntilRenderFlush: this.waitUntilRenderFlush, onSuspendTerminal: this.suspendTerminal, onRegisterInputControl: this.registerInputControl }, node));
|
|
13213
12930
|
if (this.options.concurrent)
|
|
13214
|
-
reconciler_default.updateContainer(tree, this.container, null,
|
|
12931
|
+
reconciler_default.updateContainer(tree, this.container, null, noop2);
|
|
13215
12932
|
else
|
|
13216
|
-
reconciler_default.updateContainerSync(tree, this.container, null,
|
|
12933
|
+
reconciler_default.updateContainerSync(tree, this.container, null, noop2), reconciler_default.flushSyncWork();
|
|
13217
12934
|
}
|
|
13218
12935
|
writeToStdout(data) {
|
|
13219
12936
|
if (this.isUnmounted)
|
|
@@ -13274,7 +12991,7 @@ class Ink {
|
|
|
13274
12991
|
if (this.kittyProtocolEnabled)
|
|
13275
12992
|
this.writeBestEffort(this.options.stdout, "\x1B[<u");
|
|
13276
12993
|
if (this.alternateScreen)
|
|
13277
|
-
this.writeBestEffort(this.options.stdout,
|
|
12994
|
+
this.writeBestEffort(this.options.stdout, exitAlternativeScreen), this.writeBestEffort(this.options.stdout, showCursorEscape), this.alternateScreen = !1;
|
|
13278
12995
|
if (!this.interactive)
|
|
13279
12996
|
this.options.stdout.write(this.options.debug ? `
|
|
13280
12997
|
` : this.lastOutput + `
|
|
@@ -13297,9 +13014,9 @@ class Ink {
|
|
|
13297
13014
|
setImmediate(resolveOrReject);
|
|
13298
13015
|
}, concurrentReconciler = reconciler_default;
|
|
13299
13016
|
if (this.options.concurrent)
|
|
13300
|
-
reconciler_default.updateContainerSync(null, this.container, null,
|
|
13017
|
+
reconciler_default.updateContainerSync(null, this.container, null, noop2), reconciler_default.flushSyncWork(), concurrentReconciler.flushPassiveEffects?.(), finishUnmount();
|
|
13301
13018
|
else
|
|
13302
|
-
reconciler_default.updateContainerSync(null, this.container, null,
|
|
13019
|
+
reconciler_default.updateContainerSync(null, this.container, null, noop2), reconciler_default.flushSyncWork(), finishUnmount();
|
|
13303
13020
|
}
|
|
13304
13021
|
async waitUntilExit() {
|
|
13305
13022
|
if (!this.beforeExitHandler)
|
|
@@ -13371,7 +13088,7 @@ class Ink {
|
|
|
13371
13088
|
}
|
|
13372
13089
|
setAlternateScreen(enabled) {
|
|
13373
13090
|
if (this.alternateScreen = this.resolveAlternateScreenOption(enabled, this.interactive), this.alternateScreen)
|
|
13374
|
-
this.writeBestEffort(this.options.stdout,
|
|
13091
|
+
this.writeBestEffort(this.options.stdout, enterAlternativeScreen), this.writeBestEffort(this.options.stdout, hideCursorEscape);
|
|
13375
13092
|
}
|
|
13376
13093
|
resolveInteractiveOption(interactive) {
|
|
13377
13094
|
return interactive ?? (!is_in_ci_default && Boolean(this.options.stdout.isTTY));
|
|
@@ -13418,7 +13135,7 @@ class Ink {
|
|
|
13418
13135
|
let sync = this.shouldSync();
|
|
13419
13136
|
if (sync)
|
|
13420
13137
|
this.options.stdout.write(bsu);
|
|
13421
|
-
if (this.options.stdout.write(
|
|
13138
|
+
if (this.options.stdout.write(clearTerminal + this.fullStaticOutput + outputToRender), this.lastOutput = output, this.lastOutputToRender = outputToRender, this.lastOutputHeight = outputHeight, this.log.sync(outputToRender), sync)
|
|
13422
13139
|
this.options.stdout.write(esu);
|
|
13423
13140
|
return;
|
|
13424
13141
|
}
|
|
@@ -13481,7 +13198,7 @@ class Ink {
|
|
|
13481
13198
|
if (this.log.clear(), this.log.done(), this.kittyProtocolEnabled)
|
|
13482
13199
|
this.writeBestEffort(this.options.stdout, "\x1B[<u");
|
|
13483
13200
|
if (this.alternateScreen)
|
|
13484
|
-
this.writeBestEffort(this.options.stdout,
|
|
13201
|
+
this.writeBestEffort(this.options.stdout, exitAlternativeScreen);
|
|
13485
13202
|
}
|
|
13486
13203
|
this.pauseInput?.();
|
|
13487
13204
|
} catch (error) {
|
|
@@ -13500,7 +13217,7 @@ class Ink {
|
|
|
13500
13217
|
let stdout = this.options.stdout, { canWriteToStdout } = getWritableStreamState(stdout);
|
|
13501
13218
|
if (canWriteToStdout) {
|
|
13502
13219
|
if (this.alternateScreen)
|
|
13503
|
-
this.writeBestEffort(this.options.stdout,
|
|
13220
|
+
this.writeBestEffort(this.options.stdout, enterAlternativeScreen);
|
|
13504
13221
|
if (this.kittyProtocolEnabled && this.kittyFlags)
|
|
13505
13222
|
this.writeBestEffort(this.options.stdout, `\x1B[>${resolveFlags(this.kittyFlags)}u`);
|
|
13506
13223
|
}
|
|
@@ -13555,15 +13272,15 @@ var render = (node, options) => {
|
|
|
13555
13272
|
`), instance;
|
|
13556
13273
|
};
|
|
13557
13274
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Static.js
|
|
13558
|
-
|
|
13275
|
+
init_react_production();
|
|
13559
13276
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Transform.js
|
|
13560
|
-
|
|
13277
|
+
init_react_production();
|
|
13561
13278
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Newline.js
|
|
13562
|
-
|
|
13279
|
+
init_react_production();
|
|
13563
13280
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/components/Spacer.js
|
|
13564
|
-
|
|
13281
|
+
init_react_production();
|
|
13565
13282
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-input.js
|
|
13566
|
-
|
|
13283
|
+
init_react_production();
|
|
13567
13284
|
|
|
13568
13285
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/parse-keypress.js
|
|
13569
13286
|
var textDecoder = /* @__PURE__ */ new TextDecoder, metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/, fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/, keyName = {
|
|
@@ -13639,36 +13356,32 @@ var textDecoder = /* @__PURE__ */ new TextDecoder, metaKeyCodeRe = /^(?:\x1b)([a
|
|
|
13639
13356
|
"[7^": "home",
|
|
13640
13357
|
"[8^": "end",
|
|
13641
13358
|
"[Z": "tab"
|
|
13642
|
-
}, nonAlphanumericKeys = [...Object.values(keyName), "backspace"], isShiftKey = (code) =>
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
"[7^",
|
|
13669
|
-
"[8^"
|
|
13670
|
-
].includes(code);
|
|
13671
|
-
}, kittyKeyRe = /^\x1b\[(\d+)(?:;(\d+)(?::(\d+))?(?:;([\d:]+))?)?u$/, kittySpecialKeyRe = /^\x1b\[(\d+);(\d+):(\d+)([A-Za-z~])$/, kittySpecialLetterKeys = {
|
|
13359
|
+
}, nonAlphanumericKeys = [...Object.values(keyName), "backspace"], isShiftKey = (code) => [
|
|
13360
|
+
"[a",
|
|
13361
|
+
"[b",
|
|
13362
|
+
"[c",
|
|
13363
|
+
"[d",
|
|
13364
|
+
"[e",
|
|
13365
|
+
"[2$",
|
|
13366
|
+
"[3$",
|
|
13367
|
+
"[5$",
|
|
13368
|
+
"[6$",
|
|
13369
|
+
"[7$",
|
|
13370
|
+
"[8$",
|
|
13371
|
+
"[Z"
|
|
13372
|
+
].includes(code), isCtrlKey = (code) => [
|
|
13373
|
+
"Oa",
|
|
13374
|
+
"Ob",
|
|
13375
|
+
"Oc",
|
|
13376
|
+
"Od",
|
|
13377
|
+
"Oe",
|
|
13378
|
+
"[2^",
|
|
13379
|
+
"[3^",
|
|
13380
|
+
"[5^",
|
|
13381
|
+
"[6^",
|
|
13382
|
+
"[7^",
|
|
13383
|
+
"[8^"
|
|
13384
|
+
].includes(code), kittyKeyRe = /^\x1b\[(\d+)(?:;(\d+)(?::(\d+))?(?:;([\d:]+))?)?u$/, kittySpecialKeyRe = /^\x1b\[(\d+);(\d+):(\d+)([A-Za-z~])$/, kittySpecialLetterKeys = {
|
|
13672
13385
|
A: "up",
|
|
13673
13386
|
B: "down",
|
|
13674
13387
|
C: "right",
|
|
@@ -13929,20 +13642,20 @@ var parseKittyKeypress = (s) => {
|
|
|
13929
13642
|
}, parse_keypress_default = parseKeypress;
|
|
13930
13643
|
|
|
13931
13644
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-stdin.js
|
|
13932
|
-
|
|
13933
|
-
var useStdinContext = () =>
|
|
13645
|
+
init_react_production();
|
|
13646
|
+
var useStdinContext = () => $useContext(StdinContext_default);
|
|
13934
13647
|
|
|
13935
13648
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-input.js
|
|
13936
13649
|
var useInput = (inputHandler, options = {}) => {
|
|
13937
13650
|
let { setRawMode, internal_exitOnCtrlC, internal_eventEmitter } = useStdinContext();
|
|
13938
|
-
|
|
13651
|
+
$useEffect(() => {
|
|
13939
13652
|
if (options.isActive === !1)
|
|
13940
13653
|
return;
|
|
13941
13654
|
return setRawMode(!0), () => {
|
|
13942
13655
|
setRawMode(!1);
|
|
13943
13656
|
};
|
|
13944
13657
|
}, [options.isActive, setRawMode]);
|
|
13945
|
-
let handleData =
|
|
13658
|
+
let handleData = $useEffectEvent((data) => {
|
|
13946
13659
|
let keypress = parse_keypress_default(data), key = {
|
|
13947
13660
|
upArrow: keypress.name === "up",
|
|
13948
13661
|
downArrow: keypress.name === "down",
|
|
@@ -13989,7 +13702,7 @@ var useInput = (inputHandler, options = {}) => {
|
|
|
13989
13702
|
inputHandler(input, key);
|
|
13990
13703
|
});
|
|
13991
13704
|
});
|
|
13992
|
-
|
|
13705
|
+
$useEffect(() => {
|
|
13993
13706
|
if (options.isActive === !1)
|
|
13994
13707
|
return;
|
|
13995
13708
|
return internal_eventEmitter.on("input", handleData), () => {
|
|
@@ -13998,22 +13711,22 @@ var useInput = (inputHandler, options = {}) => {
|
|
|
13998
13711
|
}, [options.isActive, internal_eventEmitter]);
|
|
13999
13712
|
}, use_input_default = useInput;
|
|
14000
13713
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-paste.js
|
|
14001
|
-
|
|
13714
|
+
init_react_production();
|
|
14002
13715
|
var usePaste = (handler, options = {}) => {
|
|
14003
13716
|
let { setRawMode, setBracketedPasteMode, internal_eventEmitter } = useStdinContext();
|
|
14004
|
-
|
|
13717
|
+
$useEffect(() => {
|
|
14005
13718
|
if (options.isActive === !1)
|
|
14006
13719
|
return;
|
|
14007
13720
|
return setRawMode(!0), setBracketedPasteMode(!0), () => {
|
|
14008
13721
|
setRawMode(!1), setBracketedPasteMode(!1);
|
|
14009
13722
|
};
|
|
14010
13723
|
}, [options.isActive, setRawMode, setBracketedPasteMode]);
|
|
14011
|
-
let handlePaste =
|
|
13724
|
+
let handlePaste = $useEffectEvent((text) => {
|
|
14012
13725
|
reconciler_default.discreteUpdates(() => {
|
|
14013
13726
|
handler(text);
|
|
14014
13727
|
});
|
|
14015
13728
|
});
|
|
14016
|
-
|
|
13729
|
+
$useEffect(() => {
|
|
14017
13730
|
if (options.isActive === !1)
|
|
14018
13731
|
return;
|
|
14019
13732
|
return internal_eventEmitter.on("paste", handlePaste), () => {
|
|
@@ -14022,37 +13735,35 @@ var usePaste = (handler, options = {}) => {
|
|
|
14022
13735
|
}, [options.isActive, internal_eventEmitter]);
|
|
14023
13736
|
}, use_paste_default = usePaste;
|
|
14024
13737
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-app.js
|
|
14025
|
-
|
|
13738
|
+
init_react_production();
|
|
14026
13739
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-stdout.js
|
|
14027
|
-
|
|
14028
|
-
var useStdout = () =>
|
|
13740
|
+
init_react_production();
|
|
13741
|
+
var useStdout = () => $useContext(StdoutContext_default), use_stdout_default = useStdout;
|
|
14029
13742
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-stderr.js
|
|
14030
|
-
|
|
13743
|
+
init_react_production();
|
|
14031
13744
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-focus.js
|
|
14032
|
-
|
|
13745
|
+
init_react_production();
|
|
14033
13746
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-focus-manager.js
|
|
14034
|
-
|
|
13747
|
+
init_react_production();
|
|
14035
13748
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js
|
|
14036
|
-
|
|
13749
|
+
init_react_production();
|
|
14037
13750
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-cursor.js
|
|
14038
|
-
|
|
13751
|
+
init_react_production();
|
|
14039
13752
|
var useCursor = () => {
|
|
14040
|
-
let context =
|
|
13753
|
+
let context = $useContext(CursorContext_default), positionRef = $useRef(void 0), setCursorPosition = $useCallback((position) => {
|
|
14041
13754
|
positionRef.current = position;
|
|
14042
13755
|
}, []);
|
|
14043
|
-
return
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
};
|
|
14047
|
-
}), { setCursorPosition };
|
|
13756
|
+
return $useInsertionEffect(() => (context.setCursorPosition(positionRef.current), () => {
|
|
13757
|
+
context.setCursorPosition(void 0);
|
|
13758
|
+
})), { setCursorPosition };
|
|
14048
13759
|
}, use_cursor_default = useCursor;
|
|
14049
13760
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-animation.js
|
|
14050
|
-
|
|
13761
|
+
init_react_production();
|
|
14051
13762
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-window-size.js
|
|
14052
|
-
|
|
13763
|
+
init_react_production();
|
|
14053
13764
|
var useWindowSize = () => {
|
|
14054
|
-
let { stdout } = use_stdout_default(), [size, setSize] =
|
|
14055
|
-
return
|
|
13765
|
+
let { stdout } = use_stdout_default(), [size, setSize] = $useState(() => getWindowSize(stdout));
|
|
13766
|
+
return $useEffect(() => {
|
|
14056
13767
|
let onResize = () => {
|
|
14057
13768
|
setSize(getWindowSize(stdout));
|
|
14058
13769
|
};
|
|
@@ -14062,7 +13773,7 @@ var useWindowSize = () => {
|
|
|
14062
13773
|
}, [stdout]), size;
|
|
14063
13774
|
}, use_window_size_default = useWindowSize;
|
|
14064
13775
|
// ../../node_modules/.bun/ink@7.1.1+c841d34b494ec30a/node_modules/ink/build/hooks/use-box-metrics.js
|
|
14065
|
-
|
|
13776
|
+
init_react_production();
|
|
14066
13777
|
var emptyMetrics = {
|
|
14067
13778
|
width: 0,
|
|
14068
13779
|
height: 0,
|
|
@@ -14075,48 +13786,37 @@ var emptyMetrics = {
|
|
|
14075
13786
|
return node.nodeName === "ink-root" ? node : void 0;
|
|
14076
13787
|
return findRootNode(node.parentNode);
|
|
14077
13788
|
}, useBoxMetrics = (ref) => {
|
|
14078
|
-
let [metrics, setMetrics] =
|
|
13789
|
+
let [metrics, setMetrics] = $useState(emptyMetrics), [hasMeasured, setHasMeasured] = $useState(!1), updateMetrics = $useCallback(() => {
|
|
14079
13790
|
let layout = ref.current?.yogaNode?.getComputedLayout() ?? emptyMetrics;
|
|
14080
|
-
setMetrics((previousMetrics) =>
|
|
14081
|
-
return previousMetrics.width !== layout.width || previousMetrics.height !== layout.height || previousMetrics.left !== layout.left || previousMetrics.top !== layout.top ? layout : previousMetrics;
|
|
14082
|
-
}), setHasMeasured(Boolean(ref.current));
|
|
13791
|
+
setMetrics((previousMetrics) => previousMetrics.width !== layout.width || previousMetrics.height !== layout.height || previousMetrics.left !== layout.left || previousMetrics.top !== layout.top ? layout : previousMetrics), setHasMeasured(Boolean(ref.current));
|
|
14083
13792
|
}, [ref]);
|
|
14084
|
-
return
|
|
13793
|
+
return $useEffect(updateMetrics), $useEffect(() => {
|
|
14085
13794
|
let rootNode = findRootNode(ref.current);
|
|
14086
13795
|
if (!rootNode)
|
|
14087
13796
|
return;
|
|
14088
13797
|
return addLayoutListener(rootNode, updateMetrics);
|
|
14089
|
-
}),
|
|
13798
|
+
}), $useMemo(() => ({
|
|
14090
13799
|
...metrics,
|
|
14091
13800
|
hasMeasured
|
|
14092
13801
|
}), [metrics, hasMeasured]);
|
|
14093
13802
|
}, use_box_metrics_default = useBoxMetrics;
|
|
14094
13803
|
// plugins-dist/tui/vendor.js
|
|
14095
|
-
|
|
14096
|
-
var export_useSyncExternalStore = import_react34.useSyncExternalStore;
|
|
14097
|
-
var export_useState = import_react34.useState;
|
|
14098
|
-
var export_useRef = import_react34.useRef;
|
|
14099
|
-
var export_useReducer = import_react34.useReducer;
|
|
14100
|
-
var export_useEffect = import_react34.useEffect;
|
|
14101
|
-
var export_useContext = import_react34.useContext;
|
|
14102
|
-
var export_createElement = import_react34.createElement;
|
|
14103
|
-
var export_createContext = import_react34.createContext;
|
|
14104
|
-
|
|
13804
|
+
init_react_production();
|
|
14105
13805
|
export {
|
|
14106
|
-
|
|
14107
|
-
export_useSyncExternalStore as useSyncExternalStore,
|
|
14108
|
-
export_useState as useState,
|
|
14109
|
-
export_useRef as useRef,
|
|
14110
|
-
export_useReducer as useReducer,
|
|
14111
|
-
use_paste_default as usePaste,
|
|
14112
|
-
use_input_default as useInput,
|
|
14113
|
-
export_useEffect as useEffect,
|
|
14114
|
-
use_cursor_default as useCursor,
|
|
14115
|
-
export_useContext as useContext,
|
|
14116
|
-
use_box_metrics_default as useBoxMetrics,
|
|
14117
|
-
render_default as render,
|
|
14118
|
-
export_createElement as createElement,
|
|
14119
|
-
export_createContext as createContext,
|
|
13806
|
+
Box_default as Box,
|
|
14120
13807
|
Text,
|
|
14121
|
-
|
|
13808
|
+
$createContext as createContext,
|
|
13809
|
+
$createElement as createElement,
|
|
13810
|
+
render_default as render,
|
|
13811
|
+
use_box_metrics_default as useBoxMetrics,
|
|
13812
|
+
$useContext as useContext,
|
|
13813
|
+
use_cursor_default as useCursor,
|
|
13814
|
+
$useEffect as useEffect,
|
|
13815
|
+
use_input_default as useInput,
|
|
13816
|
+
use_paste_default as usePaste,
|
|
13817
|
+
$useReducer as useReducer,
|
|
13818
|
+
$useRef as useRef,
|
|
13819
|
+
$useState as useState,
|
|
13820
|
+
$useSyncExternalStore as useSyncExternalStore,
|
|
13821
|
+
use_window_size_default as useWindowSize
|
|
14122
13822
|
};
|