react-dom 19.2.0-canary-63779030-20250328 → 19.2.0-canary-e5dd82a7-20250401

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.
@@ -483,1063 +483,1063 @@
483
483
  (pop(hostTransitionProviderCursor, fiber),
484
484
  (HostTransitionContext._currentValue = NotPendingTransition));
485
485
  }
486
- function typeName(value) {
487
- return (
488
- ("function" === typeof Symbol &&
489
- Symbol.toStringTag &&
490
- value[Symbol.toStringTag]) ||
491
- value.constructor.name ||
492
- "Object"
493
- );
494
- }
495
- function willCoercionThrow(value) {
496
- try {
497
- return testStringCoercion(value), !1;
498
- } catch (e) {
499
- return !0;
486
+ function disabledLog() {}
487
+ function disableLogs() {
488
+ if (0 === disabledDepth) {
489
+ prevLog = console.log;
490
+ prevInfo = console.info;
491
+ prevWarn = console.warn;
492
+ prevError = console.error;
493
+ prevGroup = console.group;
494
+ prevGroupCollapsed = console.groupCollapsed;
495
+ prevGroupEnd = console.groupEnd;
496
+ var props = {
497
+ configurable: !0,
498
+ enumerable: !0,
499
+ value: disabledLog,
500
+ writable: !0
501
+ };
502
+ Object.defineProperties(console, {
503
+ info: props,
504
+ log: props,
505
+ warn: props,
506
+ error: props,
507
+ group: props,
508
+ groupCollapsed: props,
509
+ groupEnd: props
510
+ });
500
511
  }
512
+ disabledDepth++;
501
513
  }
502
- function testStringCoercion(value) {
503
- return "" + value;
504
- }
505
- function checkAttributeStringCoercion(value, attributeName) {
506
- if (willCoercionThrow(value))
507
- return (
508
- console.error(
509
- "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
510
- attributeName,
511
- typeName(value)
512
- ),
513
- testStringCoercion(value)
514
- );
515
- }
516
- function checkCSSPropertyStringCoercion(value, propName) {
517
- if (willCoercionThrow(value))
518
- return (
519
- console.error(
520
- "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
521
- propName,
522
- typeName(value)
523
- ),
524
- testStringCoercion(value)
525
- );
526
- }
527
- function checkFormFieldValueStringCoercion(value) {
528
- if (willCoercionThrow(value))
529
- return (
530
- console.error(
531
- "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
532
- typeName(value)
533
- ),
534
- testStringCoercion(value)
535
- );
536
- }
537
- function injectInternals(internals) {
538
- if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
539
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
540
- if (hook.isDisabled) return !0;
541
- if (!hook.supportsFiber)
542
- return (
543
- console.error(
544
- "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
545
- ),
546
- !0
547
- );
548
- try {
549
- (rendererID = hook.inject(internals)), (injectedHook = hook);
550
- } catch (err) {
551
- console.error("React instrumentation encountered an error: %s.", err);
514
+ function reenableLogs() {
515
+ disabledDepth--;
516
+ if (0 === disabledDepth) {
517
+ var props = { configurable: !0, enumerable: !0, writable: !0 };
518
+ Object.defineProperties(console, {
519
+ log: assign({}, props, { value: prevLog }),
520
+ info: assign({}, props, { value: prevInfo }),
521
+ warn: assign({}, props, { value: prevWarn }),
522
+ error: assign({}, props, { value: prevError }),
523
+ group: assign({}, props, { value: prevGroup }),
524
+ groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
525
+ groupEnd: assign({}, props, { value: prevGroupEnd })
526
+ });
552
527
  }
553
- return hook.checkDCE ? !0 : !1;
528
+ 0 > disabledDepth &&
529
+ console.error(
530
+ "disabledDepth fell below zero. This is a bug in React. Please file an issue."
531
+ );
554
532
  }
555
- function setIsStrictModeForDevtools(newIsStrictMode) {
556
- "function" === typeof log$1 &&
557
- unstable_setDisableYieldValue(newIsStrictMode);
558
- if (injectedHook && "function" === typeof injectedHook.setStrictMode)
533
+ function describeBuiltInComponentFrame(name) {
534
+ if (void 0 === prefix)
559
535
  try {
560
- injectedHook.setStrictMode(rendererID, newIsStrictMode);
561
- } catch (err) {
562
- hasLoggedError ||
563
- ((hasLoggedError = !0),
564
- console.error(
565
- "React instrumentation encountered an error: %s",
566
- err
567
- ));
536
+ throw Error();
537
+ } catch (x) {
538
+ var match = x.stack.trim().match(/\n( *(at )?)/);
539
+ prefix = (match && match[1]) || "";
540
+ suffix =
541
+ -1 < x.stack.indexOf("\n at")
542
+ ? " (<anonymous>)"
543
+ : -1 < x.stack.indexOf("@")
544
+ ? "@unknown:0:0"
545
+ : "";
568
546
  }
547
+ return "\n" + prefix + name + suffix;
569
548
  }
570
- function injectProfilingHooks(profilingHooks) {
571
- injectedProfilingHooks = profilingHooks;
572
- }
573
- function markCommitStopped() {
574
- null !== injectedProfilingHooks &&
575
- "function" === typeof injectedProfilingHooks.markCommitStopped &&
576
- injectedProfilingHooks.markCommitStopped();
577
- }
578
- function markComponentRenderStarted(fiber) {
579
- null !== injectedProfilingHooks &&
580
- "function" ===
581
- typeof injectedProfilingHooks.markComponentRenderStarted &&
582
- injectedProfilingHooks.markComponentRenderStarted(fiber);
583
- }
584
- function markComponentRenderStopped() {
585
- null !== injectedProfilingHooks &&
586
- "function" ===
587
- typeof injectedProfilingHooks.markComponentRenderStopped &&
588
- injectedProfilingHooks.markComponentRenderStopped();
589
- }
590
- function markRenderStarted(lanes) {
591
- null !== injectedProfilingHooks &&
592
- "function" === typeof injectedProfilingHooks.markRenderStarted &&
593
- injectedProfilingHooks.markRenderStarted(lanes);
594
- }
595
- function markRenderStopped() {
596
- null !== injectedProfilingHooks &&
597
- "function" === typeof injectedProfilingHooks.markRenderStopped &&
598
- injectedProfilingHooks.markRenderStopped();
599
- }
600
- function markStateUpdateScheduled(fiber, lane) {
601
- null !== injectedProfilingHooks &&
602
- "function" === typeof injectedProfilingHooks.markStateUpdateScheduled &&
603
- injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
604
- }
605
- function clz32Fallback(x) {
606
- x >>>= 0;
607
- return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
608
- }
609
- function getLabelForLane(lane) {
610
- if (lane & 1) return "SyncHydrationLane";
611
- if (lane & 2) return "Sync";
612
- if (lane & 4) return "InputContinuousHydration";
613
- if (lane & 8) return "InputContinuous";
614
- if (lane & 16) return "DefaultHydration";
615
- if (lane & 32) return "Default";
616
- if (lane & 128) return "TransitionHydration";
617
- if (lane & 4194048) return "Transition";
618
- if (lane & 62914560) return "Retry";
619
- if (lane & 67108864) return "SelectiveHydration";
620
- if (lane & 134217728) return "IdleHydration";
621
- if (lane & 268435456) return "Idle";
622
- if (lane & 536870912) return "Offscreen";
623
- if (lane & 1073741824) return "Deferred";
624
- }
625
- function getHighestPriorityLanes(lanes) {
626
- var pendingSyncLanes = lanes & 42;
627
- if (0 !== pendingSyncLanes) return pendingSyncLanes;
628
- switch (lanes & -lanes) {
629
- case 1:
630
- return 1;
631
- case 2:
632
- return 2;
633
- case 4:
634
- return 4;
635
- case 8:
636
- return 8;
637
- case 16:
638
- return 16;
639
- case 32:
640
- return 32;
641
- case 64:
642
- return 64;
643
- case 128:
644
- return 128;
645
- case 256:
646
- case 512:
647
- case 1024:
648
- case 2048:
649
- case 4096:
650
- case 8192:
651
- case 16384:
652
- case 32768:
653
- case 65536:
654
- case 131072:
655
- case 262144:
656
- case 524288:
657
- case 1048576:
658
- case 2097152:
659
- return lanes & 4194048;
660
- case 4194304:
661
- case 8388608:
662
- case 16777216:
663
- case 33554432:
664
- return lanes & 62914560;
665
- case 67108864:
666
- return 67108864;
667
- case 134217728:
668
- return 134217728;
669
- case 268435456:
670
- return 268435456;
671
- case 536870912:
672
- return 536870912;
673
- case 1073741824:
674
- return 0;
675
- default:
676
- return (
677
- console.error(
678
- "Should have found matching lanes. This is a bug in React."
679
- ),
680
- lanes
681
- );
682
- }
683
- }
684
- function getNextLanes(root, wipLanes, rootHasPendingCommit) {
685
- var pendingLanes = root.pendingLanes;
686
- if (0 === pendingLanes) return 0;
687
- var nextLanes = 0,
688
- suspendedLanes = root.suspendedLanes,
689
- pingedLanes = root.pingedLanes;
690
- root = root.warmLanes;
691
- var nonIdlePendingLanes = pendingLanes & 134217727;
692
- 0 !== nonIdlePendingLanes
693
- ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
694
- 0 !== pendingLanes
695
- ? (nextLanes = getHighestPriorityLanes(pendingLanes))
696
- : ((pingedLanes &= nonIdlePendingLanes),
697
- 0 !== pingedLanes
698
- ? (nextLanes = getHighestPriorityLanes(pingedLanes))
699
- : rootHasPendingCommit ||
700
- ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
701
- 0 !== rootHasPendingCommit &&
702
- (nextLanes =
703
- getHighestPriorityLanes(rootHasPendingCommit)))))
704
- : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
705
- 0 !== nonIdlePendingLanes
706
- ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
707
- : 0 !== pingedLanes
708
- ? (nextLanes = getHighestPriorityLanes(pingedLanes))
709
- : rootHasPendingCommit ||
710
- ((rootHasPendingCommit = pendingLanes & ~root),
711
- 0 !== rootHasPendingCommit &&
712
- (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
713
- return 0 === nextLanes
714
- ? 0
715
- : 0 !== wipLanes &&
716
- wipLanes !== nextLanes &&
717
- 0 === (wipLanes & suspendedLanes) &&
718
- ((suspendedLanes = nextLanes & -nextLanes),
719
- (rootHasPendingCommit = wipLanes & -wipLanes),
720
- suspendedLanes >= rootHasPendingCommit ||
721
- (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
722
- ? wipLanes
723
- : nextLanes;
724
- }
725
- function checkIfRootIsPrerendering(root, renderLanes) {
726
- return (
727
- 0 ===
728
- (root.pendingLanes &
729
- ~(root.suspendedLanes & ~root.pingedLanes) &
730
- renderLanes)
731
- );
732
- }
733
- function computeExpirationTime(lane, currentTime) {
734
- switch (lane) {
735
- case 1:
736
- case 2:
737
- case 4:
738
- case 8:
739
- case 64:
740
- return currentTime + 250;
741
- case 16:
742
- case 32:
743
- case 128:
744
- case 256:
745
- case 512:
746
- case 1024:
747
- case 2048:
748
- case 4096:
749
- case 8192:
750
- case 16384:
751
- case 32768:
752
- case 65536:
753
- case 131072:
754
- case 262144:
755
- case 524288:
756
- case 1048576:
757
- case 2097152:
758
- return currentTime + 5e3;
759
- case 4194304:
760
- case 8388608:
761
- case 16777216:
762
- case 33554432:
763
- return -1;
764
- case 67108864:
765
- case 134217728:
766
- case 268435456:
767
- case 536870912:
768
- case 1073741824:
769
- return -1;
770
- default:
771
- return (
772
- console.error(
773
- "Should have found matching lanes. This is a bug in React."
774
- ),
775
- -1
549
+ function describeNativeComponentFrame(fn, construct) {
550
+ if (!fn || reentry) return "";
551
+ var frame = componentFrameCache.get(fn);
552
+ if (void 0 !== frame) return frame;
553
+ reentry = !0;
554
+ frame = Error.prepareStackTrace;
555
+ Error.prepareStackTrace = void 0;
556
+ var previousDispatcher = null;
557
+ previousDispatcher = ReactSharedInternals.H;
558
+ ReactSharedInternals.H = null;
559
+ disableLogs();
560
+ try {
561
+ var RunInRootFrame = {
562
+ DetermineComponentFrameRoot: function () {
563
+ try {
564
+ if (construct) {
565
+ var Fake = function () {
566
+ throw Error();
567
+ };
568
+ Object.defineProperty(Fake.prototype, "props", {
569
+ set: function () {
570
+ throw Error();
571
+ }
572
+ });
573
+ if ("object" === typeof Reflect && Reflect.construct) {
574
+ try {
575
+ Reflect.construct(Fake, []);
576
+ } catch (x) {
577
+ var control = x;
578
+ }
579
+ Reflect.construct(fn, [], Fake);
580
+ } else {
581
+ try {
582
+ Fake.call();
583
+ } catch (x$0) {
584
+ control = x$0;
585
+ }
586
+ fn.call(Fake.prototype);
587
+ }
588
+ } else {
589
+ try {
590
+ throw Error();
591
+ } catch (x$1) {
592
+ control = x$1;
593
+ }
594
+ (Fake = fn()) &&
595
+ "function" === typeof Fake.catch &&
596
+ Fake.catch(function () {});
597
+ }
598
+ } catch (sample) {
599
+ if (sample && control && "string" === typeof sample.stack)
600
+ return [sample.stack, control.stack];
601
+ }
602
+ return [null, null];
603
+ }
604
+ };
605
+ RunInRootFrame.DetermineComponentFrameRoot.displayName =
606
+ "DetermineComponentFrameRoot";
607
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(
608
+ RunInRootFrame.DetermineComponentFrameRoot,
609
+ "name"
610
+ );
611
+ namePropDescriptor &&
612
+ namePropDescriptor.configurable &&
613
+ Object.defineProperty(
614
+ RunInRootFrame.DetermineComponentFrameRoot,
615
+ "name",
616
+ { value: "DetermineComponentFrameRoot" }
776
617
  );
777
- }
778
- }
779
- function claimNextTransitionLane() {
780
- var lane = nextTransitionLane;
781
- nextTransitionLane <<= 1;
782
- 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
783
- return lane;
784
- }
785
- function claimNextRetryLane() {
786
- var lane = nextRetryLane;
787
- nextRetryLane <<= 1;
788
- 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
789
- return lane;
790
- }
791
- function createLaneMap(initial) {
792
- for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
793
- return laneMap;
794
- }
795
- function markRootUpdated$1(root, updateLane) {
796
- root.pendingLanes |= updateLane;
797
- 268435456 !== updateLane &&
798
- ((root.suspendedLanes = 0),
799
- (root.pingedLanes = 0),
800
- (root.warmLanes = 0));
801
- }
802
- function markRootFinished(
803
- root,
804
- finishedLanes,
805
- remainingLanes,
806
- spawnedLane,
807
- updatedLanes,
808
- suspendedRetryLanes
809
- ) {
810
- var previouslyPendingLanes = root.pendingLanes;
811
- root.pendingLanes = remainingLanes;
812
- root.suspendedLanes = 0;
813
- root.pingedLanes = 0;
814
- root.warmLanes = 0;
815
- root.expiredLanes &= remainingLanes;
816
- root.entangledLanes &= remainingLanes;
817
- root.errorRecoveryDisabledLanes &= remainingLanes;
818
- root.shellSuspendCounter = 0;
819
- var entanglements = root.entanglements,
820
- expirationTimes = root.expirationTimes,
821
- hiddenUpdates = root.hiddenUpdates;
822
- for (
823
- remainingLanes = previouslyPendingLanes & ~remainingLanes;
824
- 0 < remainingLanes;
618
+ var _RunInRootFrame$Deter =
619
+ RunInRootFrame.DetermineComponentFrameRoot(),
620
+ sampleStack = _RunInRootFrame$Deter[0],
621
+ controlStack = _RunInRootFrame$Deter[1];
622
+ if (sampleStack && controlStack) {
623
+ var sampleLines = sampleStack.split("\n"),
624
+ controlLines = controlStack.split("\n");
625
+ for (
626
+ _RunInRootFrame$Deter = namePropDescriptor = 0;
627
+ namePropDescriptor < sampleLines.length &&
628
+ !sampleLines[namePropDescriptor].includes(
629
+ "DetermineComponentFrameRoot"
630
+ );
825
631
 
826
- ) {
827
- var index = 31 - clz32(remainingLanes),
828
- lane = 1 << index;
829
- entanglements[index] = 0;
830
- expirationTimes[index] = -1;
831
- var hiddenUpdatesForLane = hiddenUpdates[index];
832
- if (null !== hiddenUpdatesForLane)
632
+ )
633
+ namePropDescriptor++;
833
634
  for (
834
- hiddenUpdates[index] = null, index = 0;
835
- index < hiddenUpdatesForLane.length;
836
- index++
837
- ) {
838
- var update = hiddenUpdatesForLane[index];
839
- null !== update && (update.lane &= -536870913);
840
- }
841
- remainingLanes &= ~lane;
635
+ ;
636
+ _RunInRootFrame$Deter < controlLines.length &&
637
+ !controlLines[_RunInRootFrame$Deter].includes(
638
+ "DetermineComponentFrameRoot"
639
+ );
640
+
641
+ )
642
+ _RunInRootFrame$Deter++;
643
+ if (
644
+ namePropDescriptor === sampleLines.length ||
645
+ _RunInRootFrame$Deter === controlLines.length
646
+ )
647
+ for (
648
+ namePropDescriptor = sampleLines.length - 1,
649
+ _RunInRootFrame$Deter = controlLines.length - 1;
650
+ 1 <= namePropDescriptor &&
651
+ 0 <= _RunInRootFrame$Deter &&
652
+ sampleLines[namePropDescriptor] !==
653
+ controlLines[_RunInRootFrame$Deter];
654
+
655
+ )
656
+ _RunInRootFrame$Deter--;
657
+ for (
658
+ ;
659
+ 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
660
+ namePropDescriptor--, _RunInRootFrame$Deter--
661
+ )
662
+ if (
663
+ sampleLines[namePropDescriptor] !==
664
+ controlLines[_RunInRootFrame$Deter]
665
+ ) {
666
+ if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
667
+ do
668
+ if (
669
+ (namePropDescriptor--,
670
+ _RunInRootFrame$Deter--,
671
+ 0 > _RunInRootFrame$Deter ||
672
+ sampleLines[namePropDescriptor] !==
673
+ controlLines[_RunInRootFrame$Deter])
674
+ ) {
675
+ var _frame =
676
+ "\n" +
677
+ sampleLines[namePropDescriptor].replace(
678
+ " at new ",
679
+ " at "
680
+ );
681
+ fn.displayName &&
682
+ _frame.includes("<anonymous>") &&
683
+ (_frame = _frame.replace("<anonymous>", fn.displayName));
684
+ "function" === typeof fn &&
685
+ componentFrameCache.set(fn, _frame);
686
+ return _frame;
687
+ }
688
+ while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
689
+ }
690
+ break;
691
+ }
692
+ }
693
+ } finally {
694
+ (reentry = !1),
695
+ (ReactSharedInternals.H = previousDispatcher),
696
+ reenableLogs(),
697
+ (Error.prepareStackTrace = frame);
842
698
  }
843
- 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
844
- 0 !== suspendedRetryLanes &&
845
- 0 === updatedLanes &&
846
- 0 !== root.tag &&
847
- (root.suspendedLanes |=
848
- suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
699
+ sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
700
+ ? describeBuiltInComponentFrame(sampleLines)
701
+ : "";
702
+ "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
703
+ return sampleLines;
849
704
  }
850
- function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
851
- root.pendingLanes |= spawnedLane;
852
- root.suspendedLanes &= ~spawnedLane;
853
- var spawnedLaneIndex = 31 - clz32(spawnedLane);
854
- root.entangledLanes |= spawnedLane;
855
- root.entanglements[spawnedLaneIndex] =
856
- root.entanglements[spawnedLaneIndex] |
857
- 1073741824 |
858
- (entangledLanes & 4194090);
705
+ function formatOwnerStack(error) {
706
+ var prevPrepareStackTrace = Error.prepareStackTrace;
707
+ Error.prepareStackTrace = void 0;
708
+ error = error.stack;
709
+ Error.prepareStackTrace = prevPrepareStackTrace;
710
+ error.startsWith("Error: react-stack-top-frame\n") &&
711
+ (error = error.slice(29));
712
+ prevPrepareStackTrace = error.indexOf("\n");
713
+ -1 !== prevPrepareStackTrace &&
714
+ (error = error.slice(prevPrepareStackTrace + 1));
715
+ prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
716
+ -1 !== prevPrepareStackTrace &&
717
+ (prevPrepareStackTrace = error.lastIndexOf(
718
+ "\n",
719
+ prevPrepareStackTrace
720
+ ));
721
+ if (-1 !== prevPrepareStackTrace)
722
+ error = error.slice(0, prevPrepareStackTrace);
723
+ else return "";
724
+ return error;
859
725
  }
860
- function markRootEntangled(root, entangledLanes) {
861
- var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
862
- for (root = root.entanglements; rootEntangledLanes; ) {
863
- var index = 31 - clz32(rootEntangledLanes),
864
- lane = 1 << index;
865
- (lane & entangledLanes) | (root[index] & entangledLanes) &&
866
- (root[index] |= entangledLanes);
867
- rootEntangledLanes &= ~lane;
726
+ function describeFiber(fiber) {
727
+ switch (fiber.tag) {
728
+ case 26:
729
+ case 27:
730
+ case 5:
731
+ return describeBuiltInComponentFrame(fiber.type);
732
+ case 16:
733
+ return describeBuiltInComponentFrame("Lazy");
734
+ case 13:
735
+ return describeBuiltInComponentFrame("Suspense");
736
+ case 19:
737
+ return describeBuiltInComponentFrame("SuspenseList");
738
+ case 0:
739
+ case 15:
740
+ return describeNativeComponentFrame(fiber.type, !1);
741
+ case 11:
742
+ return describeNativeComponentFrame(fiber.type.render, !1);
743
+ case 1:
744
+ return describeNativeComponentFrame(fiber.type, !0);
745
+ case 31:
746
+ return describeBuiltInComponentFrame("Activity");
747
+ default:
748
+ return "";
868
749
  }
869
750
  }
870
- function getBumpedLaneForHydrationByLane(lane) {
871
- switch (lane) {
872
- case 2:
873
- lane = 1;
874
- break;
875
- case 8:
876
- lane = 4;
877
- break;
878
- case 32:
879
- lane = 16;
880
- break;
881
- case 256:
882
- case 512:
883
- case 1024:
884
- case 2048:
885
- case 4096:
886
- case 8192:
887
- case 16384:
888
- case 32768:
889
- case 65536:
890
- case 131072:
891
- case 262144:
892
- case 524288:
893
- case 1048576:
894
- case 2097152:
895
- case 4194304:
896
- case 8388608:
897
- case 16777216:
898
- case 33554432:
899
- lane = 128;
900
- break;
901
- case 268435456:
902
- lane = 134217728;
903
- break;
904
- default:
905
- lane = 0;
751
+ function getStackByFiberInDevAndProd(workInProgress) {
752
+ try {
753
+ var info = "";
754
+ do {
755
+ info += describeFiber(workInProgress);
756
+ var debugInfo = workInProgress._debugInfo;
757
+ if (debugInfo)
758
+ for (var i = debugInfo.length - 1; 0 <= i; i--) {
759
+ var entry = debugInfo[i];
760
+ if ("string" === typeof entry.name) {
761
+ var JSCompiler_temp_const = info,
762
+ env = entry.env;
763
+ var JSCompiler_inline_result = describeBuiltInComponentFrame(
764
+ entry.name + (env ? " [" + env + "]" : "")
765
+ );
766
+ info = JSCompiler_temp_const + JSCompiler_inline_result;
767
+ }
768
+ }
769
+ workInProgress = workInProgress.return;
770
+ } while (workInProgress);
771
+ return info;
772
+ } catch (x) {
773
+ return "\nError generating stack: " + x.message + "\n" + x.stack;
906
774
  }
907
- return lane;
908
775
  }
909
- function addFiberToLanesMap(root, fiber, lanes) {
910
- if (isDevToolsPresent)
911
- for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
912
- var index = 31 - clz32(lanes),
913
- lane = 1 << index;
914
- root[index].add(fiber);
915
- lanes &= ~lane;
916
- }
776
+ function describeFunctionComponentFrameWithoutLineNumber(fn) {
777
+ return (fn = fn ? fn.displayName || fn.name : "")
778
+ ? describeBuiltInComponentFrame(fn)
779
+ : "";
917
780
  }
918
- function movePendingFibersToMemoized(root, lanes) {
919
- if (isDevToolsPresent)
920
- for (
921
- var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
922
- memoizedUpdaters = root.memoizedUpdaters;
923
- 0 < lanes;
924
-
925
- ) {
926
- var index = 31 - clz32(lanes);
927
- root = 1 << index;
928
- index = pendingUpdatersLaneMap[index];
929
- 0 < index.size &&
930
- (index.forEach(function (fiber) {
931
- var alternate = fiber.alternate;
932
- (null !== alternate && memoizedUpdaters.has(alternate)) ||
933
- memoizedUpdaters.add(fiber);
934
- }),
935
- index.clear());
936
- lanes &= ~root;
781
+ function getCurrentFiberOwnerNameInDevOrNull() {
782
+ if (null === current) return null;
783
+ var owner = current._debugOwner;
784
+ return null != owner ? getComponentNameFromOwner(owner) : null;
785
+ }
786
+ function getCurrentFiberStackInDev() {
787
+ if (null === current) return "";
788
+ var workInProgress = current;
789
+ try {
790
+ var info = "";
791
+ 6 === workInProgress.tag && (workInProgress = workInProgress.return);
792
+ switch (workInProgress.tag) {
793
+ case 26:
794
+ case 27:
795
+ case 5:
796
+ info += describeBuiltInComponentFrame(workInProgress.type);
797
+ break;
798
+ case 13:
799
+ info += describeBuiltInComponentFrame("Suspense");
800
+ break;
801
+ case 19:
802
+ info += describeBuiltInComponentFrame("SuspenseList");
803
+ break;
804
+ case 31:
805
+ info += describeBuiltInComponentFrame("Activity");
806
+ break;
807
+ case 30:
808
+ case 0:
809
+ case 15:
810
+ case 1:
811
+ workInProgress._debugOwner ||
812
+ "" !== info ||
813
+ (info += describeFunctionComponentFrameWithoutLineNumber(
814
+ workInProgress.type
815
+ ));
816
+ break;
817
+ case 11:
818
+ workInProgress._debugOwner ||
819
+ "" !== info ||
820
+ (info += describeFunctionComponentFrameWithoutLineNumber(
821
+ workInProgress.type.render
822
+ ));
937
823
  }
824
+ for (; workInProgress; )
825
+ if ("number" === typeof workInProgress.tag) {
826
+ var fiber = workInProgress;
827
+ workInProgress = fiber._debugOwner;
828
+ var debugStack = fiber._debugStack;
829
+ workInProgress &&
830
+ debugStack &&
831
+ ("string" !== typeof debugStack &&
832
+ (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
833
+ "" !== debugStack && (info += "\n" + debugStack));
834
+ } else if (null != workInProgress.debugStack) {
835
+ var ownerStack = workInProgress.debugStack;
836
+ (workInProgress = workInProgress.owner) &&
837
+ ownerStack &&
838
+ (info += "\n" + formatOwnerStack(ownerStack));
839
+ } else break;
840
+ var JSCompiler_inline_result = info;
841
+ } catch (x) {
842
+ JSCompiler_inline_result =
843
+ "\nError generating stack: " + x.message + "\n" + x.stack;
844
+ }
845
+ return JSCompiler_inline_result;
938
846
  }
939
- function lanesToEventPriority(lanes) {
940
- lanes &= -lanes;
941
- return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
942
- ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes
943
- ? 0 !== (lanes & 134217727)
944
- ? DefaultEventPriority
945
- : IdleEventPriority
946
- : ContinuousEventPriority
947
- : DiscreteEventPriority;
948
- }
949
- function resolveUpdatePriority() {
950
- var updatePriority = ReactDOMSharedInternals.p;
951
- if (0 !== updatePriority) return updatePriority;
952
- updatePriority = window.event;
953
- return void 0 === updatePriority
954
- ? DefaultEventPriority
955
- : getEventPriority(updatePriority.type);
956
- }
957
- function runWithPriority(priority, fn) {
958
- var previousPriority = ReactDOMSharedInternals.p;
847
+ function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
848
+ var previousFiber = current;
849
+ setCurrentFiber(fiber);
959
850
  try {
960
- return (ReactDOMSharedInternals.p = priority), fn();
851
+ return null !== fiber && fiber._debugTask
852
+ ? fiber._debugTask.run(
853
+ callback.bind(null, arg0, arg1, arg2, arg3, arg4)
854
+ )
855
+ : callback(arg0, arg1, arg2, arg3, arg4);
961
856
  } finally {
962
- ReactDOMSharedInternals.p = previousPriority;
857
+ setCurrentFiber(previousFiber);
963
858
  }
859
+ throw Error(
860
+ "runWithFiberInDEV should never be called in production. This is a bug in React."
861
+ );
964
862
  }
965
- function detachDeletedInstance(node) {
966
- delete node[internalInstanceKey];
967
- delete node[internalPropsKey];
968
- delete node[internalEventHandlersKey];
969
- delete node[internalEventHandlerListenersKey];
970
- delete node[internalEventHandlesSetKey];
863
+ function setCurrentFiber(fiber) {
864
+ ReactSharedInternals.getCurrentStack =
865
+ null === fiber ? null : getCurrentFiberStackInDev;
866
+ isRendering = !1;
867
+ current = fiber;
971
868
  }
972
- function getClosestInstanceFromNode(targetNode) {
973
- var targetInst = targetNode[internalInstanceKey];
974
- if (targetInst) return targetInst;
975
- for (var parentNode = targetNode.parentNode; parentNode; ) {
976
- if (
977
- (targetInst =
978
- parentNode[internalContainerInstanceKey] ||
979
- parentNode[internalInstanceKey])
980
- ) {
981
- parentNode = targetInst.alternate;
982
- if (
983
- null !== targetInst.child ||
984
- (null !== parentNode && null !== parentNode.child)
985
- )
986
- for (
987
- targetNode = getParentSuspenseInstance(targetNode);
988
- null !== targetNode;
989
-
990
- ) {
991
- if ((parentNode = targetNode[internalInstanceKey]))
992
- return parentNode;
993
- targetNode = getParentSuspenseInstance(targetNode);
994
- }
995
- return targetInst;
996
- }
997
- targetNode = parentNode;
998
- parentNode = targetNode.parentNode;
999
- }
1000
- return null;
869
+ function typeName(value) {
870
+ return (
871
+ ("function" === typeof Symbol &&
872
+ Symbol.toStringTag &&
873
+ value[Symbol.toStringTag]) ||
874
+ value.constructor.name ||
875
+ "Object"
876
+ );
1001
877
  }
1002
- function getInstanceFromNode(node) {
1003
- if (
1004
- (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
1005
- ) {
1006
- var tag = node.tag;
1007
- if (
1008
- 5 === tag ||
1009
- 6 === tag ||
1010
- 13 === tag ||
1011
- 26 === tag ||
1012
- 27 === tag ||
1013
- 3 === tag
1014
- )
1015
- return node;
878
+ function willCoercionThrow(value) {
879
+ try {
880
+ return testStringCoercion(value), !1;
881
+ } catch (e) {
882
+ return !0;
1016
883
  }
1017
- return null;
1018
884
  }
1019
- function getNodeFromInstance(inst) {
1020
- var tag = inst.tag;
1021
- if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1022
- return inst.stateNode;
1023
- throw Error("getNodeFromInstance: Invalid argument.");
885
+ function testStringCoercion(value) {
886
+ return "" + value;
1024
887
  }
1025
- function getResourcesFromRoot(root) {
1026
- var resources = root[internalRootNodeResourcesKey];
1027
- resources ||
1028
- (resources = root[internalRootNodeResourcesKey] =
1029
- { hoistableStyles: new Map(), hoistableScripts: new Map() });
1030
- return resources;
888
+ function checkAttributeStringCoercion(value, attributeName) {
889
+ if (willCoercionThrow(value))
890
+ return (
891
+ console.error(
892
+ "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
893
+ attributeName,
894
+ typeName(value)
895
+ ),
896
+ testStringCoercion(value)
897
+ );
1031
898
  }
1032
- function markNodeAsHoistable(node) {
1033
- node[internalHoistableMarker] = !0;
899
+ function checkCSSPropertyStringCoercion(value, propName) {
900
+ if (willCoercionThrow(value))
901
+ return (
902
+ console.error(
903
+ "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
904
+ propName,
905
+ typeName(value)
906
+ ),
907
+ testStringCoercion(value)
908
+ );
1034
909
  }
1035
- function registerTwoPhaseEvent(registrationName, dependencies) {
1036
- registerDirectEvent(registrationName, dependencies);
1037
- registerDirectEvent(registrationName + "Capture", dependencies);
910
+ function checkFormFieldValueStringCoercion(value) {
911
+ if (willCoercionThrow(value))
912
+ return (
913
+ console.error(
914
+ "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
915
+ typeName(value)
916
+ ),
917
+ testStringCoercion(value)
918
+ );
1038
919
  }
1039
- function registerDirectEvent(registrationName, dependencies) {
1040
- registrationNameDependencies[registrationName] &&
1041
- console.error(
1042
- "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1043
- registrationName
920
+ function injectInternals(internals) {
921
+ if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
922
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
923
+ if (hook.isDisabled) return !0;
924
+ if (!hook.supportsFiber)
925
+ return (
926
+ console.error(
927
+ "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
928
+ ),
929
+ !0
1044
930
  );
1045
- registrationNameDependencies[registrationName] = dependencies;
1046
- var lowerCasedName = registrationName.toLowerCase();
1047
- possibleRegistrationNames[lowerCasedName] = registrationName;
1048
- "onDoubleClick" === registrationName &&
1049
- (possibleRegistrationNames.ondblclick = registrationName);
1050
- for (
1051
- registrationName = 0;
1052
- registrationName < dependencies.length;
1053
- registrationName++
1054
- )
1055
- allNativeEvents.add(dependencies[registrationName]);
931
+ try {
932
+ (rendererID = hook.inject(internals)), (injectedHook = hook);
933
+ } catch (err) {
934
+ console.error("React instrumentation encountered an error: %s.", err);
935
+ }
936
+ return hook.checkDCE ? !0 : !1;
1056
937
  }
1057
- function checkControlledValueProps(tagName, props) {
1058
- hasReadOnlyValue[props.type] ||
1059
- props.onChange ||
1060
- props.onInput ||
1061
- props.readOnly ||
1062
- props.disabled ||
1063
- null == props.value ||
1064
- ("select" === tagName
1065
- ? console.error(
1066
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
1067
- )
1068
- : console.error(
1069
- "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
938
+ function setIsStrictModeForDevtools(newIsStrictMode) {
939
+ "function" === typeof log$1 &&
940
+ unstable_setDisableYieldValue(newIsStrictMode);
941
+ if (injectedHook && "function" === typeof injectedHook.setStrictMode)
942
+ try {
943
+ injectedHook.setStrictMode(rendererID, newIsStrictMode);
944
+ } catch (err) {
945
+ hasLoggedError ||
946
+ ((hasLoggedError = !0),
947
+ console.error(
948
+ "React instrumentation encountered an error: %s",
949
+ err
1070
950
  ));
1071
- props.onChange ||
1072
- props.readOnly ||
1073
- props.disabled ||
1074
- null == props.checked ||
1075
- console.error(
1076
- "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
1077
- );
951
+ }
952
+ }
953
+ function injectProfilingHooks(profilingHooks) {
954
+ injectedProfilingHooks = profilingHooks;
955
+ }
956
+ function markCommitStopped() {
957
+ null !== injectedProfilingHooks &&
958
+ "function" === typeof injectedProfilingHooks.markCommitStopped &&
959
+ injectedProfilingHooks.markCommitStopped();
960
+ }
961
+ function markComponentRenderStarted(fiber) {
962
+ null !== injectedProfilingHooks &&
963
+ "function" ===
964
+ typeof injectedProfilingHooks.markComponentRenderStarted &&
965
+ injectedProfilingHooks.markComponentRenderStarted(fiber);
966
+ }
967
+ function markComponentRenderStopped() {
968
+ null !== injectedProfilingHooks &&
969
+ "function" ===
970
+ typeof injectedProfilingHooks.markComponentRenderStopped &&
971
+ injectedProfilingHooks.markComponentRenderStopped();
1078
972
  }
1079
- function isAttributeNameSafe(attributeName) {
1080
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1081
- return !0;
1082
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1083
- return !1;
1084
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1085
- return (validatedAttributeNameCache[attributeName] = !0);
1086
- illegalAttributeNameCache[attributeName] = !0;
1087
- console.error("Invalid attribute name: `%s`", attributeName);
1088
- return !1;
973
+ function markRenderStarted(lanes) {
974
+ null !== injectedProfilingHooks &&
975
+ "function" === typeof injectedProfilingHooks.markRenderStarted &&
976
+ injectedProfilingHooks.markRenderStarted(lanes);
1089
977
  }
1090
- function getValueForAttributeOnCustomComponent(node, name, expected) {
1091
- if (isAttributeNameSafe(name)) {
1092
- if (!node.hasAttribute(name)) {
1093
- switch (typeof expected) {
1094
- case "symbol":
1095
- case "object":
1096
- return expected;
1097
- case "function":
1098
- return expected;
1099
- case "boolean":
1100
- if (!1 === expected) return expected;
1101
- }
1102
- return void 0 === expected ? void 0 : null;
1103
- }
1104
- node = node.getAttribute(name);
1105
- if ("" === node && !0 === expected) return !0;
1106
- checkAttributeStringCoercion(expected, name);
1107
- return node === "" + expected ? expected : node;
1108
- }
978
+ function markRenderStopped() {
979
+ null !== injectedProfilingHooks &&
980
+ "function" === typeof injectedProfilingHooks.markRenderStopped &&
981
+ injectedProfilingHooks.markRenderStopped();
1109
982
  }
1110
- function setValueForAttribute(node, name, value) {
1111
- if (isAttributeNameSafe(name))
1112
- if (null === value) node.removeAttribute(name);
1113
- else {
1114
- switch (typeof value) {
1115
- case "undefined":
1116
- case "function":
1117
- case "symbol":
1118
- node.removeAttribute(name);
1119
- return;
1120
- case "boolean":
1121
- var prefix = name.toLowerCase().slice(0, 5);
1122
- if ("data-" !== prefix && "aria-" !== prefix) {
1123
- node.removeAttribute(name);
1124
- return;
1125
- }
1126
- }
1127
- checkAttributeStringCoercion(value, name);
1128
- node.setAttribute(name, "" + value);
1129
- }
983
+ function markStateUpdateScheduled(fiber, lane) {
984
+ null !== injectedProfilingHooks &&
985
+ "function" === typeof injectedProfilingHooks.markStateUpdateScheduled &&
986
+ injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
1130
987
  }
1131
- function setValueForKnownAttribute(node, name, value) {
1132
- if (null === value) node.removeAttribute(name);
1133
- else {
1134
- switch (typeof value) {
1135
- case "undefined":
1136
- case "function":
1137
- case "symbol":
1138
- case "boolean":
1139
- node.removeAttribute(name);
1140
- return;
1141
- }
1142
- checkAttributeStringCoercion(value, name);
1143
- node.setAttribute(name, "" + value);
988
+ function clz32Fallback(x) {
989
+ x >>>= 0;
990
+ return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
991
+ }
992
+ function getLabelForLane(lane) {
993
+ if (lane & 1) return "SyncHydrationLane";
994
+ if (lane & 2) return "Sync";
995
+ if (lane & 4) return "InputContinuousHydration";
996
+ if (lane & 8) return "InputContinuous";
997
+ if (lane & 16) return "DefaultHydration";
998
+ if (lane & 32) return "Default";
999
+ if (lane & 128) return "TransitionHydration";
1000
+ if (lane & 4194048) return "Transition";
1001
+ if (lane & 62914560) return "Retry";
1002
+ if (lane & 67108864) return "SelectiveHydration";
1003
+ if (lane & 134217728) return "IdleHydration";
1004
+ if (lane & 268435456) return "Idle";
1005
+ if (lane & 536870912) return "Offscreen";
1006
+ if (lane & 1073741824) return "Deferred";
1007
+ }
1008
+ function getHighestPriorityLanes(lanes) {
1009
+ var pendingSyncLanes = lanes & 42;
1010
+ if (0 !== pendingSyncLanes) return pendingSyncLanes;
1011
+ switch (lanes & -lanes) {
1012
+ case 1:
1013
+ return 1;
1014
+ case 2:
1015
+ return 2;
1016
+ case 4:
1017
+ return 4;
1018
+ case 8:
1019
+ return 8;
1020
+ case 16:
1021
+ return 16;
1022
+ case 32:
1023
+ return 32;
1024
+ case 64:
1025
+ return 64;
1026
+ case 128:
1027
+ return 128;
1028
+ case 256:
1029
+ case 512:
1030
+ case 1024:
1031
+ case 2048:
1032
+ case 4096:
1033
+ case 8192:
1034
+ case 16384:
1035
+ case 32768:
1036
+ case 65536:
1037
+ case 131072:
1038
+ case 262144:
1039
+ case 524288:
1040
+ case 1048576:
1041
+ case 2097152:
1042
+ return lanes & 4194048;
1043
+ case 4194304:
1044
+ case 8388608:
1045
+ case 16777216:
1046
+ case 33554432:
1047
+ return lanes & 62914560;
1048
+ case 67108864:
1049
+ return 67108864;
1050
+ case 134217728:
1051
+ return 134217728;
1052
+ case 268435456:
1053
+ return 268435456;
1054
+ case 536870912:
1055
+ return 536870912;
1056
+ case 1073741824:
1057
+ return 0;
1058
+ default:
1059
+ return (
1060
+ console.error(
1061
+ "Should have found matching lanes. This is a bug in React."
1062
+ ),
1063
+ lanes
1064
+ );
1144
1065
  }
1145
1066
  }
1146
- function setValueForNamespacedAttribute(node, namespace, name, value) {
1147
- if (null === value) node.removeAttribute(name);
1148
- else {
1149
- switch (typeof value) {
1150
- case "undefined":
1151
- case "function":
1152
- case "symbol":
1153
- case "boolean":
1154
- node.removeAttribute(name);
1155
- return;
1156
- }
1157
- checkAttributeStringCoercion(value, name);
1158
- node.setAttributeNS(namespace, name, "" + value);
1067
+ function getNextLanes(root, wipLanes, rootHasPendingCommit) {
1068
+ var pendingLanes = root.pendingLanes;
1069
+ if (0 === pendingLanes) return 0;
1070
+ var nextLanes = 0,
1071
+ suspendedLanes = root.suspendedLanes,
1072
+ pingedLanes = root.pingedLanes;
1073
+ root = root.warmLanes;
1074
+ var nonIdlePendingLanes = pendingLanes & 134217727;
1075
+ 0 !== nonIdlePendingLanes
1076
+ ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
1077
+ 0 !== pendingLanes
1078
+ ? (nextLanes = getHighestPriorityLanes(pendingLanes))
1079
+ : ((pingedLanes &= nonIdlePendingLanes),
1080
+ 0 !== pingedLanes
1081
+ ? (nextLanes = getHighestPriorityLanes(pingedLanes))
1082
+ : rootHasPendingCommit ||
1083
+ ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
1084
+ 0 !== rootHasPendingCommit &&
1085
+ (nextLanes =
1086
+ getHighestPriorityLanes(rootHasPendingCommit)))))
1087
+ : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
1088
+ 0 !== nonIdlePendingLanes
1089
+ ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
1090
+ : 0 !== pingedLanes
1091
+ ? (nextLanes = getHighestPriorityLanes(pingedLanes))
1092
+ : rootHasPendingCommit ||
1093
+ ((rootHasPendingCommit = pendingLanes & ~root),
1094
+ 0 !== rootHasPendingCommit &&
1095
+ (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
1096
+ return 0 === nextLanes
1097
+ ? 0
1098
+ : 0 !== wipLanes &&
1099
+ wipLanes !== nextLanes &&
1100
+ 0 === (wipLanes & suspendedLanes) &&
1101
+ ((suspendedLanes = nextLanes & -nextLanes),
1102
+ (rootHasPendingCommit = wipLanes & -wipLanes),
1103
+ suspendedLanes >= rootHasPendingCommit ||
1104
+ (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
1105
+ ? wipLanes
1106
+ : nextLanes;
1107
+ }
1108
+ function checkIfRootIsPrerendering(root, renderLanes) {
1109
+ return (
1110
+ 0 ===
1111
+ (root.pendingLanes &
1112
+ ~(root.suspendedLanes & ~root.pingedLanes) &
1113
+ renderLanes)
1114
+ );
1115
+ }
1116
+ function computeExpirationTime(lane, currentTime) {
1117
+ switch (lane) {
1118
+ case 1:
1119
+ case 2:
1120
+ case 4:
1121
+ case 8:
1122
+ case 64:
1123
+ return currentTime + 250;
1124
+ case 16:
1125
+ case 32:
1126
+ case 128:
1127
+ case 256:
1128
+ case 512:
1129
+ case 1024:
1130
+ case 2048:
1131
+ case 4096:
1132
+ case 8192:
1133
+ case 16384:
1134
+ case 32768:
1135
+ case 65536:
1136
+ case 131072:
1137
+ case 262144:
1138
+ case 524288:
1139
+ case 1048576:
1140
+ case 2097152:
1141
+ return currentTime + 5e3;
1142
+ case 4194304:
1143
+ case 8388608:
1144
+ case 16777216:
1145
+ case 33554432:
1146
+ return -1;
1147
+ case 67108864:
1148
+ case 134217728:
1149
+ case 268435456:
1150
+ case 536870912:
1151
+ case 1073741824:
1152
+ return -1;
1153
+ default:
1154
+ return (
1155
+ console.error(
1156
+ "Should have found matching lanes. This is a bug in React."
1157
+ ),
1158
+ -1
1159
+ );
1159
1160
  }
1160
1161
  }
1161
- function disabledLog() {}
1162
- function disableLogs() {
1163
- if (0 === disabledDepth) {
1164
- prevLog = console.log;
1165
- prevInfo = console.info;
1166
- prevWarn = console.warn;
1167
- prevError = console.error;
1168
- prevGroup = console.group;
1169
- prevGroupCollapsed = console.groupCollapsed;
1170
- prevGroupEnd = console.groupEnd;
1171
- var props = {
1172
- configurable: !0,
1173
- enumerable: !0,
1174
- value: disabledLog,
1175
- writable: !0
1176
- };
1177
- Object.defineProperties(console, {
1178
- info: props,
1179
- log: props,
1180
- warn: props,
1181
- error: props,
1182
- group: props,
1183
- groupCollapsed: props,
1184
- groupEnd: props
1185
- });
1186
- }
1187
- disabledDepth++;
1162
+ function claimNextTransitionLane() {
1163
+ var lane = nextTransitionLane;
1164
+ nextTransitionLane <<= 1;
1165
+ 0 === (nextTransitionLane & 4194048) && (nextTransitionLane = 256);
1166
+ return lane;
1188
1167
  }
1189
- function reenableLogs() {
1190
- disabledDepth--;
1191
- if (0 === disabledDepth) {
1192
- var props = { configurable: !0, enumerable: !0, writable: !0 };
1193
- Object.defineProperties(console, {
1194
- log: assign({}, props, { value: prevLog }),
1195
- info: assign({}, props, { value: prevInfo }),
1196
- warn: assign({}, props, { value: prevWarn }),
1197
- error: assign({}, props, { value: prevError }),
1198
- group: assign({}, props, { value: prevGroup }),
1199
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1200
- groupEnd: assign({}, props, { value: prevGroupEnd })
1201
- });
1202
- }
1203
- 0 > disabledDepth &&
1204
- console.error(
1205
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
1206
- );
1168
+ function claimNextRetryLane() {
1169
+ var lane = nextRetryLane;
1170
+ nextRetryLane <<= 1;
1171
+ 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1172
+ return lane;
1207
1173
  }
1208
- function describeBuiltInComponentFrame(name) {
1209
- if (void 0 === prefix)
1210
- try {
1211
- throw Error();
1212
- } catch (x) {
1213
- var match = x.stack.trim().match(/\n( *(at )?)/);
1214
- prefix = (match && match[1]) || "";
1215
- suffix =
1216
- -1 < x.stack.indexOf("\n at")
1217
- ? " (<anonymous>)"
1218
- : -1 < x.stack.indexOf("@")
1219
- ? "@unknown:0:0"
1220
- : "";
1221
- }
1222
- return "\n" + prefix + name + suffix;
1174
+ function createLaneMap(initial) {
1175
+ for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1176
+ return laneMap;
1223
1177
  }
1224
- function describeNativeComponentFrame(fn, construct) {
1225
- if (!fn || reentry) return "";
1226
- var frame = componentFrameCache.get(fn);
1227
- if (void 0 !== frame) return frame;
1228
- reentry = !0;
1229
- frame = Error.prepareStackTrace;
1230
- Error.prepareStackTrace = void 0;
1231
- var previousDispatcher = null;
1232
- previousDispatcher = ReactSharedInternals.H;
1233
- ReactSharedInternals.H = null;
1234
- disableLogs();
1235
- try {
1236
- var RunInRootFrame = {
1237
- DetermineComponentFrameRoot: function () {
1238
- try {
1239
- if (construct) {
1240
- var Fake = function () {
1241
- throw Error();
1242
- };
1243
- Object.defineProperty(Fake.prototype, "props", {
1244
- set: function () {
1245
- throw Error();
1246
- }
1247
- });
1248
- if ("object" === typeof Reflect && Reflect.construct) {
1249
- try {
1250
- Reflect.construct(Fake, []);
1251
- } catch (x) {
1252
- var control = x;
1253
- }
1254
- Reflect.construct(fn, [], Fake);
1255
- } else {
1256
- try {
1257
- Fake.call();
1258
- } catch (x$0) {
1259
- control = x$0;
1260
- }
1261
- fn.call(Fake.prototype);
1262
- }
1263
- } else {
1264
- try {
1265
- throw Error();
1266
- } catch (x$1) {
1267
- control = x$1;
1268
- }
1269
- (Fake = fn()) &&
1270
- "function" === typeof Fake.catch &&
1271
- Fake.catch(function () {});
1272
- }
1273
- } catch (sample) {
1274
- if (sample && control && "string" === typeof sample.stack)
1275
- return [sample.stack, control.stack];
1276
- }
1277
- return [null, null];
1278
- }
1279
- };
1280
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
1281
- "DetermineComponentFrameRoot";
1282
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
1283
- RunInRootFrame.DetermineComponentFrameRoot,
1284
- "name"
1285
- );
1286
- namePropDescriptor &&
1287
- namePropDescriptor.configurable &&
1288
- Object.defineProperty(
1289
- RunInRootFrame.DetermineComponentFrameRoot,
1290
- "name",
1291
- { value: "DetermineComponentFrameRoot" }
1292
- );
1293
- var _RunInRootFrame$Deter =
1294
- RunInRootFrame.DetermineComponentFrameRoot(),
1295
- sampleStack = _RunInRootFrame$Deter[0],
1296
- controlStack = _RunInRootFrame$Deter[1];
1297
- if (sampleStack && controlStack) {
1298
- var sampleLines = sampleStack.split("\n"),
1299
- controlLines = controlStack.split("\n");
1300
- for (
1301
- _RunInRootFrame$Deter = namePropDescriptor = 0;
1302
- namePropDescriptor < sampleLines.length &&
1303
- !sampleLines[namePropDescriptor].includes(
1304
- "DetermineComponentFrameRoot"
1305
- );
1178
+ function markRootUpdated$1(root, updateLane) {
1179
+ root.pendingLanes |= updateLane;
1180
+ 268435456 !== updateLane &&
1181
+ ((root.suspendedLanes = 0),
1182
+ (root.pingedLanes = 0),
1183
+ (root.warmLanes = 0));
1184
+ }
1185
+ function markRootFinished(
1186
+ root,
1187
+ finishedLanes,
1188
+ remainingLanes,
1189
+ spawnedLane,
1190
+ updatedLanes,
1191
+ suspendedRetryLanes
1192
+ ) {
1193
+ var previouslyPendingLanes = root.pendingLanes;
1194
+ root.pendingLanes = remainingLanes;
1195
+ root.suspendedLanes = 0;
1196
+ root.pingedLanes = 0;
1197
+ root.warmLanes = 0;
1198
+ root.expiredLanes &= remainingLanes;
1199
+ root.entangledLanes &= remainingLanes;
1200
+ root.errorRecoveryDisabledLanes &= remainingLanes;
1201
+ root.shellSuspendCounter = 0;
1202
+ var entanglements = root.entanglements,
1203
+ expirationTimes = root.expirationTimes,
1204
+ hiddenUpdates = root.hiddenUpdates;
1205
+ for (
1206
+ remainingLanes = previouslyPendingLanes & ~remainingLanes;
1207
+ 0 < remainingLanes;
1306
1208
 
1307
- )
1308
- namePropDescriptor++;
1209
+ ) {
1210
+ var index = 31 - clz32(remainingLanes),
1211
+ lane = 1 << index;
1212
+ entanglements[index] = 0;
1213
+ expirationTimes[index] = -1;
1214
+ var hiddenUpdatesForLane = hiddenUpdates[index];
1215
+ if (null !== hiddenUpdatesForLane)
1309
1216
  for (
1310
- ;
1311
- _RunInRootFrame$Deter < controlLines.length &&
1312
- !controlLines[_RunInRootFrame$Deter].includes(
1313
- "DetermineComponentFrameRoot"
1314
- );
1217
+ hiddenUpdates[index] = null, index = 0;
1218
+ index < hiddenUpdatesForLane.length;
1219
+ index++
1220
+ ) {
1221
+ var update = hiddenUpdatesForLane[index];
1222
+ null !== update && (update.lane &= -536870913);
1223
+ }
1224
+ remainingLanes &= ~lane;
1225
+ }
1226
+ 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
1227
+ 0 !== suspendedRetryLanes &&
1228
+ 0 === updatedLanes &&
1229
+ 0 !== root.tag &&
1230
+ (root.suspendedLanes |=
1231
+ suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1232
+ }
1233
+ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
1234
+ root.pendingLanes |= spawnedLane;
1235
+ root.suspendedLanes &= ~spawnedLane;
1236
+ var spawnedLaneIndex = 31 - clz32(spawnedLane);
1237
+ root.entangledLanes |= spawnedLane;
1238
+ root.entanglements[spawnedLaneIndex] =
1239
+ root.entanglements[spawnedLaneIndex] |
1240
+ 1073741824 |
1241
+ (entangledLanes & 4194090);
1242
+ }
1243
+ function markRootEntangled(root, entangledLanes) {
1244
+ var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
1245
+ for (root = root.entanglements; rootEntangledLanes; ) {
1246
+ var index = 31 - clz32(rootEntangledLanes),
1247
+ lane = 1 << index;
1248
+ (lane & entangledLanes) | (root[index] & entangledLanes) &&
1249
+ (root[index] |= entangledLanes);
1250
+ rootEntangledLanes &= ~lane;
1251
+ }
1252
+ }
1253
+ function getBumpedLaneForHydrationByLane(lane) {
1254
+ switch (lane) {
1255
+ case 2:
1256
+ lane = 1;
1257
+ break;
1258
+ case 8:
1259
+ lane = 4;
1260
+ break;
1261
+ case 32:
1262
+ lane = 16;
1263
+ break;
1264
+ case 256:
1265
+ case 512:
1266
+ case 1024:
1267
+ case 2048:
1268
+ case 4096:
1269
+ case 8192:
1270
+ case 16384:
1271
+ case 32768:
1272
+ case 65536:
1273
+ case 131072:
1274
+ case 262144:
1275
+ case 524288:
1276
+ case 1048576:
1277
+ case 2097152:
1278
+ case 4194304:
1279
+ case 8388608:
1280
+ case 16777216:
1281
+ case 33554432:
1282
+ lane = 128;
1283
+ break;
1284
+ case 268435456:
1285
+ lane = 134217728;
1286
+ break;
1287
+ default:
1288
+ lane = 0;
1289
+ }
1290
+ return lane;
1291
+ }
1292
+ function addFiberToLanesMap(root, fiber, lanes) {
1293
+ if (isDevToolsPresent)
1294
+ for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
1295
+ var index = 31 - clz32(lanes),
1296
+ lane = 1 << index;
1297
+ root[index].add(fiber);
1298
+ lanes &= ~lane;
1299
+ }
1300
+ }
1301
+ function movePendingFibersToMemoized(root, lanes) {
1302
+ if (isDevToolsPresent)
1303
+ for (
1304
+ var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
1305
+ memoizedUpdaters = root.memoizedUpdaters;
1306
+ 0 < lanes;
1315
1307
 
1316
- )
1317
- _RunInRootFrame$Deter++;
1308
+ ) {
1309
+ var index = 31 - clz32(lanes);
1310
+ root = 1 << index;
1311
+ index = pendingUpdatersLaneMap[index];
1312
+ 0 < index.size &&
1313
+ (index.forEach(function (fiber) {
1314
+ var alternate = fiber.alternate;
1315
+ (null !== alternate && memoizedUpdaters.has(alternate)) ||
1316
+ memoizedUpdaters.add(fiber);
1317
+ }),
1318
+ index.clear());
1319
+ lanes &= ~root;
1320
+ }
1321
+ }
1322
+ function lanesToEventPriority(lanes) {
1323
+ lanes &= -lanes;
1324
+ return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
1325
+ ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes
1326
+ ? 0 !== (lanes & 134217727)
1327
+ ? DefaultEventPriority
1328
+ : IdleEventPriority
1329
+ : ContinuousEventPriority
1330
+ : DiscreteEventPriority;
1331
+ }
1332
+ function resolveUpdatePriority() {
1333
+ var updatePriority = ReactDOMSharedInternals.p;
1334
+ if (0 !== updatePriority) return updatePriority;
1335
+ updatePriority = window.event;
1336
+ return void 0 === updatePriority
1337
+ ? DefaultEventPriority
1338
+ : getEventPriority(updatePriority.type);
1339
+ }
1340
+ function runWithPriority(priority, fn) {
1341
+ var previousPriority = ReactDOMSharedInternals.p;
1342
+ try {
1343
+ return (ReactDOMSharedInternals.p = priority), fn();
1344
+ } finally {
1345
+ ReactDOMSharedInternals.p = previousPriority;
1346
+ }
1347
+ }
1348
+ function detachDeletedInstance(node) {
1349
+ delete node[internalInstanceKey];
1350
+ delete node[internalPropsKey];
1351
+ delete node[internalEventHandlersKey];
1352
+ delete node[internalEventHandlerListenersKey];
1353
+ delete node[internalEventHandlesSetKey];
1354
+ }
1355
+ function getClosestInstanceFromNode(targetNode) {
1356
+ var targetInst = targetNode[internalInstanceKey];
1357
+ if (targetInst) return targetInst;
1358
+ for (var parentNode = targetNode.parentNode; parentNode; ) {
1359
+ if (
1360
+ (targetInst =
1361
+ parentNode[internalContainerInstanceKey] ||
1362
+ parentNode[internalInstanceKey])
1363
+ ) {
1364
+ parentNode = targetInst.alternate;
1318
1365
  if (
1319
- namePropDescriptor === sampleLines.length ||
1320
- _RunInRootFrame$Deter === controlLines.length
1366
+ null !== targetInst.child ||
1367
+ (null !== parentNode && null !== parentNode.child)
1321
1368
  )
1322
1369
  for (
1323
- namePropDescriptor = sampleLines.length - 1,
1324
- _RunInRootFrame$Deter = controlLines.length - 1;
1325
- 1 <= namePropDescriptor &&
1326
- 0 <= _RunInRootFrame$Deter &&
1327
- sampleLines[namePropDescriptor] !==
1328
- controlLines[_RunInRootFrame$Deter];
1370
+ targetNode = getParentSuspenseInstance(targetNode);
1371
+ null !== targetNode;
1329
1372
 
1330
- )
1331
- _RunInRootFrame$Deter--;
1332
- for (
1333
- ;
1334
- 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
1335
- namePropDescriptor--, _RunInRootFrame$Deter--
1336
- )
1337
- if (
1338
- sampleLines[namePropDescriptor] !==
1339
- controlLines[_RunInRootFrame$Deter]
1340
1373
  ) {
1341
- if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1342
- do
1343
- if (
1344
- (namePropDescriptor--,
1345
- _RunInRootFrame$Deter--,
1346
- 0 > _RunInRootFrame$Deter ||
1347
- sampleLines[namePropDescriptor] !==
1348
- controlLines[_RunInRootFrame$Deter])
1349
- ) {
1350
- var _frame =
1351
- "\n" +
1352
- sampleLines[namePropDescriptor].replace(
1353
- " at new ",
1354
- " at "
1355
- );
1356
- fn.displayName &&
1357
- _frame.includes("<anonymous>") &&
1358
- (_frame = _frame.replace("<anonymous>", fn.displayName));
1359
- "function" === typeof fn &&
1360
- componentFrameCache.set(fn, _frame);
1361
- return _frame;
1362
- }
1363
- while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1364
- }
1365
- break;
1374
+ if ((parentNode = targetNode[internalInstanceKey]))
1375
+ return parentNode;
1376
+ targetNode = getParentSuspenseInstance(targetNode);
1366
1377
  }
1378
+ return targetInst;
1367
1379
  }
1368
- } finally {
1369
- (reentry = !1),
1370
- (ReactSharedInternals.H = previousDispatcher),
1371
- reenableLogs(),
1372
- (Error.prepareStackTrace = frame);
1380
+ targetNode = parentNode;
1381
+ parentNode = targetNode.parentNode;
1373
1382
  }
1374
- sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
1375
- ? describeBuiltInComponentFrame(sampleLines)
1376
- : "";
1377
- "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1378
- return sampleLines;
1383
+ return null;
1379
1384
  }
1380
- function formatOwnerStack(error) {
1381
- var prevPrepareStackTrace = Error.prepareStackTrace;
1382
- Error.prepareStackTrace = void 0;
1383
- error = error.stack;
1384
- Error.prepareStackTrace = prevPrepareStackTrace;
1385
- error.startsWith("Error: react-stack-top-frame\n") &&
1386
- (error = error.slice(29));
1387
- prevPrepareStackTrace = error.indexOf("\n");
1388
- -1 !== prevPrepareStackTrace &&
1389
- (error = error.slice(prevPrepareStackTrace + 1));
1390
- prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
1391
- -1 !== prevPrepareStackTrace &&
1392
- (prevPrepareStackTrace = error.lastIndexOf(
1393
- "\n",
1394
- prevPrepareStackTrace
1395
- ));
1396
- if (-1 !== prevPrepareStackTrace)
1397
- error = error.slice(0, prevPrepareStackTrace);
1398
- else return "";
1399
- return error;
1385
+ function getInstanceFromNode(node) {
1386
+ if (
1387
+ (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
1388
+ ) {
1389
+ var tag = node.tag;
1390
+ if (
1391
+ 5 === tag ||
1392
+ 6 === tag ||
1393
+ 13 === tag ||
1394
+ 26 === tag ||
1395
+ 27 === tag ||
1396
+ 3 === tag
1397
+ )
1398
+ return node;
1399
+ }
1400
+ return null;
1401
+ }
1402
+ function getNodeFromInstance(inst) {
1403
+ var tag = inst.tag;
1404
+ if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1405
+ return inst.stateNode;
1406
+ throw Error("getNodeFromInstance: Invalid argument.");
1407
+ }
1408
+ function getResourcesFromRoot(root) {
1409
+ var resources = root[internalRootNodeResourcesKey];
1410
+ resources ||
1411
+ (resources = root[internalRootNodeResourcesKey] =
1412
+ { hoistableStyles: new Map(), hoistableScripts: new Map() });
1413
+ return resources;
1414
+ }
1415
+ function markNodeAsHoistable(node) {
1416
+ node[internalHoistableMarker] = !0;
1417
+ }
1418
+ function registerTwoPhaseEvent(registrationName, dependencies) {
1419
+ registerDirectEvent(registrationName, dependencies);
1420
+ registerDirectEvent(registrationName + "Capture", dependencies);
1421
+ }
1422
+ function registerDirectEvent(registrationName, dependencies) {
1423
+ registrationNameDependencies[registrationName] &&
1424
+ console.error(
1425
+ "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1426
+ registrationName
1427
+ );
1428
+ registrationNameDependencies[registrationName] = dependencies;
1429
+ var lowerCasedName = registrationName.toLowerCase();
1430
+ possibleRegistrationNames[lowerCasedName] = registrationName;
1431
+ "onDoubleClick" === registrationName &&
1432
+ (possibleRegistrationNames.ondblclick = registrationName);
1433
+ for (
1434
+ registrationName = 0;
1435
+ registrationName < dependencies.length;
1436
+ registrationName++
1437
+ )
1438
+ allNativeEvents.add(dependencies[registrationName]);
1439
+ }
1440
+ function checkControlledValueProps(tagName, props) {
1441
+ hasReadOnlyValue[props.type] ||
1442
+ props.onChange ||
1443
+ props.onInput ||
1444
+ props.readOnly ||
1445
+ props.disabled ||
1446
+ null == props.value ||
1447
+ ("select" === tagName
1448
+ ? console.error(
1449
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
1450
+ )
1451
+ : console.error(
1452
+ "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
1453
+ ));
1454
+ props.onChange ||
1455
+ props.readOnly ||
1456
+ props.disabled ||
1457
+ null == props.checked ||
1458
+ console.error(
1459
+ "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
1460
+ );
1400
1461
  }
1401
- function describeFiber(fiber) {
1402
- switch (fiber.tag) {
1403
- case 26:
1404
- case 27:
1405
- case 5:
1406
- return describeBuiltInComponentFrame(fiber.type);
1407
- case 16:
1408
- return describeBuiltInComponentFrame("Lazy");
1409
- case 13:
1410
- return describeBuiltInComponentFrame("Suspense");
1411
- case 19:
1412
- return describeBuiltInComponentFrame("SuspenseList");
1413
- case 0:
1414
- case 15:
1415
- return describeNativeComponentFrame(fiber.type, !1);
1416
- case 11:
1417
- return describeNativeComponentFrame(fiber.type.render, !1);
1418
- case 1:
1419
- return describeNativeComponentFrame(fiber.type, !0);
1420
- case 31:
1421
- return describeBuiltInComponentFrame("Activity");
1422
- default:
1423
- return "";
1424
- }
1462
+ function isAttributeNameSafe(attributeName) {
1463
+ if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1464
+ return !0;
1465
+ if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1466
+ return !1;
1467
+ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1468
+ return (validatedAttributeNameCache[attributeName] = !0);
1469
+ illegalAttributeNameCache[attributeName] = !0;
1470
+ console.error("Invalid attribute name: `%s`", attributeName);
1471
+ return !1;
1425
1472
  }
1426
- function getStackByFiberInDevAndProd(workInProgress) {
1427
- try {
1428
- var info = "";
1429
- do {
1430
- info += describeFiber(workInProgress);
1431
- var debugInfo = workInProgress._debugInfo;
1432
- if (debugInfo)
1433
- for (var i = debugInfo.length - 1; 0 <= i; i--) {
1434
- var entry = debugInfo[i];
1435
- if ("string" === typeof entry.name) {
1436
- var JSCompiler_temp_const = info,
1437
- env = entry.env;
1438
- var JSCompiler_inline_result = describeBuiltInComponentFrame(
1439
- entry.name + (env ? " [" + env + "]" : "")
1440
- );
1441
- info = JSCompiler_temp_const + JSCompiler_inline_result;
1442
- }
1443
- }
1444
- workInProgress = workInProgress.return;
1445
- } while (workInProgress);
1446
- return info;
1447
- } catch (x) {
1448
- return "\nError generating stack: " + x.message + "\n" + x.stack;
1473
+ function getValueForAttributeOnCustomComponent(node, name, expected) {
1474
+ if (isAttributeNameSafe(name)) {
1475
+ if (!node.hasAttribute(name)) {
1476
+ switch (typeof expected) {
1477
+ case "symbol":
1478
+ case "object":
1479
+ return expected;
1480
+ case "function":
1481
+ return expected;
1482
+ case "boolean":
1483
+ if (!1 === expected) return expected;
1484
+ }
1485
+ return void 0 === expected ? void 0 : null;
1486
+ }
1487
+ node = node.getAttribute(name);
1488
+ if ("" === node && !0 === expected) return !0;
1489
+ checkAttributeStringCoercion(expected, name);
1490
+ return node === "" + expected ? expected : node;
1449
1491
  }
1450
1492
  }
1451
- function describeFunctionComponentFrameWithoutLineNumber(fn) {
1452
- return (fn = fn ? fn.displayName || fn.name : "")
1453
- ? describeBuiltInComponentFrame(fn)
1454
- : "";
1455
- }
1456
- function getCurrentFiberOwnerNameInDevOrNull() {
1457
- if (null === current) return null;
1458
- var owner = current._debugOwner;
1459
- return null != owner ? getComponentNameFromOwner(owner) : null;
1493
+ function setValueForAttribute(node, name, value) {
1494
+ if (isAttributeNameSafe(name))
1495
+ if (null === value) node.removeAttribute(name);
1496
+ else {
1497
+ switch (typeof value) {
1498
+ case "undefined":
1499
+ case "function":
1500
+ case "symbol":
1501
+ node.removeAttribute(name);
1502
+ return;
1503
+ case "boolean":
1504
+ var prefix = name.toLowerCase().slice(0, 5);
1505
+ if ("data-" !== prefix && "aria-" !== prefix) {
1506
+ node.removeAttribute(name);
1507
+ return;
1508
+ }
1509
+ }
1510
+ checkAttributeStringCoercion(value, name);
1511
+ node.setAttribute(name, "" + value);
1512
+ }
1460
1513
  }
1461
- function getCurrentFiberStackInDev() {
1462
- if (null === current) return "";
1463
- var workInProgress = current;
1464
- try {
1465
- var info = "";
1466
- 6 === workInProgress.tag && (workInProgress = workInProgress.return);
1467
- switch (workInProgress.tag) {
1468
- case 26:
1469
- case 27:
1470
- case 5:
1471
- info += describeBuiltInComponentFrame(workInProgress.type);
1472
- break;
1473
- case 13:
1474
- info += describeBuiltInComponentFrame("Suspense");
1475
- break;
1476
- case 19:
1477
- info += describeBuiltInComponentFrame("SuspenseList");
1478
- break;
1479
- case 31:
1480
- info += describeBuiltInComponentFrame("Activity");
1481
- break;
1482
- case 30:
1483
- case 0:
1484
- case 15:
1485
- case 1:
1486
- workInProgress._debugOwner ||
1487
- "" !== info ||
1488
- (info += describeFunctionComponentFrameWithoutLineNumber(
1489
- workInProgress.type
1490
- ));
1491
- break;
1492
- case 11:
1493
- workInProgress._debugOwner ||
1494
- "" !== info ||
1495
- (info += describeFunctionComponentFrameWithoutLineNumber(
1496
- workInProgress.type.render
1497
- ));
1514
+ function setValueForKnownAttribute(node, name, value) {
1515
+ if (null === value) node.removeAttribute(name);
1516
+ else {
1517
+ switch (typeof value) {
1518
+ case "undefined":
1519
+ case "function":
1520
+ case "symbol":
1521
+ case "boolean":
1522
+ node.removeAttribute(name);
1523
+ return;
1498
1524
  }
1499
- for (; workInProgress; )
1500
- if ("number" === typeof workInProgress.tag) {
1501
- var fiber = workInProgress;
1502
- workInProgress = fiber._debugOwner;
1503
- var debugStack = fiber._debugStack;
1504
- workInProgress &&
1505
- debugStack &&
1506
- ("string" !== typeof debugStack &&
1507
- (fiber._debugStack = debugStack = formatOwnerStack(debugStack)),
1508
- "" !== debugStack && (info += "\n" + debugStack));
1509
- } else if (null != workInProgress.debugStack) {
1510
- var ownerStack = workInProgress.debugStack;
1511
- (workInProgress = workInProgress.owner) &&
1512
- ownerStack &&
1513
- (info += "\n" + formatOwnerStack(ownerStack));
1514
- } else break;
1515
- var JSCompiler_inline_result = info;
1516
- } catch (x) {
1517
- JSCompiler_inline_result =
1518
- "\nError generating stack: " + x.message + "\n" + x.stack;
1525
+ checkAttributeStringCoercion(value, name);
1526
+ node.setAttribute(name, "" + value);
1519
1527
  }
1520
- return JSCompiler_inline_result;
1521
1528
  }
1522
- function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1523
- var previousFiber = current;
1524
- setCurrentFiber(fiber);
1525
- try {
1526
- return null !== fiber && fiber._debugTask
1527
- ? fiber._debugTask.run(
1528
- callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1529
- )
1530
- : callback(arg0, arg1, arg2, arg3, arg4);
1531
- } finally {
1532
- setCurrentFiber(previousFiber);
1529
+ function setValueForNamespacedAttribute(node, namespace, name, value) {
1530
+ if (null === value) node.removeAttribute(name);
1531
+ else {
1532
+ switch (typeof value) {
1533
+ case "undefined":
1534
+ case "function":
1535
+ case "symbol":
1536
+ case "boolean":
1537
+ node.removeAttribute(name);
1538
+ return;
1539
+ }
1540
+ checkAttributeStringCoercion(value, name);
1541
+ node.setAttributeNS(namespace, name, "" + value);
1533
1542
  }
1534
- throw Error(
1535
- "runWithFiberInDEV should never be called in production. This is a bug in React."
1536
- );
1537
- }
1538
- function setCurrentFiber(fiber) {
1539
- ReactSharedInternals.getCurrentStack =
1540
- null === fiber ? null : getCurrentFiberStackInDev;
1541
- isRendering = !1;
1542
- current = fiber;
1543
1543
  }
1544
1544
  function getToStringValue(value) {
1545
1545
  switch (typeof value) {
@@ -7013,6 +7013,7 @@
7013
7013
  {
7014
7014
  lane: 0,
7015
7015
  revertLane: 0,
7016
+ gesture: null,
7016
7017
  action: update.action,
7017
7018
  hasEagerState: update.hasEagerState,
7018
7019
  eagerState: update.eagerState,
@@ -7029,6 +7030,7 @@
7029
7030
  (updateLane = {
7030
7031
  lane: 0,
7031
7032
  revertLane: update.revertLane,
7033
+ gesture: null,
7032
7034
  action: update.action,
7033
7035
  hasEagerState: update.hasEagerState,
7034
7036
  eagerState: update.eagerState,
@@ -7050,6 +7052,7 @@
7050
7052
  (revertLane = {
7051
7053
  lane: updateLane,
7052
7054
  revertLane: update.revertLane,
7055
+ gesture: update.gesture,
7053
7056
  action: update.action,
7054
7057
  hasEagerState: update.hasEagerState,
7055
7058
  eagerState: update.eagerState,
@@ -7371,8 +7374,8 @@
7371
7374
  if (node.isTransition) {
7372
7375
  var prevTransition = ReactSharedInternals.T,
7373
7376
  currentTransition = {};
7377
+ currentTransition._updatedFibers = new Set();
7374
7378
  ReactSharedInternals.T = currentTransition;
7375
- ReactSharedInternals.T._updatedFibers = new Set();
7376
7379
  try {
7377
7380
  var returnValue = action(prevState, payload),
7378
7381
  onStartTransitionFinish = ReactSharedInternals.S;
@@ -7382,7 +7385,15 @@
7382
7385
  } catch (error) {
7383
7386
  onActionError(actionQueue, node, error);
7384
7387
  } finally {
7385
- (ReactSharedInternals.T = prevTransition),
7388
+ null !== prevTransition &&
7389
+ null !== currentTransition.types &&
7390
+ (null !== prevTransition.types &&
7391
+ prevTransition.types !== currentTransition.types &&
7392
+ console.error(
7393
+ "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."
7394
+ ),
7395
+ (prevTransition.types = currentTransition.types)),
7396
+ (ReactSharedInternals.T = prevTransition),
7386
7397
  null === prevTransition &&
7387
7398
  currentTransition._updatedFibers &&
7388
7399
  ((actionQueue = currentTransition._updatedFibers.size),
@@ -7404,7 +7415,9 @@
7404
7415
  null !== returnValue &&
7405
7416
  "object" === typeof returnValue &&
7406
7417
  "function" === typeof returnValue.then
7407
- ? (returnValue.then(
7418
+ ? (ReactSharedInternals.asyncTransitions++,
7419
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
7420
+ returnValue.then(
7408
7421
  function (nextState) {
7409
7422
  onActionSuccess(actionQueue, node, nextState);
7410
7423
  },
@@ -7803,6 +7816,9 @@
7803
7816
  workInProgressRootSkippedLanes |= hook;
7804
7817
  return prevValue;
7805
7818
  }
7819
+ function releaseAsyncTransition() {
7820
+ ReactSharedInternals.asyncTransitions--;
7821
+ }
7806
7822
  function startTransition(
7807
7823
  fiber,
7808
7824
  queue,
@@ -7817,9 +7833,9 @@
7817
7833
  : ContinuousEventPriority;
7818
7834
  var prevTransition = ReactSharedInternals.T,
7819
7835
  currentTransition = {};
7836
+ currentTransition._updatedFibers = new Set();
7820
7837
  ReactSharedInternals.T = currentTransition;
7821
7838
  dispatchOptimisticSetState(fiber, !1, queue, pendingState);
7822
- currentTransition._updatedFibers = new Set();
7823
7839
  try {
7824
7840
  var returnValue = callback(),
7825
7841
  onStartTransitionFinish = ReactSharedInternals.S;
@@ -7830,6 +7846,8 @@
7830
7846
  "object" === typeof returnValue &&
7831
7847
  "function" === typeof returnValue.then
7832
7848
  ) {
7849
+ ReactSharedInternals.asyncTransitions++;
7850
+ returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
7833
7851
  var thenableForFinishedState = chainThenableValue(
7834
7852
  returnValue,
7835
7853
  finishedState
@@ -7856,6 +7874,14 @@
7856
7874
  );
7857
7875
  } finally {
7858
7876
  (ReactDOMSharedInternals.p = previousPriority),
7877
+ null !== prevTransition &&
7878
+ null !== currentTransition.types &&
7879
+ (null !== prevTransition.types &&
7880
+ prevTransition.types !== currentTransition.types &&
7881
+ console.error(
7882
+ "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."
7883
+ ),
7884
+ (prevTransition.types = currentTransition.types)),
7859
7885
  (ReactSharedInternals.T = prevTransition),
7860
7886
  null === prevTransition &&
7861
7887
  currentTransition._updatedFibers &&
@@ -8029,6 +8055,7 @@
8029
8055
  var update = {
8030
8056
  lane: args,
8031
8057
  revertLane: 0,
8058
+ gesture: null,
8032
8059
  action: action,
8033
8060
  hasEagerState: !1,
8034
8061
  eagerState: null,
@@ -8056,6 +8083,7 @@
8056
8083
  var update = {
8057
8084
  lane: lane,
8058
8085
  revertLane: 0,
8086
+ gesture: null,
8059
8087
  action: action,
8060
8088
  hasEagerState: !1,
8061
8089
  eagerState: null,
@@ -8112,6 +8140,7 @@
8112
8140
  action = {
8113
8141
  lane: 2,
8114
8142
  revertLane: requestTransitionLane(),
8143
+ gesture: null,
8115
8144
  action: action,
8116
8145
  hasEagerState: !1,
8117
8146
  eagerState: null,
@@ -12343,13 +12372,15 @@
12343
12372
  if (5 === tag || 6 === tag)
12344
12373
  (node = node.stateNode),
12345
12374
  before
12346
- ? (9 === parent.nodeType
12375
+ ? (warnForReactChildrenConflict(parent),
12376
+ (9 === parent.nodeType
12347
12377
  ? parent.body
12348
12378
  : "HTML" === parent.nodeName
12349
12379
  ? parent.ownerDocument.body
12350
12380
  : parent
12351
- ).insertBefore(node, before)
12352
- : ((before =
12381
+ ).insertBefore(node, before))
12382
+ : (warnForReactChildrenConflict(parent),
12383
+ (before =
12353
12384
  9 === parent.nodeType
12354
12385
  ? parent.body
12355
12386
  : "HTML" === parent.nodeName
@@ -19360,6 +19391,30 @@
19360
19391
  function commitTextUpdate(textInstance, oldText, newText) {
19361
19392
  textInstance.nodeValue = newText;
19362
19393
  }
19394
+ function warnForReactChildrenConflict(container) {
19395
+ if (!container.__reactWarnedAboutChildrenConflict) {
19396
+ var props = container[internalPropsKey] || null;
19397
+ if (null !== props) {
19398
+ var fiber = getInstanceFromNode(container);
19399
+ null !== fiber &&
19400
+ ("string" === typeof props.children ||
19401
+ "number" === typeof props.children
19402
+ ? ((container.__reactWarnedAboutChildrenConflict = !0),
19403
+ runWithFiberInDEV(fiber, function () {
19404
+ console.error(
19405
+ 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
19406
+ );
19407
+ }))
19408
+ : null != props.dangerouslySetInnerHTML &&
19409
+ ((container.__reactWarnedAboutChildrenConflict = !0),
19410
+ runWithFiberInDEV(fiber, function () {
19411
+ console.error(
19412
+ 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
19413
+ );
19414
+ })));
19415
+ }
19416
+ }
19417
+ }
19363
19418
  function isSingletonScope(type) {
19364
19419
  return "head" === type;
19365
19420
  }
@@ -21298,6 +21353,23 @@
21298
21353
  contextFiberStackCursor = createCursor(null),
21299
21354
  rootInstanceStackCursor = createCursor(null),
21300
21355
  hostTransitionProviderCursor = createCursor(null),
21356
+ disabledDepth = 0,
21357
+ prevLog,
21358
+ prevInfo,
21359
+ prevWarn,
21360
+ prevError,
21361
+ prevGroup,
21362
+ prevGroupCollapsed,
21363
+ prevGroupEnd;
21364
+ disabledLog.__reactDisabledLog = !0;
21365
+ var prefix,
21366
+ suffix,
21367
+ reentry = !1;
21368
+ var componentFrameCache = new (
21369
+ "function" === typeof WeakMap ? WeakMap : Map
21370
+ )();
21371
+ var current = null,
21372
+ isRendering = !1,
21301
21373
  hasOwnProperty = Object.prototype.hasOwnProperty,
21302
21374
  scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
21303
21375
  cancelCallback$1 = Scheduler.unstable_cancelCallback,
@@ -21352,23 +21424,6 @@
21352
21424
  ),
21353
21425
  illegalAttributeNameCache = {},
21354
21426
  validatedAttributeNameCache = {},
21355
- disabledDepth = 0,
21356
- prevLog,
21357
- prevInfo,
21358
- prevWarn,
21359
- prevError,
21360
- prevGroup,
21361
- prevGroupCollapsed,
21362
- prevGroupEnd;
21363
- disabledLog.__reactDisabledLog = !0;
21364
- var prefix,
21365
- suffix,
21366
- reentry = !1;
21367
- var componentFrameCache = new (
21368
- "function" === typeof WeakMap ? WeakMap : Map
21369
- )();
21370
- var current = null,
21371
- isRendering = !1,
21372
21427
  escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g,
21373
21428
  didWarnValueDefaultValue$1 = !1,
21374
21429
  didWarnCheckedDefaultChecked = !1,
@@ -24842,11 +24897,11 @@
24842
24897
  };
24843
24898
  (function () {
24844
24899
  var isomorphicReactPackageVersion = React.version;
24845
- if ("19.2.0-canary-63779030-20250328" !== isomorphicReactPackageVersion)
24900
+ if ("19.2.0-canary-e5dd82a7-20250401" !== isomorphicReactPackageVersion)
24846
24901
  throw Error(
24847
24902
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
24848
24903
  (isomorphicReactPackageVersion +
24849
- "\n - react-dom: 19.2.0-canary-63779030-20250328\nLearn more: https://react.dev/warnings/version-mismatch")
24904
+ "\n - react-dom: 19.2.0-canary-e5dd82a7-20250401\nLearn more: https://react.dev/warnings/version-mismatch")
24850
24905
  );
24851
24906
  })();
24852
24907
  ("function" === typeof Map &&
@@ -24883,10 +24938,10 @@
24883
24938
  !(function () {
24884
24939
  var internals = {
24885
24940
  bundleType: 1,
24886
- version: "19.2.0-canary-63779030-20250328",
24941
+ version: "19.2.0-canary-e5dd82a7-20250401",
24887
24942
  rendererPackageName: "react-dom",
24888
24943
  currentDispatcherRef: ReactSharedInternals,
24889
- reconcilerVersion: "19.2.0-canary-63779030-20250328"
24944
+ reconcilerVersion: "19.2.0-canary-e5dd82a7-20250401"
24890
24945
  };
24891
24946
  internals.overrideHookState = overrideHookState;
24892
24947
  internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -25360,7 +25415,7 @@
25360
25415
  exports.useFormStatus = function () {
25361
25416
  return resolveDispatcher().useHostTransitionStatus();
25362
25417
  };
25363
- exports.version = "19.2.0-canary-63779030-20250328";
25418
+ exports.version = "19.2.0-canary-e5dd82a7-20250401";
25364
25419
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
25365
25420
  "function" ===
25366
25421
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&