| 1 |
"use strict"; |
| 2 |
var ReactRefreshRuntime = (() => { |
| 3 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 4 |
var __commonJS = (cb, mod) => function __require() { |
| 5 |
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| 6 |
}; |
| 7 |
|
| 8 |
// node_modules/react-refresh/cjs/react-refresh-runtime.development.js |
| 9 |
var require_react_refresh_runtime_development = __commonJS({ |
| 10 |
"node_modules/react-refresh/cjs/react-refresh-runtime.development.js"(exports) { |
| 11 |
"use strict"; |
| 12 |
if (true) { |
| 13 |
(function() { |
| 14 |
"use strict"; |
| 15 |
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); |
| 16 |
var REACT_MEMO_TYPE = Symbol.for("react.memo"); |
| 17 |
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; |
| 18 |
var allFamiliesByID = /* @__PURE__ */ new Map(); |
| 19 |
var allFamiliesByType = new PossiblyWeakMap(); |
| 20 |
var allSignaturesByType = new PossiblyWeakMap(); |
| 21 |
var updatedFamiliesByType = new PossiblyWeakMap(); |
| 22 |
var pendingUpdates = []; |
| 23 |
var helpersByRendererID = /* @__PURE__ */ new Map(); |
| 24 |
var helpersByRoot = /* @__PURE__ */ new Map(); |
| 25 |
var mountedRoots = /* @__PURE__ */ new Set(); |
| 26 |
var failedRoots = /* @__PURE__ */ new Set(); |
| 27 |
var rootElements = ( |
| 28 |
// $FlowIssue |
| 29 |
typeof WeakMap === "function" ? /* @__PURE__ */ new WeakMap() : null |
| 30 |
); |
| 31 |
var isPerformingRefresh = false; |
| 32 |
function computeFullKey(signature) { |
| 33 |
if (signature.fullKey !== null) { |
| 34 |
return signature.fullKey; |
| 35 |
} |
| 36 |
var fullKey = signature.ownKey; |
| 37 |
var hooks; |
| 38 |
try { |
| 39 |
hooks = signature.getCustomHooks(); |
| 40 |
} catch (err) { |
| 41 |
signature.forceReset = true; |
| 42 |
signature.fullKey = fullKey; |
| 43 |
return fullKey; |
| 44 |
} |
| 45 |
for (var i = 0; i < hooks.length; i++) { |
| 46 |
var hook = hooks[i]; |
| 47 |
if (typeof hook !== "function") { |
| 48 |
signature.forceReset = true; |
| 49 |
signature.fullKey = fullKey; |
| 50 |
return fullKey; |
| 51 |
} |
| 52 |
var nestedHookSignature = allSignaturesByType.get(hook); |
| 53 |
if (nestedHookSignature === void 0) { |
| 54 |
continue; |
| 55 |
} |
| 56 |
var nestedHookKey = computeFullKey(nestedHookSignature); |
| 57 |
if (nestedHookSignature.forceReset) { |
| 58 |
signature.forceReset = true; |
| 59 |
} |
| 60 |
fullKey += "\n---\n" + nestedHookKey; |
| 61 |
} |
| 62 |
signature.fullKey = fullKey; |
| 63 |
return fullKey; |
| 64 |
} |
| 65 |
function haveEqualSignatures(prevType, nextType) { |
| 66 |
var prevSignature = allSignaturesByType.get(prevType); |
| 67 |
var nextSignature = allSignaturesByType.get(nextType); |
| 68 |
if (prevSignature === void 0 && nextSignature === void 0) { |
| 69 |
return true; |
| 70 |
} |
| 71 |
if (prevSignature === void 0 || nextSignature === void 0) { |
| 72 |
return false; |
| 73 |
} |
| 74 |
if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) { |
| 75 |
return false; |
| 76 |
} |
| 77 |
if (nextSignature.forceReset) { |
| 78 |
return false; |
| 79 |
} |
| 80 |
return true; |
| 81 |
} |
| 82 |
function isReactClass(type) { |
| 83 |
return type.prototype && type.prototype.isReactComponent; |
| 84 |
} |
| 85 |
function canPreserveStateBetween(prevType, nextType) { |
| 86 |
if (isReactClass(prevType) || isReactClass(nextType)) { |
| 87 |
return false; |
| 88 |
} |
| 89 |
if (haveEqualSignatures(prevType, nextType)) { |
| 90 |
return true; |
| 91 |
} |
| 92 |
return false; |
| 93 |
} |
| 94 |
function resolveFamily(type) { |
| 95 |
return updatedFamiliesByType.get(type); |
| 96 |
} |
| 97 |
function cloneMap(map) { |
| 98 |
var clone = /* @__PURE__ */ new Map(); |
| 99 |
map.forEach(function(value, key) { |
| 100 |
clone.set(key, value); |
| 101 |
}); |
| 102 |
return clone; |
| 103 |
} |
| 104 |
function cloneSet(set) { |
| 105 |
var clone = /* @__PURE__ */ new Set(); |
| 106 |
set.forEach(function(value) { |
| 107 |
clone.add(value); |
| 108 |
}); |
| 109 |
return clone; |
| 110 |
} |
| 111 |
function getProperty(object, property) { |
| 112 |
try { |
| 113 |
return object[property]; |
| 114 |
} catch (err) { |
| 115 |
return void 0; |
| 116 |
} |
| 117 |
} |
| 118 |
function performReactRefresh() { |
| 119 |
if (pendingUpdates.length === 0) { |
| 120 |
return null; |
| 121 |
} |
| 122 |
if (isPerformingRefresh) { |
| 123 |
return null; |
| 124 |
} |
| 125 |
isPerformingRefresh = true; |
| 126 |
try { |
| 127 |
var staleFamilies = /* @__PURE__ */ new Set(); |
| 128 |
var updatedFamilies = /* @__PURE__ */ new Set(); |
| 129 |
var updates = pendingUpdates; |
| 130 |
pendingUpdates = []; |
| 131 |
updates.forEach(function(_ref) { |
| 132 |
var family = _ref[0], nextType = _ref[1]; |
| 133 |
var prevType = family.current; |
| 134 |
updatedFamiliesByType.set(prevType, family); |
| 135 |
updatedFamiliesByType.set(nextType, family); |
| 136 |
family.current = nextType; |
| 137 |
if (canPreserveStateBetween(prevType, nextType)) { |
| 138 |
updatedFamilies.add(family); |
| 139 |
} else { |
| 140 |
staleFamilies.add(family); |
| 141 |
} |
| 142 |
}); |
| 143 |
var update = { |
| 144 |
updatedFamilies, |
| 145 |
// Families that will re-render preserving state |
| 146 |
staleFamilies |
| 147 |
// Families that will be remounted |
| 148 |
}; |
| 149 |
helpersByRendererID.forEach(function(helpers) { |
| 150 |
helpers.setRefreshHandler(resolveFamily); |
| 151 |
}); |
| 152 |
var didError = false; |
| 153 |
var firstError = null; |
| 154 |
var failedRootsSnapshot = cloneSet(failedRoots); |
| 155 |
var mountedRootsSnapshot = cloneSet(mountedRoots); |
| 156 |
var helpersByRootSnapshot = cloneMap(helpersByRoot); |
| 157 |
failedRootsSnapshot.forEach(function(root) { |
| 158 |
var helpers = helpersByRootSnapshot.get(root); |
| 159 |
if (helpers === void 0) { |
| 160 |
throw new Error("Could not find helpers for a root. This is a bug in React Refresh."); |
| 161 |
} |
| 162 |
if (!failedRoots.has(root)) { |
| 163 |
} |
| 164 |
if (rootElements === null) { |
| 165 |
return; |
| 166 |
} |
| 167 |
if (!rootElements.has(root)) { |
| 168 |
return; |
| 169 |
} |
| 170 |
var element = rootElements.get(root); |
| 171 |
try { |
| 172 |
helpers.scheduleRoot(root, element); |
| 173 |
} catch (err) { |
| 174 |
if (!didError) { |
| 175 |
didError = true; |
| 176 |
firstError = err; |
| 177 |
} |
| 178 |
} |
| 179 |
}); |
| 180 |
mountedRootsSnapshot.forEach(function(root) { |
| 181 |
var helpers = helpersByRootSnapshot.get(root); |
| 182 |
if (helpers === void 0) { |
| 183 |
throw new Error("Could not find helpers for a root. This is a bug in React Refresh."); |
| 184 |
} |
| 185 |
if (!mountedRoots.has(root)) { |
| 186 |
} |
| 187 |
try { |
| 188 |
helpers.scheduleRefresh(root, update); |
| 189 |
} catch (err) { |
| 190 |
if (!didError) { |
| 191 |
didError = true; |
| 192 |
firstError = err; |
| 193 |
} |
| 194 |
} |
| 195 |
}); |
| 196 |
if (didError) { |
| 197 |
throw firstError; |
| 198 |
} |
| 199 |
return update; |
| 200 |
} finally { |
| 201 |
isPerformingRefresh = false; |
| 202 |
} |
| 203 |
} |
| 204 |
function register(type, id) { |
| 205 |
{ |
| 206 |
if (type === null) { |
| 207 |
return; |
| 208 |
} |
| 209 |
if (typeof type !== "function" && typeof type !== "object") { |
| 210 |
return; |
| 211 |
} |
| 212 |
if (allFamiliesByType.has(type)) { |
| 213 |
return; |
| 214 |
} |
| 215 |
var family = allFamiliesByID.get(id); |
| 216 |
if (family === void 0) { |
| 217 |
family = { |
| 218 |
current: type |
| 219 |
}; |
| 220 |
allFamiliesByID.set(id, family); |
| 221 |
} else { |
| 222 |
pendingUpdates.push([family, type]); |
| 223 |
} |
| 224 |
allFamiliesByType.set(type, family); |
| 225 |
if (typeof type === "object" && type !== null) { |
| 226 |
switch (getProperty(type, "$$typeof")) { |
| 227 |
case REACT_FORWARD_REF_TYPE: |
| 228 |
register(type.render, id + "$render"); |
| 229 |
break; |
| 230 |
case REACT_MEMO_TYPE: |
| 231 |
register(type.type, id + "$type"); |
| 232 |
break; |
| 233 |
} |
| 234 |
} |
| 235 |
} |
| 236 |
} |
| 237 |
function setSignature(type, key) { |
| 238 |
var forceReset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; |
| 239 |
var getCustomHooks = arguments.length > 3 ? arguments[3] : void 0; |
| 240 |
{ |
| 241 |
if (!allSignaturesByType.has(type)) { |
| 242 |
allSignaturesByType.set(type, { |
| 243 |
forceReset, |
| 244 |
ownKey: key, |
| 245 |
fullKey: null, |
| 246 |
getCustomHooks: getCustomHooks || function() { |
| 247 |
return []; |
| 248 |
} |
| 249 |
}); |
| 250 |
} |
| 251 |
if (typeof type === "object" && type !== null) { |
| 252 |
switch (getProperty(type, "$$typeof")) { |
| 253 |
case REACT_FORWARD_REF_TYPE: |
| 254 |
setSignature(type.render, key, forceReset, getCustomHooks); |
| 255 |
break; |
| 256 |
case REACT_MEMO_TYPE: |
| 257 |
setSignature(type.type, key, forceReset, getCustomHooks); |
| 258 |
break; |
| 259 |
} |
| 260 |
} |
| 261 |
} |
| 262 |
} |
| 263 |
function collectCustomHooksForSignature(type) { |
| 264 |
{ |
| 265 |
var signature = allSignaturesByType.get(type); |
| 266 |
if (signature !== void 0) { |
| 267 |
computeFullKey(signature); |
| 268 |
} |
| 269 |
} |
| 270 |
} |
| 271 |
function getFamilyByID(id) { |
| 272 |
{ |
| 273 |
return allFamiliesByID.get(id); |
| 274 |
} |
| 275 |
} |
| 276 |
function getFamilyByType(type) { |
| 277 |
{ |
| 278 |
return allFamiliesByType.get(type); |
| 279 |
} |
| 280 |
} |
| 281 |
function findAffectedHostInstances(families) { |
| 282 |
{ |
| 283 |
var affectedInstances = /* @__PURE__ */ new Set(); |
| 284 |
mountedRoots.forEach(function(root) { |
| 285 |
var helpers = helpersByRoot.get(root); |
| 286 |
if (helpers === void 0) { |
| 287 |
throw new Error("Could not find helpers for a root. This is a bug in React Refresh."); |
| 288 |
} |
| 289 |
var instancesForRoot = helpers.findHostInstancesForRefresh(root, families); |
| 290 |
instancesForRoot.forEach(function(inst) { |
| 291 |
affectedInstances.add(inst); |
| 292 |
}); |
| 293 |
}); |
| 294 |
return affectedInstances; |
| 295 |
} |
| 296 |
} |
| 297 |
function injectIntoGlobalHook(globalObject) { |
| 298 |
{ |
| 299 |
var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__; |
| 300 |
if (hook === void 0) { |
| 301 |
var nextID = 0; |
| 302 |
globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = { |
| 303 |
renderers: /* @__PURE__ */ new Map(), |
| 304 |
supportsFiber: true, |
| 305 |
inject: function(injected) { |
| 306 |
return nextID++; |
| 307 |
}, |
| 308 |
onScheduleFiberRoot: function(id, root, children) { |
| 309 |
}, |
| 310 |
onCommitFiberRoot: function(id, root, maybePriorityLevel, didError) { |
| 311 |
}, |
| 312 |
onCommitFiberUnmount: function() { |
| 313 |
} |
| 314 |
}; |
| 315 |
} |
| 316 |
if (hook.isDisabled) { |
| 317 |
console["warn"]("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled."); |
| 318 |
return; |
| 319 |
} |
| 320 |
var oldInject = hook.inject; |
| 321 |
hook.inject = function(injected) { |
| 322 |
var id = oldInject.apply(this, arguments); |
| 323 |
if (typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function") { |
| 324 |
helpersByRendererID.set(id, injected); |
| 325 |
} |
| 326 |
return id; |
| 327 |
}; |
| 328 |
hook.renderers.forEach(function(injected, id) { |
| 329 |
if (typeof injected.scheduleRefresh === "function" && typeof injected.setRefreshHandler === "function") { |
| 330 |
helpersByRendererID.set(id, injected); |
| 331 |
} |
| 332 |
}); |
| 333 |
var oldOnCommitFiberRoot = hook.onCommitFiberRoot; |
| 334 |
var oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function() { |
| 335 |
}; |
| 336 |
hook.onScheduleFiberRoot = function(id, root, children) { |
| 337 |
if (!isPerformingRefresh) { |
| 338 |
failedRoots.delete(root); |
| 339 |
if (rootElements !== null) { |
| 340 |
rootElements.set(root, children); |
| 341 |
} |
| 342 |
} |
| 343 |
return oldOnScheduleFiberRoot.apply(this, arguments); |
| 344 |
}; |
| 345 |
hook.onCommitFiberRoot = function(id, root, maybePriorityLevel, didError) { |
| 346 |
var helpers = helpersByRendererID.get(id); |
| 347 |
if (helpers !== void 0) { |
| 348 |
helpersByRoot.set(root, helpers); |
| 349 |
var current = root.current; |
| 350 |
var alternate = current.alternate; |
| 351 |
if (alternate !== null) { |
| 352 |
var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root); |
| 353 |
var isMounted = current.memoizedState != null && current.memoizedState.element != null; |
| 354 |
if (!wasMounted && isMounted) { |
| 355 |
mountedRoots.add(root); |
| 356 |
failedRoots.delete(root); |
| 357 |
} else if (wasMounted && isMounted) ; |
| 358 |
else if (wasMounted && !isMounted) { |
| 359 |
mountedRoots.delete(root); |
| 360 |
if (didError) { |
| 361 |
failedRoots.add(root); |
| 362 |
} else { |
| 363 |
helpersByRoot.delete(root); |
| 364 |
} |
| 365 |
} else if (!wasMounted && !isMounted) { |
| 366 |
if (didError) { |
| 367 |
failedRoots.add(root); |
| 368 |
} |
| 369 |
} |
| 370 |
} else { |
| 371 |
mountedRoots.add(root); |
| 372 |
} |
| 373 |
} |
| 374 |
return oldOnCommitFiberRoot.apply(this, arguments); |
| 375 |
}; |
| 376 |
} |
| 377 |
} |
| 378 |
function hasUnrecoverableErrors() { |
| 379 |
return false; |
| 380 |
} |
| 381 |
function _getMountedRootCount() { |
| 382 |
{ |
| 383 |
return mountedRoots.size; |
| 384 |
} |
| 385 |
} |
| 386 |
function createSignatureFunctionForTransform() { |
| 387 |
{ |
| 388 |
var savedType; |
| 389 |
var hasCustomHooks; |
| 390 |
var didCollectHooks = false; |
| 391 |
return function(type, key, forceReset, getCustomHooks) { |
| 392 |
if (typeof key === "string") { |
| 393 |
if (!savedType) { |
| 394 |
savedType = type; |
| 395 |
hasCustomHooks = typeof getCustomHooks === "function"; |
| 396 |
} |
| 397 |
if (type != null && (typeof type === "function" || typeof type === "object")) { |
| 398 |
setSignature(type, key, forceReset, getCustomHooks); |
| 399 |
} |
| 400 |
return type; |
| 401 |
} else { |
| 402 |
if (!didCollectHooks && hasCustomHooks) { |
| 403 |
didCollectHooks = true; |
| 404 |
collectCustomHooksForSignature(savedType); |
| 405 |
} |
| 406 |
} |
| 407 |
}; |
| 408 |
} |
| 409 |
} |
| 410 |
function isLikelyComponentType(type) { |
| 411 |
{ |
| 412 |
switch (typeof type) { |
| 413 |
case "function": { |
| 414 |
if (type.prototype != null) { |
| 415 |
if (type.prototype.isReactComponent) { |
| 416 |
return true; |
| 417 |
} |
| 418 |
var ownNames = Object.getOwnPropertyNames(type.prototype); |
| 419 |
if (ownNames.length > 1 || ownNames[0] !== "constructor") { |
| 420 |
return false; |
| 421 |
} |
| 422 |
if (type.prototype.__proto__ !== Object.prototype) { |
| 423 |
return false; |
| 424 |
} |
| 425 |
} |
| 426 |
var name = type.name || type.displayName; |
| 427 |
return typeof name === "string" && /^[A-Z]/.test(name); |
| 428 |
} |
| 429 |
case "object": { |
| 430 |
if (type != null) { |
| 431 |
switch (getProperty(type, "$$typeof")) { |
| 432 |
case REACT_FORWARD_REF_TYPE: |
| 433 |
case REACT_MEMO_TYPE: |
| 434 |
return true; |
| 435 |
default: |
| 436 |
return false; |
| 437 |
} |
| 438 |
} |
| 439 |
return false; |
| 440 |
} |
| 441 |
default: { |
| 442 |
return false; |
| 443 |
} |
| 444 |
} |
| 445 |
} |
| 446 |
} |
| 447 |
exports._getMountedRootCount = _getMountedRootCount; |
| 448 |
exports.collectCustomHooksForSignature = collectCustomHooksForSignature; |
| 449 |
exports.createSignatureFunctionForTransform = createSignatureFunctionForTransform; |
| 450 |
exports.findAffectedHostInstances = findAffectedHostInstances; |
| 451 |
exports.getFamilyByID = getFamilyByID; |
| 452 |
exports.getFamilyByType = getFamilyByType; |
| 453 |
exports.hasUnrecoverableErrors = hasUnrecoverableErrors; |
| 454 |
exports.injectIntoGlobalHook = injectIntoGlobalHook; |
| 455 |
exports.isLikelyComponentType = isLikelyComponentType; |
| 456 |
exports.performReactRefresh = performReactRefresh; |
| 457 |
exports.register = register; |
| 458 |
exports.setSignature = setSignature; |
| 459 |
})(); |
| 460 |
} |
| 461 |
} |
| 462 |
}); |
| 463 |
|
| 464 |
// node_modules/react-refresh/runtime.js |
| 465 |
var require_runtime = __commonJS({ |
| 466 |
"node_modules/react-refresh/runtime.js"(exports, module) { |
| 467 |
if (false) { |
| 468 |
module.exports = null; |
| 469 |
} else { |
| 470 |
module.exports = require_react_refresh_runtime_development(); |
| 471 |
} |
| 472 |
} |
| 473 |
}); |
| 474 |
return require_runtime(); |
| 475 |
})(); |
| 476 |
/*! Bundled license information: |
| 477 |
|
| 478 |
react-refresh/cjs/react-refresh-runtime.development.js: |
| 479 |
(** |
| 480 |
* @license React |
| 481 |
* react-refresh-runtime.development.js |
| 482 |
* |
| 483 |
* Copyright (c) Facebook, Inc. and its affiliates. |
| 484 |
* |
| 485 |
* This source code is licensed under the MIT license found in the |
| 486 |
* LICENSE file in the root directory of this source tree. |
| 487 |
*) |
| 488 |
*/ |
| 489 |
|