@salloomd/teeth-selector 0.0.1 → 0.0.3
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/dist/components/teeth-preview.d.ts +5 -0
- package/dist/components/teeth-preview.d.ts.map +1 -0
- package/dist/components/teeth-selector.d.ts +63 -0
- package/dist/components/teeth-selector.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -1094
- package/dist/lib/teeth.d.ts +18 -0
- package/dist/lib/teeth.d.ts.map +1 -0
- package/dist/lib/types.d.ts +93 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/package.json +14 -3
package/dist/index.js
CHANGED
|
@@ -1,1079 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
-
for (let key of __getOwnPropNames(mod))
|
|
10
|
-
if (!__hasOwnProp.call(to, key))
|
|
11
|
-
__defProp(to, key, {
|
|
12
|
-
get: () => mod[key],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
|
-
|
|
19
|
-
// node_modules/react/cjs/react.development.js
|
|
20
|
-
var require_react_development = __commonJS((exports, module) => {
|
|
21
|
-
(function() {
|
|
22
|
-
function defineDeprecationWarning(methodName, info) {
|
|
23
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
24
|
-
get: function() {
|
|
25
|
-
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function getIteratorFn(maybeIterable) {
|
|
30
|
-
if (maybeIterable === null || typeof maybeIterable !== "object")
|
|
31
|
-
return null;
|
|
32
|
-
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
33
|
-
return typeof maybeIterable === "function" ? maybeIterable : null;
|
|
34
|
-
}
|
|
35
|
-
function warnNoop(publicInstance, callerName) {
|
|
36
|
-
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
37
|
-
var warningKey = publicInstance + "." + callerName;
|
|
38
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
39
|
-
}
|
|
40
|
-
function Component(props, context, updater) {
|
|
41
|
-
this.props = props;
|
|
42
|
-
this.context = context;
|
|
43
|
-
this.refs = emptyObject;
|
|
44
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
45
|
-
}
|
|
46
|
-
function ComponentDummy() {}
|
|
47
|
-
function PureComponent(props, context, updater) {
|
|
48
|
-
this.props = props;
|
|
49
|
-
this.context = context;
|
|
50
|
-
this.refs = emptyObject;
|
|
51
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
52
|
-
}
|
|
53
|
-
function noop() {}
|
|
54
|
-
function testStringCoercion(value) {
|
|
55
|
-
return "" + value;
|
|
56
|
-
}
|
|
57
|
-
function checkKeyStringCoercion(value) {
|
|
58
|
-
try {
|
|
59
|
-
testStringCoercion(value);
|
|
60
|
-
var JSCompiler_inline_result = false;
|
|
61
|
-
} catch (e) {
|
|
62
|
-
JSCompiler_inline_result = true;
|
|
63
|
-
}
|
|
64
|
-
if (JSCompiler_inline_result) {
|
|
65
|
-
JSCompiler_inline_result = console;
|
|
66
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
67
|
-
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
68
|
-
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
69
|
-
return testStringCoercion(value);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
function getComponentNameFromType(type) {
|
|
73
|
-
if (type == null)
|
|
74
|
-
return null;
|
|
75
|
-
if (typeof type === "function")
|
|
76
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
77
|
-
if (typeof type === "string")
|
|
78
|
-
return type;
|
|
79
|
-
switch (type) {
|
|
80
|
-
case REACT_FRAGMENT_TYPE:
|
|
81
|
-
return "Fragment";
|
|
82
|
-
case REACT_PROFILER_TYPE:
|
|
83
|
-
return "Profiler";
|
|
84
|
-
case REACT_STRICT_MODE_TYPE:
|
|
85
|
-
return "StrictMode";
|
|
86
|
-
case REACT_SUSPENSE_TYPE:
|
|
87
|
-
return "Suspense";
|
|
88
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
89
|
-
return "SuspenseList";
|
|
90
|
-
case REACT_ACTIVITY_TYPE:
|
|
91
|
-
return "Activity";
|
|
92
|
-
}
|
|
93
|
-
if (typeof type === "object")
|
|
94
|
-
switch (typeof type.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
95
|
-
case REACT_PORTAL_TYPE:
|
|
96
|
-
return "Portal";
|
|
97
|
-
case REACT_CONTEXT_TYPE:
|
|
98
|
-
return type.displayName || "Context";
|
|
99
|
-
case REACT_CONSUMER_TYPE:
|
|
100
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
101
|
-
case REACT_FORWARD_REF_TYPE:
|
|
102
|
-
var innerType = type.render;
|
|
103
|
-
type = type.displayName;
|
|
104
|
-
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
105
|
-
return type;
|
|
106
|
-
case REACT_MEMO_TYPE:
|
|
107
|
-
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
108
|
-
case REACT_LAZY_TYPE:
|
|
109
|
-
innerType = type._payload;
|
|
110
|
-
type = type._init;
|
|
111
|
-
try {
|
|
112
|
-
return getComponentNameFromType(type(innerType));
|
|
113
|
-
} catch (x) {}
|
|
114
|
-
}
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
function getTaskName(type) {
|
|
118
|
-
if (type === REACT_FRAGMENT_TYPE)
|
|
119
|
-
return "<>";
|
|
120
|
-
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
121
|
-
return "<...>";
|
|
122
|
-
try {
|
|
123
|
-
var name = getComponentNameFromType(type);
|
|
124
|
-
return name ? "<" + name + ">" : "<...>";
|
|
125
|
-
} catch (x) {
|
|
126
|
-
return "<...>";
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
function getOwner() {
|
|
130
|
-
var dispatcher = ReactSharedInternals.A;
|
|
131
|
-
return dispatcher === null ? null : dispatcher.getOwner();
|
|
132
|
-
}
|
|
133
|
-
function UnknownOwner() {
|
|
134
|
-
return Error("react-stack-top-frame");
|
|
135
|
-
}
|
|
136
|
-
function hasValidKey(config) {
|
|
137
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
138
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
139
|
-
if (getter && getter.isReactWarning)
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
return config.key !== undefined;
|
|
143
|
-
}
|
|
144
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
145
|
-
function warnAboutAccessingKey() {
|
|
146
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
147
|
-
}
|
|
148
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
149
|
-
Object.defineProperty(props, "key", {
|
|
150
|
-
get: warnAboutAccessingKey,
|
|
151
|
-
configurable: true
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
155
|
-
var componentName = getComponentNameFromType(this.type);
|
|
156
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
157
|
-
componentName = this.props.ref;
|
|
158
|
-
return componentName !== undefined ? componentName : null;
|
|
159
|
-
}
|
|
160
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
161
|
-
var refProp = props.ref;
|
|
162
|
-
type = {
|
|
163
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
164
|
-
type,
|
|
165
|
-
key,
|
|
166
|
-
props,
|
|
167
|
-
_owner: owner
|
|
168
|
-
};
|
|
169
|
-
(refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type, "ref", {
|
|
170
|
-
enumerable: false,
|
|
171
|
-
get: elementRefGetterWithDeprecationWarning
|
|
172
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
173
|
-
type._store = {};
|
|
174
|
-
Object.defineProperty(type._store, "validated", {
|
|
175
|
-
configurable: false,
|
|
176
|
-
enumerable: false,
|
|
177
|
-
writable: true,
|
|
178
|
-
value: 0
|
|
179
|
-
});
|
|
180
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
181
|
-
configurable: false,
|
|
182
|
-
enumerable: false,
|
|
183
|
-
writable: true,
|
|
184
|
-
value: null
|
|
185
|
-
});
|
|
186
|
-
Object.defineProperty(type, "_debugStack", {
|
|
187
|
-
configurable: false,
|
|
188
|
-
enumerable: false,
|
|
189
|
-
writable: true,
|
|
190
|
-
value: debugStack
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(type, "_debugTask", {
|
|
193
|
-
configurable: false,
|
|
194
|
-
enumerable: false,
|
|
195
|
-
writable: true,
|
|
196
|
-
value: debugTask
|
|
197
|
-
});
|
|
198
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
199
|
-
return type;
|
|
200
|
-
}
|
|
201
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
202
|
-
newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask);
|
|
203
|
-
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
204
|
-
return newKey;
|
|
205
|
-
}
|
|
206
|
-
function validateChildKeys(node) {
|
|
207
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : typeof node === "object" && node !== null && node.$$typeof === REACT_LAZY_TYPE && (node._payload.status === "fulfilled" ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
208
|
-
}
|
|
209
|
-
function isValidElement(object) {
|
|
210
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
211
|
-
}
|
|
212
|
-
function escape(key) {
|
|
213
|
-
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
214
|
-
return "$" + key.replace(/[=:]/g, function(match) {
|
|
215
|
-
return escaperLookup[match];
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
function getElementKey(element, index) {
|
|
219
|
-
return typeof element === "object" && element !== null && element.key != null ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
|
220
|
-
}
|
|
221
|
-
function resolveThenable(thenable) {
|
|
222
|
-
switch (thenable.status) {
|
|
223
|
-
case "fulfilled":
|
|
224
|
-
return thenable.value;
|
|
225
|
-
case "rejected":
|
|
226
|
-
throw thenable.reason;
|
|
227
|
-
default:
|
|
228
|
-
switch (typeof thenable.status === "string" ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
|
|
229
|
-
thenable.status === "pending" && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
230
|
-
}, function(error) {
|
|
231
|
-
thenable.status === "pending" && (thenable.status = "rejected", thenable.reason = error);
|
|
232
|
-
})), thenable.status) {
|
|
233
|
-
case "fulfilled":
|
|
234
|
-
return thenable.value;
|
|
235
|
-
case "rejected":
|
|
236
|
-
throw thenable.reason;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
throw thenable;
|
|
240
|
-
}
|
|
241
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
242
|
-
var type = typeof children;
|
|
243
|
-
if (type === "undefined" || type === "boolean")
|
|
244
|
-
children = null;
|
|
245
|
-
var invokeCallback = false;
|
|
246
|
-
if (children === null)
|
|
247
|
-
invokeCallback = true;
|
|
248
|
-
else
|
|
249
|
-
switch (type) {
|
|
250
|
-
case "bigint":
|
|
251
|
-
case "string":
|
|
252
|
-
case "number":
|
|
253
|
-
invokeCallback = true;
|
|
254
|
-
break;
|
|
255
|
-
case "object":
|
|
256
|
-
switch (children.$$typeof) {
|
|
257
|
-
case REACT_ELEMENT_TYPE:
|
|
258
|
-
case REACT_PORTAL_TYPE:
|
|
259
|
-
invokeCallback = true;
|
|
260
|
-
break;
|
|
261
|
-
case REACT_LAZY_TYPE:
|
|
262
|
-
return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (invokeCallback) {
|
|
266
|
-
invokeCallback = children;
|
|
267
|
-
callback = callback(invokeCallback);
|
|
268
|
-
var childKey = nameSoFar === "" ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
269
|
-
isArrayImpl(callback) ? (escapedPrefix = "", childKey != null && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
270
|
-
return c;
|
|
271
|
-
})) : callback != null && (isValidElement(callback) && (callback.key != null && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (callback.key == null || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), nameSoFar !== "" && invokeCallback != null && isValidElement(invokeCallback) && invokeCallback.key == null && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
272
|
-
return 1;
|
|
273
|
-
}
|
|
274
|
-
invokeCallback = 0;
|
|
275
|
-
childKey = nameSoFar === "" ? "." : nameSoFar + ":";
|
|
276
|
-
if (isArrayImpl(children))
|
|
277
|
-
for (var i = 0;i < children.length; i++)
|
|
278
|
-
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
279
|
-
else if (i = getIteratorFn(children), typeof i === "function")
|
|
280
|
-
for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = true), children = i.call(children), i = 0;!(nameSoFar = children.next()).done; )
|
|
281
|
-
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
|
282
|
-
else if (type === "object") {
|
|
283
|
-
if (typeof children.then === "function")
|
|
284
|
-
return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
|
|
285
|
-
array = String(children);
|
|
286
|
-
throw 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.");
|
|
287
|
-
}
|
|
288
|
-
return invokeCallback;
|
|
289
|
-
}
|
|
290
|
-
function mapChildren(children, func, context) {
|
|
291
|
-
if (children == null)
|
|
292
|
-
return children;
|
|
293
|
-
var result = [], count = 0;
|
|
294
|
-
mapIntoArray(children, result, "", "", function(child) {
|
|
295
|
-
return func.call(context, child, count++);
|
|
296
|
-
});
|
|
297
|
-
return result;
|
|
298
|
-
}
|
|
299
|
-
function lazyInitializer(payload) {
|
|
300
|
-
if (payload._status === -1) {
|
|
301
|
-
var ioInfo = payload._ioInfo;
|
|
302
|
-
ioInfo != null && (ioInfo.start = ioInfo.end = performance.now());
|
|
303
|
-
ioInfo = payload._result;
|
|
304
|
-
var thenable = ioInfo();
|
|
305
|
-
thenable.then(function(moduleObject) {
|
|
306
|
-
if (payload._status === 0 || payload._status === -1) {
|
|
307
|
-
payload._status = 1;
|
|
308
|
-
payload._result = moduleObject;
|
|
309
|
-
var _ioInfo = payload._ioInfo;
|
|
310
|
-
_ioInfo != null && (_ioInfo.end = performance.now());
|
|
311
|
-
thenable.status === undefined && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
312
|
-
}
|
|
313
|
-
}, function(error) {
|
|
314
|
-
if (payload._status === 0 || payload._status === -1) {
|
|
315
|
-
payload._status = 2;
|
|
316
|
-
payload._result = error;
|
|
317
|
-
var _ioInfo2 = payload._ioInfo;
|
|
318
|
-
_ioInfo2 != null && (_ioInfo2.end = performance.now());
|
|
319
|
-
thenable.status === undefined && (thenable.status = "rejected", thenable.reason = error);
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
ioInfo = payload._ioInfo;
|
|
323
|
-
if (ioInfo != null) {
|
|
324
|
-
ioInfo.value = thenable;
|
|
325
|
-
var displayName = thenable.displayName;
|
|
326
|
-
typeof displayName === "string" && (ioInfo.name = displayName);
|
|
327
|
-
}
|
|
328
|
-
payload._status === -1 && (payload._status = 0, payload._result = thenable);
|
|
329
|
-
}
|
|
330
|
-
if (payload._status === 1)
|
|
331
|
-
return ioInfo = payload._result, ioInfo === undefined && console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
332
|
-
|
|
333
|
-
Your code should look like:
|
|
334
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
335
|
-
|
|
336
|
-
Did you accidentally put curly braces around the import?`, ioInfo), "default" in ioInfo || console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
337
|
-
|
|
338
|
-
Your code should look like:
|
|
339
|
-
const MyComponent = lazy(() => import('./MyComponent'))`, ioInfo), ioInfo.default;
|
|
340
|
-
throw payload._result;
|
|
341
|
-
}
|
|
342
|
-
function resolveDispatcher() {
|
|
343
|
-
var dispatcher = ReactSharedInternals.H;
|
|
344
|
-
dispatcher === null && console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
345
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
346
|
-
2. You might be breaking the Rules of Hooks
|
|
347
|
-
3. You might have more than one copy of React in the same app
|
|
348
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`);
|
|
349
|
-
return dispatcher;
|
|
350
|
-
}
|
|
351
|
-
function releaseAsyncTransition() {
|
|
352
|
-
ReactSharedInternals.asyncTransitions--;
|
|
353
|
-
}
|
|
354
|
-
function enqueueTask(task) {
|
|
355
|
-
if (enqueueTaskImpl === null)
|
|
356
|
-
try {
|
|
357
|
-
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
358
|
-
enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
|
|
359
|
-
} catch (_err) {
|
|
360
|
-
enqueueTaskImpl = function(callback) {
|
|
361
|
-
didWarnAboutMessageChannel === false && (didWarnAboutMessageChannel = true, typeof MessageChannel === "undefined" && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
362
|
-
var channel = new MessageChannel;
|
|
363
|
-
channel.port1.onmessage = callback;
|
|
364
|
-
channel.port2.postMessage(undefined);
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
return enqueueTaskImpl(task);
|
|
368
|
-
}
|
|
369
|
-
function aggregateErrors(errors) {
|
|
370
|
-
return 1 < errors.length && typeof AggregateError === "function" ? new AggregateError(errors) : errors[0];
|
|
371
|
-
}
|
|
372
|
-
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
373
|
-
prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
374
|
-
actScopeDepth = prevActScopeDepth;
|
|
375
|
-
}
|
|
376
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
377
|
-
var queue = ReactSharedInternals.actQueue;
|
|
378
|
-
if (queue !== null)
|
|
379
|
-
if (queue.length !== 0)
|
|
380
|
-
try {
|
|
381
|
-
flushActQueue(queue);
|
|
382
|
-
enqueueTask(function() {
|
|
383
|
-
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
384
|
-
});
|
|
385
|
-
return;
|
|
386
|
-
} catch (error) {
|
|
387
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
388
|
-
}
|
|
389
|
-
else
|
|
390
|
-
ReactSharedInternals.actQueue = null;
|
|
391
|
-
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
392
|
-
}
|
|
393
|
-
function flushActQueue(queue) {
|
|
394
|
-
if (!isFlushing) {
|
|
395
|
-
isFlushing = true;
|
|
396
|
-
var i = 0;
|
|
397
|
-
try {
|
|
398
|
-
for (;i < queue.length; i++) {
|
|
399
|
-
var callback = queue[i];
|
|
400
|
-
do {
|
|
401
|
-
ReactSharedInternals.didUsePromise = false;
|
|
402
|
-
var continuation = callback(false);
|
|
403
|
-
if (continuation !== null) {
|
|
404
|
-
if (ReactSharedInternals.didUsePromise) {
|
|
405
|
-
queue[i] = callback;
|
|
406
|
-
queue.splice(0, i);
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
callback = continuation;
|
|
410
|
-
} else
|
|
411
|
-
break;
|
|
412
|
-
} while (1);
|
|
413
|
-
}
|
|
414
|
-
queue.length = 0;
|
|
415
|
-
} catch (error) {
|
|
416
|
-
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
417
|
-
} finally {
|
|
418
|
-
isFlushing = false;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
423
|
-
var 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"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
424
|
-
isMounted: function() {
|
|
425
|
-
return false;
|
|
426
|
-
},
|
|
427
|
-
enqueueForceUpdate: function(publicInstance) {
|
|
428
|
-
warnNoop(publicInstance, "forceUpdate");
|
|
429
|
-
},
|
|
430
|
-
enqueueReplaceState: function(publicInstance) {
|
|
431
|
-
warnNoop(publicInstance, "replaceState");
|
|
432
|
-
},
|
|
433
|
-
enqueueSetState: function(publicInstance) {
|
|
434
|
-
warnNoop(publicInstance, "setState");
|
|
435
|
-
}
|
|
436
|
-
}, assign = Object.assign, emptyObject = {};
|
|
437
|
-
Object.freeze(emptyObject);
|
|
438
|
-
Component.prototype.isReactComponent = {};
|
|
439
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
440
|
-
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null)
|
|
441
|
-
throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
|
442
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
443
|
-
};
|
|
444
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
445
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
446
|
-
};
|
|
447
|
-
var deprecatedAPIs = {
|
|
448
|
-
isMounted: [
|
|
449
|
-
"isMounted",
|
|
450
|
-
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
451
|
-
],
|
|
452
|
-
replaceState: [
|
|
453
|
-
"replaceState",
|
|
454
|
-
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
455
|
-
]
|
|
456
|
-
};
|
|
457
|
-
for (fnName in deprecatedAPIs)
|
|
458
|
-
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
459
|
-
ComponentDummy.prototype = Component.prototype;
|
|
460
|
-
deprecatedAPIs = PureComponent.prototype = new ComponentDummy;
|
|
461
|
-
deprecatedAPIs.constructor = PureComponent;
|
|
462
|
-
assign(deprecatedAPIs, Component.prototype);
|
|
463
|
-
deprecatedAPIs.isPureReactComponent = true;
|
|
464
|
-
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
465
|
-
H: null,
|
|
466
|
-
A: null,
|
|
467
|
-
T: null,
|
|
468
|
-
S: null,
|
|
469
|
-
actQueue: null,
|
|
470
|
-
asyncTransitions: 0,
|
|
471
|
-
isBatchingLegacy: false,
|
|
472
|
-
didScheduleLegacyUpdate: false,
|
|
473
|
-
didUsePromise: false,
|
|
474
|
-
thrownErrors: [],
|
|
475
|
-
getCurrentStack: null,
|
|
476
|
-
recentlyCreatedOwnerStacks: 0
|
|
477
|
-
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
|
478
|
-
return null;
|
|
479
|
-
};
|
|
480
|
-
deprecatedAPIs = {
|
|
481
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
482
|
-
return callStackForError();
|
|
483
|
-
}
|
|
484
|
-
};
|
|
485
|
-
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
486
|
-
var didWarnAboutElementRef = {};
|
|
487
|
-
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)();
|
|
488
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
489
|
-
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = typeof reportError === "function" ? reportError : function(error) {
|
|
490
|
-
if (typeof window === "object" && typeof window.ErrorEvent === "function") {
|
|
491
|
-
var event = new window.ErrorEvent("error", {
|
|
492
|
-
bubbles: true,
|
|
493
|
-
cancelable: true,
|
|
494
|
-
message: typeof error === "object" && error !== null && typeof error.message === "string" ? String(error.message) : String(error),
|
|
495
|
-
error
|
|
496
|
-
});
|
|
497
|
-
if (!window.dispatchEvent(event))
|
|
498
|
-
return;
|
|
499
|
-
} else if (typeof process === "object" && typeof process.emit === "function") {
|
|
500
|
-
process.emit("uncaughtException", error);
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
console.error(error);
|
|
504
|
-
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = typeof queueMicrotask === "function" ? function(callback) {
|
|
505
|
-
queueMicrotask(function() {
|
|
506
|
-
return queueMicrotask(callback);
|
|
507
|
-
});
|
|
508
|
-
} : enqueueTask;
|
|
509
|
-
deprecatedAPIs = Object.freeze({
|
|
510
|
-
__proto__: null,
|
|
511
|
-
c: function(size) {
|
|
512
|
-
return resolveDispatcher().useMemoCache(size);
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
var fnName = {
|
|
516
|
-
map: mapChildren,
|
|
517
|
-
forEach: function(children, forEachFunc, forEachContext) {
|
|
518
|
-
mapChildren(children, function() {
|
|
519
|
-
forEachFunc.apply(this, arguments);
|
|
520
|
-
}, forEachContext);
|
|
521
|
-
},
|
|
522
|
-
count: function(children) {
|
|
523
|
-
var n = 0;
|
|
524
|
-
mapChildren(children, function() {
|
|
525
|
-
n++;
|
|
526
|
-
});
|
|
527
|
-
return n;
|
|
528
|
-
},
|
|
529
|
-
toArray: function(children) {
|
|
530
|
-
return mapChildren(children, function(child) {
|
|
531
|
-
return child;
|
|
532
|
-
}) || [];
|
|
533
|
-
},
|
|
534
|
-
only: function(children) {
|
|
535
|
-
if (!isValidElement(children))
|
|
536
|
-
throw Error("React.Children.only expected to receive a single React element child.");
|
|
537
|
-
return children;
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
541
|
-
exports.Children = fnName;
|
|
542
|
-
exports.Component = Component;
|
|
543
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
544
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
545
|
-
exports.PureComponent = PureComponent;
|
|
546
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
547
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
548
|
-
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
549
|
-
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
550
|
-
exports.act = function(callback) {
|
|
551
|
-
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
552
|
-
actScopeDepth++;
|
|
553
|
-
var queue = ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : [], didAwaitActCall = false;
|
|
554
|
-
try {
|
|
555
|
-
var result = callback();
|
|
556
|
-
} catch (error) {
|
|
557
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
558
|
-
}
|
|
559
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
560
|
-
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
561
|
-
if (result !== null && typeof result === "object" && typeof result.then === "function") {
|
|
562
|
-
var thenable = result;
|
|
563
|
-
queueSeveralMicrotasks(function() {
|
|
564
|
-
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
565
|
-
});
|
|
566
|
-
return {
|
|
567
|
-
then: function(resolve, reject) {
|
|
568
|
-
didAwaitActCall = true;
|
|
569
|
-
thenable.then(function(returnValue) {
|
|
570
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
571
|
-
if (prevActScopeDepth === 0) {
|
|
572
|
-
try {
|
|
573
|
-
flushActQueue(queue), enqueueTask(function() {
|
|
574
|
-
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
575
|
-
});
|
|
576
|
-
} catch (error$0) {
|
|
577
|
-
ReactSharedInternals.thrownErrors.push(error$0);
|
|
578
|
-
}
|
|
579
|
-
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
580
|
-
var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
|
|
581
|
-
ReactSharedInternals.thrownErrors.length = 0;
|
|
582
|
-
reject(_thrownError);
|
|
583
|
-
}
|
|
584
|
-
} else
|
|
585
|
-
resolve(returnValue);
|
|
586
|
-
}, function(error) {
|
|
587
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
588
|
-
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
var returnValue$jscomp$0 = result;
|
|
594
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
595
|
-
prevActScopeDepth === 0 && (flushActQueue(queue), queue.length !== 0 && queueSeveralMicrotasks(function() {
|
|
596
|
-
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
|
597
|
-
}), ReactSharedInternals.actQueue = null);
|
|
598
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
599
|
-
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
600
|
-
return {
|
|
601
|
-
then: function(resolve, reject) {
|
|
602
|
-
didAwaitActCall = true;
|
|
603
|
-
prevActScopeDepth === 0 ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
604
|
-
return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject);
|
|
605
|
-
})) : resolve(returnValue$jscomp$0);
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
|
-
};
|
|
609
|
-
exports.cache = function(fn) {
|
|
610
|
-
return function() {
|
|
611
|
-
return fn.apply(null, arguments);
|
|
612
|
-
};
|
|
613
|
-
};
|
|
614
|
-
exports.cacheSignal = function() {
|
|
615
|
-
return null;
|
|
616
|
-
};
|
|
617
|
-
exports.captureOwnerStack = function() {
|
|
618
|
-
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
619
|
-
return getCurrentStack === null ? null : getCurrentStack();
|
|
620
|
-
};
|
|
621
|
-
exports.cloneElement = function(element, config, children) {
|
|
622
|
-
if (element === null || element === undefined)
|
|
623
|
-
throw Error("The argument must be a React element, but you passed " + element + ".");
|
|
624
|
-
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
625
|
-
if (config != null) {
|
|
626
|
-
var JSCompiler_inline_result;
|
|
627
|
-
a: {
|
|
628
|
-
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) {
|
|
629
|
-
JSCompiler_inline_result = false;
|
|
630
|
-
break a;
|
|
631
|
-
}
|
|
632
|
-
JSCompiler_inline_result = config.ref !== undefined;
|
|
633
|
-
}
|
|
634
|
-
JSCompiler_inline_result && (owner = getOwner());
|
|
635
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
636
|
-
for (propName in config)
|
|
637
|
-
!hasOwnProperty.call(config, propName) || propName === "key" || propName === "__self" || propName === "__source" || propName === "ref" && config.ref === undefined || (props[propName] = config[propName]);
|
|
638
|
-
}
|
|
639
|
-
var propName = arguments.length - 2;
|
|
640
|
-
if (propName === 1)
|
|
641
|
-
props.children = children;
|
|
642
|
-
else if (1 < propName) {
|
|
643
|
-
JSCompiler_inline_result = Array(propName);
|
|
644
|
-
for (var i = 0;i < propName; i++)
|
|
645
|
-
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
646
|
-
props.children = JSCompiler_inline_result;
|
|
647
|
-
}
|
|
648
|
-
props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask);
|
|
649
|
-
for (key = 2;key < arguments.length; key++)
|
|
650
|
-
validateChildKeys(arguments[key]);
|
|
651
|
-
return props;
|
|
652
|
-
};
|
|
653
|
-
exports.createContext = function(defaultValue) {
|
|
654
|
-
defaultValue = {
|
|
655
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
656
|
-
_currentValue: defaultValue,
|
|
657
|
-
_currentValue2: defaultValue,
|
|
658
|
-
_threadCount: 0,
|
|
659
|
-
Provider: null,
|
|
660
|
-
Consumer: null
|
|
661
|
-
};
|
|
662
|
-
defaultValue.Provider = defaultValue;
|
|
663
|
-
defaultValue.Consumer = {
|
|
664
|
-
$$typeof: REACT_CONSUMER_TYPE,
|
|
665
|
-
_context: defaultValue
|
|
666
|
-
};
|
|
667
|
-
defaultValue._currentRenderer = null;
|
|
668
|
-
defaultValue._currentRenderer2 = null;
|
|
669
|
-
return defaultValue;
|
|
670
|
-
};
|
|
671
|
-
exports.createElement = function(type, config, children) {
|
|
672
|
-
for (var i = 2;i < arguments.length; i++)
|
|
673
|
-
validateChildKeys(arguments[i]);
|
|
674
|
-
i = {};
|
|
675
|
-
var key = null;
|
|
676
|
-
if (config != null)
|
|
677
|
-
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
678
|
-
hasOwnProperty.call(config, propName) && propName !== "key" && propName !== "__self" && propName !== "__source" && (i[propName] = config[propName]);
|
|
679
|
-
var childrenLength = arguments.length - 2;
|
|
680
|
-
if (childrenLength === 1)
|
|
681
|
-
i.children = children;
|
|
682
|
-
else if (1 < childrenLength) {
|
|
683
|
-
for (var childArray = Array(childrenLength), _i = 0;_i < childrenLength; _i++)
|
|
684
|
-
childArray[_i] = arguments[_i + 2];
|
|
685
|
-
Object.freeze && Object.freeze(childArray);
|
|
686
|
-
i.children = childArray;
|
|
687
|
-
}
|
|
688
|
-
if (type && type.defaultProps)
|
|
689
|
-
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
690
|
-
i[propName] === undefined && (i[propName] = childrenLength[propName]);
|
|
691
|
-
key && defineKeyPropWarningGetter(i, typeof type === "function" ? type.displayName || type.name || "Unknown" : type);
|
|
692
|
-
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
693
|
-
return ReactElement(type, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
694
|
-
};
|
|
695
|
-
exports.createRef = function() {
|
|
696
|
-
var refObject = { current: null };
|
|
697
|
-
Object.seal(refObject);
|
|
698
|
-
return refObject;
|
|
699
|
-
};
|
|
700
|
-
exports.forwardRef = function(render) {
|
|
701
|
-
render != null && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof render !== "function" ? console.error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render) : render.length !== 0 && render.length !== 2 && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
|
|
702
|
-
render != null && render.defaultProps != null && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
|
703
|
-
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
704
|
-
Object.defineProperty(elementType, "displayName", {
|
|
705
|
-
enumerable: false,
|
|
706
|
-
configurable: true,
|
|
707
|
-
get: function() {
|
|
708
|
-
return ownName;
|
|
709
|
-
},
|
|
710
|
-
set: function(name) {
|
|
711
|
-
ownName = name;
|
|
712
|
-
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
return elementType;
|
|
716
|
-
};
|
|
717
|
-
exports.isValidElement = isValidElement;
|
|
718
|
-
exports.lazy = function(ctor) {
|
|
719
|
-
ctor = { _status: -1, _result: ctor };
|
|
720
|
-
var lazyType = {
|
|
721
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
722
|
-
_payload: ctor,
|
|
723
|
-
_init: lazyInitializer
|
|
724
|
-
}, ioInfo = {
|
|
725
|
-
name: "lazy",
|
|
726
|
-
start: -1,
|
|
727
|
-
end: -1,
|
|
728
|
-
value: null,
|
|
729
|
-
owner: null,
|
|
730
|
-
debugStack: Error("react-stack-top-frame"),
|
|
731
|
-
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
732
|
-
};
|
|
733
|
-
ctor._ioInfo = ioInfo;
|
|
734
|
-
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
735
|
-
return lazyType;
|
|
736
|
-
};
|
|
737
|
-
exports.memo = function(type, compare) {
|
|
738
|
-
type == null && console.error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
|
|
739
|
-
compare = {
|
|
740
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
741
|
-
type,
|
|
742
|
-
compare: compare === undefined ? null : compare
|
|
743
|
-
};
|
|
744
|
-
var ownName;
|
|
745
|
-
Object.defineProperty(compare, "displayName", {
|
|
746
|
-
enumerable: false,
|
|
747
|
-
configurable: true,
|
|
748
|
-
get: function() {
|
|
749
|
-
return ownName;
|
|
750
|
-
},
|
|
751
|
-
set: function(name) {
|
|
752
|
-
ownName = name;
|
|
753
|
-
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
return compare;
|
|
757
|
-
};
|
|
758
|
-
exports.startTransition = function(scope) {
|
|
759
|
-
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
760
|
-
currentTransition._updatedFibers = new Set;
|
|
761
|
-
ReactSharedInternals.T = currentTransition;
|
|
762
|
-
try {
|
|
763
|
-
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
764
|
-
onStartTransitionFinish !== null && onStartTransitionFinish(currentTransition, returnValue);
|
|
765
|
-
typeof returnValue === "object" && returnValue !== null && typeof returnValue.then === "function" && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
766
|
-
} catch (error) {
|
|
767
|
-
reportGlobalError(error);
|
|
768
|
-
} finally {
|
|
769
|
-
prevTransition === null && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), prevTransition !== null && currentTransition.types !== null && (prevTransition.types !== null && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
770
|
-
}
|
|
771
|
-
};
|
|
772
|
-
exports.unstable_useCacheRefresh = function() {
|
|
773
|
-
return resolveDispatcher().useCacheRefresh();
|
|
774
|
-
};
|
|
775
|
-
exports.use = function(usable) {
|
|
776
|
-
return resolveDispatcher().use(usable);
|
|
777
|
-
};
|
|
778
|
-
exports.useActionState = function(action, initialState, permalink) {
|
|
779
|
-
return resolveDispatcher().useActionState(action, initialState, permalink);
|
|
780
|
-
};
|
|
781
|
-
exports.useCallback = function(callback, deps) {
|
|
782
|
-
return resolveDispatcher().useCallback(callback, deps);
|
|
783
|
-
};
|
|
784
|
-
exports.useContext = function(Context) {
|
|
785
|
-
var dispatcher = resolveDispatcher();
|
|
786
|
-
Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?");
|
|
787
|
-
return dispatcher.useContext(Context);
|
|
788
|
-
};
|
|
789
|
-
exports.useDebugValue = function(value, formatterFn) {
|
|
790
|
-
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
791
|
-
};
|
|
792
|
-
exports.useDeferredValue = function(value, initialValue) {
|
|
793
|
-
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
794
|
-
};
|
|
795
|
-
exports.useEffect = function(create, deps) {
|
|
796
|
-
create == null && console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
797
|
-
return resolveDispatcher().useEffect(create, deps);
|
|
798
|
-
};
|
|
799
|
-
exports.useEffectEvent = function(callback) {
|
|
800
|
-
return resolveDispatcher().useEffectEvent(callback);
|
|
801
|
-
};
|
|
802
|
-
exports.useId = function() {
|
|
803
|
-
return resolveDispatcher().useId();
|
|
804
|
-
};
|
|
805
|
-
exports.useImperativeHandle = function(ref, create, deps) {
|
|
806
|
-
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
807
|
-
};
|
|
808
|
-
exports.useInsertionEffect = function(create, deps) {
|
|
809
|
-
create == null && console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
810
|
-
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
811
|
-
};
|
|
812
|
-
exports.useLayoutEffect = function(create, deps) {
|
|
813
|
-
create == null && console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
|
814
|
-
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
815
|
-
};
|
|
816
|
-
exports.useMemo = function(create, deps) {
|
|
817
|
-
return resolveDispatcher().useMemo(create, deps);
|
|
818
|
-
};
|
|
819
|
-
exports.useOptimistic = function(passthrough, reducer) {
|
|
820
|
-
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
821
|
-
};
|
|
822
|
-
exports.useReducer = function(reducer, initialArg, init) {
|
|
823
|
-
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
824
|
-
};
|
|
825
|
-
exports.useRef = function(initialValue) {
|
|
826
|
-
return resolveDispatcher().useRef(initialValue);
|
|
827
|
-
};
|
|
828
|
-
exports.useState = function(initialState) {
|
|
829
|
-
return resolveDispatcher().useState(initialState);
|
|
830
|
-
};
|
|
831
|
-
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
832
|
-
return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
833
|
-
};
|
|
834
|
-
exports.useTransition = function() {
|
|
835
|
-
return resolveDispatcher().useTransition();
|
|
836
|
-
};
|
|
837
|
-
exports.version = "19.2.3";
|
|
838
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
839
|
-
})();
|
|
840
|
-
});
|
|
841
|
-
|
|
842
|
-
// node_modules/react/index.js
|
|
843
|
-
var require_react = __commonJS((exports, module) => {
|
|
844
|
-
var react_development = __toESM(require_react_development());
|
|
845
|
-
if (false) {} else {
|
|
846
|
-
module.exports = react_development;
|
|
847
|
-
}
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
// node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
|
851
|
-
var require_react_jsx_dev_runtime_development = __commonJS((exports) => {
|
|
852
|
-
var React = __toESM(require_react());
|
|
853
|
-
(function() {
|
|
854
|
-
function getComponentNameFromType(type) {
|
|
855
|
-
if (type == null)
|
|
856
|
-
return null;
|
|
857
|
-
if (typeof type === "function")
|
|
858
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
859
|
-
if (typeof type === "string")
|
|
860
|
-
return type;
|
|
861
|
-
switch (type) {
|
|
862
|
-
case REACT_FRAGMENT_TYPE:
|
|
863
|
-
return "Fragment";
|
|
864
|
-
case REACT_PROFILER_TYPE:
|
|
865
|
-
return "Profiler";
|
|
866
|
-
case REACT_STRICT_MODE_TYPE:
|
|
867
|
-
return "StrictMode";
|
|
868
|
-
case REACT_SUSPENSE_TYPE:
|
|
869
|
-
return "Suspense";
|
|
870
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
871
|
-
return "SuspenseList";
|
|
872
|
-
case REACT_ACTIVITY_TYPE:
|
|
873
|
-
return "Activity";
|
|
874
|
-
}
|
|
875
|
-
if (typeof type === "object")
|
|
876
|
-
switch (typeof type.tag === "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
877
|
-
case REACT_PORTAL_TYPE:
|
|
878
|
-
return "Portal";
|
|
879
|
-
case REACT_CONTEXT_TYPE:
|
|
880
|
-
return type.displayName || "Context";
|
|
881
|
-
case REACT_CONSUMER_TYPE:
|
|
882
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
883
|
-
case REACT_FORWARD_REF_TYPE:
|
|
884
|
-
var innerType = type.render;
|
|
885
|
-
type = type.displayName;
|
|
886
|
-
type || (type = innerType.displayName || innerType.name || "", type = type !== "" ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
887
|
-
return type;
|
|
888
|
-
case REACT_MEMO_TYPE:
|
|
889
|
-
return innerType = type.displayName || null, innerType !== null ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
890
|
-
case REACT_LAZY_TYPE:
|
|
891
|
-
innerType = type._payload;
|
|
892
|
-
type = type._init;
|
|
893
|
-
try {
|
|
894
|
-
return getComponentNameFromType(type(innerType));
|
|
895
|
-
} catch (x) {}
|
|
896
|
-
}
|
|
897
|
-
return null;
|
|
898
|
-
}
|
|
899
|
-
function testStringCoercion(value) {
|
|
900
|
-
return "" + value;
|
|
901
|
-
}
|
|
902
|
-
function checkKeyStringCoercion(value) {
|
|
903
|
-
try {
|
|
904
|
-
testStringCoercion(value);
|
|
905
|
-
var JSCompiler_inline_result = false;
|
|
906
|
-
} catch (e) {
|
|
907
|
-
JSCompiler_inline_result = true;
|
|
908
|
-
}
|
|
909
|
-
if (JSCompiler_inline_result) {
|
|
910
|
-
JSCompiler_inline_result = console;
|
|
911
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
912
|
-
var JSCompiler_inline_result$jscomp$0 = typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
913
|
-
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
914
|
-
return testStringCoercion(value);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
function getTaskName(type) {
|
|
918
|
-
if (type === REACT_FRAGMENT_TYPE)
|
|
919
|
-
return "<>";
|
|
920
|
-
if (typeof type === "object" && type !== null && type.$$typeof === REACT_LAZY_TYPE)
|
|
921
|
-
return "<...>";
|
|
922
|
-
try {
|
|
923
|
-
var name = getComponentNameFromType(type);
|
|
924
|
-
return name ? "<" + name + ">" : "<...>";
|
|
925
|
-
} catch (x) {
|
|
926
|
-
return "<...>";
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
function getOwner() {
|
|
930
|
-
var dispatcher = ReactSharedInternals.A;
|
|
931
|
-
return dispatcher === null ? null : dispatcher.getOwner();
|
|
932
|
-
}
|
|
933
|
-
function UnknownOwner() {
|
|
934
|
-
return Error("react-stack-top-frame");
|
|
935
|
-
}
|
|
936
|
-
function hasValidKey(config) {
|
|
937
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
938
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
939
|
-
if (getter && getter.isReactWarning)
|
|
940
|
-
return false;
|
|
941
|
-
}
|
|
942
|
-
return config.key !== undefined;
|
|
943
|
-
}
|
|
944
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
945
|
-
function warnAboutAccessingKey() {
|
|
946
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
947
|
-
}
|
|
948
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
949
|
-
Object.defineProperty(props, "key", {
|
|
950
|
-
get: warnAboutAccessingKey,
|
|
951
|
-
configurable: true
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
955
|
-
var componentName = getComponentNameFromType(this.type);
|
|
956
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
957
|
-
componentName = this.props.ref;
|
|
958
|
-
return componentName !== undefined ? componentName : null;
|
|
959
|
-
}
|
|
960
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
961
|
-
var refProp = props.ref;
|
|
962
|
-
type = {
|
|
963
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
964
|
-
type,
|
|
965
|
-
key,
|
|
966
|
-
props,
|
|
967
|
-
_owner: owner
|
|
968
|
-
};
|
|
969
|
-
(refProp !== undefined ? refProp : null) !== null ? Object.defineProperty(type, "ref", {
|
|
970
|
-
enumerable: false,
|
|
971
|
-
get: elementRefGetterWithDeprecationWarning
|
|
972
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
973
|
-
type._store = {};
|
|
974
|
-
Object.defineProperty(type._store, "validated", {
|
|
975
|
-
configurable: false,
|
|
976
|
-
enumerable: false,
|
|
977
|
-
writable: true,
|
|
978
|
-
value: 0
|
|
979
|
-
});
|
|
980
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
981
|
-
configurable: false,
|
|
982
|
-
enumerable: false,
|
|
983
|
-
writable: true,
|
|
984
|
-
value: null
|
|
985
|
-
});
|
|
986
|
-
Object.defineProperty(type, "_debugStack", {
|
|
987
|
-
configurable: false,
|
|
988
|
-
enumerable: false,
|
|
989
|
-
writable: true,
|
|
990
|
-
value: debugStack
|
|
991
|
-
});
|
|
992
|
-
Object.defineProperty(type, "_debugTask", {
|
|
993
|
-
configurable: false,
|
|
994
|
-
enumerable: false,
|
|
995
|
-
writable: true,
|
|
996
|
-
value: debugTask
|
|
997
|
-
});
|
|
998
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
999
|
-
return type;
|
|
1000
|
-
}
|
|
1001
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
1002
|
-
var children = config.children;
|
|
1003
|
-
if (children !== undefined)
|
|
1004
|
-
if (isStaticChildren)
|
|
1005
|
-
if (isArrayImpl(children)) {
|
|
1006
|
-
for (isStaticChildren = 0;isStaticChildren < children.length; isStaticChildren++)
|
|
1007
|
-
validateChildKeys(children[isStaticChildren]);
|
|
1008
|
-
Object.freeze && Object.freeze(children);
|
|
1009
|
-
} else
|
|
1010
|
-
console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1011
|
-
else
|
|
1012
|
-
validateChildKeys(children);
|
|
1013
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
1014
|
-
children = getComponentNameFromType(type);
|
|
1015
|
-
var keys = Object.keys(config).filter(function(k) {
|
|
1016
|
-
return k !== "key";
|
|
1017
|
-
});
|
|
1018
|
-
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1019
|
-
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
1020
|
-
let props = %s;
|
|
1021
|
-
<%s {...props} />
|
|
1022
|
-
React keys must be passed directly to JSX without using spread:
|
|
1023
|
-
let props = %s;
|
|
1024
|
-
<%s key={someKey} {...props} />`, isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
1025
|
-
}
|
|
1026
|
-
children = null;
|
|
1027
|
-
maybeKey !== undefined && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
1028
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
1029
|
-
if ("key" in config) {
|
|
1030
|
-
maybeKey = {};
|
|
1031
|
-
for (var propName in config)
|
|
1032
|
-
propName !== "key" && (maybeKey[propName] = config[propName]);
|
|
1033
|
-
} else
|
|
1034
|
-
maybeKey = config;
|
|
1035
|
-
children && defineKeyPropWarningGetter(maybeKey, typeof type === "function" ? type.displayName || type.name || "Unknown" : type);
|
|
1036
|
-
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
1037
|
-
}
|
|
1038
|
-
function validateChildKeys(node) {
|
|
1039
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : typeof node === "object" && node !== null && node.$$typeof === REACT_LAZY_TYPE && (node._payload.status === "fulfilled" ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
1040
|
-
}
|
|
1041
|
-
function isValidElement(object) {
|
|
1042
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1043
|
-
}
|
|
1044
|
-
var 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_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
1045
|
-
return null;
|
|
1046
|
-
};
|
|
1047
|
-
React = {
|
|
1048
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
1049
|
-
return callStackForError();
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
var specialPropKeyWarningShown;
|
|
1053
|
-
var didWarnAboutElementRef = {};
|
|
1054
|
-
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
1055
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1056
|
-
var didWarnAboutKeySpread = {};
|
|
1057
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1058
|
-
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
|
|
1059
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1060
|
-
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
1061
|
-
};
|
|
1062
|
-
})();
|
|
1063
|
-
});
|
|
1064
|
-
|
|
1065
|
-
// node_modules/react/jsx-dev-runtime.js
|
|
1066
|
-
var require_jsx_dev_runtime = __commonJS((exports, module) => {
|
|
1067
|
-
var react_jsx_dev_runtime_development = __toESM(require_react_jsx_dev_runtime_development());
|
|
1068
|
-
if (false) {} else {
|
|
1069
|
-
module.exports = react_jsx_dev_runtime_development;
|
|
1070
|
-
}
|
|
1071
|
-
});
|
|
1072
|
-
|
|
1073
|
-
// components/teeth-selector.tsx
|
|
1074
|
-
var React = __toESM(require_react(), 1);
|
|
1
|
+
// src/components/teeth-selector.tsx
|
|
2
|
+
import * as React from "react";
|
|
1075
3
|
|
|
1076
|
-
// lib/teeth.ts
|
|
4
|
+
// src/lib/teeth.ts
|
|
1077
5
|
var teethData = [
|
|
1078
6
|
{
|
|
1079
7
|
order: 0,
|
|
@@ -1457,8 +385,8 @@ function formatTeethSelection(selectedTeeth, bridges) {
|
|
|
1457
385
|
return result.join(", ");
|
|
1458
386
|
}
|
|
1459
387
|
|
|
1460
|
-
// components/teeth-selector.tsx
|
|
1461
|
-
|
|
388
|
+
// src/components/teeth-selector.tsx
|
|
389
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
1462
390
|
"use client";
|
|
1463
391
|
var initialState = {
|
|
1464
392
|
selectedTeeth: [],
|
|
@@ -1600,9 +528,9 @@ var TeethSelector = React.forwardRef((props, ref) => {
|
|
|
1600
528
|
hasBridge,
|
|
1601
529
|
getSelectedTeethData
|
|
1602
530
|
};
|
|
1603
|
-
return /* @__PURE__ */
|
|
531
|
+
return /* @__PURE__ */ jsxDEV(TeethSelectorContext.Provider, {
|
|
1604
532
|
value: { state, dispatch, dragState, setDragState },
|
|
1605
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
1606
534
|
ref,
|
|
1607
535
|
children: children(renderProps)
|
|
1608
536
|
}, undefined, false, undefined, this)
|
|
@@ -1700,7 +628,7 @@ var TeethChart = React.forwardRef((props, ref) => {
|
|
|
1700
628
|
handleEnter(toothId);
|
|
1701
629
|
}
|
|
1702
630
|
}, [enableDragSelection, dragState.start, handleEnter, setDragState]);
|
|
1703
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ jsxDEV("svg", {
|
|
1704
632
|
ref: svgRef,
|
|
1705
633
|
viewBox: "0 0 450 750",
|
|
1706
634
|
width,
|
|
@@ -1714,7 +642,7 @@ var TeethChart = React.forwardRef((props, ref) => {
|
|
|
1714
642
|
teethData.map((tooth) => {
|
|
1715
643
|
const isSelected = state.selectedTeeth.includes(tooth.id);
|
|
1716
644
|
const isInDragRange = dragState.teethInRange.includes(tooth.id);
|
|
1717
|
-
const defaultElement = /* @__PURE__ */
|
|
645
|
+
const defaultElement = /* @__PURE__ */ jsxDEV("path", {
|
|
1718
646
|
id: `teeth-${tooth.id}`,
|
|
1719
647
|
d: tooth.d,
|
|
1720
648
|
"data-selected": isSelected,
|
|
@@ -1728,23 +656,23 @@ var TeethChart = React.forwardRef((props, ref) => {
|
|
|
1728
656
|
}
|
|
1729
657
|
return defaultElement;
|
|
1730
658
|
}),
|
|
1731
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ jsxDEV("g", {
|
|
1732
660
|
"data-bridges": true,
|
|
1733
661
|
children: adjacentTeethPairs.map((pair, i) => {
|
|
1734
662
|
const pos = getBridgePos(pair[0], pair[1]);
|
|
1735
663
|
if (!pos)
|
|
1736
664
|
return null;
|
|
1737
665
|
const exists = state.bridges.some(([a, b]) => a === pair[0] && b === pair[1] || a === pair[1] && b === pair[0]);
|
|
1738
|
-
const defaultElement = /* @__PURE__ */
|
|
666
|
+
const defaultElement = /* @__PURE__ */ jsxDEV("g", {
|
|
1739
667
|
children: [
|
|
1740
|
-
exists && /* @__PURE__ */
|
|
668
|
+
exists && /* @__PURE__ */ jsxDEV("line", {
|
|
1741
669
|
x1: pos.x1,
|
|
1742
670
|
y1: pos.y1,
|
|
1743
671
|
x2: pos.x2,
|
|
1744
672
|
y2: pos.y2,
|
|
1745
673
|
"data-bridge-line": true
|
|
1746
674
|
}, undefined, false, undefined, this),
|
|
1747
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ jsxDEV("circle", {
|
|
1748
676
|
cx: pos.midX,
|
|
1749
677
|
cy: pos.midY,
|
|
1750
678
|
r: 8,
|
|
@@ -1768,9 +696,9 @@ var TeethChart = React.forwardRef((props, ref) => {
|
|
|
1768
696
|
}, undefined, true, undefined, this);
|
|
1769
697
|
});
|
|
1770
698
|
TeethChart.displayName = "TeethChart";
|
|
1771
|
-
// components/teeth-preview.tsx
|
|
1772
|
-
|
|
1773
|
-
|
|
699
|
+
// src/components/teeth-preview.tsx
|
|
700
|
+
import * as React2 from "react";
|
|
701
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
1774
702
|
"use client";
|
|
1775
703
|
var TeethPreview = React2.forwardRef((props, ref) => {
|
|
1776
704
|
const {
|
|
@@ -1809,7 +737,7 @@ var TeethPreview = React2.forwardRef((props, ref) => {
|
|
|
1809
737
|
toothRefs.current = map;
|
|
1810
738
|
setRefsReady(true);
|
|
1811
739
|
}, []);
|
|
1812
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ jsxDEV2("svg", {
|
|
1813
741
|
ref: svgRef,
|
|
1814
742
|
viewBox: "0 0 450 750",
|
|
1815
743
|
width,
|
|
@@ -1818,7 +746,7 @@ var TeethPreview = React2.forwardRef((props, ref) => {
|
|
|
1818
746
|
children: [
|
|
1819
747
|
teethData.map((tooth) => {
|
|
1820
748
|
const isSelected = selectedTeeth.includes(tooth.id);
|
|
1821
|
-
const defaultElement = /* @__PURE__ */
|
|
749
|
+
const defaultElement = /* @__PURE__ */ jsxDEV2("path", {
|
|
1822
750
|
id: `teeth-preview-${tooth.id}`,
|
|
1823
751
|
d: tooth.d,
|
|
1824
752
|
"data-selected": isSelected
|
|
@@ -1828,22 +756,22 @@ var TeethPreview = React2.forwardRef((props, ref) => {
|
|
|
1828
756
|
}
|
|
1829
757
|
return defaultElement;
|
|
1830
758
|
}),
|
|
1831
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ jsxDEV2("g", {
|
|
1832
760
|
"data-bridges": true,
|
|
1833
761
|
children: refsReady && bridges.map((pair, i) => {
|
|
1834
762
|
const pos = getBridgePos(pair[0], pair[1]);
|
|
1835
763
|
if (!pos)
|
|
1836
764
|
return null;
|
|
1837
|
-
const defaultElement = /* @__PURE__ */
|
|
765
|
+
const defaultElement = /* @__PURE__ */ jsxDEV2("g", {
|
|
1838
766
|
children: [
|
|
1839
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ jsxDEV2("line", {
|
|
1840
768
|
x1: pos.x1,
|
|
1841
769
|
y1: pos.y1,
|
|
1842
770
|
x2: pos.x2,
|
|
1843
771
|
y2: pos.y2,
|
|
1844
772
|
"data-bridge-line": true
|
|
1845
773
|
}, undefined, false, undefined, this),
|
|
1846
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ jsxDEV2("circle", {
|
|
1847
775
|
cx: pos.midX,
|
|
1848
776
|
cy: pos.midY,
|
|
1849
777
|
r: 8,
|