offcode 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -2
- package/data/index.json +1 -0
- package/data/problems/01-matrix.json +1 -0
- package/data/problems/1-bit-and-2-bit-characters.json +1 -0
- package/data/problems/132-pattern.json +1 -0
- package/data/problems/2-keys-keyboard.json +1 -0
- package/data/problems/24-game.json +1 -0
- package/data/problems/3sum-closest.json +1 -0
- package/data/problems/3sum-smaller.json +1 -0
- package/data/problems/3sum-with-multiplicity.json +1 -0
- package/data/problems/3sum.json +1 -0
- package/data/problems/4-keys-keyboard.json +1 -0
- package/data/problems/4sum-ii.json +1 -0
- package/data/problems/4sum.json +1 -0
- package/data/problems/accounts-merge.json +1 -0
- package/data/problems/add-binary.json +1 -0
- package/data/problems/add-bold-tag-in-string.json +1 -0
- package/data/problems/add-digits.json +1 -0
- package/data/problems/add-one-row-to-tree.json +1 -0
- package/data/problems/add-strings.json +1 -0
- package/data/problems/add-to-array-form-of-integer.json +1 -0
- package/data/problems/add-two-numbers-ii.json +1 -0
- package/data/problems/add-two-numbers.json +1 -0
- package/data/problems/additive-number.json +1 -0
- package/data/problems/advantage-shuffle.json +1 -0
- package/data/problems/alien-dictionary.json +1 -0
- package/data/problems/all-nodes-distance-k-in-binary-tree.json +1 -0
- package/data/problems/all-oone-data-structure.json +1 -0
- package/data/problems/all-paths-from-source-to-target.json +1 -0
- package/data/problems/all-possible-full-binary-trees.json +1 -0
- package/data/problems/ambiguous-coordinates.json +1 -0
- package/data/problems/android-unlock-patterns.json +1 -0
- package/data/problems/arithmetic-slices-ii-subsequence.json +1 -0
- package/data/problems/arithmetic-slices.json +1 -0
- package/data/problems/arranging-coins.json +1 -0
- package/data/problems/array-nesting.json +1 -0
- package/data/problems/array-of-doubled-pairs.json +1 -0
- package/data/problems/array-partition.json +1 -0
- package/data/problems/assign-cookies.json +1 -0
- package/data/problems/asteroid-collision.json +1 -0
- package/data/problems/available-captures-for-rook.json +1 -0
- package/data/problems/average-of-levels-in-binary-tree.json +1 -0
- package/data/problems/backspace-string-compare.json +1 -0
- package/data/problems/bag-of-tokens.json +1 -0
- package/data/problems/balanced-binary-tree.json +1 -0
- package/data/problems/base-7.json +1 -0
- package/data/problems/baseball-game.json +1 -0
- package/data/problems/basic-absolute-value.json +1 -0
- package/data/problems/basic-array-max.json +1 -0
- package/data/problems/basic-array-min.json +1 -0
- package/data/problems/basic-array-sum-rec.json +1 -0
- package/data/problems/basic-array-sum.json +1 -0
- package/data/problems/basic-average-floor.json +1 -0
- package/data/problems/basic-bubble-sort.json +1 -0
- package/data/problems/basic-calculator-ii.json +1 -0
- package/data/problems/basic-calculator-iii.json +1 -0
- package/data/problems/basic-calculator-iv.json +1 -0
- package/data/problems/basic-calculator.json +1 -0
- package/data/problems/basic-collatz-steps.json +1 -0
- package/data/problems/basic-contains-value.json +1 -0
- package/data/problems/basic-count-above.json +1 -0
- package/data/problems/basic-count-char.json +1 -0
- package/data/problems/basic-count-digits.json +1 -0
- package/data/problems/basic-count-evens.json +1 -0
- package/data/problems/basic-count-pairs.json +1 -0
- package/data/problems/basic-count-vowels.json +1 -0
- package/data/problems/basic-count-words.json +1 -0
- package/data/problems/basic-countdown.json +1 -0
- package/data/problems/basic-double-array.json +1 -0
- package/data/problems/basic-factorial-rec.json +1 -0
- package/data/problems/basic-factorial.json +1 -0
- package/data/problems/basic-fibonacci.json +1 -0
- package/data/problems/basic-find-index.json +1 -0
- package/data/problems/basic-gcd.json +1 -0
- package/data/problems/basic-grade-letter.json +1 -0
- package/data/problems/basic-has-duplicate.json +1 -0
- package/data/problems/basic-is-even.json +1 -0
- package/data/problems/basic-is-leap-year.json +1 -0
- package/data/problems/basic-is-sorted.json +1 -0
- package/data/problems/basic-max-frequency.json +1 -0
- package/data/problems/basic-max-of-three.json +1 -0
- package/data/problems/basic-max-of-two.json +1 -0
- package/data/problems/basic-palindrome-text.json +1 -0
- package/data/problems/basic-power-rec.json +1 -0
- package/data/problems/basic-power.json +1 -0
- package/data/problems/basic-repeat-string.json +1 -0
- package/data/problems/basic-reverse-array.json +1 -0
- package/data/problems/basic-reverse-number.json +1 -0
- package/data/problems/basic-reverse-text-rec.json +1 -0
- package/data/problems/basic-reverse-text.json +1 -0
- package/data/problems/basic-second-largest.json +1 -0
- package/data/problems/basic-sort-two.json +1 -0
- package/data/problems/basic-staircase.json +1 -0
- package/data/problems/basic-string-length.json +1 -0
- package/data/problems/basic-sum-1-to-n.json +1 -0
- package/data/problems/basic-sum-digits-rec.json +1 -0
- package/data/problems/basic-sum-multiples.json +1 -0
- package/data/problems/basic-sum-of-digits.json +1 -0
- package/data/problems/basic-temperature-advice.json +1 -0
- package/data/problems/basic-to-upper.json +1 -0
- package/data/problems/basic-triangle-sum.json +1 -0
- package/data/problems/battleships-in-a-board.json +1 -0
- package/data/problems/beautiful-arrangement-ii.json +1 -0
- package/data/problems/beautiful-arrangement.json +1 -0
- package/data/problems/beautiful-array.json +1 -0
- package/data/problems/best-meeting-point.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock-ii.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock-iii.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock-iv.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock-with-cooldown.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock-with-transaction-fee.json +1 -0
- package/data/problems/best-time-to-buy-and-sell-stock.json +1 -0
- package/data/problems/binary-gap.json +1 -0
- package/data/problems/binary-number-with-alternating-bits.json +1 -0
- package/data/problems/binary-search-tree-iterator.json +1 -0
- package/data/problems/binary-search.json +1 -0
- package/data/problems/binary-subarrays-with-sum.json +1 -0
- package/data/problems/binary-tree-cameras.json +1 -0
- package/data/problems/binary-tree-inorder-traversal.json +1 -0
- package/data/problems/binary-tree-level-order-traversal-ii.json +1 -0
- package/data/problems/binary-tree-level-order-traversal.json +1 -0
- package/data/problems/binary-tree-longest-consecutive-sequence-ii.json +1 -0
- package/data/problems/binary-tree-longest-consecutive-sequence.json +1 -0
- package/data/problems/binary-tree-maximum-path-sum.json +1 -0
- package/data/problems/binary-tree-paths.json +1 -0
- package/data/problems/binary-tree-postorder-traversal.json +1 -0
- package/data/problems/binary-tree-preorder-traversal.json +1 -0
- package/data/problems/binary-tree-pruning.json +1 -0
- package/data/problems/binary-tree-right-side-view.json +1 -0
- package/data/problems/binary-tree-tilt.json +1 -0
- package/data/problems/binary-tree-upside-down.json +1 -0
- package/data/problems/binary-tree-vertical-order-traversal.json +1 -0
- package/data/problems/binary-tree-zigzag-level-order-traversal.json +1 -0
- package/data/problems/binary-trees-with-factors.json +1 -0
- package/data/problems/binary-watch.json +1 -0
- package/data/problems/bitwise-and-of-numbers-range.json +1 -0
- package/data/problems/bitwise-ors-of-subarrays.json +1 -0
- package/data/problems/boats-to-save-people.json +1 -0
- package/data/problems/bold-words-in-string.json +1 -0
- package/data/problems/bomb-enemy.json +1 -0
- package/data/problems/boundary-of-binary-tree.json +1 -0
- package/data/problems/brick-wall.json +1 -0
- package/data/problems/bricks-falling-when-hit.json +1 -0
- package/data/problems/broken-calculator.json +1 -0
- package/data/problems/buddy-strings.json +1 -0
- package/data/problems/build-a-matrix-with-conditions.json +1 -0
- package/data/problems/bulb-switcher-ii.json +1 -0
- package/data/problems/bulb-switcher.json +1 -0
- package/data/problems/bulls-and-cows.json +1 -0
- package/data/problems/burst-balloons.json +1 -0
- package/data/problems/bus-routes.json +1 -0
- package/data/problems/can-i-win.json +1 -0
- package/data/problems/can-place-flowers.json +1 -0
- package/data/problems/candy-crush.json +1 -0
- package/data/problems/candy.json +1 -0
- package/data/problems/capacity-to-ship-packages-within-d-days.json +1 -0
- package/data/problems/car-fleet.json +1 -0
- package/data/problems/car-pooling.json +1 -0
- package/data/problems/card-flipping-game.json +1 -0
- package/data/problems/cat-and-mouse.json +1 -0
- package/data/problems/chalkboard-xor-game.json +1 -0
- package/data/problems/champagne-tower.json +1 -0
- package/data/problems/cheapest-flights-within-k-stops.json +1 -0
- package/data/problems/check-completeness-of-a-binary-tree.json +1 -0
- package/data/problems/cherry-pickup.json +1 -0
- package/data/problems/circular-array-loop.json +1 -0
- package/data/problems/climbing-stairs.json +1 -0
- package/data/problems/clone-graph.json +1 -0
- package/data/problems/closest-binary-search-tree-value-ii.json +1 -0
- package/data/problems/closest-binary-search-tree-value.json +1 -0
- package/data/problems/closest-leaf-in-a-binary-tree.json +1 -0
- package/data/problems/coin-change-ii.json +1 -0
- package/data/problems/coin-change.json +1 -0
- package/data/problems/coin-path.json +1 -0
- package/data/problems/combination-sum-ii.json +1 -0
- package/data/problems/combination-sum-iii.json +1 -0
- package/data/problems/combination-sum-iv.json +1 -0
- package/data/problems/combination-sum.json +1 -0
- package/data/problems/combinations.json +1 -0
- package/data/problems/compare-version-numbers.json +1 -0
- package/data/problems/complete-binary-tree-inserter.json +1 -0
- package/data/problems/complex-number-multiplication.json +1 -0
- package/data/problems/concatenated-words.json +1 -0
- package/data/problems/concatenation-of-array.json +1 -0
- package/data/problems/consecutive-numbers-sum.json +1 -0
- package/data/problems/construct-binary-tree-from-inorder-and-postorder-traversal.json +1 -0
- package/data/problems/construct-binary-tree-from-preorder-and-inorder-traversal.json +1 -0
- package/data/problems/construct-binary-tree-from-preorder-and-postorder-traversal.json +1 -0
- package/data/problems/construct-binary-tree-from-string.json +1 -0
- package/data/problems/construct-quad-tree.json +1 -0
- package/data/problems/construct-string-from-binary-tree.json +1 -0
- package/data/problems/construct-the-rectangle.json +1 -0
- package/data/problems/contain-virus.json +1 -0
- package/data/problems/container-with-most-water.json +1 -0
- package/data/problems/contains-duplicate-ii.json +1 -0
- package/data/problems/contains-duplicate-iii.json +1 -0
- package/data/problems/contains-duplicate.json +1 -0
- package/data/problems/contiguous-array.json +1 -0
- package/data/problems/continuous-subarray-sum.json +1 -0
- package/data/problems/convert-a-number-to-hexadecimal.json +1 -0
- package/data/problems/convert-binary-search-tree-to-sorted-doubly-linked-list.json +1 -0
- package/data/problems/convert-bst-to-greater-tree.json +1 -0
- package/data/problems/convert-sorted-array-to-binary-search-tree.json +1 -0
- package/data/problems/convert-sorted-list-to-binary-search-tree.json +1 -0
- package/data/problems/convex-polygon.json +1 -0
- package/data/problems/copy-list-with-random-pointer.json +1 -0
- package/data/problems/count-and-say.json +1 -0
- package/data/problems/count-binary-substrings.json +1 -0
- package/data/problems/count-complete-tree-nodes.json +1 -0
- package/data/problems/count-different-palindromic-subsequences.json +1 -0
- package/data/problems/count-good-nodes-in-binary-tree.json +1 -0
- package/data/problems/count-numbers-with-unique-digits.json +1 -0
- package/data/problems/count-of-range-sum.json +1 -0
- package/data/problems/count-of-smaller-numbers-after-self.json +1 -0
- package/data/problems/count-primes.json +1 -0
- package/data/problems/count-the-repetitions.json +1 -0
- package/data/problems/count-unique-characters-of-all-substrings-of-a-given-string.json +1 -0
- package/data/problems/count-univalue-subtrees.json +1 -0
- package/data/problems/counting-bits.json +1 -0
- package/data/problems/couples-holding-hands.json +1 -0
- package/data/problems/course-schedule-ii.json +1 -0
- package/data/problems/course-schedule-iii.json +1 -0
- package/data/problems/course-schedule-iv.json +1 -0
- package/data/problems/course-schedule.json +1 -0
- package/data/problems/cousins-in-binary-tree.json +1 -0
- package/data/problems/cracking-the-safe.json +1 -0
- package/data/problems/create-maximum-number.json +1 -0
- package/data/problems/custom-sort-string.json +1 -0
- package/data/problems/cut-off-trees-for-golf-event.json +1 -0
- package/data/problems/daily-temperatures.json +1 -0
- package/data/problems/data-stream-as-disjoint-intervals.json +1 -0
- package/data/problems/decode-string.json +1 -0
- package/data/problems/decode-ways-ii.json +1 -0
- package/data/problems/decode-ways.json +1 -0
- package/data/problems/decoded-string-at-index.json +1 -0
- package/data/problems/degree-of-an-array.json +1 -0
- package/data/problems/delete-and-earn.json +1 -0
- package/data/problems/delete-columns-to-make-sorted-ii.json +1 -0
- package/data/problems/delete-columns-to-make-sorted-iii.json +1 -0
- package/data/problems/delete-columns-to-make-sorted.json +1 -0
- package/data/problems/delete-leaves-with-a-given-value.json +1 -0
- package/data/problems/delete-node-in-a-bst.json +1 -0
- package/data/problems/delete-node-in-a-linked-list.json +1 -0
- package/data/problems/delete-operation-for-two-strings.json +1 -0
- package/data/problems/design-add-and-search-words-data-structure.json +1 -0
- package/data/problems/design-circular-deque.json +1 -0
- package/data/problems/design-circular-queue.json +1 -0
- package/data/problems/design-compressed-string-iterator.json +1 -0
- package/data/problems/design-excel-sum-formula.json +1 -0
- package/data/problems/design-hashmap.json +1 -0
- package/data/problems/design-hashset.json +1 -0
- package/data/problems/design-hit-counter.json +1 -0
- package/data/problems/design-in-memory-file-system.json +1 -0
- package/data/problems/design-linked-list.json +1 -0
- package/data/problems/design-log-storage-system.json +1 -0
- package/data/problems/design-phone-directory.json +1 -0
- package/data/problems/design-search-autocomplete-system.json +1 -0
- package/data/problems/design-snake-game.json +1 -0
- package/data/problems/design-tic-tac-toe.json +1 -0
- package/data/problems/design-twitter.json +1 -0
- package/data/problems/detect-capital.json +1 -0
- package/data/problems/detect-squares.json +1 -0
- package/data/problems/di-string-match.json +1 -0
- package/data/problems/diagonal-traverse.json +1 -0
- package/data/problems/diameter-of-binary-tree.json +1 -0
- package/data/problems/different-ways-to-add-parentheses.json +1 -0
- package/data/problems/distinct-subsequences-ii.json +1 -0
- package/data/problems/distinct-subsequences.json +1 -0
- package/data/problems/distribute-candies.json +1 -0
- package/data/problems/distribute-coins-in-binary-tree.json +1 -0
- package/data/problems/divide-two-integers.json +1 -0
- package/data/problems/domino-and-tromino-tiling.json +1 -0
- package/data/problems/dota2-senate.json +1 -0
- package/data/problems/dungeon-game.json +1 -0
- package/data/problems/edit-distance.json +1 -0
- package/data/problems/elimination-game.json +1 -0
- package/data/problems/employee-free-time.json +1 -0
- package/data/problems/employee-importance.json +1 -0
- package/data/problems/encode-and-decode-strings.json +1 -0
- package/data/problems/encode-and-decode-tinyurl.json +1 -0
- package/data/problems/encode-n-ary-tree-to-binary-tree.json +1 -0
- package/data/problems/encode-string-with-shortest-length.json +1 -0
- package/data/problems/equal-rational-numbers.json +1 -0
- package/data/problems/equal-tree-partition.json +1 -0
- package/data/problems/erect-the-fence.json +1 -0
- package/data/problems/escape-the-ghosts.json +1 -0
- package/data/problems/evaluate-division.json +1 -0
- package/data/problems/evaluate-reverse-polish-notation.json +1 -0
- package/data/problems/exam-room.json +1 -0
- package/data/problems/excel-sheet-column-number.json +1 -0
- package/data/problems/excel-sheet-column-title.json +1 -0
- package/data/problems/exclusive-time-of-functions.json +1 -0
- package/data/problems/expression-add-operators.json +1 -0
- package/data/problems/expressive-words.json +1 -0
- package/data/problems/extra-characters-in-a-string.json +1 -0
- package/data/problems/factor-combinations.json +1 -0
- package/data/problems/factorial-trailing-zeroes.json +1 -0
- package/data/problems/fair-candy-swap.json +1 -0
- package/data/problems/falling-squares.json +1 -0
- package/data/problems/fibonacci-number.json +1 -0
- package/data/problems/find-all-anagrams-in-a-string.json +1 -0
- package/data/problems/find-all-duplicates-in-an-array.json +1 -0
- package/data/problems/find-all-numbers-disappeared-in-an-array.json +1 -0
- package/data/problems/find-anagram-mappings.json +1 -0
- package/data/problems/find-and-replace-in-string.json +1 -0
- package/data/problems/find-and-replace-pattern.json +1 -0
- package/data/problems/find-bottom-left-tree-value.json +1 -0
- package/data/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree.json +1 -0
- package/data/problems/find-duplicate-file-in-system.json +1 -0
- package/data/problems/find-duplicate-subtrees.json +1 -0
- package/data/problems/find-eventual-safe-states.json +1 -0
- package/data/problems/find-first-and-last-position-of-element-in-sorted-array.json +1 -0
- package/data/problems/find-in-mountain-array.json +1 -0
- package/data/problems/find-k-closest-elements.json +1 -0
- package/data/problems/find-k-pairs-with-smallest-sums.json +1 -0
- package/data/problems/find-k-th-smallest-pair-distance.json +1 -0
- package/data/problems/find-largest-value-in-each-tree-row.json +1 -0
- package/data/problems/find-leaves-of-binary-tree.json +1 -0
- package/data/problems/find-median-from-data-stream.json +1 -0
- package/data/problems/find-minimum-in-rotated-sorted-array-ii.json +1 -0
- package/data/problems/find-minimum-in-rotated-sorted-array.json +1 -0
- package/data/problems/find-mode-in-binary-search-tree.json +1 -0
- package/data/problems/find-peak-element.json +1 -0
- package/data/problems/find-permutation.json +1 -0
- package/data/problems/find-pivot-index.json +1 -0
- package/data/problems/find-right-interval.json +1 -0
- package/data/problems/find-smallest-letter-greater-than-target.json +1 -0
- package/data/problems/find-the-celebrity.json +1 -0
- package/data/problems/find-the-closest-palindrome.json +1 -0
- package/data/problems/find-the-derangement-of-an-array.json +1 -0
- package/data/problems/find-the-difference.json +1 -0
- package/data/problems/find-the-duplicate-number.json +1 -0
- package/data/problems/find-the-index-of-the-first-occurrence-in-a-string.json +1 -0
- package/data/problems/find-the-shortest-superstring.json +1 -0
- package/data/problems/find-the-town-judge.json +1 -0
- package/data/problems/first-bad-version.json +1 -0
- package/data/problems/first-missing-positive.json +1 -0
- package/data/problems/first-unique-character-in-a-string.json +1 -0
- package/data/problems/fizz-buzz.json +1 -0
- package/data/problems/flatten-2d-vector.json +1 -0
- package/data/problems/flatten-a-multilevel-doubly-linked-list.json +1 -0
- package/data/problems/flatten-binary-tree-to-linked-list.json +1 -0
- package/data/problems/flatten-nested-list-iterator.json +1 -0
- package/data/problems/flip-binary-tree-to-match-preorder-traversal.json +1 -0
- package/data/problems/flip-equivalent-binary-trees.json +1 -0
- package/data/problems/flip-game-ii.json +1 -0
- package/data/problems/flip-game.json +1 -0
- package/data/problems/flip-string-to-monotone-increasing.json +1 -0
- package/data/problems/flipping-an-image.json +1 -0
- package/data/problems/flood-fill.json +1 -0
- package/data/problems/fraction-addition-and-subtraction.json +1 -0
- package/data/problems/fraction-to-recurring-decimal.json +1 -0
- package/data/problems/freedom-trail.json +1 -0
- package/data/problems/friends-of-appropriate-ages.json +1 -0
- package/data/problems/frog-jump.json +1 -0
- package/data/problems/fruit-into-baskets.json +1 -0
- package/data/problems/game-of-life.json +1 -0
- package/data/problems/gas-station.json +1 -0
- package/data/problems/generalized-abbreviation.json +1 -0
- package/data/problems/generate-parentheses.json +1 -0
- package/data/problems/generate-random-point-in-a-circle.json +1 -0
- package/data/problems/global-and-local-inversions.json +1 -0
- package/data/problems/goat-latin.json +1 -0
- package/data/problems/graph-valid-tree.json +1 -0
- package/data/problems/gray-code.json +1 -0
- package/data/problems/greatest-common-divisor-of-strings.json +1 -0
- package/data/problems/greatest-common-divisor-traversal.json +1 -0
- package/data/problems/group-anagrams.json +1 -0
- package/data/problems/group-shifted-strings.json +1 -0
- package/data/problems/groups-of-special-equivalent-strings.json +1 -0
- package/data/problems/guess-number-higher-or-lower-ii.json +1 -0
- package/data/problems/guess-number-higher-or-lower.json +1 -0
- package/data/problems/guess-the-word.json +1 -0
- package/data/problems/h-index-ii.json +1 -0
- package/data/problems/h-index.json +1 -0
- package/data/problems/hamming-distance.json +1 -0
- package/data/problems/hand-of-straights.json +1 -0
- package/data/problems/happy-number.json +1 -0
- package/data/problems/heaters.json +1 -0
- package/data/problems/house-robber-ii.json +1 -0
- package/data/problems/house-robber-iii.json +1 -0
- package/data/problems/house-robber.json +1 -0
- package/data/problems/image-overlap.json +1 -0
- package/data/problems/image-smoother.json +1 -0
- package/data/problems/implement-magic-dictionary.json +1 -0
- package/data/problems/implement-queue-using-stacks.json +1 -0
- package/data/problems/implement-rand10-using-rand7.json +1 -0
- package/data/problems/implement-stack-using-queues.json +1 -0
- package/data/problems/implement-trie-prefix-tree.json +1 -0
- package/data/problems/increasing-order-search-tree.json +1 -0
- package/data/problems/increasing-triplet-subsequence.json +1 -0
- package/data/problems/inorder-successor-in-bst-ii.json +1 -0
- package/data/problems/inorder-successor-in-bst.json +1 -0
- package/data/problems/insert-delete-getrandom-o1-duplicates-allowed.json +1 -0
- package/data/problems/insert-delete-getrandom-o1.json +1 -0
- package/data/problems/insert-greatest-common-divisors-in-linked-list.json +1 -0
- package/data/problems/insert-interval.json +1 -0
- package/data/problems/insert-into-a-binary-search-tree.json +1 -0
- package/data/problems/insert-into-a-sorted-circular-linked-list.json +1 -0
- package/data/problems/insertion-sort-list.json +1 -0
- package/data/problems/integer-break.json +1 -0
- package/data/problems/integer-replacement.json +1 -0
- package/data/problems/integer-to-english-words.json +1 -0
- package/data/problems/integer-to-roman.json +1 -0
- package/data/problems/interleaving-string.json +1 -0
- package/data/problems/intersection-of-two-arrays-ii.json +1 -0
- package/data/problems/intersection-of-two-arrays.json +1 -0
- package/data/problems/intersection-of-two-linked-lists.json +1 -0
- package/data/problems/interval-list-intersections.json +1 -0
- package/data/problems/invert-binary-tree.json +1 -0
- package/data/problems/ip-to-cidr.json +1 -0
- package/data/problems/ipo.json +1 -0
- package/data/problems/is-graph-bipartite.json +1 -0
- package/data/problems/is-subsequence.json +1 -0
- package/data/problems/island-perimeter.json +1 -0
- package/data/problems/isomorphic-strings.json +1 -0
- package/data/problems/jewels-and-stones.json +1 -0
- package/data/problems/jump-game-ii.json +1 -0
- package/data/problems/jump-game-vii.json +1 -0
- package/data/problems/jump-game.json +1 -0
- package/data/problems/k-closest-points-to-origin.json +1 -0
- package/data/problems/k-diff-pairs-in-an-array.json +1 -0
- package/data/problems/k-empty-slots.json +1 -0
- package/data/problems/k-inverse-pairs-array.json +1 -0
- package/data/problems/k-similar-strings.json +1 -0
- package/data/problems/k-th-smallest-in-lexicographical-order.json +1 -0
- package/data/problems/k-th-smallest-prime-fraction.json +1 -0
- package/data/problems/k-th-symbol-in-grammar.json +1 -0
- package/data/problems/keyboard-row.json +1 -0
- package/data/problems/keys-and-rooms.json +1 -0
- package/data/problems/kill-process.json +1 -0
- package/data/problems/knight-dialer.json +1 -0
- package/data/problems/knight-probability-in-chessboard.json +1 -0
- package/data/problems/koko-eating-bananas.json +1 -0
- package/data/problems/kth-largest-element-in-a-stream.json +1 -0
- package/data/problems/kth-largest-element-in-an-array.json +1 -0
- package/data/problems/kth-smallest-element-in-a-bst.json +1 -0
- package/data/problems/kth-smallest-element-in-a-sorted-matrix.json +1 -0
- package/data/problems/kth-smallest-number-in-multiplication-table.json +1 -0
- package/data/problems/largest-bst-subtree.json +1 -0
- package/data/problems/largest-component-size-by-common-factor.json +1 -0
- package/data/problems/largest-divisible-subset.json +1 -0
- package/data/problems/largest-number-at-least-twice-of-others.json +1 -0
- package/data/problems/largest-number.json +1 -0
- package/data/problems/largest-palindrome-product.json +1 -0
- package/data/problems/largest-perimeter-triangle.json +1 -0
- package/data/problems/largest-plus-sign.json +1 -0
- package/data/problems/largest-rectangle-in-histogram.json +1 -0
- package/data/problems/largest-sum-of-averages.json +1 -0
- package/data/problems/largest-time-for-given-digits.json +1 -0
- package/data/problems/largest-triangle-area.json +1 -0
- package/data/problems/last-stone-weight-ii.json +1 -0
- package/data/problems/last-stone-weight.json +1 -0
- package/data/problems/leaf-similar-trees.json +1 -0
- package/data/problems/least-operators-to-express-number.json +1 -0
- package/data/problems/lemonade-change.json +1 -0
- package/data/problems/length-of-last-word.json +1 -0
- package/data/problems/length-of-longest-fibonacci-subsequence.json +1 -0
- package/data/problems/letter-case-permutation.json +1 -0
- package/data/problems/letter-combinations-of-a-phone-number.json +1 -0
- package/data/problems/lexicographical-numbers.json +1 -0
- package/data/problems/lfu-cache.json +1 -0
- package/data/problems/license-key-formatting.json +1 -0
- package/data/problems/line-reflection.json +1 -0
- package/data/problems/linked-list-components.json +1 -0
- package/data/problems/linked-list-cycle-ii.json +1 -0
- package/data/problems/linked-list-cycle.json +1 -0
- package/data/problems/linked-list-random-node.json +1 -0
- package/data/problems/logger-rate-limiter.json +1 -0
- package/data/problems/logical-or-of-two-binary-grids-represented-as-quad-trees.json +1 -0
- package/data/problems/lonely-pixel-i.json +1 -0
- package/data/problems/lonely-pixel-ii.json +1 -0
- package/data/problems/long-pressed-name.json +1 -0
- package/data/problems/longest-absolute-file-path.json +1 -0
- package/data/problems/longest-common-prefix.json +1 -0
- package/data/problems/longest-common-subsequence.json +1 -0
- package/data/problems/longest-consecutive-sequence.json +1 -0
- package/data/problems/longest-continuous-increasing-subsequence.json +1 -0
- package/data/problems/longest-happy-string.json +1 -0
- package/data/problems/longest-harmonious-subsequence.json +1 -0
- package/data/problems/longest-increasing-path-in-a-matrix.json +1 -0
- package/data/problems/longest-increasing-subsequence.json +1 -0
- package/data/problems/longest-line-of-consecutive-one-in-matrix.json +1 -0
- package/data/problems/longest-mountain-in-array.json +1 -0
- package/data/problems/longest-palindrome.json +1 -0
- package/data/problems/longest-palindromic-subsequence.json +1 -0
- package/data/problems/longest-palindromic-substring.json +1 -0
- package/data/problems/longest-repeating-character-replacement.json +1 -0
- package/data/problems/longest-substring-with-at-least-k-repeating-characters.json +1 -0
- package/data/problems/longest-substring-with-at-most-k-distinct-characters.json +1 -0
- package/data/problems/longest-substring-with-at-most-two-distinct-characters.json +1 -0
- package/data/problems/longest-substring-without-repeating-characters.json +1 -0
- package/data/problems/longest-turbulent-subarray.json +1 -0
- package/data/problems/longest-uncommon-subsequence-i.json +1 -0
- package/data/problems/longest-uncommon-subsequence-ii.json +1 -0
- package/data/problems/longest-univalue-path.json +1 -0
- package/data/problems/longest-valid-parentheses.json +1 -0
- package/data/problems/longest-word-in-dictionary-through-deleting.json +1 -0
- package/data/problems/longest-word-in-dictionary.json +1 -0
- package/data/problems/loud-and-rich.json +1 -0
- package/data/problems/lowest-common-ancestor-of-a-binary-search-tree.json +1 -0
- package/data/problems/lowest-common-ancestor-of-a-binary-tree.json +1 -0
- package/data/problems/lru-cache.json +1 -0
- package/data/problems/magic-squares-in-grid.json +1 -0
- package/data/problems/magical-string.json +1 -0
- package/data/problems/majority-element-ii.json +1 -0
- package/data/problems/majority-element.json +1 -0
- package/data/problems/making-a-large-island.json +1 -0
- package/data/problems/map-sum-pairs.json +1 -0
- package/data/problems/masking-personal-information.json +1 -0
- package/data/problems/matchsticks-to-square.json +1 -0
- package/data/problems/max-area-of-island.json +1 -0
- package/data/problems/max-chunks-to-make-sorted-ii.json +1 -0
- package/data/problems/max-chunks-to-make-sorted.json +1 -0
- package/data/problems/max-consecutive-ones-ii.json +1 -0
- package/data/problems/max-consecutive-ones.json +1 -0
- package/data/problems/max-increase-to-keep-city-skyline.json +1 -0
- package/data/problems/max-points-on-a-line.json +1 -0
- package/data/problems/max-stack.json +1 -0
- package/data/problems/max-sum-of-rectangle-no-larger-than-k.json +1 -0
- package/data/problems/maximal-rectangle.json +1 -0
- package/data/problems/maximal-square.json +1 -0
- package/data/problems/maximize-distance-to-closest-person.json +1 -0
- package/data/problems/maximum-average-subarray-i.json +1 -0
- package/data/problems/maximum-average-subarray-ii.json +1 -0
- package/data/problems/maximum-binary-tree-ii.json +1 -0
- package/data/problems/maximum-binary-tree.json +1 -0
- package/data/problems/maximum-depth-of-binary-tree.json +1 -0
- package/data/problems/maximum-depth-of-n-ary-tree.json +1 -0
- package/data/problems/maximum-distance-in-arrays.json +1 -0
- package/data/problems/maximum-frequency-stack.json +1 -0
- package/data/problems/maximum-gap.json +1 -0
- package/data/problems/maximum-length-of-pair-chain.json +1 -0
- package/data/problems/maximum-length-of-repeated-subarray.json +1 -0
- package/data/problems/maximum-product-of-three-numbers.json +1 -0
- package/data/problems/maximum-product-of-word-lengths.json +1 -0
- package/data/problems/maximum-product-subarray.json +1 -0
- package/data/problems/maximum-size-subarray-sum-equals-k.json +1 -0
- package/data/problems/maximum-subarray.json +1 -0
- package/data/problems/maximum-sum-circular-subarray.json +1 -0
- package/data/problems/maximum-sum-of-3-non-overlapping-subarrays.json +1 -0
- package/data/problems/maximum-swap.json +1 -0
- package/data/problems/maximum-vacation-days.json +1 -0
- package/data/problems/maximum-width-of-binary-tree.json +1 -0
- package/data/problems/maximum-width-ramp.json +1 -0
- package/data/problems/maximum-xor-of-two-numbers-in-an-array.json +1 -0
- package/data/problems/median-of-two-sorted-arrays.json +1 -0
- package/data/problems/meeting-rooms-ii.json +1 -0
- package/data/problems/meeting-rooms-iii.json +1 -0
- package/data/problems/meeting-rooms.json +1 -0
- package/data/problems/merge-intervals.json +1 -0
- package/data/problems/merge-k-sorted-lists.json +1 -0
- package/data/problems/merge-sorted-array.json +1 -0
- package/data/problems/merge-strings-alternately.json +1 -0
- package/data/problems/merge-triplets-to-form-target-triplet.json +1 -0
- package/data/problems/merge-two-binary-trees.json +1 -0
- package/data/problems/merge-two-sorted-lists.json +1 -0
- package/data/problems/middle-of-the-linked-list.json +1 -0
- package/data/problems/min-cost-climbing-stairs.json +1 -0
- package/data/problems/min-cost-to-connect-all-points.json +1 -0
- package/data/problems/min-stack.json +1 -0
- package/data/problems/minesweeper.json +1 -0
- package/data/problems/mini-parser.json +1 -0
- package/data/problems/minimize-malware-spread-ii.json +1 -0
- package/data/problems/minimize-malware-spread.json +1 -0
- package/data/problems/minimize-max-distance-to-gas-station.json +1 -0
- package/data/problems/minimum-absolute-difference-in-bst.json +1 -0
- package/data/problems/minimum-add-to-make-parentheses-valid.json +1 -0
- package/data/problems/minimum-area-rectangle-ii.json +1 -0
- package/data/problems/minimum-area-rectangle.json +1 -0
- package/data/problems/minimum-array-end.json +1 -0
- package/data/problems/minimum-ascii-delete-sum-for-two-strings.json +1 -0
- package/data/problems/minimum-cost-for-tickets.json +1 -0
- package/data/problems/minimum-cost-to-hire-k-workers.json +1 -0
- package/data/problems/minimum-cost-to-merge-stones.json +1 -0
- package/data/problems/minimum-depth-of-binary-tree.json +1 -0
- package/data/problems/minimum-distance-between-bst-nodes.json +1 -0
- package/data/problems/minimum-factorization.json +1 -0
- package/data/problems/minimum-falling-path-sum.json +1 -0
- package/data/problems/minimum-genetic-mutation.json +1 -0
- package/data/problems/minimum-height-trees.json +1 -0
- package/data/problems/minimum-increment-to-make-array-unique.json +1 -0
- package/data/problems/minimum-index-sum-of-two-lists.json +1 -0
- package/data/problems/minimum-interval-to-include-each-query.json +1 -0
- package/data/problems/minimum-moves-to-equal-array-elements-ii.json +1 -0
- package/data/problems/minimum-moves-to-equal-array-elements.json +1 -0
- package/data/problems/minimum-number-of-arrows-to-burst-balloons.json +1 -0
- package/data/problems/minimum-number-of-k-consecutive-bit-flips.json +1 -0
- package/data/problems/minimum-number-of-refueling-stops.json +1 -0
- package/data/problems/minimum-path-sum.json +1 -0
- package/data/problems/minimum-size-subarray-sum.json +1 -0
- package/data/problems/minimum-swaps-to-make-sequences-increasing.json +1 -0
- package/data/problems/minimum-time-difference.json +1 -0
- package/data/problems/minimum-unique-word-abbreviation.json +1 -0
- package/data/problems/minimum-window-subsequence.json +1 -0
- package/data/problems/minimum-window-substring.json +1 -0
- package/data/problems/mirror-reflection.json +1 -0
- package/data/problems/missing-number.json +1 -0
- package/data/problems/missing-ranges.json +1 -0
- package/data/problems/monotone-increasing-digits.json +1 -0
- package/data/problems/monotonic-array.json +1 -0
- package/data/problems/most-common-word.json +1 -0
- package/data/problems/most-frequent-subtree-sum.json +1 -0
- package/data/problems/most-profit-assigning-work.json +1 -0
- package/data/problems/most-stones-removed-with-same-row-or-column.json +1 -0
- package/data/problems/move-zeroes.json +1 -0
- package/data/problems/moving-average-from-data-stream.json +1 -0
- package/data/problems/multiply-strings.json +1 -0
- package/data/problems/my-calendar-i.json +1 -0
- package/data/problems/my-calendar-ii.json +1 -0
- package/data/problems/my-calendar-iii.json +1 -0
- package/data/problems/n-ary-tree-level-order-traversal.json +1 -0
- package/data/problems/n-ary-tree-postorder-traversal.json +1 -0
- package/data/problems/n-ary-tree-preorder-traversal.json +1 -0
- package/data/problems/n-queens-ii.json +1 -0
- package/data/problems/n-queens.json +1 -0
- package/data/problems/n-repeated-element-in-size-2n-array.json +1 -0
- package/data/problems/n-th-tribonacci-number.json +1 -0
- package/data/problems/nested-list-weight-sum-ii.json +1 -0
- package/data/problems/nested-list-weight-sum.json +1 -0
- package/data/problems/network-delay-time.json +1 -0
- package/data/problems/new-21-game.json +1 -0
- package/data/problems/next-closest-time.json +1 -0
- package/data/problems/next-greater-element-i.json +1 -0
- package/data/problems/next-greater-element-ii.json +1 -0
- package/data/problems/next-greater-element-iii.json +1 -0
- package/data/problems/next-permutation.json +1 -0
- package/data/problems/nim-game.json +1 -0
- package/data/problems/non-decreasing-array.json +1 -0
- package/data/problems/non-decreasing-subsequences.json +1 -0
- package/data/problems/non-negative-integers-without-consecutive-ones.json +1 -0
- package/data/problems/non-overlapping-intervals.json +1 -0
- package/data/problems/nth-digit.json +1 -0
- package/data/problems/nth-magical-number.json +1 -0
- package/data/problems/number-complement.json +1 -0
- package/data/problems/number-of-1-bits.json +1 -0
- package/data/problems/number-of-atoms.json +1 -0
- package/data/problems/number-of-boomerangs.json +1 -0
- package/data/problems/number-of-connected-components-in-an-undirected-graph.json +1 -0
- package/data/problems/number-of-corner-rectangles.json +1 -0
- package/data/problems/number-of-digit-one.json +1 -0
- package/data/problems/number-of-distinct-islands-ii.json +1 -0
- package/data/problems/number-of-distinct-islands.json +1 -0
- package/data/problems/number-of-islands-ii.json +1 -0
- package/data/problems/number-of-islands.json +1 -0
- package/data/problems/number-of-lines-to-write-string.json +1 -0
- package/data/problems/number-of-longest-increasing-subsequence.json +1 -0
- package/data/problems/number-of-matching-subsequences.json +1 -0
- package/data/problems/number-of-music-playlists.json +1 -0
- package/data/problems/number-of-provinces.json +1 -0
- package/data/problems/number-of-recent-calls.json +1 -0
- package/data/problems/number-of-segments-in-a-string.json +1 -0
- package/data/problems/number-of-squareful-arrays.json +1 -0
- package/data/problems/number-of-subarrays-with-bounded-maximum.json +1 -0
- package/data/problems/numbers-at-most-n-given-digit-set.json +1 -0
- package/data/problems/numbers-with-same-consecutive-differences.json +1 -0
- package/data/problems/odd-even-jump.json +1 -0
- package/data/problems/odd-even-linked-list.json +1 -0
- package/data/problems/one-edit-distance.json +1 -0
- package/data/problems/ones-and-zeroes.json +1 -0
- package/data/problems/online-election.json +1 -0
- package/data/problems/online-stock-span.json +1 -0
- package/data/problems/open-the-lock.json +1 -0
- package/data/problems/optimal-account-balancing.json +1 -0
- package/data/problems/optimal-division.json +1 -0
- package/data/problems/orderly-queue.json +1 -0
- package/data/problems/out-of-boundary-paths.json +1 -0
- package/data/problems/output-contest-matches.json +1 -0
- package/data/problems/pacific-atlantic-water-flow.json +1 -0
- package/data/problems/paint-fence.json +1 -0
- package/data/problems/paint-house-ii.json +1 -0
- package/data/problems/paint-house.json +1 -0
- package/data/problems/palindrome-linked-list.json +1 -0
- package/data/problems/palindrome-number.json +1 -0
- package/data/problems/palindrome-pairs.json +1 -0
- package/data/problems/palindrome-partitioning-ii.json +1 -0
- package/data/problems/palindrome-partitioning.json +1 -0
- package/data/problems/palindrome-permutation-ii.json +1 -0
- package/data/problems/palindrome-permutation.json +1 -0
- package/data/problems/palindromic-substrings.json +1 -0
- package/data/problems/pancake-sorting.json +1 -0
- package/data/problems/parse-lisp-expression.json +1 -0
- package/data/problems/partition-array-into-disjoint-intervals.json +1 -0
- package/data/problems/partition-equal-subset-sum.json +1 -0
- package/data/problems/partition-labels.json +1 -0
- package/data/problems/partition-list.json +1 -0
- package/data/problems/partition-to-k-equal-sum-subsets.json +1 -0
- package/data/problems/pascals-triangle-ii.json +1 -0
- package/data/problems/pascals-triangle.json +1 -0
- package/data/problems/patching-array.json +1 -0
- package/data/problems/path-sum-ii.json +1 -0
- package/data/problems/path-sum-iii.json +1 -0
- package/data/problems/path-sum-iv.json +1 -0
- package/data/problems/path-sum.json +1 -0
- package/data/problems/path-with-minimum-effort.json +1 -0
- package/data/problems/peak-index-in-a-mountain-array.json +1 -0
- package/data/problems/peeking-iterator.json +1 -0
- package/data/problems/perfect-number.json +1 -0
- package/data/problems/perfect-rectangle.json +1 -0
- package/data/problems/perfect-squares.json +1 -0
- package/data/problems/permutation-in-string.json +1 -0
- package/data/problems/permutation-sequence.json +1 -0
- package/data/problems/permutations-ii.json +1 -0
- package/data/problems/permutations.json +1 -0
- package/data/problems/plus-one-linked-list.json +1 -0
- package/data/problems/plus-one.json +1 -0
- package/data/problems/poor-pigs.json +1 -0
- package/data/problems/populating-next-right-pointers-in-each-node-ii.json +1 -0
- package/data/problems/populating-next-right-pointers-in-each-node.json +1 -0
- package/data/problems/positions-of-large-groups.json +1 -0
- package/data/problems/possible-bipartition.json +1 -0
- package/data/problems/pour-water.json +1 -0
- package/data/problems/power-of-four.json +1 -0
- package/data/problems/power-of-three.json +1 -0
- package/data/problems/power-of-two.json +1 -0
- package/data/problems/powerful-integers.json +1 -0
- package/data/problems/powx-n.json +1 -0
- package/data/problems/predict-the-winner.json +1 -0
- package/data/problems/prefix-and-suffix-search.json +1 -0
- package/data/problems/preimage-size-of-factorial-zeroes-function.json +1 -0
- package/data/problems/prime-number-of-set-bits-in-binary-representation.json +1 -0
- package/data/problems/prime-palindrome.json +1 -0
- package/data/problems/print-binary-tree.json +1 -0
- package/data/problems/prison-cells-after-n-days.json +1 -0
- package/data/problems/product-of-array-except-self.json +1 -0
- package/data/problems/profitable-schemes.json +1 -0
- package/data/problems/projection-area-of-3d-shapes.json +1 -0
- package/data/problems/push-dominoes.json +1 -0
- package/data/problems/pyramid-transition-matrix.json +1 -0
- package/data/problems/queue-reconstruction-by-height.json +1 -0
- package/data/problems/rabbits-in-forest.json +1 -0
- package/data/problems/race-car.json +1 -0
- package/data/problems/random-flip-matrix.json +1 -0
- package/data/problems/random-pick-index.json +1 -0
- package/data/problems/random-pick-with-blacklist.json +1 -0
- package/data/problems/random-pick-with-weight.json +1 -0
- package/data/problems/random-point-in-non-overlapping-rectangles.json +1 -0
- package/data/problems/range-addition-ii.json +1 -0
- package/data/problems/range-addition.json +1 -0
- package/data/problems/range-module.json +1 -0
- package/data/problems/range-sum-of-bst.json +1 -0
- package/data/problems/range-sum-query-2d-immutable.json +1 -0
- package/data/problems/range-sum-query-2d-mutable.json +1 -0
- package/data/problems/range-sum-query-immutable.json +1 -0
- package/data/problems/range-sum-query-mutable.json +1 -0
- package/data/problems/ransom-note.json +1 -0
- package/data/problems/reach-a-number.json +1 -0
- package/data/problems/reachable-nodes-in-subdivided-graph.json +1 -0
- package/data/problems/reaching-points.json +1 -0
- package/data/problems/read-n-characters-given-read4-ii-call-multiple-times.json +1 -0
- package/data/problems/read-n-characters-given-read4.json +1 -0
- package/data/problems/rearrange-string-k-distance-apart.json +1 -0
- package/data/problems/reconstruct-itinerary.json +1 -0
- package/data/problems/reconstruct-original-digits-from-english.json +1 -0
- package/data/problems/recover-binary-search-tree.json +1 -0
- package/data/problems/rectangle-area-ii.json +1 -0
- package/data/problems/rectangle-area.json +1 -0
- package/data/problems/rectangle-overlap.json +1 -0
- package/data/problems/redundant-connection-ii.json +1 -0
- package/data/problems/redundant-connection.json +1 -0
- package/data/problems/regions-cut-by-slashes.json +1 -0
- package/data/problems/regular-expression-matching.json +1 -0
- package/data/problems/relative-ranks.json +1 -0
- package/data/problems/remove-9.json +1 -0
- package/data/problems/remove-boxes.json +1 -0
- package/data/problems/remove-comments.json +1 -0
- package/data/problems/remove-duplicate-letters.json +1 -0
- package/data/problems/remove-duplicates-from-sorted-array-ii.json +1 -0
- package/data/problems/remove-duplicates-from-sorted-array.json +1 -0
- package/data/problems/remove-duplicates-from-sorted-list-ii.json +1 -0
- package/data/problems/remove-duplicates-from-sorted-list.json +1 -0
- package/data/problems/remove-element.json +1 -0
- package/data/problems/remove-invalid-parentheses.json +1 -0
- package/data/problems/remove-k-digits.json +1 -0
- package/data/problems/remove-linked-list-elements.json +1 -0
- package/data/problems/remove-nth-node-from-end-of-list.json +1 -0
- package/data/problems/reorder-data-in-log-files.json +1 -0
- package/data/problems/reorder-list.json +1 -0
- package/data/problems/reordered-power-of-2.json +1 -0
- package/data/problems/reorganize-string.json +1 -0
- package/data/problems/repeated-dna-sequences.json +1 -0
- package/data/problems/repeated-string-match.json +1 -0
- package/data/problems/repeated-substring-pattern.json +1 -0
- package/data/problems/replace-words.json +1 -0
- package/data/problems/reshape-the-matrix.json +1 -0
- package/data/problems/restore-ip-addresses.json +1 -0
- package/data/problems/reveal-cards-in-increasing-order.json +1 -0
- package/data/problems/reverse-bits.json +1 -0
- package/data/problems/reverse-integer.json +1 -0
- package/data/problems/reverse-linked-list-ii.json +1 -0
- package/data/problems/reverse-linked-list.json +1 -0
- package/data/problems/reverse-nodes-in-k-group.json +1 -0
- package/data/problems/reverse-only-letters.json +1 -0
- package/data/problems/reverse-pairs.json +1 -0
- package/data/problems/reverse-string-ii.json +1 -0
- package/data/problems/reverse-string.json +1 -0
- package/data/problems/reverse-vowels-of-a-string.json +1 -0
- package/data/problems/reverse-words-in-a-string-ii.json +1 -0
- package/data/problems/reverse-words-in-a-string-iii.json +1 -0
- package/data/problems/reverse-words-in-a-string.json +1 -0
- package/data/problems/rle-iterator.json +1 -0
- package/data/problems/robot-return-to-origin.json +1 -0
- package/data/problems/robot-room-cleaner.json +1 -0
- package/data/problems/roman-to-integer.json +1 -0
- package/data/problems/rotate-array.json +1 -0
- package/data/problems/rotate-function.json +1 -0
- package/data/problems/rotate-image.json +1 -0
- package/data/problems/rotate-list.json +1 -0
- package/data/problems/rotate-string.json +1 -0
- package/data/problems/rotated-digits.json +1 -0
- package/data/problems/rotting-oranges.json +1 -0
- package/data/problems/russian-doll-envelopes.json +1 -0
- package/data/problems/same-tree.json +1 -0
- package/data/problems/satisfiability-of-equality-equations.json +1 -0
- package/data/problems/score-after-flipping-matrix.json +1 -0
- package/data/problems/score-of-parentheses.json +1 -0
- package/data/problems/scramble-string.json +1 -0
- package/data/problems/search-a-2d-matrix-ii.json +1 -0
- package/data/problems/search-a-2d-matrix.json +1 -0
- package/data/problems/search-in-a-binary-search-tree.json +1 -0
- package/data/problems/search-in-a-sorted-array-of-unknown-size.json +1 -0
- package/data/problems/search-in-rotated-sorted-array-ii.json +1 -0
- package/data/problems/search-in-rotated-sorted-array.json +1 -0
- package/data/problems/search-insert-position.json +1 -0
- package/data/problems/second-minimum-node-in-a-binary-tree.json +1 -0
- package/data/problems/self-crossing.json +1 -0
- package/data/problems/self-dividing-numbers.json +1 -0
- package/data/problems/sentence-screen-fitting.json +1 -0
- package/data/problems/sentence-similarity-ii.json +1 -0
- package/data/problems/sentence-similarity.json +1 -0
- package/data/problems/sequence-reconstruction.json +1 -0
- package/data/problems/serialize-and-deserialize-binary-tree.json +1 -0
- package/data/problems/serialize-and-deserialize-bst.json +1 -0
- package/data/problems/serialize-and-deserialize-n-ary-tree.json +1 -0
- package/data/problems/set-intersection-size-at-least-two.json +1 -0
- package/data/problems/set-matrix-zeroes.json +1 -0
- package/data/problems/set-mismatch.json +1 -0
- package/data/problems/shifting-letters.json +1 -0
- package/data/problems/shopping-offers.json +1 -0
- package/data/problems/short-encoding-of-words.json +1 -0
- package/data/problems/shortest-bridge.json +1 -0
- package/data/problems/shortest-completing-word.json +1 -0
- package/data/problems/shortest-distance-from-all-buildings.json +1 -0
- package/data/problems/shortest-distance-to-a-character.json +1 -0
- package/data/problems/shortest-palindrome.json +1 -0
- package/data/problems/shortest-path-to-get-all-keys.json +1 -0
- package/data/problems/shortest-path-visiting-all-nodes.json +1 -0
- package/data/problems/shortest-subarray-with-sum-at-least-k.json +1 -0
- package/data/problems/shortest-unsorted-continuous-subarray.json +1 -0
- package/data/problems/shortest-word-distance-ii.json +1 -0
- package/data/problems/shortest-word-distance-iii.json +1 -0
- package/data/problems/shortest-word-distance.json +1 -0
- package/data/problems/shuffle-an-array.json +1 -0
- package/data/problems/similar-rgb-color.json +1 -0
- package/data/problems/similar-string-groups.json +1 -0
- package/data/problems/simplify-path.json +1 -0
- package/data/problems/single-element-in-a-sorted-array.json +1 -0
- package/data/problems/single-number-ii.json +1 -0
- package/data/problems/single-number-iii.json +1 -0
- package/data/problems/single-number.json +1 -0
- package/data/problems/single-threaded-cpu.json +1 -0
- package/data/problems/sliding-puzzle.json +1 -0
- package/data/problems/sliding-window-maximum.json +1 -0
- package/data/problems/sliding-window-median.json +1 -0
- package/data/problems/smallest-good-base.json +1 -0
- package/data/problems/smallest-range-covering-elements-from-k-lists.json +1 -0
- package/data/problems/smallest-range-i.json +1 -0
- package/data/problems/smallest-range-ii.json +1 -0
- package/data/problems/smallest-rectangle-enclosing-black-pixels.json +1 -0
- package/data/problems/smallest-rotation-with-highest-score.json +1 -0
- package/data/problems/smallest-string-starting-from-leaf.json +1 -0
- package/data/problems/smallest-subtree-with-all-the-deepest-nodes.json +1 -0
- package/data/problems/snakes-and-ladders.json +1 -0
- package/data/problems/solve-the-equation.json +1 -0
- package/data/problems/sort-an-array.json +1 -0
- package/data/problems/sort-array-by-parity-ii.json +1 -0
- package/data/problems/sort-array-by-parity.json +1 -0
- package/data/problems/sort-characters-by-frequency.json +1 -0
- package/data/problems/sort-colors.json +1 -0
- package/data/problems/sort-list.json +1 -0
- package/data/problems/sort-transformed-array.json +1 -0
- package/data/problems/soup-servings.json +1 -0
- package/data/problems/sparse-matrix-multiplication.json +1 -0
- package/data/problems/special-binary-string.json +1 -0
- package/data/problems/spiral-matrix-ii.json +1 -0
- package/data/problems/spiral-matrix-iii.json +1 -0
- package/data/problems/spiral-matrix.json +1 -0
- package/data/problems/split-array-into-consecutive-subsequences.json +1 -0
- package/data/problems/split-array-into-fibonacci-sequence.json +1 -0
- package/data/problems/split-array-largest-sum.json +1 -0
- package/data/problems/split-array-with-equal-sum.json +1 -0
- package/data/problems/split-array-with-same-average.json +1 -0
- package/data/problems/split-bst.json +1 -0
- package/data/problems/split-concatenated-strings.json +1 -0
- package/data/problems/split-linked-list-in-parts.json +1 -0
- package/data/problems/sqrtx.json +1 -0
- package/data/problems/squares-of-a-sorted-array.json +1 -0
- package/data/problems/squirrel-simulation.json +1 -0
- package/data/problems/stamping-the-sequence.json +1 -0
- package/data/problems/stickers-to-spell-word.json +1 -0
- package/data/problems/stone-game-ii.json +1 -0
- package/data/problems/stone-game-iii.json +1 -0
- package/data/problems/stone-game.json +1 -0
- package/data/problems/strange-printer.json +1 -0
- package/data/problems/string-compression.json +1 -0
- package/data/problems/string-to-integer-atoi.json +1 -0
- package/data/problems/string-without-aaa-or-bbb.json +1 -0
- package/data/problems/strobogrammatic-number-ii.json +1 -0
- package/data/problems/strobogrammatic-number-iii.json +1 -0
- package/data/problems/strobogrammatic-number.json +1 -0
- package/data/problems/strong-password-checker.json +1 -0
- package/data/problems/student-attendance-record-i.json +1 -0
- package/data/problems/student-attendance-record-ii.json +1 -0
- package/data/problems/subarray-product-less-than-k.json +1 -0
- package/data/problems/subarray-sum-equals-k.json +1 -0
- package/data/problems/subarray-sums-divisible-by-k.json +1 -0
- package/data/problems/subarrays-with-k-different-integers.json +1 -0
- package/data/problems/subdomain-visit-count.json +1 -0
- package/data/problems/subsets-ii.json +1 -0
- package/data/problems/subsets.json +1 -0
- package/data/problems/substring-with-concatenation-of-all-words.json +1 -0
- package/data/problems/subtree-of-another-tree.json +1 -0
- package/data/problems/sudoku-solver.json +1 -0
- package/data/problems/sum-of-all-subset-xor-totals.json +1 -0
- package/data/problems/sum-of-distances-in-tree.json +1 -0
- package/data/problems/sum-of-even-numbers-after-queries.json +1 -0
- package/data/problems/sum-of-left-leaves.json +1 -0
- package/data/problems/sum-of-square-numbers.json +1 -0
- package/data/problems/sum-of-subarray-minimums.json +1 -0
- package/data/problems/sum-of-subsequence-widths.json +1 -0
- package/data/problems/sum-of-two-integers.json +1 -0
- package/data/problems/sum-root-to-leaf-numbers.json +1 -0
- package/data/problems/summary-ranges.json +1 -0
- package/data/problems/super-egg-drop.json +1 -0
- package/data/problems/super-palindromes.json +1 -0
- package/data/problems/super-pow.json +1 -0
- package/data/problems/super-ugly-number.json +1 -0
- package/data/problems/super-washing-machines.json +1 -0
- package/data/problems/surface-area-of-3d-shapes.json +1 -0
- package/data/problems/surrounded-regions.json +1 -0
- package/data/problems/swap-adjacent-in-lr-string.json +1 -0
- package/data/problems/swap-nodes-in-pairs.json +1 -0
- package/data/problems/swim-in-rising-water.json +1 -0
- package/data/problems/symmetric-tree.json +1 -0
- package/data/problems/tag-validator.json +1 -0
- package/data/problems/tallest-billboard.json +1 -0
- package/data/problems/target-sum.json +1 -0
- package/data/problems/task-scheduler.json +1 -0
- package/data/problems/teemo-attacking.json +1 -0
- package/data/problems/ternary-expression-parser.json +1 -0
- package/data/problems/text-justification.json +1 -0
- package/data/problems/the-maze-ii.json +1 -0
- package/data/problems/the-maze-iii.json +1 -0
- package/data/problems/the-maze.json +1 -0
- package/data/problems/the-skyline-problem.json +1 -0
- package/data/problems/third-maximum-number.json +1 -0
- package/data/problems/three-equal-parts.json +1 -0
- package/data/problems/time-based-key-value-store.json +1 -0
- package/data/problems/to-lower-case.json +1 -0
- package/data/problems/toeplitz-matrix.json +1 -0
- package/data/problems/top-k-frequent-elements.json +1 -0
- package/data/problems/top-k-frequent-words.json +1 -0
- package/data/problems/total-hamming-distance.json +1 -0
- package/data/problems/transform-to-chessboard.json +1 -0
- package/data/problems/transpose-matrix.json +1 -0
- package/data/problems/trapping-rain-water-ii.json +1 -0
- package/data/problems/trapping-rain-water.json +1 -0
- package/data/problems/triangle.json +1 -0
- package/data/problems/trim-a-binary-search-tree.json +1 -0
- package/data/problems/triples-with-bitwise-and-equal-to-zero.json +1 -0
- package/data/problems/two-sum-ii-input-array-is-sorted.json +1 -0
- package/data/problems/two-sum-iii-data-structure-design.json +1 -0
- package/data/problems/two-sum-iv-input-is-a-bst.json +1 -0
- package/data/problems/two-sum.json +1 -0
- package/data/problems/ugly-number-ii.json +1 -0
- package/data/problems/ugly-number.json +1 -0
- package/data/problems/uncommon-words-from-two-sentences.json +1 -0
- package/data/problems/unique-binary-search-trees-ii.json +1 -0
- package/data/problems/unique-binary-search-trees.json +1 -0
- package/data/problems/unique-email-addresses.json +1 -0
- package/data/problems/unique-morse-code-words.json +1 -0
- package/data/problems/unique-paths-ii.json +1 -0
- package/data/problems/unique-paths-iii.json +1 -0
- package/data/problems/unique-paths.json +1 -0
- package/data/problems/unique-substrings-in-wraparound-string.json +1 -0
- package/data/problems/unique-word-abbreviation.json +1 -0
- package/data/problems/univalued-binary-tree.json +1 -0
- package/data/problems/utf-8-validation.json +1 -0
- package/data/problems/valid-anagram.json +1 -0
- package/data/problems/valid-mountain-array.json +1 -0
- package/data/problems/valid-number.json +1 -0
- package/data/problems/valid-palindrome-ii.json +1 -0
- package/data/problems/valid-palindrome.json +1 -0
- package/data/problems/valid-parentheses.json +1 -0
- package/data/problems/valid-parenthesis-string.json +1 -0
- package/data/problems/valid-perfect-square.json +1 -0
- package/data/problems/valid-permutations-for-di-sequence.json +1 -0
- package/data/problems/valid-square.json +1 -0
- package/data/problems/valid-sudoku.json +1 -0
- package/data/problems/valid-tic-tac-toe-state.json +1 -0
- package/data/problems/valid-triangle-number.json +1 -0
- package/data/problems/valid-word-abbreviation.json +1 -0
- package/data/problems/valid-word-square.json +1 -0
- package/data/problems/validate-binary-search-tree.json +1 -0
- package/data/problems/validate-ip-address.json +1 -0
- package/data/problems/validate-stack-sequences.json +1 -0
- package/data/problems/verify-preorder-sequence-in-binary-search-tree.json +1 -0
- package/data/problems/verify-preorder-serialization-of-a-binary-tree.json +1 -0
- package/data/problems/verifying-an-alien-dictionary.json +1 -0
- package/data/problems/vertical-order-traversal-of-a-binary-tree.json +1 -0
- package/data/problems/vowel-spellchecker.json +1 -0
- package/data/problems/walking-robot-simulation.json +1 -0
- package/data/problems/walls-and-gates.json +1 -0
- package/data/problems/water-and-jug-problem.json +1 -0
- package/data/problems/wiggle-sort-ii.json +1 -0
- package/data/problems/wiggle-sort.json +1 -0
- package/data/problems/wiggle-subsequence.json +1 -0
- package/data/problems/wildcard-matching.json +1 -0
- package/data/problems/word-abbreviation.json +1 -0
- package/data/problems/word-break-ii.json +1 -0
- package/data/problems/word-break.json +1 -0
- package/data/problems/word-ladder-ii.json +1 -0
- package/data/problems/word-ladder.json +1 -0
- package/data/problems/word-pattern-ii.json +1 -0
- package/data/problems/word-pattern.json +1 -0
- package/data/problems/word-search-ii.json +1 -0
- package/data/problems/word-search.json +1 -0
- package/data/problems/word-squares.json +1 -0
- package/data/problems/word-subsets.json +1 -0
- package/data/problems/x-of-a-kind-in-a-deck-of-cards.json +1 -0
- package/data/problems/zigzag-conversion.json +1 -0
- package/data/problems/zigzag-iterator.json +1 -0
- package/data/problems/zuma-game.json +1 -0
- package/dist/cli.js +793 -0
- package/dist/web/assets/index-DCYvZg7a.js +150 -0
- package/dist/web/assets/index-gSBueMfH.css +1 -0
- package/dist/web/index.html +13 -0
- package/package.json +44 -4
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var J2=Object.defineProperty;var Vg=e=>{throw TypeError(e)};var ew=(e,r,o)=>r in e?J2(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o;var je=(e,r,o)=>ew(e,typeof r!="symbol"?r+"":r,o),tw=(e,r,o)=>r.has(e)||Vg("Cannot "+o);var Hg=(e,r,o)=>r.has(e)?Vg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,o);var il=(e,r,o)=>(tw(e,r,"access private method"),o);function nw(e,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(i,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function o(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(l){if(l.ep)return;l.ep=!0;const u=o(l);fetch(l.href,u)}})();function B0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gf={exports:{}},ll={},mf={exports:{}},It={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Wg;function rw(){if(Wg)return It;Wg=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function x(T){return T===null||typeof T!="object"?null:(T=y&&T[y]||T["@@iterator"],typeof T=="function"?T:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function b(T,D,Z){this.props=T,this.context=D,this.refs=S,this.updater=Z||k}b.prototype.isReactComponent={},b.prototype.setState=function(T,D){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,D,"setState")},b.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function C(){}C.prototype=b.prototype;function E(T,D,Z){this.props=T,this.context=D,this.refs=S,this.updater=Z||k}var A=E.prototype=new C;A.constructor=E,w(A,b.prototype),A.isPureReactComponent=!0;var I=Array.isArray,P=Object.prototype.hasOwnProperty,_={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function j(T,D,Z){var X,oe={},J=null,re=null;if(D!=null)for(X in D.ref!==void 0&&(re=D.ref),D.key!==void 0&&(J=""+D.key),D)P.call(D,X)&&!N.hasOwnProperty(X)&&(oe[X]=D[X]);var de=arguments.length-2;if(de===1)oe.children=Z;else if(1<de){for(var ae=Array(de),ve=0;ve<de;ve++)ae[ve]=arguments[ve+2];oe.children=ae}if(T&&T.defaultProps)for(X in de=T.defaultProps,de)oe[X]===void 0&&(oe[X]=de[X]);return{$$typeof:e,type:T,key:J,ref:re,props:oe,_owner:_.current}}function F(T,D){return{$$typeof:e,type:T.type,key:D,ref:T.ref,props:T.props,_owner:T._owner}}function M(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function G(T){var D={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(Z){return D[Z]})}var q=/\/+/g;function W(T,D){return typeof T=="object"&&T!==null&&T.key!=null?G(""+T.key):D.toString(36)}function K(T,D,Z,X,oe){var J=typeof T;(J==="undefined"||J==="boolean")&&(T=null);var re=!1;if(T===null)re=!0;else switch(J){case"string":case"number":re=!0;break;case"object":switch(T.$$typeof){case e:case r:re=!0}}if(re)return re=T,oe=oe(re),T=X===""?"."+W(re,0):X,I(oe)?(Z="",T!=null&&(Z=T.replace(q,"$&/")+"/"),K(oe,D,Z,"",function(ve){return ve})):oe!=null&&(M(oe)&&(oe=F(oe,Z+(!oe.key||re&&re.key===oe.key?"":(""+oe.key).replace(q,"$&/")+"/")+T)),D.push(oe)),1;if(re=0,X=X===""?".":X+":",I(T))for(var de=0;de<T.length;de++){J=T[de];var ae=X+W(J,de);re+=K(J,D,Z,ae,oe)}else if(ae=x(T),typeof ae=="function")for(T=ae.call(T),de=0;!(J=T.next()).done;)J=J.value,ae=X+W(J,de++),re+=K(J,D,Z,ae,oe);else if(J==="object")throw D=String(T),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return re}function H(T,D,Z){if(T==null)return T;var X=[],oe=0;return K(T,X,"","",function(J){return D.call(Z,J,oe++)}),X}function ne(T){if(T._status===-1){var D=T._result;D=D(),D.then(function(Z){(T._status===0||T._status===-1)&&(T._status=1,T._result=Z)},function(Z){(T._status===0||T._status===-1)&&(T._status=2,T._result=Z)}),T._status===-1&&(T._status=0,T._result=D)}if(T._status===1)return T._result.default;throw T._result}var le={current:null},B={transition:null},V={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:B,ReactCurrentOwner:_};function U(){throw Error("act(...) is not supported in production builds of React.")}return It.Children={map:H,forEach:function(T,D,Z){H(T,function(){D.apply(this,arguments)},Z)},count:function(T){var D=0;return H(T,function(){D++}),D},toArray:function(T){return H(T,function(D){return D})||[]},only:function(T){if(!M(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},It.Component=b,It.Fragment=o,It.Profiler=l,It.PureComponent=E,It.StrictMode=i,It.Suspense=p,It.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,It.act=U,It.cloneElement=function(T,D,Z){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var X=w({},T.props),oe=T.key,J=T.ref,re=T._owner;if(D!=null){if(D.ref!==void 0&&(J=D.ref,re=_.current),D.key!==void 0&&(oe=""+D.key),T.type&&T.type.defaultProps)var de=T.type.defaultProps;for(ae in D)P.call(D,ae)&&!N.hasOwnProperty(ae)&&(X[ae]=D[ae]===void 0&&de!==void 0?de[ae]:D[ae])}var ae=arguments.length-2;if(ae===1)X.children=Z;else if(1<ae){de=Array(ae);for(var ve=0;ve<ae;ve++)de[ve]=arguments[ve+2];X.children=de}return{$$typeof:e,type:T.type,key:oe,ref:J,props:X,_owner:re}},It.createContext=function(T){return T={$$typeof:c,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:u,_context:T},T.Consumer=T},It.createElement=j,It.createFactory=function(T){var D=j.bind(null,T);return D.type=T,D},It.createRef=function(){return{current:null}},It.forwardRef=function(T){return{$$typeof:d,render:T}},It.isValidElement=M,It.lazy=function(T){return{$$typeof:m,_payload:{_status:-1,_result:T},_init:ne}},It.memo=function(T,D){return{$$typeof:h,type:T,compare:D===void 0?null:D}},It.startTransition=function(T){var D=B.transition;B.transition={};try{T()}finally{B.transition=D}},It.unstable_act=U,It.useCallback=function(T,D){return le.current.useCallback(T,D)},It.useContext=function(T){return le.current.useContext(T)},It.useDebugValue=function(){},It.useDeferredValue=function(T){return le.current.useDeferredValue(T)},It.useEffect=function(T,D){return le.current.useEffect(T,D)},It.useId=function(){return le.current.useId()},It.useImperativeHandle=function(T,D,Z){return le.current.useImperativeHandle(T,D,Z)},It.useInsertionEffect=function(T,D){return le.current.useInsertionEffect(T,D)},It.useLayoutEffect=function(T,D){return le.current.useLayoutEffect(T,D)},It.useMemo=function(T,D){return le.current.useMemo(T,D)},It.useReducer=function(T,D,Z){return le.current.useReducer(T,D,Z)},It.useRef=function(T){return le.current.useRef(T)},It.useState=function(T){return le.current.useState(T)},It.useSyncExternalStore=function(T,D,Z){return le.current.useSyncExternalStore(T,D,Z)},It.useTransition=function(){return le.current.useTransition()},It.version="18.3.1",It}var Kg;function El(){return Kg||(Kg=1,mf.exports=rw()),mf.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Gg;function ow(){if(Gg)return ll;Gg=1;var e=El(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,h){var m,y={},x=null,k=null;h!==void 0&&(x=""+h),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(k=p.ref);for(m in p)i.call(p,m)&&!u.hasOwnProperty(m)&&(y[m]=p[m]);if(d&&d.defaultProps)for(m in p=d.defaultProps,p)y[m]===void 0&&(y[m]=p[m]);return{$$typeof:r,type:d,key:x,ref:k,props:y,_owner:l.current}}return ll.Fragment=o,ll.jsx=c,ll.jsxs=c,ll}var Yg;function sw(){return Yg||(Yg=1,gf.exports=ow()),gf.exports}var O=sw(),v=El();const Po=B0(v),iw=nw({__proto__:null,default:Po},[v]);var Pa={},yf={exports:{}},ar={},vf={exports:{}},xf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Xg;function lw(){return Xg||(Xg=1,(function(e){function r(B,V){var U=B.length;B.push(V);e:for(;0<U;){var T=U-1>>>1,D=B[T];if(0<l(D,V))B[T]=V,B[U]=D,U=T;else break e}}function o(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var V=B[0],U=B.pop();if(U!==V){B[0]=U;e:for(var T=0,D=B.length,Z=D>>>1;T<Z;){var X=2*(T+1)-1,oe=B[X],J=X+1,re=B[J];if(0>l(oe,U))J<D&&0>l(re,oe)?(B[T]=re,B[J]=U,T=J):(B[T]=oe,B[X]=U,T=X);else if(J<D&&0>l(re,U))B[T]=re,B[J]=U,T=J;else break e}}return V}function l(B,V){var U=B.sortIndex-V.sortIndex;return U!==0?U:B.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var p=[],h=[],m=1,y=null,x=3,k=!1,w=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(B){for(var V=o(h);V!==null;){if(V.callback===null)i(h);else if(V.startTime<=B)i(h),V.sortIndex=V.expirationTime,r(p,V);else break;V=o(h)}}function I(B){if(S=!1,A(B),!w)if(o(p)!==null)w=!0,ne(P);else{var V=o(h);V!==null&&le(I,V.startTime-B)}}function P(B,V){w=!1,S&&(S=!1,C(j),j=-1),k=!0;var U=x;try{for(A(V),y=o(p);y!==null&&(!(y.expirationTime>V)||B&&!G());){var T=y.callback;if(typeof T=="function"){y.callback=null,x=y.priorityLevel;var D=T(y.expirationTime<=V);V=e.unstable_now(),typeof D=="function"?y.callback=D:y===o(p)&&i(p),A(V)}else i(p);y=o(p)}if(y!==null)var Z=!0;else{var X=o(h);X!==null&&le(I,X.startTime-V),Z=!1}return Z}finally{y=null,x=U,k=!1}}var _=!1,N=null,j=-1,F=5,M=-1;function G(){return!(e.unstable_now()-M<F)}function q(){if(N!==null){var B=e.unstable_now();M=B;var V=!0;try{V=N(!0,B)}finally{V?W():(_=!1,N=null)}}else _=!1}var W;if(typeof E=="function")W=function(){E(q)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,H=K.port2;K.port1.onmessage=q,W=function(){H.postMessage(null)}}else W=function(){b(q,0)};function ne(B){N=B,_||(_=!0,W())}function le(B,V){j=b(function(){B(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){w||k||(w=!0,ne(P))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return o(p)},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var U=x;x=V;try{return B()}finally{x=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,V){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var U=x;x=B;try{return V()}finally{x=U}},e.unstable_scheduleCallback=function(B,V,U){var T=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?T+U:T):U=T,B){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=U+D,B={id:m++,callback:V,priorityLevel:B,startTime:U,expirationTime:D,sortIndex:-1},U>T?(B.sortIndex=U,r(h,B),o(p)===null&&B===o(h)&&(S?(C(j),j=-1):S=!0,le(I,U-T))):(B.sortIndex=D,r(p,B),w||k||(w=!0,ne(P))),B},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(B){var V=x;return function(){var U=x;x=V;try{return B.apply(this,arguments)}finally{x=U}}}})(xf)),xf}var qg;function aw(){return qg||(qg=1,vf.exports=lw()),vf.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Zg;function uw(){if(Zg)return ar;Zg=1;var e=El(),r=aw();function o(t){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+t,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function u(t,n){c(t,n),c(t+"Capture",n)}function c(t,n){for(l[t]=n,t=0;t<n.length;t++)i.add(n[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function x(t){return p.call(y,t)?!0:p.call(m,t)?!1:h.test(t)?y[t]=!0:(m[t]=!0,!1)}function k(t,n,s,a){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function w(t,n,s,a){if(n===null||typeof n>"u"||k(t,n,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function S(t,n,s,a,f,g,R){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=f,this.mustUseProperty=s,this.propertyName=t,this.type=n,this.sanitizeURL=g,this.removeEmptyString=R}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){b[t]=new S(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var n=t[0];b[n]=new S(n,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){b[t]=new S(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){b[t]=new S(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){b[t]=new S(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){b[t]=new S(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){b[t]=new S(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){b[t]=new S(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){b[t]=new S(t,5,!1,t.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function E(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var n=t.replace(C,E);b[n]=new S(n,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var n=t.replace(C,E);b[n]=new S(n,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var n=t.replace(C,E);b[n]=new S(n,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){b[t]=new S(t,1,!1,t.toLowerCase(),null,!1,!1)}),b.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){b[t]=new S(t,1,!1,t.toLowerCase(),null,!0,!0)});function A(t,n,s,a){var f=b.hasOwnProperty(n)?b[n]:null;(f!==null?f.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(w(n,s,f,a)&&(s=null),a||f===null?x(n)&&(s===null?t.removeAttribute(n):t.setAttribute(n,""+s)):f.mustUseProperty?t[f.propertyName]=s===null?f.type===3?!1:"":s:(n=f.attributeName,a=f.attributeNamespace,s===null?t.removeAttribute(n):(f=f.type,s=f===3||f===4&&s===!0?"":""+s,a?t.setAttributeNS(a,n,s):t.setAttribute(n,s))))}var I=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),_=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),G=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),B=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=B&&t[B]||t["@@iterator"],typeof t=="function"?t:null)}var U=Object.assign,T;function D(t){if(T===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return`
|
|
34
|
+
`+T+t}var Z=!1;function X(t,n){if(!t||Z)return"";Z=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(ie){var a=ie}Reflect.construct(t,[],n)}else{try{n.call()}catch(ie){a=ie}t.call(n.prototype)}else{try{throw Error()}catch(ie){a=ie}t()}}catch(ie){if(ie&&a&&typeof ie.stack=="string"){for(var f=ie.stack.split(`
|
|
35
|
+
`),g=a.stack.split(`
|
|
36
|
+
`),R=f.length-1,L=g.length-1;1<=R&&0<=L&&f[R]!==g[L];)L--;for(;1<=R&&0<=L;R--,L--)if(f[R]!==g[L]){if(R!==1||L!==1)do if(R--,L--,0>L||f[R]!==g[L]){var $=`
|
|
37
|
+
`+f[R].replace(" at new "," at ");return t.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",t.displayName)),$}while(1<=R&&0<=L);break}}}finally{Z=!1,Error.prepareStackTrace=s}return(t=t?t.displayName||t.name:"")?D(t):""}function oe(t){switch(t.tag){case 5:return D(t.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return t=X(t.type,!1),t;case 11:return t=X(t.type.render,!1),t;case 1:return t=X(t.type,!0),t;default:return""}}function J(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case _:return"Portal";case F:return"Profiler";case j:return"StrictMode";case W:return"Suspense";case K:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case G:return(t.displayName||"Context")+".Consumer";case M:return(t._context.displayName||"Context")+".Provider";case q:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case H:return n=t.displayName||null,n!==null?n:J(t.type)||"Memo";case ne:n=t._payload,t=t._init;try{return J(t(n))}catch{}}return null}function re(t){var n=t.type;switch(t.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(n);case 8:return n===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function de(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ae(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ve(t){var n=ae(t)?"checked":"value",s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),a=""+t[n];if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,g=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return f.call(this)},set:function(R){a=""+R,g.call(this,R)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(R){a=""+R},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function De(t){t._valueTracker||(t._valueTracker=ve(t))}function _e(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var s=n.getValue(),a="";return t&&(a=ae(t)?t.checked?"true":"false":t.value),t=a,t!==s?(n.setValue(t),!0):!1}function $e(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Te(t,n){var s=n.checked;return U({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??t._wrapperState.initialChecked})}function Ne(t,n){var s=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;s=de(n.value!=null?n.value:s),t._wrapperState={initialChecked:a,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Qe(t,n){n=n.checked,n!=null&&A(t,"checked",n,!1)}function tt(t,n){Qe(t,n);var s=de(n.value),a=n.type;if(s!=null)a==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+s):t.value!==""+s&&(t.value=""+s);else if(a==="submit"||a==="reset"){t.removeAttribute("value");return}n.hasOwnProperty("value")?Fe(t,n.type,s):n.hasOwnProperty("defaultValue")&&Fe(t,n.type,de(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(t.defaultChecked=!!n.defaultChecked)}function ft(t,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+t._wrapperState.initialValue,s||n===t.value||(t.value=n),t.defaultValue=n}s=t.name,s!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,s!==""&&(t.name=s)}function Fe(t,n,s){(n!=="number"||$e(t.ownerDocument)!==t)&&(s==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+s&&(t.defaultValue=""+s))}var Ye=Array.isArray;function me(t,n,s,a){if(t=t.options,n){n={};for(var f=0;f<s.length;f++)n["$"+s[f]]=!0;for(s=0;s<t.length;s++)f=n.hasOwnProperty("$"+t[s].value),t[s].selected!==f&&(t[s].selected=f),f&&a&&(t[s].defaultSelected=!0)}else{for(s=""+de(s),n=null,f=0;f<t.length;f++){if(t[f].value===s){t[f].selected=!0,a&&(t[f].defaultSelected=!0);return}n!==null||t[f].disabled||(n=t[f])}n!==null&&(n.selected=!0)}}function it(t,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return U({},n,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Rt(t,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(Ye(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}t._wrapperState={initialValue:de(s)}}function wt(t,n){var s=de(n.value),a=de(n.defaultValue);s!=null&&(s=""+s,s!==t.value&&(t.value=s),n.defaultValue==null&&t.defaultValue!==s&&(t.defaultValue=s)),a!=null&&(t.defaultValue=""+a)}function se(t){var n=t.textContent;n===t._wrapperState.initialValue&&n!==""&&n!==null&&(t.value=n)}function ce(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Be(t,n){return t==null||t==="http://www.w3.org/1999/xhtml"?ce(n):t==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var ge,He=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,a,f){MSApp.execUnsafeLocalFunction(function(){return t(n,s,a,f)})}:t})(function(t,n){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=n;else{for(ge=ge||document.createElement("div"),ge.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ge.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;n.firstChild;)t.appendChild(n.firstChild)}});function lt(t,n){if(n){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=n;return}}t.textContent=n}var gt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bt=["Webkit","ms","Moz","O"];Object.keys(gt).forEach(function(t){bt.forEach(function(n){n=n+t.charAt(0).toUpperCase()+t.substring(1),gt[n]=gt[t]})});function Qt(t,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||gt.hasOwnProperty(t)&>[t]?(""+n).trim():n+"px"}function Xt(t,n){t=t.style;for(var s in n)if(n.hasOwnProperty(s)){var a=s.indexOf("--")===0,f=Qt(s,n[s],a);s==="float"&&(s="cssFloat"),a?t.setProperty(s,f):t[s]=f}}var jn=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dn(t,n){if(n){if(jn[t]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function pn(t,n){if(t.indexOf("-")===-1)return typeof n.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nn=null;function sn(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Cn=null,Ut=null,hn=null;function At(t){if(t=Wi(t)){if(typeof Cn!="function")throw Error(o(280));var n=t.stateNode;n&&(n=Wl(n),Cn(t.stateNode,t.type,n))}}function z(t){Ut?hn?hn.push(t):hn=[t]:Ut=t}function ue(){if(Ut){var t=Ut,n=hn;if(hn=Ut=null,At(t),n)for(t=0;t<n.length;t++)At(n[t])}}function ke(t,n){return t(n)}function Re(){}var ut=!1;function ht(t,n,s){if(ut)return t(n,s);ut=!0;try{return ke(t,n,s)}finally{ut=!1,(Ut!==null||hn!==null)&&(Re(),ue())}}function we(t,n){var s=t.stateNode;if(s===null)return null;var a=Wl(s);if(a===null)return null;s=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var Se=!1;if(d)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Se=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch{Se=!1}function Ue(t,n,s,a,f,g,R,L,$){var ie=Array.prototype.slice.call(arguments,3);try{n.apply(s,ie)}catch(he){this.onError(he)}}var Ze=!1,Kt=null,Vt=!1,jt=null,Kn={onError:function(t){Ze=!0,Kt=t}};function yn(t,n,s,a,f,g,R,L,$){Ze=!1,Kt=null,Ue.apply(Kn,arguments)}function Nn(t,n,s,a,f,g,R,L,$){if(yn.apply(this,arguments),Ze){if(Ze){var ie=Kt;Ze=!1,Kt=null}else throw Error(o(198));Vt||(Vt=!0,jt=ie)}}function vn(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function Jn(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function Mn(t){if(vn(t)!==t)throw Error(o(188))}function kr(t){var n=t.alternate;if(!n){if(n=vn(t),n===null)throw Error(o(188));return n!==t?null:t}for(var s=t,a=n;;){var f=s.return;if(f===null)break;var g=f.alternate;if(g===null){if(a=f.return,a!==null){s=a;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===s)return Mn(f),t;if(g===a)return Mn(f),n;g=g.sibling}throw Error(o(188))}if(s.return!==a.return)s=f,a=g;else{for(var R=!1,L=f.child;L;){if(L===s){R=!0,s=f,a=g;break}if(L===a){R=!0,a=f,s=g;break}L=L.sibling}if(!R){for(L=g.child;L;){if(L===s){R=!0,s=g,a=f;break}if(L===a){R=!0,a=g,s=f;break}L=L.sibling}if(!R)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:n}function Fr(t){return t=kr(t),t!==null?Sr(t):null}function Sr(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var n=Sr(t);if(n!==null)return n;t=t.sibling}return null}var cr=r.unstable_scheduleCallback,Gn=r.unstable_cancelCallback,uo=r.unstable_shouldYield,co=r.unstable_requestPaint,Lt=r.unstable_now,fr=r.unstable_getCurrentPriorityLevel,Gr=r.unstable_ImmediatePriority,wn=r.unstable_UserBlockingPriority,Er=r.unstable_NormalPriority,xe=r.unstable_LowPriority,We=r.unstable_IdlePriority,mt=null,vt=null;function qt(t){if(vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:Ln,Rr=Math.log,Lo=Math.LN2;function Ln(t){return t>>>=0,t===0?32:31-(Rr(t)/Lo|0)|0}var bn=64,Do=4194304;function ee(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function fe(t,n){var s=t.pendingLanes;if(s===0)return 0;var a=0,f=t.suspendedLanes,g=t.pingedLanes,R=s&268435455;if(R!==0){var L=R&~f;L!==0?a=ee(L):(g&=R,g!==0&&(a=ee(g)))}else R=s&~f,R!==0?a=ee(R):g!==0&&(a=ee(g));if(a===0)return 0;if(n!==0&&n!==a&&(n&f)===0&&(f=a&-a,g=n&-n,f>=g||f===16&&(g&4194240)!==0))return n;if((a&4)!==0&&(a|=s&16),n=t.entangledLanes,n!==0)for(t=t.entanglements,n&=a;0<n;)s=31-Ht(n),f=1<<s,a|=t[s],n&=~f;return a}function be(t,n){switch(t){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Je(t,n){for(var s=t.suspendedLanes,a=t.pingedLanes,f=t.expirationTimes,g=t.pendingLanes;0<g;){var R=31-Ht(g),L=1<<R,$=f[R];$===-1?((L&s)===0||(L&a)!==0)&&(f[R]=be(L,n)):$<=n&&(t.expiredLanes|=L),g&=~L}}function dt(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function at(){var t=bn;return bn<<=1,(bn&4194240)===0&&(bn=64),t}function kt(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function Bt(t,n,s){t.pendingLanes|=n,n!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,n=31-Ht(n),t[n]=s}function St(t,n){var s=t.pendingLanes&~n;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=n,t.mutableReadLanes&=n,t.entangledLanes&=n,n=t.entanglements;var a=t.eventTimes;for(t=t.expirationTimes;0<s;){var f=31-Ht(s),g=1<<f;n[f]=0,a[f]=-1,t[f]=-1,s&=~g}}function nt(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var a=31-Ht(s),f=1<<a;f&n|t[a]&n&&(t[a]|=n),s&=~f}}var Oe=0;function Pe(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Jt,Ct,ct,Bn,gn,er=!1,Cr=[],Ce=null,Le=null,rt=null,Tt=new Map,Pt=new Map,Ft=[],fo="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hs(t,n){switch(t){case"focusin":case"focusout":Ce=null;break;case"dragenter":case"dragleave":Le=null;break;case"mouseover":case"mouseout":rt=null;break;case"pointerover":case"pointerout":Tt.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(n.pointerId)}}function dr(t,n,s,a,f,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:s,eventSystemFlags:a,nativeEvent:g,targetContainers:[f]},n!==null&&(n=Wi(n),n!==null&&Ct(n)),t):(t.eventSystemFlags|=a,n=t.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),t)}function Ni(t,n,s,a,f){switch(n){case"focusin":return Ce=dr(Ce,t,n,s,a,f),!0;case"dragenter":return Le=dr(Le,t,n,s,a,f),!0;case"mouseover":return rt=dr(rt,t,n,s,a,f),!0;case"pointerover":var g=f.pointerId;return Tt.set(g,dr(Tt.get(g)||null,t,n,s,a,f)),!0;case"gotpointercapture":return g=f.pointerId,Pt.set(g,dr(Pt.get(g)||null,t,n,s,a,f)),!0}return!1}function pr(t){var n=ms(t.target);if(n!==null){var s=vn(n);if(s!==null){if(n=s.tag,n===13){if(n=Jn(s),n!==null){t.blockedOn=n,gn(t.priority,function(){ct(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function hr(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=zt(t.domEventName,t.eventSystemFlags,n[0],t.nativeEvent);if(s===null){s=t.nativeEvent;var a=new s.constructor(s.type,s);nn=a,s.target.dispatchEvent(a),nn=null}else return n=Wi(s),n!==null&&Ct(n),t.blockedOn=s,!1;n.shift()}return!0}function po(t,n,s){hr(t)&&s.delete(n)}function Dl(){er=!1,Ce!==null&&hr(Ce)&&(Ce=null),Le!==null&&hr(Le)&&(Le=null),rt!==null&&hr(rt)&&(rt=null),Tt.forEach(po),Pt.forEach(po)}function $n(t,n){t.blockedOn===n&&(t.blockedOn=null,er||(er=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Dl)))}function ho(t){function n(f){return $n(f,t)}if(0<Cr.length){$n(Cr[0],t);for(var s=1;s<Cr.length;s++){var a=Cr[s];a.blockedOn===t&&(a.blockedOn=null)}}for(Ce!==null&&$n(Ce,t),Le!==null&&$n(Le,t),rt!==null&&$n(rt,t),Tt.forEach(n),Pt.forEach(n),s=0;s<Ft.length;s++)a=Ft[s],a.blockedOn===t&&(a.blockedOn=null);for(;0<Ft.length&&(s=Ft[0],s.blockedOn===null);)pr(s),s.blockedOn===null&&Ft.shift()}var Yr=I.ReactCurrentBatchConfig,Fo=!0;function tr(t,n,s,a){var f=Oe,g=Yr.transition;Yr.transition=null;try{Oe=1,gs(t,n,s,a)}finally{Oe=f,Yr.transition=g}}function Vs(t,n,s,a){var f=Oe,g=Yr.transition;Yr.transition=null;try{Oe=4,gs(t,n,s,a)}finally{Oe=f,Yr.transition=g}}function gs(t,n,s,a){if(Fo){var f=zt(t,n,s,a);if(f===null)oc(t,n,a,zo,s),hs(t,a);else if(Ni(f,t,n,s,a))a.stopPropagation();else if(hs(t,a),n&4&&-1<fo.indexOf(t)){for(;f!==null;){var g=Wi(f);if(g!==null&&Jt(g),g=zt(t,n,s,a),g===null&&oc(t,n,a,zo,s),g===f)break;f=g}f!==null&&a.stopPropagation()}else oc(t,n,a,null,s)}}var zo=null;function zt(t,n,s,a){if(zo=null,t=sn(a),t=ms(t),t!==null)if(n=vn(t),n===null)t=null;else if(s=n.tag,s===13){if(t=Jn(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null);return zo=t,null}function nr(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fr()){case Gr:return 1;case wn:return 4;case Er:case xe:return 16;case We:return 536870912;default:return 16}default:return 16}}var Tn=null,gr=null,go=null;function Hs(){if(go)return go;var t,n=gr,s=n.length,a,f="value"in Tn?Tn.value:Tn.textContent,g=f.length;for(t=0;t<s&&n[t]===f[t];t++);var R=s-t;for(a=1;a<=R&&n[s-a]===f[g-a];a++);return go=f.slice(t,1<a?1-a:void 0)}function Tr(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function jo(){return!0}function _p(){return!1}function mr(t){function n(s,a,f,g,R){this._reactName=s,this._targetInst=f,this.type=a,this.nativeEvent=g,this.target=R,this.currentTarget=null;for(var L in t)t.hasOwnProperty(L)&&(s=t[L],this[L]=s?s(g):g[L]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?jo:_p,this.isPropagationStopped=_p,this}return U(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=jo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jo)},persist:function(){},isPersistent:jo}),n}var Ws={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vu=mr(Ws),Mi=U({},Ws,{view:0,detail:0}),Cx=mr(Mi),Hu,Wu,Li,Fl=U({},Mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Li&&(Li&&t.type==="mousemove"?(Hu=t.screenX-Li.screenX,Wu=t.screenY-Li.screenY):Wu=Hu=0,Li=t),Hu)},movementY:function(t){return"movementY"in t?t.movementY:Wu}}),Op=mr(Fl),Tx=U({},Fl,{dataTransfer:0}),Ix=mr(Tx),Ax=U({},Mi,{relatedTarget:0}),Ku=mr(Ax),Px=U({},Ws,{animationName:0,elapsedTime:0,pseudoElement:0}),_x=mr(Px),Ox=U({},Ws,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Nx=mr(Ox),Mx=U({},Ws,{data:0}),Np=mr(Mx),Lx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dx={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zx(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Fx[t])?!!n[t]:!1}function Gu(){return zx}var jx=U({},Mi,{key:function(t){if(t.key){var n=Lx[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Tr(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Dx[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gu,charCode:function(t){return t.type==="keypress"?Tr(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Tr(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Bx=mr(jx),$x=U({},Fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=mr($x),Ux=U({},Mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gu}),Vx=mr(Ux),Hx=U({},Ws,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wx=mr(Hx),Kx=U({},Fl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Gx=mr(Kx),Yx=[9,13,27,32],Yu=d&&"CompositionEvent"in window,Di=null;d&&"documentMode"in document&&(Di=document.documentMode);var Xx=d&&"TextEvent"in window&&!Di,Lp=d&&(!Yu||Di&&8<Di&&11>=Di),Dp=" ",Fp=!1;function zp(t,n){switch(t){case"keyup":return Yx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ks=!1;function qx(t,n){switch(t){case"compositionend":return jp(n);case"keypress":return n.which!==32?null:(Fp=!0,Dp);case"textInput":return t=n.data,t===Dp&&Fp?null:t;default:return null}}function Zx(t,n){if(Ks)return t==="compositionend"||!Yu&&zp(t,n)?(t=Hs(),go=gr=Tn=null,Ks=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Lp&&n.locale!=="ko"?null:n.data;default:return null}}var Qx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Qx[t.type]:n==="textarea"}function $p(t,n,s,a){z(a),n=Ul(n,"onChange"),0<n.length&&(s=new Vu("onChange","change",null,s,a),t.push({event:s,listeners:n}))}var Fi=null,zi=null;function Jx(t){sh(t,0)}function zl(t){var n=Zs(t);if(_e(n))return t}function e2(t,n){if(t==="change")return n}var Up=!1;if(d){var Xu;if(d){var qu="oninput"in document;if(!qu){var Vp=document.createElement("div");Vp.setAttribute("oninput","return;"),qu=typeof Vp.oninput=="function"}Xu=qu}else Xu=!1;Up=Xu&&(!document.documentMode||9<document.documentMode)}function Hp(){Fi&&(Fi.detachEvent("onpropertychange",Wp),zi=Fi=null)}function Wp(t){if(t.propertyName==="value"&&zl(zi)){var n=[];$p(n,zi,t,sn(t)),ht(Jx,n)}}function t2(t,n,s){t==="focusin"?(Hp(),Fi=n,zi=s,Fi.attachEvent("onpropertychange",Wp)):t==="focusout"&&Hp()}function n2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return zl(zi)}function r2(t,n){if(t==="click")return zl(n)}function o2(t,n){if(t==="input"||t==="change")return zl(n)}function s2(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var zr=typeof Object.is=="function"?Object.is:s2;function ji(t,n){if(zr(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var s=Object.keys(t),a=Object.keys(n);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var f=s[a];if(!p.call(n,f)||!zr(t[f],n[f]))return!1}return!0}function Kp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Gp(t,n){var s=Kp(t);t=0;for(var a;s;){if(s.nodeType===3){if(a=t+s.textContent.length,t<=n&&a>=n)return{node:s,offset:n-t};t=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Kp(s)}}function Yp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Yp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Xp(){for(var t=window,n=$e();n instanceof t.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)t=n.contentWindow;else break;n=$e(t.document)}return n}function Zu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function i2(t){var n=Xp(),s=t.focusedElem,a=t.selectionRange;if(n!==s&&s&&s.ownerDocument&&Yp(s.ownerDocument.documentElement,s)){if(a!==null&&Zu(s)){if(n=a.start,t=a.end,t===void 0&&(t=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(t,s.value.length);else if(t=(n=s.ownerDocument||document)&&n.defaultView||window,t.getSelection){t=t.getSelection();var f=s.textContent.length,g=Math.min(a.start,f);a=a.end===void 0?g:Math.min(a.end,f),!t.extend&&g>a&&(f=a,a=g,g=f),f=Gp(s,g);var R=Gp(s,a);f&&R&&(t.rangeCount!==1||t.anchorNode!==f.node||t.anchorOffset!==f.offset||t.focusNode!==R.node||t.focusOffset!==R.offset)&&(n=n.createRange(),n.setStart(f.node,f.offset),t.removeAllRanges(),g>a?(t.addRange(n),t.extend(R.node,R.offset)):(n.setEnd(R.node,R.offset),t.addRange(n)))}}for(n=[],t=s;t=t.parentNode;)t.nodeType===1&&n.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)t=n[s],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var l2=d&&"documentMode"in document&&11>=document.documentMode,Gs=null,Qu=null,Bi=null,Ju=!1;function qp(t,n,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ju||Gs==null||Gs!==$e(a)||(a=Gs,"selectionStart"in a&&Zu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bi&&ji(Bi,a)||(Bi=a,a=Ul(Qu,"onSelect"),0<a.length&&(n=new Vu("onSelect","select",null,n,s),t.push({event:n,listeners:a}),n.target=Gs)))}function jl(t,n){var s={};return s[t.toLowerCase()]=n.toLowerCase(),s["Webkit"+t]="webkit"+n,s["Moz"+t]="moz"+n,s}var Ys={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionend:jl("Transition","TransitionEnd")},ec={},Zp={};d&&(Zp=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function Bl(t){if(ec[t])return ec[t];if(!Ys[t])return t;var n=Ys[t],s;for(s in n)if(n.hasOwnProperty(s)&&s in Zp)return ec[t]=n[s];return t}var Qp=Bl("animationend"),Jp=Bl("animationiteration"),eh=Bl("animationstart"),th=Bl("transitionend"),nh=new Map,rh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Bo(t,n){nh.set(t,n),u(n,[t])}for(var tc=0;tc<rh.length;tc++){var nc=rh[tc],a2=nc.toLowerCase(),u2=nc[0].toUpperCase()+nc.slice(1);Bo(a2,"on"+u2)}Bo(Qp,"onAnimationEnd"),Bo(Jp,"onAnimationIteration"),Bo(eh,"onAnimationStart"),Bo("dblclick","onDoubleClick"),Bo("focusin","onFocus"),Bo("focusout","onBlur"),Bo(th,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $i="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),c2=new Set("cancel close invalid load scroll toggle".split(" ").concat($i));function oh(t,n,s){var a=t.type||"unknown-event";t.currentTarget=s,Nn(a,n,void 0,t),t.currentTarget=null}function sh(t,n){n=(n&4)!==0;for(var s=0;s<t.length;s++){var a=t[s],f=a.event;a=a.listeners;e:{var g=void 0;if(n)for(var R=a.length-1;0<=R;R--){var L=a[R],$=L.instance,ie=L.currentTarget;if(L=L.listener,$!==g&&f.isPropagationStopped())break e;oh(f,L,ie),g=$}else for(R=0;R<a.length;R++){if(L=a[R],$=L.instance,ie=L.currentTarget,L=L.listener,$!==g&&f.isPropagationStopped())break e;oh(f,L,ie),g=$}}}if(Vt)throw t=jt,Vt=!1,jt=null,t}function en(t,n){var s=n[cc];s===void 0&&(s=n[cc]=new Set);var a=t+"__bubble";s.has(a)||(ih(n,t,2,!1),s.add(a))}function rc(t,n,s){var a=0;n&&(a|=4),ih(s,t,a,n)}var $l="_reactListening"+Math.random().toString(36).slice(2);function Ui(t){if(!t[$l]){t[$l]=!0,i.forEach(function(s){s!=="selectionchange"&&(c2.has(s)||rc(s,!1,t),rc(s,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[$l]||(n[$l]=!0,rc("selectionchange",!1,n))}}function ih(t,n,s,a){switch(nr(n)){case 1:var f=tr;break;case 4:f=Vs;break;default:f=gs}s=f.bind(null,n,s,t),f=void 0,!Se||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),a?f!==void 0?t.addEventListener(n,s,{capture:!0,passive:f}):t.addEventListener(n,s,!0):f!==void 0?t.addEventListener(n,s,{passive:f}):t.addEventListener(n,s,!1)}function oc(t,n,s,a,f){var g=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var R=a.tag;if(R===3||R===4){var L=a.stateNode.containerInfo;if(L===f||L.nodeType===8&&L.parentNode===f)break;if(R===4)for(R=a.return;R!==null;){var $=R.tag;if(($===3||$===4)&&($=R.stateNode.containerInfo,$===f||$.nodeType===8&&$.parentNode===f))return;R=R.return}for(;L!==null;){if(R=ms(L),R===null)return;if($=R.tag,$===5||$===6){a=g=R;continue e}L=L.parentNode}}a=a.return}ht(function(){var ie=g,he=sn(s),ye=[];e:{var pe=nh.get(t);if(pe!==void 0){var ze=Vu,Ke=t;switch(t){case"keypress":if(Tr(s)===0)break e;case"keydown":case"keyup":ze=Bx;break;case"focusin":Ke="focus",ze=Ku;break;case"focusout":Ke="blur",ze=Ku;break;case"beforeblur":case"afterblur":ze=Ku;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=Op;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=Ix;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=Vx;break;case Qp:case Jp:case eh:ze=_x;break;case th:ze=Wx;break;case"scroll":ze=Cx;break;case"wheel":ze=Gx;break;case"copy":case"cut":case"paste":ze=Nx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ze=Mp}var Ge=(n&4)!==0,mn=!Ge&&t==="scroll",Q=Ge?pe!==null?pe+"Capture":null:pe;Ge=[];for(var Y=ie,te;Y!==null;){te=Y;var Ee=te.stateNode;if(te.tag===5&&Ee!==null&&(te=Ee,Q!==null&&(Ee=we(Y,Q),Ee!=null&&Ge.push(Vi(Y,Ee,te)))),mn)break;Y=Y.return}0<Ge.length&&(pe=new ze(pe,Ke,null,s,he),ye.push({event:pe,listeners:Ge}))}}if((n&7)===0){e:{if(pe=t==="mouseover"||t==="pointerover",ze=t==="mouseout"||t==="pointerout",pe&&s!==nn&&(Ke=s.relatedTarget||s.fromElement)&&(ms(Ke)||Ke[mo]))break e;if((ze||pe)&&(pe=he.window===he?he:(pe=he.ownerDocument)?pe.defaultView||pe.parentWindow:window,ze?(Ke=s.relatedTarget||s.toElement,ze=ie,Ke=Ke?ms(Ke):null,Ke!==null&&(mn=vn(Ke),Ke!==mn||Ke.tag!==5&&Ke.tag!==6)&&(Ke=null)):(ze=null,Ke=ie),ze!==Ke)){if(Ge=Op,Ee="onMouseLeave",Q="onMouseEnter",Y="mouse",(t==="pointerout"||t==="pointerover")&&(Ge=Mp,Ee="onPointerLeave",Q="onPointerEnter",Y="pointer"),mn=ze==null?pe:Zs(ze),te=Ke==null?pe:Zs(Ke),pe=new Ge(Ee,Y+"leave",ze,s,he),pe.target=mn,pe.relatedTarget=te,Ee=null,ms(he)===ie&&(Ge=new Ge(Q,Y+"enter",Ke,s,he),Ge.target=te,Ge.relatedTarget=mn,Ee=Ge),mn=Ee,ze&&Ke)t:{for(Ge=ze,Q=Ke,Y=0,te=Ge;te;te=Xs(te))Y++;for(te=0,Ee=Q;Ee;Ee=Xs(Ee))te++;for(;0<Y-te;)Ge=Xs(Ge),Y--;for(;0<te-Y;)Q=Xs(Q),te--;for(;Y--;){if(Ge===Q||Q!==null&&Ge===Q.alternate)break t;Ge=Xs(Ge),Q=Xs(Q)}Ge=null}else Ge=null;ze!==null&&lh(ye,pe,ze,Ge,!1),Ke!==null&&mn!==null&&lh(ye,mn,Ke,Ge,!0)}}e:{if(pe=ie?Zs(ie):window,ze=pe.nodeName&&pe.nodeName.toLowerCase(),ze==="select"||ze==="input"&&pe.type==="file")var qe=e2;else if(Bp(pe))if(Up)qe=o2;else{qe=n2;var ot=t2}else(ze=pe.nodeName)&&ze.toLowerCase()==="input"&&(pe.type==="checkbox"||pe.type==="radio")&&(qe=r2);if(qe&&(qe=qe(t,ie))){$p(ye,qe,s,he);break e}ot&&ot(t,pe,ie),t==="focusout"&&(ot=pe._wrapperState)&&ot.controlled&&pe.type==="number"&&Fe(pe,"number",pe.value)}switch(ot=ie?Zs(ie):window,t){case"focusin":(Bp(ot)||ot.contentEditable==="true")&&(Gs=ot,Qu=ie,Bi=null);break;case"focusout":Bi=Qu=Gs=null;break;case"mousedown":Ju=!0;break;case"contextmenu":case"mouseup":case"dragend":Ju=!1,qp(ye,s,he);break;case"selectionchange":if(l2)break;case"keydown":case"keyup":qp(ye,s,he)}var st;if(Yu)e:{switch(t){case"compositionstart":var pt="onCompositionStart";break e;case"compositionend":pt="onCompositionEnd";break e;case"compositionupdate":pt="onCompositionUpdate";break e}pt=void 0}else Ks?zp(t,s)&&(pt="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(pt="onCompositionStart");pt&&(Lp&&s.locale!=="ko"&&(Ks||pt!=="onCompositionStart"?pt==="onCompositionEnd"&&Ks&&(st=Hs()):(Tn=he,gr="value"in Tn?Tn.value:Tn.textContent,Ks=!0)),ot=Ul(ie,pt),0<ot.length&&(pt=new Np(pt,t,null,s,he),ye.push({event:pt,listeners:ot}),st?pt.data=st:(st=jp(s),st!==null&&(pt.data=st)))),(st=Xx?qx(t,s):Zx(t,s))&&(ie=Ul(ie,"onBeforeInput"),0<ie.length&&(he=new Np("onBeforeInput","beforeinput",null,s,he),ye.push({event:he,listeners:ie}),he.data=st))}sh(ye,n)})}function Vi(t,n,s){return{instance:t,listener:n,currentTarget:s}}function Ul(t,n){for(var s=n+"Capture",a=[];t!==null;){var f=t,g=f.stateNode;f.tag===5&&g!==null&&(f=g,g=we(t,s),g!=null&&a.unshift(Vi(t,g,f)),g=we(t,n),g!=null&&a.push(Vi(t,g,f))),t=t.return}return a}function Xs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function lh(t,n,s,a,f){for(var g=n._reactName,R=[];s!==null&&s!==a;){var L=s,$=L.alternate,ie=L.stateNode;if($!==null&&$===a)break;L.tag===5&&ie!==null&&(L=ie,f?($=we(s,g),$!=null&&R.unshift(Vi(s,$,L))):f||($=we(s,g),$!=null&&R.push(Vi(s,$,L)))),s=s.return}R.length!==0&&t.push({event:n,listeners:R})}var f2=/\r\n?/g,d2=/\u0000|\uFFFD/g;function ah(t){return(typeof t=="string"?t:""+t).replace(f2,`
|
|
38
|
+
`).replace(d2,"")}function Vl(t,n,s){if(n=ah(n),ah(t)!==n&&s)throw Error(o(425))}function Hl(){}var sc=null,ic=null;function lc(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var ac=typeof setTimeout=="function"?setTimeout:void 0,p2=typeof clearTimeout=="function"?clearTimeout:void 0,uh=typeof Promise=="function"?Promise:void 0,h2=typeof queueMicrotask=="function"?queueMicrotask:typeof uh<"u"?function(t){return uh.resolve(null).then(t).catch(g2)}:ac;function g2(t){setTimeout(function(){throw t})}function uc(t,n){var s=n,a=0;do{var f=s.nextSibling;if(t.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(a===0){t.removeChild(f),ho(n);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=f}while(s);ho(n)}function $o(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return t}function ch(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return t;n--}else s==="/$"&&n++}t=t.previousSibling}return null}var qs=Math.random().toString(36).slice(2),Xr="__reactFiber$"+qs,Hi="__reactProps$"+qs,mo="__reactContainer$"+qs,cc="__reactEvents$"+qs,m2="__reactListeners$"+qs,y2="__reactHandles$"+qs;function ms(t){var n=t[Xr];if(n)return n;for(var s=t.parentNode;s;){if(n=s[mo]||s[Xr]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=ch(t);t!==null;){if(s=t[Xr])return s;t=ch(t)}return n}t=s,s=t.parentNode}return null}function Wi(t){return t=t[Xr]||t[mo],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Zs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function Wl(t){return t[Hi]||null}var fc=[],Qs=-1;function Uo(t){return{current:t}}function tn(t){0>Qs||(t.current=fc[Qs],fc[Qs]=null,Qs--)}function Zt(t,n){Qs++,fc[Qs]=t.current,t.current=n}var Vo={},Un=Uo(Vo),rr=Uo(!1),ys=Vo;function Js(t,n){var s=t.type.contextTypes;if(!s)return Vo;var a=t.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var f={},g;for(g in s)f[g]=n[g];return a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=n,t.__reactInternalMemoizedMaskedChildContext=f),f}function or(t){return t=t.childContextTypes,t!=null}function Kl(){tn(rr),tn(Un)}function fh(t,n,s){if(Un.current!==Vo)throw Error(o(168));Zt(Un,n),Zt(rr,s)}function dh(t,n,s){var a=t.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var f in a)if(!(f in n))throw Error(o(108,re(t)||"Unknown",f));return U({},s,a)}function Gl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Vo,ys=Un.current,Zt(Un,t),Zt(rr,rr.current),!0}function ph(t,n,s){var a=t.stateNode;if(!a)throw Error(o(169));s?(t=dh(t,n,ys),a.__reactInternalMemoizedMergedChildContext=t,tn(rr),tn(Un),Zt(Un,t)):tn(rr),Zt(rr,s)}var yo=null,Yl=!1,dc=!1;function hh(t){yo===null?yo=[t]:yo.push(t)}function v2(t){Yl=!0,hh(t)}function Ho(){if(!dc&&yo!==null){dc=!0;var t=0,n=Oe;try{var s=yo;for(Oe=1;t<s.length;t++){var a=s[t];do a=a(!0);while(a!==null)}yo=null,Yl=!1}catch(f){throw yo!==null&&(yo=yo.slice(t+1)),cr(Gr,Ho),f}finally{Oe=n,dc=!1}}return null}var ei=[],ti=0,Xl=null,ql=0,Ir=[],Ar=0,vs=null,vo=1,xo="";function xs(t,n){ei[ti++]=ql,ei[ti++]=Xl,Xl=t,ql=n}function gh(t,n,s){Ir[Ar++]=vo,Ir[Ar++]=xo,Ir[Ar++]=vs,vs=t;var a=vo;t=xo;var f=32-Ht(a)-1;a&=~(1<<f),s+=1;var g=32-Ht(n)+f;if(30<g){var R=f-f%5;g=(a&(1<<R)-1).toString(32),a>>=R,f-=R,vo=1<<32-Ht(n)+f|s<<f|a,xo=g+t}else vo=1<<g|s<<f|a,xo=t}function pc(t){t.return!==null&&(xs(t,1),gh(t,1,0))}function hc(t){for(;t===Xl;)Xl=ei[--ti],ei[ti]=null,ql=ei[--ti],ei[ti]=null;for(;t===vs;)vs=Ir[--Ar],Ir[Ar]=null,xo=Ir[--Ar],Ir[Ar]=null,vo=Ir[--Ar],Ir[Ar]=null}var yr=null,vr=null,rn=!1,jr=null;function mh(t,n){var s=Nr(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=t,n=t.deletions,n===null?(t.deletions=[s],t.flags|=16):n.push(s)}function yh(t,n){switch(t.tag){case 5:var s=t.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(t.stateNode=n,yr=t,vr=$o(n.firstChild),!0):!1;case 6:return n=t.pendingProps===""||n.nodeType!==3?null:n,n!==null?(t.stateNode=n,yr=t,vr=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=vs!==null?{id:vo,overflow:xo}:null,t.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=Nr(18,null,null,0),s.stateNode=n,s.return=t,t.child=s,yr=t,vr=null,!0):!1;default:return!1}}function gc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function mc(t){if(rn){var n=vr;if(n){var s=n;if(!yh(t,n)){if(gc(t))throw Error(o(418));n=$o(s.nextSibling);var a=yr;n&&yh(t,n)?mh(a,s):(t.flags=t.flags&-4097|2,rn=!1,yr=t)}}else{if(gc(t))throw Error(o(418));t.flags=t.flags&-4097|2,rn=!1,yr=t}}}function vh(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;yr=t}function Zl(t){if(t!==yr)return!1;if(!rn)return vh(t),rn=!0,!1;var n;if((n=t.tag!==3)&&!(n=t.tag!==5)&&(n=t.type,n=n!=="head"&&n!=="body"&&!lc(t.type,t.memoizedProps)),n&&(n=vr)){if(gc(t))throw xh(),Error(o(418));for(;n;)mh(t,n),n=$o(n.nextSibling)}if(vh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"){if(n===0){vr=$o(t.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}t=t.nextSibling}vr=null}}else vr=yr?$o(t.stateNode.nextSibling):null;return!0}function xh(){for(var t=vr;t;)t=$o(t.nextSibling)}function ni(){vr=yr=null,rn=!1}function yc(t){jr===null?jr=[t]:jr.push(t)}var x2=I.ReactCurrentBatchConfig;function Ki(t,n,s){if(t=s.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var a=s.stateNode}if(!a)throw Error(o(147,t));var f=a,g=""+t;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===g?n.ref:(n=function(R){var L=f.refs;R===null?delete L[g]:L[g]=R},n._stringRef=g,n)}if(typeof t!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,t))}return t}function Ql(t,n){throw t=Object.prototype.toString.call(n),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t))}function wh(t){var n=t._init;return n(t._payload)}function bh(t){function n(Q,Y){if(t){var te=Q.deletions;te===null?(Q.deletions=[Y],Q.flags|=16):te.push(Y)}}function s(Q,Y){if(!t)return null;for(;Y!==null;)n(Q,Y),Y=Y.sibling;return null}function a(Q,Y){for(Q=new Map;Y!==null;)Y.key!==null?Q.set(Y.key,Y):Q.set(Y.index,Y),Y=Y.sibling;return Q}function f(Q,Y){return Q=Qo(Q,Y),Q.index=0,Q.sibling=null,Q}function g(Q,Y,te){return Q.index=te,t?(te=Q.alternate,te!==null?(te=te.index,te<Y?(Q.flags|=2,Y):te):(Q.flags|=2,Y)):(Q.flags|=1048576,Y)}function R(Q){return t&&Q.alternate===null&&(Q.flags|=2),Q}function L(Q,Y,te,Ee){return Y===null||Y.tag!==6?(Y=uf(te,Q.mode,Ee),Y.return=Q,Y):(Y=f(Y,te),Y.return=Q,Y)}function $(Q,Y,te,Ee){var qe=te.type;return qe===N?he(Q,Y,te.props.children,Ee,te.key):Y!==null&&(Y.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===ne&&wh(qe)===Y.type)?(Ee=f(Y,te.props),Ee.ref=Ki(Q,Y,te),Ee.return=Q,Ee):(Ee=ka(te.type,te.key,te.props,null,Q.mode,Ee),Ee.ref=Ki(Q,Y,te),Ee.return=Q,Ee)}function ie(Q,Y,te,Ee){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==te.containerInfo||Y.stateNode.implementation!==te.implementation?(Y=cf(te,Q.mode,Ee),Y.return=Q,Y):(Y=f(Y,te.children||[]),Y.return=Q,Y)}function he(Q,Y,te,Ee,qe){return Y===null||Y.tag!==7?(Y=Ts(te,Q.mode,Ee,qe),Y.return=Q,Y):(Y=f(Y,te),Y.return=Q,Y)}function ye(Q,Y,te){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=uf(""+Y,Q.mode,te),Y.return=Q,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case P:return te=ka(Y.type,Y.key,Y.props,null,Q.mode,te),te.ref=Ki(Q,null,Y),te.return=Q,te;case _:return Y=cf(Y,Q.mode,te),Y.return=Q,Y;case ne:var Ee=Y._init;return ye(Q,Ee(Y._payload),te)}if(Ye(Y)||V(Y))return Y=Ts(Y,Q.mode,te,null),Y.return=Q,Y;Ql(Q,Y)}return null}function pe(Q,Y,te,Ee){var qe=Y!==null?Y.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return qe!==null?null:L(Q,Y,""+te,Ee);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case P:return te.key===qe?$(Q,Y,te,Ee):null;case _:return te.key===qe?ie(Q,Y,te,Ee):null;case ne:return qe=te._init,pe(Q,Y,qe(te._payload),Ee)}if(Ye(te)||V(te))return qe!==null?null:he(Q,Y,te,Ee,null);Ql(Q,te)}return null}function ze(Q,Y,te,Ee,qe){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return Q=Q.get(te)||null,L(Y,Q,""+Ee,qe);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case P:return Q=Q.get(Ee.key===null?te:Ee.key)||null,$(Y,Q,Ee,qe);case _:return Q=Q.get(Ee.key===null?te:Ee.key)||null,ie(Y,Q,Ee,qe);case ne:var ot=Ee._init;return ze(Q,Y,te,ot(Ee._payload),qe)}if(Ye(Ee)||V(Ee))return Q=Q.get(te)||null,he(Y,Q,Ee,qe,null);Ql(Y,Ee)}return null}function Ke(Q,Y,te,Ee){for(var qe=null,ot=null,st=Y,pt=Y=0,Pn=null;st!==null&&pt<te.length;pt++){st.index>pt?(Pn=st,st=null):Pn=st.sibling;var Dt=pe(Q,st,te[pt],Ee);if(Dt===null){st===null&&(st=Pn);break}t&&st&&Dt.alternate===null&&n(Q,st),Y=g(Dt,Y,pt),ot===null?qe=Dt:ot.sibling=Dt,ot=Dt,st=Pn}if(pt===te.length)return s(Q,st),rn&&xs(Q,pt),qe;if(st===null){for(;pt<te.length;pt++)st=ye(Q,te[pt],Ee),st!==null&&(Y=g(st,Y,pt),ot===null?qe=st:ot.sibling=st,ot=st);return rn&&xs(Q,pt),qe}for(st=a(Q,st);pt<te.length;pt++)Pn=ze(st,Q,pt,te[pt],Ee),Pn!==null&&(t&&Pn.alternate!==null&&st.delete(Pn.key===null?pt:Pn.key),Y=g(Pn,Y,pt),ot===null?qe=Pn:ot.sibling=Pn,ot=Pn);return t&&st.forEach(function(Jo){return n(Q,Jo)}),rn&&xs(Q,pt),qe}function Ge(Q,Y,te,Ee){var qe=V(te);if(typeof qe!="function")throw Error(o(150));if(te=qe.call(te),te==null)throw Error(o(151));for(var ot=qe=null,st=Y,pt=Y=0,Pn=null,Dt=te.next();st!==null&&!Dt.done;pt++,Dt=te.next()){st.index>pt?(Pn=st,st=null):Pn=st.sibling;var Jo=pe(Q,st,Dt.value,Ee);if(Jo===null){st===null&&(st=Pn);break}t&&st&&Jo.alternate===null&&n(Q,st),Y=g(Jo,Y,pt),ot===null?qe=Jo:ot.sibling=Jo,ot=Jo,st=Pn}if(Dt.done)return s(Q,st),rn&&xs(Q,pt),qe;if(st===null){for(;!Dt.done;pt++,Dt=te.next())Dt=ye(Q,Dt.value,Ee),Dt!==null&&(Y=g(Dt,Y,pt),ot===null?qe=Dt:ot.sibling=Dt,ot=Dt);return rn&&xs(Q,pt),qe}for(st=a(Q,st);!Dt.done;pt++,Dt=te.next())Dt=ze(st,Q,pt,Dt.value,Ee),Dt!==null&&(t&&Dt.alternate!==null&&st.delete(Dt.key===null?pt:Dt.key),Y=g(Dt,Y,pt),ot===null?qe=Dt:ot.sibling=Dt,ot=Dt);return t&&st.forEach(function(Q2){return n(Q,Q2)}),rn&&xs(Q,pt),qe}function mn(Q,Y,te,Ee){if(typeof te=="object"&&te!==null&&te.type===N&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case P:e:{for(var qe=te.key,ot=Y;ot!==null;){if(ot.key===qe){if(qe=te.type,qe===N){if(ot.tag===7){s(Q,ot.sibling),Y=f(ot,te.props.children),Y.return=Q,Q=Y;break e}}else if(ot.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===ne&&wh(qe)===ot.type){s(Q,ot.sibling),Y=f(ot,te.props),Y.ref=Ki(Q,ot,te),Y.return=Q,Q=Y;break e}s(Q,ot);break}else n(Q,ot);ot=ot.sibling}te.type===N?(Y=Ts(te.props.children,Q.mode,Ee,te.key),Y.return=Q,Q=Y):(Ee=ka(te.type,te.key,te.props,null,Q.mode,Ee),Ee.ref=Ki(Q,Y,te),Ee.return=Q,Q=Ee)}return R(Q);case _:e:{for(ot=te.key;Y!==null;){if(Y.key===ot)if(Y.tag===4&&Y.stateNode.containerInfo===te.containerInfo&&Y.stateNode.implementation===te.implementation){s(Q,Y.sibling),Y=f(Y,te.children||[]),Y.return=Q,Q=Y;break e}else{s(Q,Y);break}else n(Q,Y);Y=Y.sibling}Y=cf(te,Q.mode,Ee),Y.return=Q,Q=Y}return R(Q);case ne:return ot=te._init,mn(Q,Y,ot(te._payload),Ee)}if(Ye(te))return Ke(Q,Y,te,Ee);if(V(te))return Ge(Q,Y,te,Ee);Ql(Q,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,Y!==null&&Y.tag===6?(s(Q,Y.sibling),Y=f(Y,te),Y.return=Q,Q=Y):(s(Q,Y),Y=uf(te,Q.mode,Ee),Y.return=Q,Q=Y),R(Q)):s(Q,Y)}return mn}var ri=bh(!0),kh=bh(!1),Jl=Uo(null),ea=null,oi=null,vc=null;function xc(){vc=oi=ea=null}function wc(t){var n=Jl.current;tn(Jl),t._currentValue=n}function bc(t,n,s){for(;t!==null;){var a=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),t===s)break;t=t.return}}function si(t,n){ea=t,vc=oi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&n)!==0&&(sr=!0),t.firstContext=null)}function Pr(t){var n=t._currentValue;if(vc!==t)if(t={context:t,memoizedValue:n,next:null},oi===null){if(ea===null)throw Error(o(308));oi=t,ea.dependencies={lanes:0,firstContext:t}}else oi=oi.next=t;return n}var ws=null;function kc(t){ws===null?ws=[t]:ws.push(t)}function Sh(t,n,s,a){var f=n.interleaved;return f===null?(s.next=s,kc(n)):(s.next=f.next,f.next=s),n.interleaved=s,wo(t,a)}function wo(t,n){t.lanes|=n;var s=t.alternate;for(s!==null&&(s.lanes|=n),s=t,t=t.return;t!==null;)t.childLanes|=n,s=t.alternate,s!==null&&(s.childLanes|=n),s=t,t=t.return;return s.tag===3?s.stateNode:null}var Wo=!1;function Sc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Eh(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function bo(t,n){return{eventTime:t,lane:n,tag:0,payload:null,callback:null,next:null}}function Ko(t,n,s){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Nt&2)!==0){var f=a.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),a.pending=n,wo(t,s)}return f=a.interleaved,f===null?(n.next=n,kc(a)):(n.next=f.next,f.next=n),a.interleaved=n,wo(t,s)}function ta(t,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var a=n.lanes;a&=t.pendingLanes,s|=a,n.lanes=s,nt(t,s)}}function Rh(t,n){var s=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var f=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var R={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};g===null?f=g=R:g=g.next=R,s=s.next}while(s!==null);g===null?f=g=n:g=g.next=n}else f=g=n;s={baseState:a.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:a.shared,effects:a.effects},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=n:t.next=n,s.lastBaseUpdate=n}function na(t,n,s,a){var f=t.updateQueue;Wo=!1;var g=f.firstBaseUpdate,R=f.lastBaseUpdate,L=f.shared.pending;if(L!==null){f.shared.pending=null;var $=L,ie=$.next;$.next=null,R===null?g=ie:R.next=ie,R=$;var he=t.alternate;he!==null&&(he=he.updateQueue,L=he.lastBaseUpdate,L!==R&&(L===null?he.firstBaseUpdate=ie:L.next=ie,he.lastBaseUpdate=$))}if(g!==null){var ye=f.baseState;R=0,he=ie=$=null,L=g;do{var pe=L.lane,ze=L.eventTime;if((a&pe)===pe){he!==null&&(he=he.next={eventTime:ze,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ke=t,Ge=L;switch(pe=n,ze=s,Ge.tag){case 1:if(Ke=Ge.payload,typeof Ke=="function"){ye=Ke.call(ze,ye,pe);break e}ye=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=Ge.payload,pe=typeof Ke=="function"?Ke.call(ze,ye,pe):Ke,pe==null)break e;ye=U({},ye,pe);break e;case 2:Wo=!0}}L.callback!==null&&L.lane!==0&&(t.flags|=64,pe=f.effects,pe===null?f.effects=[L]:pe.push(L))}else ze={eventTime:ze,lane:pe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},he===null?(ie=he=ze,$=ye):he=he.next=ze,R|=pe;if(L=L.next,L===null){if(L=f.shared.pending,L===null)break;pe=L,L=pe.next,pe.next=null,f.lastBaseUpdate=pe,f.shared.pending=null}}while(!0);if(he===null&&($=ye),f.baseState=$,f.firstBaseUpdate=ie,f.lastBaseUpdate=he,n=f.shared.interleaved,n!==null){f=n;do R|=f.lane,f=f.next;while(f!==n)}else g===null&&(f.shared.lanes=0);Ss|=R,t.lanes=R,t.memoizedState=ye}}function Ch(t,n,s){if(t=n.effects,n.effects=null,t!==null)for(n=0;n<t.length;n++){var a=t[n],f=a.callback;if(f!==null){if(a.callback=null,a=s,typeof f!="function")throw Error(o(191,f));f.call(a)}}}var Gi={},qr=Uo(Gi),Yi=Uo(Gi),Xi=Uo(Gi);function bs(t){if(t===Gi)throw Error(o(174));return t}function Ec(t,n){switch(Zt(Xi,n),Zt(Yi,t),Zt(qr,Gi),t=n.nodeType,t){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Be(null,"");break;default:t=t===8?n.parentNode:n,n=t.namespaceURI||null,t=t.tagName,n=Be(n,t)}tn(qr),Zt(qr,n)}function ii(){tn(qr),tn(Yi),tn(Xi)}function Th(t){bs(Xi.current);var n=bs(qr.current),s=Be(n,t.type);n!==s&&(Zt(Yi,t),Zt(qr,s))}function Rc(t){Yi.current===t&&(tn(qr),tn(Yi))}var ln=Uo(0);function ra(t){for(var n=t;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Cc=[];function Tc(){for(var t=0;t<Cc.length;t++)Cc[t]._workInProgressVersionPrimary=null;Cc.length=0}var oa=I.ReactCurrentDispatcher,Ic=I.ReactCurrentBatchConfig,ks=0,an=null,kn=null,In=null,sa=!1,qi=!1,Zi=0,w2=0;function Vn(){throw Error(o(321))}function Ac(t,n){if(n===null)return!1;for(var s=0;s<n.length&&s<t.length;s++)if(!zr(t[s],n[s]))return!1;return!0}function Pc(t,n,s,a,f,g){if(ks=g,an=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,oa.current=t===null||t.memoizedState===null?E2:R2,t=s(a,f),qi){g=0;do{if(qi=!1,Zi=0,25<=g)throw Error(o(301));g+=1,In=kn=null,n.updateQueue=null,oa.current=C2,t=s(a,f)}while(qi)}if(oa.current=aa,n=kn!==null&&kn.next!==null,ks=0,In=kn=an=null,sa=!1,n)throw Error(o(300));return t}function _c(){var t=Zi!==0;return Zi=0,t}function Zr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return In===null?an.memoizedState=In=t:In=In.next=t,In}function _r(){if(kn===null){var t=an.alternate;t=t!==null?t.memoizedState:null}else t=kn.next;var n=In===null?an.memoizedState:In.next;if(n!==null)In=n,kn=t;else{if(t===null)throw Error(o(310));kn=t,t={memoizedState:kn.memoizedState,baseState:kn.baseState,baseQueue:kn.baseQueue,queue:kn.queue,next:null},In===null?an.memoizedState=In=t:In=In.next=t}return In}function Qi(t,n){return typeof n=="function"?n(t):n}function Oc(t){var n=_r(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=t;var a=kn,f=a.baseQueue,g=s.pending;if(g!==null){if(f!==null){var R=f.next;f.next=g.next,g.next=R}a.baseQueue=f=g,s.pending=null}if(f!==null){g=f.next,a=a.baseState;var L=R=null,$=null,ie=g;do{var he=ie.lane;if((ks&he)===he)$!==null&&($=$.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),a=ie.hasEagerState?ie.eagerState:t(a,ie.action);else{var ye={lane:he,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};$===null?(L=$=ye,R=a):$=$.next=ye,an.lanes|=he,Ss|=he}ie=ie.next}while(ie!==null&&ie!==g);$===null?R=a:$.next=L,zr(a,n.memoizedState)||(sr=!0),n.memoizedState=a,n.baseState=R,n.baseQueue=$,s.lastRenderedState=a}if(t=s.interleaved,t!==null){f=t;do g=f.lane,an.lanes|=g,Ss|=g,f=f.next;while(f!==t)}else f===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function Nc(t){var n=_r(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=t;var a=s.dispatch,f=s.pending,g=n.memoizedState;if(f!==null){s.pending=null;var R=f=f.next;do g=t(g,R.action),R=R.next;while(R!==f);zr(g,n.memoizedState)||(sr=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),s.lastRenderedState=g}return[g,a]}function Ih(){}function Ah(t,n){var s=an,a=_r(),f=n(),g=!zr(a.memoizedState,f);if(g&&(a.memoizedState=f,sr=!0),a=a.queue,Mc(Oh.bind(null,s,a,t),[t]),a.getSnapshot!==n||g||In!==null&&In.memoizedState.tag&1){if(s.flags|=2048,Ji(9,_h.bind(null,s,a,f,n),void 0,null),An===null)throw Error(o(349));(ks&30)!==0||Ph(s,n,f)}return f}function Ph(t,n,s){t.flags|=16384,t={getSnapshot:n,value:s},n=an.updateQueue,n===null?(n={lastEffect:null,stores:null},an.updateQueue=n,n.stores=[t]):(s=n.stores,s===null?n.stores=[t]:s.push(t))}function _h(t,n,s,a){n.value=s,n.getSnapshot=a,Nh(n)&&Mh(t)}function Oh(t,n,s){return s(function(){Nh(n)&&Mh(t)})}function Nh(t){var n=t.getSnapshot;t=t.value;try{var s=n();return!zr(t,s)}catch{return!0}}function Mh(t){var n=wo(t,1);n!==null&&Vr(n,t,1,-1)}function Lh(t){var n=Zr();return typeof t=="function"&&(t=t()),n.memoizedState=n.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:t},n.queue=t,t=t.dispatch=S2.bind(null,an,t),[n.memoizedState,t]}function Ji(t,n,s,a){return t={tag:t,create:n,destroy:s,deps:a,next:null},n=an.updateQueue,n===null?(n={lastEffect:null,stores:null},an.updateQueue=n,n.lastEffect=t.next=t):(s=n.lastEffect,s===null?n.lastEffect=t.next=t:(a=s.next,s.next=t,t.next=a,n.lastEffect=t)),t}function Dh(){return _r().memoizedState}function ia(t,n,s,a){var f=Zr();an.flags|=t,f.memoizedState=Ji(1|n,s,void 0,a===void 0?null:a)}function la(t,n,s,a){var f=_r();a=a===void 0?null:a;var g=void 0;if(kn!==null){var R=kn.memoizedState;if(g=R.destroy,a!==null&&Ac(a,R.deps)){f.memoizedState=Ji(n,s,g,a);return}}an.flags|=t,f.memoizedState=Ji(1|n,s,g,a)}function Fh(t,n){return ia(8390656,8,t,n)}function Mc(t,n){return la(2048,8,t,n)}function zh(t,n){return la(4,2,t,n)}function jh(t,n){return la(4,4,t,n)}function Bh(t,n){if(typeof n=="function")return t=t(),n(t),function(){n(null)};if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function $h(t,n,s){return s=s!=null?s.concat([t]):null,la(4,4,Bh.bind(null,n,t),s)}function Lc(){}function Uh(t,n){var s=_r();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Ac(n,a[1])?a[0]:(s.memoizedState=[t,n],t)}function Vh(t,n){var s=_r();n=n===void 0?null:n;var a=s.memoizedState;return a!==null&&n!==null&&Ac(n,a[1])?a[0]:(t=t(),s.memoizedState=[t,n],t)}function Hh(t,n,s){return(ks&21)===0?(t.baseState&&(t.baseState=!1,sr=!0),t.memoizedState=s):(zr(s,n)||(s=at(),an.lanes|=s,Ss|=s,t.baseState=!0),n)}function b2(t,n){var s=Oe;Oe=s!==0&&4>s?s:4,t(!0);var a=Ic.transition;Ic.transition={};try{t(!1),n()}finally{Oe=s,Ic.transition=a}}function Wh(){return _r().memoizedState}function k2(t,n,s){var a=qo(t);if(s={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null},Kh(t))Gh(n,s);else if(s=Sh(t,n,s,a),s!==null){var f=Xn();Vr(s,t,a,f),Yh(s,n,a)}}function S2(t,n,s){var a=qo(t),f={lane:a,action:s,hasEagerState:!1,eagerState:null,next:null};if(Kh(t))Gh(n,f);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var R=n.lastRenderedState,L=g(R,s);if(f.hasEagerState=!0,f.eagerState=L,zr(L,R)){var $=n.interleaved;$===null?(f.next=f,kc(n)):(f.next=$.next,$.next=f),n.interleaved=f;return}}catch{}finally{}s=Sh(t,n,f,a),s!==null&&(f=Xn(),Vr(s,t,a,f),Yh(s,n,a))}}function Kh(t){var n=t.alternate;return t===an||n!==null&&n===an}function Gh(t,n){qi=sa=!0;var s=t.pending;s===null?n.next=n:(n.next=s.next,s.next=n),t.pending=n}function Yh(t,n,s){if((s&4194240)!==0){var a=n.lanes;a&=t.pendingLanes,s|=a,n.lanes=s,nt(t,s)}}var aa={readContext:Pr,useCallback:Vn,useContext:Vn,useEffect:Vn,useImperativeHandle:Vn,useInsertionEffect:Vn,useLayoutEffect:Vn,useMemo:Vn,useReducer:Vn,useRef:Vn,useState:Vn,useDebugValue:Vn,useDeferredValue:Vn,useTransition:Vn,useMutableSource:Vn,useSyncExternalStore:Vn,useId:Vn,unstable_isNewReconciler:!1},E2={readContext:Pr,useCallback:function(t,n){return Zr().memoizedState=[t,n===void 0?null:n],t},useContext:Pr,useEffect:Fh,useImperativeHandle:function(t,n,s){return s=s!=null?s.concat([t]):null,ia(4194308,4,Bh.bind(null,n,t),s)},useLayoutEffect:function(t,n){return ia(4194308,4,t,n)},useInsertionEffect:function(t,n){return ia(4,2,t,n)},useMemo:function(t,n){var s=Zr();return n=n===void 0?null:n,t=t(),s.memoizedState=[t,n],t},useReducer:function(t,n,s){var a=Zr();return n=s!==void 0?s(n):n,a.memoizedState=a.baseState=n,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=k2.bind(null,an,t),[a.memoizedState,t]},useRef:function(t){var n=Zr();return t={current:t},n.memoizedState=t},useState:Lh,useDebugValue:Lc,useDeferredValue:function(t){return Zr().memoizedState=t},useTransition:function(){var t=Lh(!1),n=t[0];return t=b2.bind(null,t[1]),Zr().memoizedState=t,[n,t]},useMutableSource:function(){},useSyncExternalStore:function(t,n,s){var a=an,f=Zr();if(rn){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),An===null)throw Error(o(349));(ks&30)!==0||Ph(a,n,s)}f.memoizedState=s;var g={value:s,getSnapshot:n};return f.queue=g,Fh(Oh.bind(null,a,g,t),[t]),a.flags|=2048,Ji(9,_h.bind(null,a,g,s,n),void 0,null),s},useId:function(){var t=Zr(),n=An.identifierPrefix;if(rn){var s=xo,a=vo;s=(a&~(1<<32-Ht(a)-1)).toString(32)+s,n=":"+n+"R"+s,s=Zi++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=w2++,n=":"+n+"r"+s.toString(32)+":";return t.memoizedState=n},unstable_isNewReconciler:!1},R2={readContext:Pr,useCallback:Uh,useContext:Pr,useEffect:Mc,useImperativeHandle:$h,useInsertionEffect:zh,useLayoutEffect:jh,useMemo:Vh,useReducer:Oc,useRef:Dh,useState:function(){return Oc(Qi)},useDebugValue:Lc,useDeferredValue:function(t){var n=_r();return Hh(n,kn.memoizedState,t)},useTransition:function(){var t=Oc(Qi)[0],n=_r().memoizedState;return[t,n]},useMutableSource:Ih,useSyncExternalStore:Ah,useId:Wh,unstable_isNewReconciler:!1},C2={readContext:Pr,useCallback:Uh,useContext:Pr,useEffect:Mc,useImperativeHandle:$h,useInsertionEffect:zh,useLayoutEffect:jh,useMemo:Vh,useReducer:Nc,useRef:Dh,useState:function(){return Nc(Qi)},useDebugValue:Lc,useDeferredValue:function(t){var n=_r();return kn===null?n.memoizedState=t:Hh(n,kn.memoizedState,t)},useTransition:function(){var t=Nc(Qi)[0],n=_r().memoizedState;return[t,n]},useMutableSource:Ih,useSyncExternalStore:Ah,useId:Wh,unstable_isNewReconciler:!1};function Br(t,n){if(t&&t.defaultProps){n=U({},n),t=t.defaultProps;for(var s in t)n[s]===void 0&&(n[s]=t[s]);return n}return n}function Dc(t,n,s,a){n=t.memoizedState,s=s(a,n),s=s==null?n:U({},n,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var ua={isMounted:function(t){return(t=t._reactInternals)?vn(t)===t:!1},enqueueSetState:function(t,n,s){t=t._reactInternals;var a=Xn(),f=qo(t),g=bo(a,f);g.payload=n,s!=null&&(g.callback=s),n=Ko(t,g,f),n!==null&&(Vr(n,t,f,a),ta(n,t,f))},enqueueReplaceState:function(t,n,s){t=t._reactInternals;var a=Xn(),f=qo(t),g=bo(a,f);g.tag=1,g.payload=n,s!=null&&(g.callback=s),n=Ko(t,g,f),n!==null&&(Vr(n,t,f,a),ta(n,t,f))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var s=Xn(),a=qo(t),f=bo(s,a);f.tag=2,n!=null&&(f.callback=n),n=Ko(t,f,a),n!==null&&(Vr(n,t,a,s),ta(n,t,a))}};function Xh(t,n,s,a,f,g,R){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,g,R):n.prototype&&n.prototype.isPureReactComponent?!ji(s,a)||!ji(f,g):!0}function qh(t,n,s){var a=!1,f=Vo,g=n.contextType;return typeof g=="object"&&g!==null?g=Pr(g):(f=or(n)?ys:Un.current,a=n.contextTypes,g=(a=a!=null)?Js(t,f):Vo),n=new n(s,g),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=ua,t.stateNode=n,n._reactInternals=t,a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=f,t.__reactInternalMemoizedMaskedChildContext=g),n}function Zh(t,n,s,a){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,a),n.state!==t&&ua.enqueueReplaceState(n,n.state,null)}function Fc(t,n,s,a){var f=t.stateNode;f.props=s,f.state=t.memoizedState,f.refs={},Sc(t);var g=n.contextType;typeof g=="object"&&g!==null?f.context=Pr(g):(g=or(n)?ys:Un.current,f.context=Js(t,g)),f.state=t.memoizedState,g=n.getDerivedStateFromProps,typeof g=="function"&&(Dc(t,n,g,s),f.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(n=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),n!==f.state&&ua.enqueueReplaceState(f,f.state,null),na(t,s,f,a),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308)}function li(t,n){try{var s="",a=n;do s+=oe(a),a=a.return;while(a);var f=s}catch(g){f=`
|
|
39
|
+
Error generating stack: `+g.message+`
|
|
40
|
+
`+g.stack}return{value:t,source:n,stack:f,digest:null}}function zc(t,n,s){return{value:t,source:null,stack:s??null,digest:n??null}}function jc(t,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var T2=typeof WeakMap=="function"?WeakMap:Map;function Qh(t,n,s){s=bo(-1,s),s.tag=3,s.payload={element:null};var a=n.value;return s.callback=function(){ma||(ma=!0,ef=a),jc(t,n)},s}function Jh(t,n,s){s=bo(-1,s),s.tag=3;var a=t.type.getDerivedStateFromError;if(typeof a=="function"){var f=n.value;s.payload=function(){return a(f)},s.callback=function(){jc(t,n)}}var g=t.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(s.callback=function(){jc(t,n),typeof a!="function"&&(Yo===null?Yo=new Set([this]):Yo.add(this));var R=n.stack;this.componentDidCatch(n.value,{componentStack:R!==null?R:""})}),s}function eg(t,n,s){var a=t.pingCache;if(a===null){a=t.pingCache=new T2;var f=new Set;a.set(n,f)}else f=a.get(n),f===void 0&&(f=new Set,a.set(n,f));f.has(s)||(f.add(s),t=$2.bind(null,t,n,s),n.then(t,t))}function tg(t){do{var n;if((n=t.tag===13)&&(n=t.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return t;t=t.return}while(t!==null);return null}function ng(t,n,s,a,f){return(t.mode&1)===0?(t===n?t.flags|=65536:(t.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=bo(-1,1),n.tag=2,Ko(s,n,1))),s.lanes|=1),t):(t.flags|=65536,t.lanes=f,t)}var I2=I.ReactCurrentOwner,sr=!1;function Yn(t,n,s,a){n.child=t===null?kh(n,null,s,a):ri(n,t.child,s,a)}function rg(t,n,s,a,f){s=s.render;var g=n.ref;return si(n,f),a=Pc(t,n,s,a,g,f),s=_c(),t!==null&&!sr?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~f,ko(t,n,f)):(rn&&s&&pc(n),n.flags|=1,Yn(t,n,a,f),n.child)}function og(t,n,s,a,f){if(t===null){var g=s.type;return typeof g=="function"&&!af(g)&&g.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=g,sg(t,n,g,a,f)):(t=ka(s.type,null,a,n,n.mode,f),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,(t.lanes&f)===0){var R=g.memoizedProps;if(s=s.compare,s=s!==null?s:ji,s(R,a)&&t.ref===n.ref)return ko(t,n,f)}return n.flags|=1,t=Qo(g,a),t.ref=n.ref,t.return=n,n.child=t}function sg(t,n,s,a,f){if(t!==null){var g=t.memoizedProps;if(ji(g,a)&&t.ref===n.ref)if(sr=!1,n.pendingProps=a=g,(t.lanes&f)!==0)(t.flags&131072)!==0&&(sr=!0);else return n.lanes=t.lanes,ko(t,n,f)}return Bc(t,n,s,a,f)}function ig(t,n,s){var a=n.pendingProps,f=a.children,g=t!==null?t.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(ui,xr),xr|=s;else{if((s&1073741824)===0)return t=g!==null?g.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:t,cachePool:null,transitions:null},n.updateQueue=null,Zt(ui,xr),xr|=t,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=g!==null?g.baseLanes:s,Zt(ui,xr),xr|=a}else g!==null?(a=g.baseLanes|s,n.memoizedState=null):a=s,Zt(ui,xr),xr|=a;return Yn(t,n,f,s),n.child}function lg(t,n){var s=n.ref;(t===null&&s!==null||t!==null&&t.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function Bc(t,n,s,a,f){var g=or(s)?ys:Un.current;return g=Js(n,g),si(n,f),s=Pc(t,n,s,a,g,f),a=_c(),t!==null&&!sr?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~f,ko(t,n,f)):(rn&&a&&pc(n),n.flags|=1,Yn(t,n,s,f),n.child)}function ag(t,n,s,a,f){if(or(s)){var g=!0;Gl(n)}else g=!1;if(si(n,f),n.stateNode===null)fa(t,n),qh(n,s,a),Fc(n,s,a,f),a=!0;else if(t===null){var R=n.stateNode,L=n.memoizedProps;R.props=L;var $=R.context,ie=s.contextType;typeof ie=="object"&&ie!==null?ie=Pr(ie):(ie=or(s)?ys:Un.current,ie=Js(n,ie));var he=s.getDerivedStateFromProps,ye=typeof he=="function"||typeof R.getSnapshotBeforeUpdate=="function";ye||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(L!==a||$!==ie)&&Zh(n,R,a,ie),Wo=!1;var pe=n.memoizedState;R.state=pe,na(n,a,R,f),$=n.memoizedState,L!==a||pe!==$||rr.current||Wo?(typeof he=="function"&&(Dc(n,s,he,a),$=n.memoizedState),(L=Wo||Xh(n,s,L,a,pe,$,ie))?(ye||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(n.flags|=4194308)):(typeof R.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=$),R.props=a,R.state=$,R.context=ie,a=L):(typeof R.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{R=n.stateNode,Eh(t,n),L=n.memoizedProps,ie=n.type===n.elementType?L:Br(n.type,L),R.props=ie,ye=n.pendingProps,pe=R.context,$=s.contextType,typeof $=="object"&&$!==null?$=Pr($):($=or(s)?ys:Un.current,$=Js(n,$));var ze=s.getDerivedStateFromProps;(he=typeof ze=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(L!==ye||pe!==$)&&Zh(n,R,a,$),Wo=!1,pe=n.memoizedState,R.state=pe,na(n,a,R,f);var Ke=n.memoizedState;L!==ye||pe!==Ke||rr.current||Wo?(typeof ze=="function"&&(Dc(n,s,ze,a),Ke=n.memoizedState),(ie=Wo||Xh(n,s,ie,a,pe,Ke,$)||!1)?(he||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(a,Ke,$),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(a,Ke,$)),typeof R.componentDidUpdate=="function"&&(n.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof R.componentDidUpdate!="function"||L===t.memoizedProps&&pe===t.memoizedState||(n.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||L===t.memoizedProps&&pe===t.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=Ke),R.props=a,R.state=Ke,R.context=$,a=ie):(typeof R.componentDidUpdate!="function"||L===t.memoizedProps&&pe===t.memoizedState||(n.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||L===t.memoizedProps&&pe===t.memoizedState||(n.flags|=1024),a=!1)}return $c(t,n,s,a,g,f)}function $c(t,n,s,a,f,g){lg(t,n);var R=(n.flags&128)!==0;if(!a&&!R)return f&&ph(n,s,!1),ko(t,n,g);a=n.stateNode,I2.current=n;var L=R&&typeof s.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,t!==null&&R?(n.child=ri(n,t.child,null,g),n.child=ri(n,null,L,g)):Yn(t,n,L,g),n.memoizedState=a.state,f&&ph(n,s,!0),n.child}function ug(t){var n=t.stateNode;n.pendingContext?fh(t,n.pendingContext,n.pendingContext!==n.context):n.context&&fh(t,n.context,!1),Ec(t,n.containerInfo)}function cg(t,n,s,a,f){return ni(),yc(f),n.flags|=256,Yn(t,n,s,a),n.child}var Uc={dehydrated:null,treeContext:null,retryLane:0};function Vc(t){return{baseLanes:t,cachePool:null,transitions:null}}function fg(t,n,s){var a=n.pendingProps,f=ln.current,g=!1,R=(n.flags&128)!==0,L;if((L=R)||(L=t!==null&&t.memoizedState===null?!1:(f&2)!==0),L?(g=!0,n.flags&=-129):(t===null||t.memoizedState!==null)&&(f|=1),Zt(ln,f&1),t===null)return mc(n),t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((n.mode&1)===0?n.lanes=1:t.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(R=a.children,t=a.fallback,g?(a=n.mode,g=n.child,R={mode:"hidden",children:R},(a&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=R):g=Sa(R,a,0,null),t=Ts(t,a,s,null),g.return=n,t.return=n,g.sibling=t,n.child=g,n.child.memoizedState=Vc(s),n.memoizedState=Uc,t):Hc(n,R));if(f=t.memoizedState,f!==null&&(L=f.dehydrated,L!==null))return A2(t,n,R,a,L,f,s);if(g){g=a.fallback,R=n.mode,f=t.child,L=f.sibling;var $={mode:"hidden",children:a.children};return(R&1)===0&&n.child!==f?(a=n.child,a.childLanes=0,a.pendingProps=$,n.deletions=null):(a=Qo(f,$),a.subtreeFlags=f.subtreeFlags&14680064),L!==null?g=Qo(L,g):(g=Ts(g,R,s,null),g.flags|=2),g.return=n,a.return=n,a.sibling=g,n.child=a,a=g,g=n.child,R=t.child.memoizedState,R=R===null?Vc(s):{baseLanes:R.baseLanes|s,cachePool:null,transitions:R.transitions},g.memoizedState=R,g.childLanes=t.childLanes&~s,n.memoizedState=Uc,a}return g=t.child,t=g.sibling,a=Qo(g,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=s),a.return=n,a.sibling=null,t!==null&&(s=n.deletions,s===null?(n.deletions=[t],n.flags|=16):s.push(t)),n.child=a,n.memoizedState=null,a}function Hc(t,n){return n=Sa({mode:"visible",children:n},t.mode,0,null),n.return=t,t.child=n}function ca(t,n,s,a){return a!==null&&yc(a),ri(n,t.child,null,s),t=Hc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function A2(t,n,s,a,f,g,R){if(s)return n.flags&256?(n.flags&=-257,a=zc(Error(o(422))),ca(t,n,R,a)):n.memoizedState!==null?(n.child=t.child,n.flags|=128,null):(g=a.fallback,f=n.mode,a=Sa({mode:"visible",children:a.children},f,0,null),g=Ts(g,f,R,null),g.flags|=2,a.return=n,g.return=n,a.sibling=g,n.child=a,(n.mode&1)!==0&&ri(n,t.child,null,R),n.child.memoizedState=Vc(R),n.memoizedState=Uc,g);if((n.mode&1)===0)return ca(t,n,R,null);if(f.data==="$!"){if(a=f.nextSibling&&f.nextSibling.dataset,a)var L=a.dgst;return a=L,g=Error(o(419)),a=zc(g,a,void 0),ca(t,n,R,a)}if(L=(R&t.childLanes)!==0,sr||L){if(a=An,a!==null){switch(R&-R){case 4:f=2;break;case 16:f=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(a.suspendedLanes|R))!==0?0:f,f!==0&&f!==g.retryLane&&(g.retryLane=f,wo(t,f),Vr(a,t,f,-1))}return lf(),a=zc(Error(o(421))),ca(t,n,R,a)}return f.data==="$?"?(n.flags|=128,n.child=t.child,n=U2.bind(null,t),f._reactRetry=n,null):(t=g.treeContext,vr=$o(f.nextSibling),yr=n,rn=!0,jr=null,t!==null&&(Ir[Ar++]=vo,Ir[Ar++]=xo,Ir[Ar++]=vs,vo=t.id,xo=t.overflow,vs=n),n=Hc(n,a.children),n.flags|=4096,n)}function dg(t,n,s){t.lanes|=n;var a=t.alternate;a!==null&&(a.lanes|=n),bc(t.return,n,s)}function Wc(t,n,s,a,f){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:f}:(g.isBackwards=n,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=s,g.tailMode=f)}function pg(t,n,s){var a=n.pendingProps,f=a.revealOrder,g=a.tail;if(Yn(t,n,a.children,s),a=ln.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&dg(t,s,n);else if(t.tag===19)dg(t,s,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}a&=1}if(Zt(ln,a),(n.mode&1)===0)n.memoizedState=null;else switch(f){case"forwards":for(s=n.child,f=null;s!==null;)t=s.alternate,t!==null&&ra(t)===null&&(f=s),s=s.sibling;s=f,s===null?(f=n.child,n.child=null):(f=s.sibling,s.sibling=null),Wc(n,!1,f,s,g);break;case"backwards":for(s=null,f=n.child,n.child=null;f!==null;){if(t=f.alternate,t!==null&&ra(t)===null){n.child=f;break}t=f.sibling,f.sibling=s,s=f,f=t}Wc(n,!0,s,null,g);break;case"together":Wc(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function fa(t,n){(n.mode&1)===0&&t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2)}function ko(t,n,s){if(t!==null&&(n.dependencies=t.dependencies),Ss|=n.lanes,(s&n.childLanes)===0)return null;if(t!==null&&n.child!==t.child)throw Error(o(153));if(n.child!==null){for(t=n.child,s=Qo(t,t.pendingProps),n.child=s,s.return=n;t.sibling!==null;)t=t.sibling,s=s.sibling=Qo(t,t.pendingProps),s.return=n;s.sibling=null}return n.child}function P2(t,n,s){switch(n.tag){case 3:ug(n),ni();break;case 5:Th(n);break;case 1:or(n.type)&&Gl(n);break;case 4:Ec(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,f=n.memoizedProps.value;Zt(Jl,a._currentValue),a._currentValue=f;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Zt(ln,ln.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?fg(t,n,s):(Zt(ln,ln.current&1),t=ko(t,n,s),t!==null?t.sibling:null);Zt(ln,ln.current&1);break;case 19:if(a=(s&n.childLanes)!==0,(t.flags&128)!==0){if(a)return pg(t,n,s);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Zt(ln,ln.current),a)break;return null;case 22:case 23:return n.lanes=0,ig(t,n,s)}return ko(t,n,s)}var hg,Kc,gg,mg;hg=function(t,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)t.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Kc=function(){},gg=function(t,n,s,a){var f=t.memoizedProps;if(f!==a){t=n.stateNode,bs(qr.current);var g=null;switch(s){case"input":f=Te(t,f),a=Te(t,a),g=[];break;case"select":f=U({},f,{value:void 0}),a=U({},a,{value:void 0}),g=[];break;case"textarea":f=it(t,f),a=it(t,a),g=[];break;default:typeof f.onClick!="function"&&typeof a.onClick=="function"&&(t.onclick=Hl)}dn(s,a);var R;s=null;for(ie in f)if(!a.hasOwnProperty(ie)&&f.hasOwnProperty(ie)&&f[ie]!=null)if(ie==="style"){var L=f[ie];for(R in L)L.hasOwnProperty(R)&&(s||(s={}),s[R]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(l.hasOwnProperty(ie)?g||(g=[]):(g=g||[]).push(ie,null));for(ie in a){var $=a[ie];if(L=f!=null?f[ie]:void 0,a.hasOwnProperty(ie)&&$!==L&&($!=null||L!=null))if(ie==="style")if(L){for(R in L)!L.hasOwnProperty(R)||$&&$.hasOwnProperty(R)||(s||(s={}),s[R]="");for(R in $)$.hasOwnProperty(R)&&L[R]!==$[R]&&(s||(s={}),s[R]=$[R])}else s||(g||(g=[]),g.push(ie,s)),s=$;else ie==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,L=L?L.__html:void 0,$!=null&&L!==$&&(g=g||[]).push(ie,$)):ie==="children"?typeof $!="string"&&typeof $!="number"||(g=g||[]).push(ie,""+$):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(l.hasOwnProperty(ie)?($!=null&&ie==="onScroll"&&en("scroll",t),g||L===$||(g=[])):(g=g||[]).push(ie,$))}s&&(g=g||[]).push("style",s);var ie=g;(n.updateQueue=ie)&&(n.flags|=4)}},mg=function(t,n,s,a){s!==a&&(n.flags|=4)};function el(t,n){if(!rn)switch(t.tailMode){case"hidden":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function Hn(t){var n=t.alternate!==null&&t.alternate.child===t.child,s=0,a=0;if(n)for(var f=t.child;f!==null;)s|=f.lanes|f.childLanes,a|=f.subtreeFlags&14680064,a|=f.flags&14680064,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)s|=f.lanes|f.childLanes,a|=f.subtreeFlags,a|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=a,t.childLanes=s,n}function _2(t,n,s){var a=n.pendingProps;switch(hc(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hn(n),null;case 1:return or(n.type)&&Kl(),Hn(n),null;case 3:return a=n.stateNode,ii(),tn(rr),tn(Un),Tc(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Zl(n)?n.flags|=4:t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,jr!==null&&(rf(jr),jr=null))),Kc(t,n),Hn(n),null;case 5:Rc(n);var f=bs(Xi.current);if(s=n.type,t!==null&&n.stateNode!=null)gg(t,n,s,a,f),t.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(o(166));return Hn(n),null}if(t=bs(qr.current),Zl(n)){a=n.stateNode,s=n.type;var g=n.memoizedProps;switch(a[Xr]=n,a[Hi]=g,t=(n.mode&1)!==0,s){case"dialog":en("cancel",a),en("close",a);break;case"iframe":case"object":case"embed":en("load",a);break;case"video":case"audio":for(f=0;f<$i.length;f++)en($i[f],a);break;case"source":en("error",a);break;case"img":case"image":case"link":en("error",a),en("load",a);break;case"details":en("toggle",a);break;case"input":Ne(a,g),en("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!g.multiple},en("invalid",a);break;case"textarea":Rt(a,g),en("invalid",a)}dn(s,g),f=null;for(var R in g)if(g.hasOwnProperty(R)){var L=g[R];R==="children"?typeof L=="string"?a.textContent!==L&&(g.suppressHydrationWarning!==!0&&Vl(a.textContent,L,t),f=["children",L]):typeof L=="number"&&a.textContent!==""+L&&(g.suppressHydrationWarning!==!0&&Vl(a.textContent,L,t),f=["children",""+L]):l.hasOwnProperty(R)&&L!=null&&R==="onScroll"&&en("scroll",a)}switch(s){case"input":De(a),ft(a,g,!0);break;case"textarea":De(a),se(a);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(a.onclick=Hl)}a=f,n.updateQueue=a,a!==null&&(n.flags|=4)}else{R=f.nodeType===9?f:f.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=ce(s)),t==="http://www.w3.org/1999/xhtml"?s==="script"?(t=R.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof a.is=="string"?t=R.createElement(s,{is:a.is}):(t=R.createElement(s),s==="select"&&(R=t,a.multiple?R.multiple=!0:a.size&&(R.size=a.size))):t=R.createElementNS(t,s),t[Xr]=n,t[Hi]=a,hg(t,n,!1,!1),n.stateNode=t;e:{switch(R=pn(s,a),s){case"dialog":en("cancel",t),en("close",t),f=a;break;case"iframe":case"object":case"embed":en("load",t),f=a;break;case"video":case"audio":for(f=0;f<$i.length;f++)en($i[f],t);f=a;break;case"source":en("error",t),f=a;break;case"img":case"image":case"link":en("error",t),en("load",t),f=a;break;case"details":en("toggle",t),f=a;break;case"input":Ne(t,a),f=Te(t,a),en("invalid",t);break;case"option":f=a;break;case"select":t._wrapperState={wasMultiple:!!a.multiple},f=U({},a,{value:void 0}),en("invalid",t);break;case"textarea":Rt(t,a),f=it(t,a),en("invalid",t);break;default:f=a}dn(s,f),L=f;for(g in L)if(L.hasOwnProperty(g)){var $=L[g];g==="style"?Xt(t,$):g==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&He(t,$)):g==="children"?typeof $=="string"?(s!=="textarea"||$!=="")&<(t,$):typeof $=="number"&<(t,""+$):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(l.hasOwnProperty(g)?$!=null&&g==="onScroll"&&en("scroll",t):$!=null&&A(t,g,$,R))}switch(s){case"input":De(t),ft(t,a,!1);break;case"textarea":De(t),se(t);break;case"option":a.value!=null&&t.setAttribute("value",""+de(a.value));break;case"select":t.multiple=!!a.multiple,g=a.value,g!=null?me(t,!!a.multiple,g,!1):a.defaultValue!=null&&me(t,!!a.multiple,a.defaultValue,!0);break;default:typeof f.onClick=="function"&&(t.onclick=Hl)}switch(s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Hn(n),null;case 6:if(t&&n.stateNode!=null)mg(t,n,t.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(o(166));if(s=bs(Xi.current),bs(qr.current),Zl(n)){if(a=n.stateNode,s=n.memoizedProps,a[Xr]=n,(g=a.nodeValue!==s)&&(t=yr,t!==null))switch(t.tag){case 3:Vl(a.nodeValue,s,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Vl(a.nodeValue,s,(t.mode&1)!==0)}g&&(n.flags|=4)}else a=(s.nodeType===9?s:s.ownerDocument).createTextNode(a),a[Xr]=n,n.stateNode=a}return Hn(n),null;case 13:if(tn(ln),a=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(rn&&vr!==null&&(n.mode&1)!==0&&(n.flags&128)===0)xh(),ni(),n.flags|=98560,g=!1;else if(g=Zl(n),a!==null&&a.dehydrated!==null){if(t===null){if(!g)throw Error(o(318));if(g=n.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[Xr]=n}else ni(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Hn(n),g=!1}else jr!==null&&(rf(jr),jr=null),g=!0;if(!g)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(a=a!==null,a!==(t!==null&&t.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(t===null||(ln.current&1)!==0?Sn===0&&(Sn=3):lf())),n.updateQueue!==null&&(n.flags|=4),Hn(n),null);case 4:return ii(),Kc(t,n),t===null&&Ui(n.stateNode.containerInfo),Hn(n),null;case 10:return wc(n.type._context),Hn(n),null;case 17:return or(n.type)&&Kl(),Hn(n),null;case 19:if(tn(ln),g=n.memoizedState,g===null)return Hn(n),null;if(a=(n.flags&128)!==0,R=g.rendering,R===null)if(a)el(g,!1);else{if(Sn!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(R=ra(t),R!==null){for(n.flags|=128,el(g,!1),a=R.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=s,s=n.child;s!==null;)g=s,t=a,g.flags&=14680066,R=g.alternate,R===null?(g.childLanes=0,g.lanes=t,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=R.childLanes,g.lanes=R.lanes,g.child=R.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=R.memoizedProps,g.memoizedState=R.memoizedState,g.updateQueue=R.updateQueue,g.type=R.type,t=R.dependencies,g.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),s=s.sibling;return Zt(ln,ln.current&1|2),n.child}t=t.sibling}g.tail!==null&&Lt()>ci&&(n.flags|=128,a=!0,el(g,!1),n.lanes=4194304)}else{if(!a)if(t=ra(R),t!==null){if(n.flags|=128,a=!0,s=t.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),el(g,!0),g.tail===null&&g.tailMode==="hidden"&&!R.alternate&&!rn)return Hn(n),null}else 2*Lt()-g.renderingStartTime>ci&&s!==1073741824&&(n.flags|=128,a=!0,el(g,!1),n.lanes=4194304);g.isBackwards?(R.sibling=n.child,n.child=R):(s=g.last,s!==null?s.sibling=R:n.child=R,g.last=R)}return g.tail!==null?(n=g.tail,g.rendering=n,g.tail=n.sibling,g.renderingStartTime=Lt(),n.sibling=null,s=ln.current,Zt(ln,a?s&1|2:s&1),n):(Hn(n),null);case 22:case 23:return sf(),a=n.memoizedState!==null,t!==null&&t.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(xr&1073741824)!==0&&(Hn(n),n.subtreeFlags&6&&(n.flags|=8192)):Hn(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function O2(t,n){switch(hc(n),n.tag){case 1:return or(n.type)&&Kl(),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ii(),tn(rr),tn(Un),Tc(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 5:return Rc(n),null;case 13:if(tn(ln),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(o(340));ni()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return tn(ln),null;case 4:return ii(),null;case 10:return wc(n.type._context),null;case 22:case 23:return sf(),null;case 24:return null;default:return null}}var da=!1,Wn=!1,N2=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function ai(t,n){var s=t.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(a){fn(t,n,a)}else s.current=null}function Gc(t,n,s){try{s()}catch(a){fn(t,n,a)}}var yg=!1;function M2(t,n){if(sc=Fo,t=Xp(),Zu(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var f=a.anchorOffset,g=a.focusNode;a=a.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var R=0,L=-1,$=-1,ie=0,he=0,ye=t,pe=null;t:for(;;){for(var ze;ye!==s||f!==0&&ye.nodeType!==3||(L=R+f),ye!==g||a!==0&&ye.nodeType!==3||($=R+a),ye.nodeType===3&&(R+=ye.nodeValue.length),(ze=ye.firstChild)!==null;)pe=ye,ye=ze;for(;;){if(ye===t)break t;if(pe===s&&++ie===f&&(L=R),pe===g&&++he===a&&($=R),(ze=ye.nextSibling)!==null)break;ye=pe,pe=ye.parentNode}ye=ze}s=L===-1||$===-1?null:{start:L,end:$}}else s=null}s=s||{start:0,end:0}}else s=null;for(ic={focusedElem:t,selectionRange:s},Fo=!1,Ve=n;Ve!==null;)if(n=Ve,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Ve=t;else for(;Ve!==null;){n=Ve;try{var Ke=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(Ke!==null){var Ge=Ke.memoizedProps,mn=Ke.memoizedState,Q=n.stateNode,Y=Q.getSnapshotBeforeUpdate(n.elementType===n.type?Ge:Br(n.type,Ge),mn);Q.__reactInternalSnapshotBeforeUpdate=Y}break;case 3:var te=n.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Ee){fn(n,n.return,Ee)}if(t=n.sibling,t!==null){t.return=n.return,Ve=t;break}Ve=n.return}return Ke=yg,yg=!1,Ke}function tl(t,n,s){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var f=a=a.next;do{if((f.tag&t)===t){var g=f.destroy;f.destroy=void 0,g!==void 0&&Gc(n,s,g)}f=f.next}while(f!==a)}}function pa(t,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var a=s.create;s.destroy=a()}s=s.next}while(s!==n)}}function Yc(t){var n=t.ref;if(n!==null){var s=t.stateNode;switch(t.tag){case 5:t=s;break;default:t=s}typeof n=="function"?n(t):n.current=t}}function vg(t){var n=t.alternate;n!==null&&(t.alternate=null,vg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&(delete n[Xr],delete n[Hi],delete n[cc],delete n[m2],delete n[y2])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xg(t){return t.tag===5||t.tag===3||t.tag===4}function wg(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xc(t,n,s){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(t,n):s.insertBefore(t,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(t,s)):(n=s,n.appendChild(t)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Hl));else if(a!==4&&(t=t.child,t!==null))for(Xc(t,n,s),t=t.sibling;t!==null;)Xc(t,n,s),t=t.sibling}function qc(t,n,s){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?s.insertBefore(t,n):s.appendChild(t);else if(a!==4&&(t=t.child,t!==null))for(qc(t,n,s),t=t.sibling;t!==null;)qc(t,n,s),t=t.sibling}var Dn=null,$r=!1;function Go(t,n,s){for(s=s.child;s!==null;)bg(t,n,s),s=s.sibling}function bg(t,n,s){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(mt,s)}catch{}switch(s.tag){case 5:Wn||ai(s,n);case 6:var a=Dn,f=$r;Dn=null,Go(t,n,s),Dn=a,$r=f,Dn!==null&&($r?(t=Dn,s=s.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)):Dn.removeChild(s.stateNode));break;case 18:Dn!==null&&($r?(t=Dn,s=s.stateNode,t.nodeType===8?uc(t.parentNode,s):t.nodeType===1&&uc(t,s),ho(t)):uc(Dn,s.stateNode));break;case 4:a=Dn,f=$r,Dn=s.stateNode.containerInfo,$r=!0,Go(t,n,s),Dn=a,$r=f;break;case 0:case 11:case 14:case 15:if(!Wn&&(a=s.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){f=a=a.next;do{var g=f,R=g.destroy;g=g.tag,R!==void 0&&((g&2)!==0||(g&4)!==0)&&Gc(s,n,R),f=f.next}while(f!==a)}Go(t,n,s);break;case 1:if(!Wn&&(ai(s,n),a=s.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=s.memoizedProps,a.state=s.memoizedState,a.componentWillUnmount()}catch(L){fn(s,n,L)}Go(t,n,s);break;case 21:Go(t,n,s);break;case 22:s.mode&1?(Wn=(a=Wn)||s.memoizedState!==null,Go(t,n,s),Wn=a):Go(t,n,s);break;default:Go(t,n,s)}}function kg(t){var n=t.updateQueue;if(n!==null){t.updateQueue=null;var s=t.stateNode;s===null&&(s=t.stateNode=new N2),n.forEach(function(a){var f=V2.bind(null,t,a);s.has(a)||(s.add(a),a.then(f,f))})}}function Ur(t,n){var s=n.deletions;if(s!==null)for(var a=0;a<s.length;a++){var f=s[a];try{var g=t,R=n,L=R;e:for(;L!==null;){switch(L.tag){case 5:Dn=L.stateNode,$r=!1;break e;case 3:Dn=L.stateNode.containerInfo,$r=!0;break e;case 4:Dn=L.stateNode.containerInfo,$r=!0;break e}L=L.return}if(Dn===null)throw Error(o(160));bg(g,R,f),Dn=null,$r=!1;var $=f.alternate;$!==null&&($.return=null),f.return=null}catch(ie){fn(f,n,ie)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Sg(n,t),n=n.sibling}function Sg(t,n){var s=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ur(n,t),Qr(t),a&4){try{tl(3,t,t.return),pa(3,t)}catch(Ge){fn(t,t.return,Ge)}try{tl(5,t,t.return)}catch(Ge){fn(t,t.return,Ge)}}break;case 1:Ur(n,t),Qr(t),a&512&&s!==null&&ai(s,s.return);break;case 5:if(Ur(n,t),Qr(t),a&512&&s!==null&&ai(s,s.return),t.flags&32){var f=t.stateNode;try{lt(f,"")}catch(Ge){fn(t,t.return,Ge)}}if(a&4&&(f=t.stateNode,f!=null)){var g=t.memoizedProps,R=s!==null?s.memoizedProps:g,L=t.type,$=t.updateQueue;if(t.updateQueue=null,$!==null)try{L==="input"&&g.type==="radio"&&g.name!=null&&Qe(f,g),pn(L,R);var ie=pn(L,g);for(R=0;R<$.length;R+=2){var he=$[R],ye=$[R+1];he==="style"?Xt(f,ye):he==="dangerouslySetInnerHTML"?He(f,ye):he==="children"?lt(f,ye):A(f,he,ye,ie)}switch(L){case"input":tt(f,g);break;case"textarea":wt(f,g);break;case"select":var pe=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!g.multiple;var ze=g.value;ze!=null?me(f,!!g.multiple,ze,!1):pe!==!!g.multiple&&(g.defaultValue!=null?me(f,!!g.multiple,g.defaultValue,!0):me(f,!!g.multiple,g.multiple?[]:"",!1))}f[Hi]=g}catch(Ge){fn(t,t.return,Ge)}}break;case 6:if(Ur(n,t),Qr(t),a&4){if(t.stateNode===null)throw Error(o(162));f=t.stateNode,g=t.memoizedProps;try{f.nodeValue=g}catch(Ge){fn(t,t.return,Ge)}}break;case 3:if(Ur(n,t),Qr(t),a&4&&s!==null&&s.memoizedState.isDehydrated)try{ho(n.containerInfo)}catch(Ge){fn(t,t.return,Ge)}break;case 4:Ur(n,t),Qr(t);break;case 13:Ur(n,t),Qr(t),f=t.child,f.flags&8192&&(g=f.memoizedState!==null,f.stateNode.isHidden=g,!g||f.alternate!==null&&f.alternate.memoizedState!==null||(Jc=Lt())),a&4&&kg(t);break;case 22:if(he=s!==null&&s.memoizedState!==null,t.mode&1?(Wn=(ie=Wn)||he,Ur(n,t),Wn=ie):Ur(n,t),Qr(t),a&8192){if(ie=t.memoizedState!==null,(t.stateNode.isHidden=ie)&&!he&&(t.mode&1)!==0)for(Ve=t,he=t.child;he!==null;){for(ye=Ve=he;Ve!==null;){switch(pe=Ve,ze=pe.child,pe.tag){case 0:case 11:case 14:case 15:tl(4,pe,pe.return);break;case 1:ai(pe,pe.return);var Ke=pe.stateNode;if(typeof Ke.componentWillUnmount=="function"){a=pe,s=pe.return;try{n=a,Ke.props=n.memoizedProps,Ke.state=n.memoizedState,Ke.componentWillUnmount()}catch(Ge){fn(a,s,Ge)}}break;case 5:ai(pe,pe.return);break;case 22:if(pe.memoizedState!==null){Cg(ye);continue}}ze!==null?(ze.return=pe,Ve=ze):Cg(ye)}he=he.sibling}e:for(he=null,ye=t;;){if(ye.tag===5){if(he===null){he=ye;try{f=ye.stateNode,ie?(g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(L=ye.stateNode,$=ye.memoizedProps.style,R=$!=null&&$.hasOwnProperty("display")?$.display:null,L.style.display=Qt("display",R))}catch(Ge){fn(t,t.return,Ge)}}}else if(ye.tag===6){if(he===null)try{ye.stateNode.nodeValue=ie?"":ye.memoizedProps}catch(Ge){fn(t,t.return,Ge)}}else if((ye.tag!==22&&ye.tag!==23||ye.memoizedState===null||ye===t)&&ye.child!==null){ye.child.return=ye,ye=ye.child;continue}if(ye===t)break e;for(;ye.sibling===null;){if(ye.return===null||ye.return===t)break e;he===ye&&(he=null),ye=ye.return}he===ye&&(he=null),ye.sibling.return=ye.return,ye=ye.sibling}}break;case 19:Ur(n,t),Qr(t),a&4&&kg(t);break;case 21:break;default:Ur(n,t),Qr(t)}}function Qr(t){var n=t.flags;if(n&2){try{e:{for(var s=t.return;s!==null;){if(xg(s)){var a=s;break e}s=s.return}throw Error(o(160))}switch(a.tag){case 5:var f=a.stateNode;a.flags&32&&(lt(f,""),a.flags&=-33);var g=wg(t);qc(t,g,f);break;case 3:case 4:var R=a.stateNode.containerInfo,L=wg(t);Xc(t,L,R);break;default:throw Error(o(161))}}catch($){fn(t,t.return,$)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function L2(t,n,s){Ve=t,Eg(t)}function Eg(t,n,s){for(var a=(t.mode&1)!==0;Ve!==null;){var f=Ve,g=f.child;if(f.tag===22&&a){var R=f.memoizedState!==null||da;if(!R){var L=f.alternate,$=L!==null&&L.memoizedState!==null||Wn;L=da;var ie=Wn;if(da=R,(Wn=$)&&!ie)for(Ve=f;Ve!==null;)R=Ve,$=R.child,R.tag===22&&R.memoizedState!==null?Tg(f):$!==null?($.return=R,Ve=$):Tg(f);for(;g!==null;)Ve=g,Eg(g),g=g.sibling;Ve=f,da=L,Wn=ie}Rg(t)}else(f.subtreeFlags&8772)!==0&&g!==null?(g.return=f,Ve=g):Rg(t)}}function Rg(t){for(;Ve!==null;){var n=Ve;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Wn||pa(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!Wn)if(s===null)a.componentDidMount();else{var f=n.elementType===n.type?s.memoizedProps:Br(n.type,s.memoizedProps);a.componentDidUpdate(f,s.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var g=n.updateQueue;g!==null&&Ch(n,g,a);break;case 3:var R=n.updateQueue;if(R!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}Ch(n,R,s)}break;case 5:var L=n.stateNode;if(s===null&&n.flags&4){s=L;var $=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&s.focus();break;case"img":$.src&&(s.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var ie=n.alternate;if(ie!==null){var he=ie.memoizedState;if(he!==null){var ye=he.dehydrated;ye!==null&&ho(ye)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Wn||n.flags&512&&Yc(n)}catch(pe){fn(n,n.return,pe)}}if(n===t){Ve=null;break}if(s=n.sibling,s!==null){s.return=n.return,Ve=s;break}Ve=n.return}}function Cg(t){for(;Ve!==null;){var n=Ve;if(n===t){Ve=null;break}var s=n.sibling;if(s!==null){s.return=n.return,Ve=s;break}Ve=n.return}}function Tg(t){for(;Ve!==null;){var n=Ve;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{pa(4,n)}catch($){fn(n,s,$)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var f=n.return;try{a.componentDidMount()}catch($){fn(n,f,$)}}var g=n.return;try{Yc(n)}catch($){fn(n,g,$)}break;case 5:var R=n.return;try{Yc(n)}catch($){fn(n,R,$)}}}catch($){fn(n,n.return,$)}if(n===t){Ve=null;break}var L=n.sibling;if(L!==null){L.return=n.return,Ve=L;break}Ve=n.return}}var D2=Math.ceil,ha=I.ReactCurrentDispatcher,Zc=I.ReactCurrentOwner,Or=I.ReactCurrentBatchConfig,Nt=0,An=null,xn=null,Fn=0,xr=0,ui=Uo(0),Sn=0,nl=null,Ss=0,ga=0,Qc=0,rl=null,ir=null,Jc=0,ci=1/0,So=null,ma=!1,ef=null,Yo=null,ya=!1,Xo=null,va=0,ol=0,tf=null,xa=-1,wa=0;function Xn(){return(Nt&6)!==0?Lt():xa!==-1?xa:xa=Lt()}function qo(t){return(t.mode&1)===0?1:(Nt&2)!==0&&Fn!==0?Fn&-Fn:x2.transition!==null?(wa===0&&(wa=at()),wa):(t=Oe,t!==0||(t=window.event,t=t===void 0?16:nr(t.type)),t)}function Vr(t,n,s,a){if(50<ol)throw ol=0,tf=null,Error(o(185));Bt(t,s,a),((Nt&2)===0||t!==An)&&(t===An&&((Nt&2)===0&&(ga|=s),Sn===4&&Zo(t,Fn)),lr(t,a),s===1&&Nt===0&&(n.mode&1)===0&&(ci=Lt()+500,Yl&&Ho()))}function lr(t,n){var s=t.callbackNode;Je(t,n);var a=fe(t,t===An?Fn:0);if(a===0)s!==null&&Gn(s),t.callbackNode=null,t.callbackPriority=0;else if(n=a&-a,t.callbackPriority!==n){if(s!=null&&Gn(s),n===1)t.tag===0?v2(Ag.bind(null,t)):hh(Ag.bind(null,t)),h2(function(){(Nt&6)===0&&Ho()}),s=null;else{switch(Pe(a)){case 1:s=Gr;break;case 4:s=wn;break;case 16:s=Er;break;case 536870912:s=We;break;default:s=Er}s=Fg(s,Ig.bind(null,t))}t.callbackPriority=n,t.callbackNode=s}}function Ig(t,n){if(xa=-1,wa=0,(Nt&6)!==0)throw Error(o(327));var s=t.callbackNode;if(fi()&&t.callbackNode!==s)return null;var a=fe(t,t===An?Fn:0);if(a===0)return null;if((a&30)!==0||(a&t.expiredLanes)!==0||n)n=ba(t,a);else{n=a;var f=Nt;Nt|=2;var g=_g();(An!==t||Fn!==n)&&(So=null,ci=Lt()+500,Rs(t,n));do try{j2();break}catch(L){Pg(t,L)}while(!0);xc(),ha.current=g,Nt=f,xn!==null?n=0:(An=null,Fn=0,n=Sn)}if(n!==0){if(n===2&&(f=dt(t),f!==0&&(a=f,n=nf(t,f))),n===1)throw s=nl,Rs(t,0),Zo(t,a),lr(t,Lt()),s;if(n===6)Zo(t,a);else{if(f=t.current.alternate,(a&30)===0&&!F2(f)&&(n=ba(t,a),n===2&&(g=dt(t),g!==0&&(a=g,n=nf(t,g))),n===1))throw s=nl,Rs(t,0),Zo(t,a),lr(t,Lt()),s;switch(t.finishedWork=f,t.finishedLanes=a,n){case 0:case 1:throw Error(o(345));case 2:Cs(t,ir,So);break;case 3:if(Zo(t,a),(a&130023424)===a&&(n=Jc+500-Lt(),10<n)){if(fe(t,0)!==0)break;if(f=t.suspendedLanes,(f&a)!==a){Xn(),t.pingedLanes|=t.suspendedLanes&f;break}t.timeoutHandle=ac(Cs.bind(null,t,ir,So),n);break}Cs(t,ir,So);break;case 4:if(Zo(t,a),(a&4194240)===a)break;for(n=t.eventTimes,f=-1;0<a;){var R=31-Ht(a);g=1<<R,R=n[R],R>f&&(f=R),a&=~g}if(a=f,a=Lt()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*D2(a/1960))-a,10<a){t.timeoutHandle=ac(Cs.bind(null,t,ir,So),a);break}Cs(t,ir,So);break;case 5:Cs(t,ir,So);break;default:throw Error(o(329))}}}return lr(t,Lt()),t.callbackNode===s?Ig.bind(null,t):null}function nf(t,n){var s=rl;return t.current.memoizedState.isDehydrated&&(Rs(t,n).flags|=256),t=ba(t,n),t!==2&&(n=ir,ir=s,n!==null&&rf(n)),t}function rf(t){ir===null?ir=t:ir.push.apply(ir,t)}function F2(t){for(var n=t;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var a=0;a<s.length;a++){var f=s[a],g=f.getSnapshot;f=f.value;try{if(!zr(g(),f))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Zo(t,n){for(n&=~Qc,n&=~ga,t.suspendedLanes|=n,t.pingedLanes&=~n,t=t.expirationTimes;0<n;){var s=31-Ht(n),a=1<<s;t[s]=-1,n&=~a}}function Ag(t){if((Nt&6)!==0)throw Error(o(327));fi();var n=fe(t,0);if((n&1)===0)return lr(t,Lt()),null;var s=ba(t,n);if(t.tag!==0&&s===2){var a=dt(t);a!==0&&(n=a,s=nf(t,a))}if(s===1)throw s=nl,Rs(t,0),Zo(t,n),lr(t,Lt()),s;if(s===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=n,Cs(t,ir,So),lr(t,Lt()),null}function of(t,n){var s=Nt;Nt|=1;try{return t(n)}finally{Nt=s,Nt===0&&(ci=Lt()+500,Yl&&Ho())}}function Es(t){Xo!==null&&Xo.tag===0&&(Nt&6)===0&&fi();var n=Nt;Nt|=1;var s=Or.transition,a=Oe;try{if(Or.transition=null,Oe=1,t)return t()}finally{Oe=a,Or.transition=s,Nt=n,(Nt&6)===0&&Ho()}}function sf(){xr=ui.current,tn(ui)}function Rs(t,n){t.finishedWork=null,t.finishedLanes=0;var s=t.timeoutHandle;if(s!==-1&&(t.timeoutHandle=-1,p2(s)),xn!==null)for(s=xn.return;s!==null;){var a=s;switch(hc(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Kl();break;case 3:ii(),tn(rr),tn(Un),Tc();break;case 5:Rc(a);break;case 4:ii();break;case 13:tn(ln);break;case 19:tn(ln);break;case 10:wc(a.type._context);break;case 22:case 23:sf()}s=s.return}if(An=t,xn=t=Qo(t.current,null),Fn=xr=n,Sn=0,nl=null,Qc=ga=Ss=0,ir=rl=null,ws!==null){for(n=0;n<ws.length;n++)if(s=ws[n],a=s.interleaved,a!==null){s.interleaved=null;var f=a.next,g=s.pending;if(g!==null){var R=g.next;g.next=f,a.next=R}s.pending=a}ws=null}return t}function Pg(t,n){do{var s=xn;try{if(xc(),oa.current=aa,sa){for(var a=an.memoizedState;a!==null;){var f=a.queue;f!==null&&(f.pending=null),a=a.next}sa=!1}if(ks=0,In=kn=an=null,qi=!1,Zi=0,Zc.current=null,s===null||s.return===null){Sn=1,nl=n,xn=null;break}e:{var g=t,R=s.return,L=s,$=n;if(n=Fn,L.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var ie=$,he=L,ye=he.tag;if((he.mode&1)===0&&(ye===0||ye===11||ye===15)){var pe=he.alternate;pe?(he.updateQueue=pe.updateQueue,he.memoizedState=pe.memoizedState,he.lanes=pe.lanes):(he.updateQueue=null,he.memoizedState=null)}var ze=tg(R);if(ze!==null){ze.flags&=-257,ng(ze,R,L,g,n),ze.mode&1&&eg(g,ie,n),n=ze,$=ie;var Ke=n.updateQueue;if(Ke===null){var Ge=new Set;Ge.add($),n.updateQueue=Ge}else Ke.add($);break e}else{if((n&1)===0){eg(g,ie,n),lf();break e}$=Error(o(426))}}else if(rn&&L.mode&1){var mn=tg(R);if(mn!==null){(mn.flags&65536)===0&&(mn.flags|=256),ng(mn,R,L,g,n),yc(li($,L));break e}}g=$=li($,L),Sn!==4&&(Sn=2),rl===null?rl=[g]:rl.push(g),g=R;do{switch(g.tag){case 3:g.flags|=65536,n&=-n,g.lanes|=n;var Q=Qh(g,$,n);Rh(g,Q);break e;case 1:L=$;var Y=g.type,te=g.stateNode;if((g.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(Yo===null||!Yo.has(te)))){g.flags|=65536,n&=-n,g.lanes|=n;var Ee=Jh(g,L,n);Rh(g,Ee);break e}}g=g.return}while(g!==null)}Ng(s)}catch(qe){n=qe,xn===s&&s!==null&&(xn=s=s.return);continue}break}while(!0)}function _g(){var t=ha.current;return ha.current=aa,t===null?aa:t}function lf(){(Sn===0||Sn===3||Sn===2)&&(Sn=4),An===null||(Ss&268435455)===0&&(ga&268435455)===0||Zo(An,Fn)}function ba(t,n){var s=Nt;Nt|=2;var a=_g();(An!==t||Fn!==n)&&(So=null,Rs(t,n));do try{z2();break}catch(f){Pg(t,f)}while(!0);if(xc(),Nt=s,ha.current=a,xn!==null)throw Error(o(261));return An=null,Fn=0,Sn}function z2(){for(;xn!==null;)Og(xn)}function j2(){for(;xn!==null&&!uo();)Og(xn)}function Og(t){var n=Dg(t.alternate,t,xr);t.memoizedProps=t.pendingProps,n===null?Ng(t):xn=n,Zc.current=null}function Ng(t){var n=t;do{var s=n.alternate;if(t=n.return,(n.flags&32768)===0){if(s=_2(s,n,xr),s!==null){xn=s;return}}else{if(s=O2(s,n),s!==null){s.flags&=32767,xn=s;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Sn=6,xn=null;return}}if(n=n.sibling,n!==null){xn=n;return}xn=n=t}while(n!==null);Sn===0&&(Sn=5)}function Cs(t,n,s){var a=Oe,f=Or.transition;try{Or.transition=null,Oe=1,B2(t,n,s,a)}finally{Or.transition=f,Oe=a}return null}function B2(t,n,s,a){do fi();while(Xo!==null);if((Nt&6)!==0)throw Error(o(327));s=t.finishedWork;var f=t.finishedLanes;if(s===null)return null;if(t.finishedWork=null,t.finishedLanes=0,s===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var g=s.lanes|s.childLanes;if(St(t,g),t===An&&(xn=An=null,Fn=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ya||(ya=!0,Fg(Er,function(){return fi(),null})),g=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||g){g=Or.transition,Or.transition=null;var R=Oe;Oe=1;var L=Nt;Nt|=4,Zc.current=null,M2(t,s),Sg(s,t),i2(ic),Fo=!!sc,ic=sc=null,t.current=s,L2(s),co(),Nt=L,Oe=R,Or.transition=g}else t.current=s;if(ya&&(ya=!1,Xo=t,va=f),g=t.pendingLanes,g===0&&(Yo=null),qt(s.stateNode),lr(t,Lt()),n!==null)for(a=t.onRecoverableError,s=0;s<n.length;s++)f=n[s],a(f.value,{componentStack:f.stack,digest:f.digest});if(ma)throw ma=!1,t=ef,ef=null,t;return(va&1)!==0&&t.tag!==0&&fi(),g=t.pendingLanes,(g&1)!==0?t===tf?ol++:(ol=0,tf=t):ol=0,Ho(),null}function fi(){if(Xo!==null){var t=Pe(va),n=Or.transition,s=Oe;try{if(Or.transition=null,Oe=16>t?16:t,Xo===null)var a=!1;else{if(t=Xo,Xo=null,va=0,(Nt&6)!==0)throw Error(o(331));var f=Nt;for(Nt|=4,Ve=t.current;Ve!==null;){var g=Ve,R=g.child;if((Ve.flags&16)!==0){var L=g.deletions;if(L!==null){for(var $=0;$<L.length;$++){var ie=L[$];for(Ve=ie;Ve!==null;){var he=Ve;switch(he.tag){case 0:case 11:case 15:tl(8,he,g)}var ye=he.child;if(ye!==null)ye.return=he,Ve=ye;else for(;Ve!==null;){he=Ve;var pe=he.sibling,ze=he.return;if(vg(he),he===ie){Ve=null;break}if(pe!==null){pe.return=ze,Ve=pe;break}Ve=ze}}}var Ke=g.alternate;if(Ke!==null){var Ge=Ke.child;if(Ge!==null){Ke.child=null;do{var mn=Ge.sibling;Ge.sibling=null,Ge=mn}while(Ge!==null)}}Ve=g}}if((g.subtreeFlags&2064)!==0&&R!==null)R.return=g,Ve=R;else e:for(;Ve!==null;){if(g=Ve,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:tl(9,g,g.return)}var Q=g.sibling;if(Q!==null){Q.return=g.return,Ve=Q;break e}Ve=g.return}}var Y=t.current;for(Ve=Y;Ve!==null;){R=Ve;var te=R.child;if((R.subtreeFlags&2064)!==0&&te!==null)te.return=R,Ve=te;else e:for(R=Y;Ve!==null;){if(L=Ve,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:pa(9,L)}}catch(qe){fn(L,L.return,qe)}if(L===R){Ve=null;break e}var Ee=L.sibling;if(Ee!==null){Ee.return=L.return,Ve=Ee;break e}Ve=L.return}}if(Nt=f,Ho(),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(mt,t)}catch{}a=!0}return a}finally{Oe=s,Or.transition=n}}return!1}function Mg(t,n,s){n=li(s,n),n=Qh(t,n,1),t=Ko(t,n,1),n=Xn(),t!==null&&(Bt(t,1,n),lr(t,n))}function fn(t,n,s){if(t.tag===3)Mg(t,t,s);else for(;n!==null;){if(n.tag===3){Mg(n,t,s);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Yo===null||!Yo.has(a))){t=li(s,t),t=Jh(n,t,1),n=Ko(n,t,1),t=Xn(),n!==null&&(Bt(n,1,t),lr(n,t));break}}n=n.return}}function $2(t,n,s){var a=t.pingCache;a!==null&&a.delete(n),n=Xn(),t.pingedLanes|=t.suspendedLanes&s,An===t&&(Fn&s)===s&&(Sn===4||Sn===3&&(Fn&130023424)===Fn&&500>Lt()-Jc?Rs(t,0):Qc|=s),lr(t,n)}function Lg(t,n){n===0&&((t.mode&1)===0?n=1:(n=Do,Do<<=1,(Do&130023424)===0&&(Do=4194304)));var s=Xn();t=wo(t,n),t!==null&&(Bt(t,n,s),lr(t,s))}function U2(t){var n=t.memoizedState,s=0;n!==null&&(s=n.retryLane),Lg(t,s)}function V2(t,n){var s=0;switch(t.tag){case 13:var a=t.stateNode,f=t.memoizedState;f!==null&&(s=f.retryLane);break;case 19:a=t.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(n),Lg(t,s)}var Dg;Dg=function(t,n,s){if(t!==null)if(t.memoizedProps!==n.pendingProps||rr.current)sr=!0;else{if((t.lanes&s)===0&&(n.flags&128)===0)return sr=!1,P2(t,n,s);sr=(t.flags&131072)!==0}else sr=!1,rn&&(n.flags&1048576)!==0&&gh(n,ql,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;fa(t,n),t=n.pendingProps;var f=Js(n,Un.current);si(n,s),f=Pc(null,n,a,t,f,s);var g=_c();return n.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,or(a)?(g=!0,Gl(n)):g=!1,n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,Sc(n),f.updater=ua,n.stateNode=f,f._reactInternals=n,Fc(n,a,t,s),n=$c(null,n,a,!0,g,s)):(n.tag=0,rn&&g&&pc(n),Yn(null,n,f,s),n=n.child),n;case 16:a=n.elementType;e:{switch(fa(t,n),t=n.pendingProps,f=a._init,a=f(a._payload),n.type=a,f=n.tag=W2(a),t=Br(a,t),f){case 0:n=Bc(null,n,a,t,s);break e;case 1:n=ag(null,n,a,t,s);break e;case 11:n=rg(null,n,a,t,s);break e;case 14:n=og(null,n,a,Br(a.type,t),s);break e}throw Error(o(306,a,""))}return n;case 0:return a=n.type,f=n.pendingProps,f=n.elementType===a?f:Br(a,f),Bc(t,n,a,f,s);case 1:return a=n.type,f=n.pendingProps,f=n.elementType===a?f:Br(a,f),ag(t,n,a,f,s);case 3:e:{if(ug(n),t===null)throw Error(o(387));a=n.pendingProps,g=n.memoizedState,f=g.element,Eh(t,n),na(n,a,null,s);var R=n.memoizedState;if(a=R.element,g.isDehydrated)if(g={element:a,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){f=li(Error(o(423)),n),n=cg(t,n,a,s,f);break e}else if(a!==f){f=li(Error(o(424)),n),n=cg(t,n,a,s,f);break e}else for(vr=$o(n.stateNode.containerInfo.firstChild),yr=n,rn=!0,jr=null,s=kh(n,null,a,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ni(),a===f){n=ko(t,n,s);break e}Yn(t,n,a,s)}n=n.child}return n;case 5:return Th(n),t===null&&mc(n),a=n.type,f=n.pendingProps,g=t!==null?t.memoizedProps:null,R=f.children,lc(a,f)?R=null:g!==null&&lc(a,g)&&(n.flags|=32),lg(t,n),Yn(t,n,R,s),n.child;case 6:return t===null&&mc(n),null;case 13:return fg(t,n,s);case 4:return Ec(n,n.stateNode.containerInfo),a=n.pendingProps,t===null?n.child=ri(n,null,a,s):Yn(t,n,a,s),n.child;case 11:return a=n.type,f=n.pendingProps,f=n.elementType===a?f:Br(a,f),rg(t,n,a,f,s);case 7:return Yn(t,n,n.pendingProps,s),n.child;case 8:return Yn(t,n,n.pendingProps.children,s),n.child;case 12:return Yn(t,n,n.pendingProps.children,s),n.child;case 10:e:{if(a=n.type._context,f=n.pendingProps,g=n.memoizedProps,R=f.value,Zt(Jl,a._currentValue),a._currentValue=R,g!==null)if(zr(g.value,R)){if(g.children===f.children&&!rr.current){n=ko(t,n,s);break e}}else for(g=n.child,g!==null&&(g.return=n);g!==null;){var L=g.dependencies;if(L!==null){R=g.child;for(var $=L.firstContext;$!==null;){if($.context===a){if(g.tag===1){$=bo(-1,s&-s),$.tag=2;var ie=g.updateQueue;if(ie!==null){ie=ie.shared;var he=ie.pending;he===null?$.next=$:($.next=he.next,he.next=$),ie.pending=$}}g.lanes|=s,$=g.alternate,$!==null&&($.lanes|=s),bc(g.return,s,n),L.lanes|=s;break}$=$.next}}else if(g.tag===10)R=g.type===n.type?null:g.child;else if(g.tag===18){if(R=g.return,R===null)throw Error(o(341));R.lanes|=s,L=R.alternate,L!==null&&(L.lanes|=s),bc(R,s,n),R=g.sibling}else R=g.child;if(R!==null)R.return=g;else for(R=g;R!==null;){if(R===n){R=null;break}if(g=R.sibling,g!==null){g.return=R.return,R=g;break}R=R.return}g=R}Yn(t,n,f.children,s),n=n.child}return n;case 9:return f=n.type,a=n.pendingProps.children,si(n,s),f=Pr(f),a=a(f),n.flags|=1,Yn(t,n,a,s),n.child;case 14:return a=n.type,f=Br(a,n.pendingProps),f=Br(a.type,f),og(t,n,a,f,s);case 15:return sg(t,n,n.type,n.pendingProps,s);case 17:return a=n.type,f=n.pendingProps,f=n.elementType===a?f:Br(a,f),fa(t,n),n.tag=1,or(a)?(t=!0,Gl(n)):t=!1,si(n,s),qh(n,a,f),Fc(n,a,f,s),$c(null,n,a,!0,t,s);case 19:return pg(t,n,s);case 22:return ig(t,n,s)}throw Error(o(156,n.tag))};function Fg(t,n){return cr(t,n)}function H2(t,n,s,a){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(t,n,s,a){return new H2(t,n,s,a)}function af(t){return t=t.prototype,!(!t||!t.isReactComponent)}function W2(t){if(typeof t=="function")return af(t)?1:0;if(t!=null){if(t=t.$$typeof,t===q)return 11;if(t===H)return 14}return 2}function Qo(t,n){var s=t.alternate;return s===null?(s=Nr(t.tag,n,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=n,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&14680064,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,n=t.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s}function ka(t,n,s,a,f,g){var R=2;if(a=t,typeof t=="function")af(t)&&(R=1);else if(typeof t=="string")R=5;else e:switch(t){case N:return Ts(s.children,f,g,n);case j:R=8,f|=8;break;case F:return t=Nr(12,s,n,f|2),t.elementType=F,t.lanes=g,t;case W:return t=Nr(13,s,n,f),t.elementType=W,t.lanes=g,t;case K:return t=Nr(19,s,n,f),t.elementType=K,t.lanes=g,t;case le:return Sa(s,f,g,n);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:R=10;break e;case G:R=9;break e;case q:R=11;break e;case H:R=14;break e;case ne:R=16,a=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return n=Nr(R,s,n,f),n.elementType=t,n.type=a,n.lanes=g,n}function Ts(t,n,s,a){return t=Nr(7,t,a,n),t.lanes=s,t}function Sa(t,n,s,a){return t=Nr(22,t,a,n),t.elementType=le,t.lanes=s,t.stateNode={isHidden:!1},t}function uf(t,n,s){return t=Nr(6,t,null,n),t.lanes=s,t}function cf(t,n,s){return n=Nr(4,t.children!==null?t.children:[],t.key,n),n.lanes=s,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function K2(t,n,s,a,f){this.tag=n,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kt(0),this.expirationTimes=kt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kt(0),this.identifierPrefix=a,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function ff(t,n,s,a,f,g,R,L,$){return t=new K2(t,n,s,L,$),n===1?(n=1,g===!0&&(n|=8)):n=0,g=Nr(3,null,null,n),t.current=g,g.stateNode=t,g.memoizedState={element:a,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sc(g),t}function G2(t,n,s){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:a==null?null:""+a,children:t,containerInfo:n,implementation:s}}function zg(t){if(!t)return Vo;t=t._reactInternals;e:{if(vn(t)!==t||t.tag!==1)throw Error(o(170));var n=t;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(or(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(t.tag===1){var s=t.type;if(or(s))return dh(t,s,n)}return n}function jg(t,n,s,a,f,g,R,L,$){return t=ff(s,a,!0,t,f,g,R,L,$),t.context=zg(null),s=t.current,a=Xn(),f=qo(s),g=bo(a,f),g.callback=n??null,Ko(s,g,f),t.current.lanes=f,Bt(t,f,a),lr(t,a),t}function Ea(t,n,s,a){var f=n.current,g=Xn(),R=qo(f);return s=zg(s),n.context===null?n.context=s:n.pendingContext=s,n=bo(g,R),n.payload={element:t},a=a===void 0?null:a,a!==null&&(n.callback=a),t=Ko(f,n,R),t!==null&&(Vr(t,f,R,g),ta(t,f,R)),R}function Ra(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Bg(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function df(t,n){Bg(t,n),(t=t.alternate)&&Bg(t,n)}function Y2(){return null}var $g=typeof reportError=="function"?reportError:function(t){console.error(t)};function pf(t){this._internalRoot=t}Ca.prototype.render=pf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(o(409));Ea(t,n,null,null)},Ca.prototype.unmount=pf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Es(function(){Ea(null,t,null,null)}),n[mo]=null}};function Ca(t){this._internalRoot=t}Ca.prototype.unstable_scheduleHydration=function(t){if(t){var n=Bn();t={blockedOn:null,target:t,priority:n};for(var s=0;s<Ft.length&&n!==0&&n<Ft[s].priority;s++);Ft.splice(s,0,t),s===0&&pr(t)}};function hf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ta(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Ug(){}function X2(t,n,s,a,f){if(f){if(typeof a=="function"){var g=a;a=function(){var ie=Ra(R);g.call(ie)}}var R=jg(n,a,t,0,null,!1,!1,"",Ug);return t._reactRootContainer=R,t[mo]=R.current,Ui(t.nodeType===8?t.parentNode:t),Es(),R}for(;f=t.lastChild;)t.removeChild(f);if(typeof a=="function"){var L=a;a=function(){var ie=Ra($);L.call(ie)}}var $=ff(t,0,!1,null,null,!1,!1,"",Ug);return t._reactRootContainer=$,t[mo]=$.current,Ui(t.nodeType===8?t.parentNode:t),Es(function(){Ea(n,$,s,a)}),$}function Ia(t,n,s,a,f){var g=s._reactRootContainer;if(g){var R=g;if(typeof f=="function"){var L=f;f=function(){var $=Ra(R);L.call($)}}Ea(n,R,t,f)}else R=X2(s,n,t,f,a);return Ra(R)}Jt=function(t){switch(t.tag){case 3:var n=t.stateNode;if(n.current.memoizedState.isDehydrated){var s=ee(n.pendingLanes);s!==0&&(nt(n,s|1),lr(n,Lt()),(Nt&6)===0&&(ci=Lt()+500,Ho()))}break;case 13:Es(function(){var a=wo(t,1);if(a!==null){var f=Xn();Vr(a,t,1,f)}}),df(t,1)}},Ct=function(t){if(t.tag===13){var n=wo(t,134217728);if(n!==null){var s=Xn();Vr(n,t,134217728,s)}df(t,134217728)}},ct=function(t){if(t.tag===13){var n=qo(t),s=wo(t,n);if(s!==null){var a=Xn();Vr(s,t,n,a)}df(t,n)}},Bn=function(){return Oe},gn=function(t,n){var s=Oe;try{return Oe=t,n()}finally{Oe=s}},Cn=function(t,n,s){switch(n){case"input":if(tt(t,s),n=s.name,s.type==="radio"&&n!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var a=s[n];if(a!==t&&a.form===t.form){var f=Wl(a);if(!f)throw Error(o(90));_e(a),tt(a,f)}}}break;case"textarea":wt(t,s);break;case"select":n=s.value,n!=null&&me(t,!!s.multiple,n,!1)}},ke=of,Re=Es;var q2={usingClientEntryPoint:!1,Events:[Wi,Zs,Wl,z,ue,of]},sl={findFiberByHostInstance:ms,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Z2={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:I.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Fr(t),t===null?null:t.stateNode},findFiberByHostInstance:sl.findFiberByHostInstance||Y2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Aa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Aa.isDisabled&&Aa.supportsFiber)try{mt=Aa.inject(Z2),vt=Aa}catch{}}return ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q2,ar.createPortal=function(t,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hf(n))throw Error(o(200));return G2(t,n,null,s)},ar.createRoot=function(t,n){if(!hf(t))throw Error(o(299));var s=!1,a="",f=$g;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),n=ff(t,1,!1,null,null,s,!1,a,f),t[mo]=n.current,Ui(t.nodeType===8?t.parentNode:t),new pf(n)},ar.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=Fr(n),t=t===null?null:t.stateNode,t},ar.flushSync=function(t){return Es(t)},ar.hydrate=function(t,n,s){if(!Ta(n))throw Error(o(200));return Ia(null,t,n,!0,s)},ar.hydrateRoot=function(t,n,s){if(!hf(t))throw Error(o(405));var a=s!=null&&s.hydratedSources||null,f=!1,g="",R=$g;if(s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onRecoverableError!==void 0&&(R=s.onRecoverableError)),n=jg(n,null,t,1,s??null,f,!1,g,R),t[mo]=n.current,Ui(t),a)for(t=0;t<a.length;t++)s=a[t],f=s._getVersion,f=f(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,f]:n.mutableSourceEagerHydrationData.push(s,f);return new Ca(n)},ar.render=function(t,n,s){if(!Ta(n))throw Error(o(200));return Ia(null,t,n,!1,s)},ar.unmountComponentAtNode=function(t){if(!Ta(t))throw Error(o(40));return t._reactRootContainer?(Es(function(){Ia(null,null,t,!1,function(){t._reactRootContainer=null,t[mo]=null})}),!0):!1},ar.unstable_batchedUpdates=of,ar.unstable_renderSubtreeIntoContainer=function(t,n,s,a){if(!Ta(s))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Ia(t,n,s,!1,a)},ar.version="18.3.1-next-f1338f8080-20240426",ar}var Qg;function $0(){if(Qg)return yf.exports;Qg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),yf.exports=uw(),yf.exports}var Jg;function cw(){if(Jg)return Pa;Jg=1;var e=$0();return Pa.createRoot=e.createRoot,Pa.hydrateRoot=e.hydrateRoot,Pa}var fw=cw();function bd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $s=bd();function U0(e){$s=e}var Ns={exec:()=>null};function Is(e){let r=[];return o=>{let i=Math.max(0,Math.min(3,o-1)),l=r[i];return l||(l=e(i),r[i]=l),l}}function yt(e,r=""){let o=typeof e=="string"?e:e.source,i={replace:(l,u)=>{let c=typeof u=="string"?u:u.source;return c=c.replace(En.caret,"$1"),o=o.replace(l,c),i},getRegex:()=>new RegExp(o,r)};return i}var V0=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),En={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Is(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Is(e=>new RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Is(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Is(e=>new RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Is(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Is(e=>new RegExp(`^ {0,${e}}(?:</?(?:${Cl})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Is(e=>new RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},dw=/^(?:[ \t]*(?:\n|$))+/,pw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Rl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,kd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,H0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,W0=yt(H0).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),mw=yt(H0).replace(/bull/g,kd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,yw=/^[^\n]+/,Ed=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,vw=yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ed).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),xw=yt(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,kd).getRegex(),Cl="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Rd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ww=yt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Rd).replace("tag",Cl).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K0=e=>yt(Sd).replace("hr",Rl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Cl).getRegex(),bw=K0(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),kw=K0(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Sw=yt(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",kw).getRegex(),Cd={blockquote:Sw,code:pw,def:vw,fences:hw,heading:gw,hr:Rl,html:ww,lheading:W0,list:xw,newline:dw,paragraph:bw,table:Ns,text:yw},em=yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Cl).getRegex(),Ew={...Cd,lheading:mw,table:em,paragraph:yt(Sd).replace("hr",Rl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",em).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Cl).getRegex()},Rw={...Cd,html:yt(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Rd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ns,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yt(Sd).replace("hr",Rl).replace("heading",` *#{1,6} *[^
|
|
41
|
+
]`).replace("lheading",W0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Cw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,G0=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Iw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,io=/[\p{P}\p{S}]/u,Ai=/[\s\p{P}\p{S}]/u,Tl=/[^\s\p{P}\p{S}]/u,Aw=yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ai).getRegex(),Pw=/[\p{Pi}\p{Ps}"']/u,Y0=/(?!~)[\p{P}\p{S}]/u,_w=/(?!~)[\s\p{P}\p{S}]/u,Ow=/(?:[^\s\p{P}\p{S}]|~)/u,Nw=yt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",V0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),X0=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Mw=yt(X0,"u").replace(/punct/g,io).getRegex(),Lw=yt(X0,"u").replace(/punct/g,Y0).getRegex(),Dw=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Fw=yt(Dw,"u").replace(/openQuote/g,Pw).replace(/punct/g,io).getRegex(),q0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zw=yt(q0,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Ai).replace(/punct/g,io).getRegex(),jw=yt(q0,"gu").replace(/notPunctSpace/g,Ow).replace(/punctSpace/g,_w).replace(/punct/g,Y0).getRegex(),Bw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",$w=yt(Bw,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Ai).replace(/punct/g,io).getRegex(),Uw=yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Ai).replace(/punct/g,io).getRegex(),Vw="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Hw=yt(Vw,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Ai).replace(/punct/g,io).getRegex(),Ww=yt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,io).getRegex(),Kw="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Gw=yt(Kw,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Ai).replace(/punct/g,io).getRegex(),Yw=yt(/\\(punct)/,"gu").replace(/punct/g,io).getRegex(),Xw=yt(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,io).getRegex(),qw=yt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zw=yt(Rd).replace("(?:-->|$)","-->").getRegex(),Qw=yt("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Zw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z0=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,lu=yt(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Z0).getRegex(),Jw=yt(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",lu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),eb=yt(/^!?\[(label)\]\[(ref)\]/).replace("label",lu).replace("ref",Ed).getRegex(),tb=yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ed).getRegex(),tm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,nb=yt(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Z0).getRegex(),rb=yt("reflink|nolink(?!\\()","g").replace("reflink",yt(/^!?\[(label)\]\[(ref)\]/).replace("label",nb).replace("ref",tm).getRegex()).replace("nolink",yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",tm).getRegex()).getRegex(),nm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ob=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,sb=yt(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,ob).getRegex(),Td={_backpedal:Ns,anyPunctuation:Yw,anyPunctuationOutsideCode:Xw,autolink:qw,blockSkip:Nw,br:G0,code:Tw,del:Ns,delLDelim:Ns,delRDelim:Ns,emStrongLDelim:Mw,emStrongRDelimAst:zw,emStrongRDelimUnd:Uw,escape:Cw,link:Jw,nolink:tb,punctuation:Aw,reflink:eb,reflinkSearch:rb,tag:Qw,text:Iw,url:Ns},ib={...Td,emStrongLDelim:Fw,emStrongRDelimAst:$w,emStrongRDelimUnd:Hw,link:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",lu).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lu).getRegex()},Uf={...Td,emStrongRDelimAst:jw,emStrongLDelim:Lw,delLDelim:Ww,delRDelim:Gw,url:yt(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",sb).replace("protocol",nm).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:yt(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",nm).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",V0?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},lb={...Uf,br:yt(G0).replace("{2,}","*").getRegex(),text:yt(Uf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_a={normal:Cd,gfm:Ew,pedantic:Rw},al={normal:Td,gfm:Uf,breaks:lb,pedantic:ib},ab={"&":"&","<":"<",">":">",'"':""","'":"'"},rm=e=>ab[e];function wr(e,r){if(r){if(En.escapeTest.test(e))return e.replace(En.escapeReplace,rm)}else if(En.escapeTestNoEncode.test(e))return e.replace(En.escapeReplaceNoEncode,rm);return e}function ub(e){return En.numericCharacterReference.test(e)?e.replace(En.numericCharacterReferenceOrAmpersand,(r,o,i)=>{if(o===void 0&&i===void 0)return"&";let l=o===void 0?Number.parseInt(i,16):Number.parseInt(o,10);return l===0||l>1114111||l>=55296&&l<=57343?"�":l===38?"&":String.fromCodePoint(l)}):e}function om(e){try{e=encodeURI(e).replace(En.percentDecode,"%")}catch{return null}return e}function sm(e,r){var u;let o=e.replace(En.findPipe,(c,d,p)=>{let h=!1,m=d;for(;--m>=0&&p[m]==="\\";)h=!h;return h?"|":" |"}),i=o.split(En.splitPipe),l=0;if(i[0].trim()||i.shift(),i.length>0&&!((u=i.at(-1))!=null&&u.trim())&&i.pop(),r)if(i.length>r)i.splice(r);else for(;i.length<r;)i.push("");for(;l<i.length;l++)i[l]=i[l].trim().replace(En.slashPipe,"|");return i}function Eo(e,r,o){let i=e.length;if(i===0)return"";let l=0;for(;l<i&&e.charAt(i-l-1)===r;)l++;return e.slice(0,i-l)}function im(e){let r=e.split(`
|
|
42
|
+
`),o=r.length-1;for(;o>=0&&En.blankLine.test(r[o]);)o--;return r.length-o<=2?e:r.slice(0,o+1).join(`
|
|
43
|
+
`)}function au(e){return e.trim().replace(En.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function lm(e,r){if(e.indexOf(r[0])===-1&&e.indexOf(r[1])===-1)return-1;let o=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===r[0])o++;else if(e[i]===r[1]&&(o--,o<0))return i;return o>0?-2:-1}var ki=new WeakMap;function Id(e){let r={"*":-1,_:-1},o=-1,i=e.length;for(let l=0;l<i;l++){let u=e[l];if(u!=="*"&&u!=="_"&&u!=="~")continue;let c=l===0?`
|
|
44
|
+
`:e[l-1],d=l+1;for(;d<i&&e[d]===u;)d++;c!==" "&&c!==" "&&c!==`
|
|
45
|
+
`&&c!=="\r"&&c!=="\f"&&(u==="~"?o=l:r[u]=l),l=d-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:r,lastPossibleDelCloserIndex:o}}function cb(e,r){let o=Id(r),i=ki.get(e);i?i.push(o):ki.set(e,[o])}function fb(e){let r=ki.get(e);r&&(r.pop(),r.length===0&&ki.delete(e))}function db(e,r,o){var l;let i=(l=ki.get(e))==null?void 0:l.at(-1);return i&&i.maskedSrc===r?i.lastPossibleEmStrongCloserIndex[o]:Id(r).lastPossibleEmStrongCloserIndex[o]}function pb(e,r){var i;let o=(i=ki.get(e))==null?void 0:i.at(-1);return o&&o.maskedSrc===r?o.lastPossibleDelCloserIndex:Id(r).lastPossibleDelCloserIndex}function Oa(e,r=0){let o=r,i="";for(let l of e)if(l===" "){let u=4-o%4;i+=" ".repeat(u),o+=u}else i+=l,o++;return i}function am(e,r,o,i,l){let u=r.href,c=r.title||null,d=e[1].replace(l.other.outputLinkReplace,"$1"),p=e[0].charAt(0)==="!",h=i.state.inLink,m=i.state.linkEmitted,y=i.state.inRawBlock;i.state.inLink=!0,i.state.linkEmitted=!1;let x=i.inlineTokens(d),k=i.state.linkEmitted;if(i.state.linkEmitted=m,i.state.inLink=h,!p){if(k){i.state.inRawBlock=y;return}i.state.linkEmitted=!0}return{type:p?"image":"link",raw:o,href:u,title:c,text:d,tokens:x}}function hb(e,r,o){let i=e.match(o.other.indentCodeCompensation);if(i===null)return r;let l=i[1];return r.split(`
|
|
46
|
+
`).map(u=>{let c=u.match(o.other.beginningSpace);if(c===null)return u;let[d]=c;return u.slice(Math.min(d.length,l.length))}).join(`
|
|
47
|
+
`)}function um(e,r,o,i){if(!r.includes("<"))return!1;for(let l=0;l<r.length;l++){if(r[l]==="\\"){l++;continue}if(r[l]==="`"){let d=i.inline.code.exec(r.slice(l));if(d){l+=d[0].length-1;continue}}if(r[l]!=="<")continue;let u=e.slice(o+l),c=i.inline.tag.exec(u)||i.inline.autolink.exec(u);if(c){if(c[0].length>r.length-l)return!0;l+=c[0].length-1}}return!1}var gi=class{constructor(e){je(this,"options");je(this,"rules");je(this,"lexer");this.options=e||$s}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let o=this.options.pedantic?r[0]:im(r[0]),i=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:i}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let o=r[0],i=hb(o,r[3]||"",this.rules);return{type:"code",raw:o,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let o=r[2].trim();if(this.rules.other.endingHash.test(o)){let i=Eo(o,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceTabChar.test(i))&&(o=i.trim())}return{type:"heading",raw:Eo(r[0],`
|
|
48
|
+
`),depth:r[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Eo(r[0],`
|
|
49
|
+
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let o=Eo(r[0],`
|
|
50
|
+
`).split(`
|
|
51
|
+
`),i="",l="",u=[];for(;o.length>0;){let c=!1,d=[],p;for(p=0;p<o.length;p++)if(this.rules.other.blockquoteStart.test(o[p]))d.push(o[p]),c=!0;else if(!c)d.push(o[p]);else break;o=o.slice(p);let h=d.join(`
|
|
52
|
+
`),m=h.replace(this.rules.other.blockquoteMarkerWhitespace,(k,w,S)=>w+Oa(S,w.length)).replace(this.rules.other.blockquoteSetextReplace,`
|
|
53
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
54
|
+
${h}`:h,l=l?`${l}
|
|
55
|
+
${m}`:m;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,u,!0),this.lexer.state.top=y,o.length===0)break;let x=u.at(-1);if((x==null?void 0:x.type)==="code"||(x==null?void 0:x.type)==="heading"||(x==null?void 0:x.type)==="hr"||(x==null?void 0:x.type)==="html"||(x==null?void 0:x.type)==="table")break;if((x==null?void 0:x.type)==="blockquote"){let k=x,w=o.join(`
|
|
56
|
+
`),S=k.raw+`
|
|
57
|
+
`+w.replace(this.rules.other.blockquoteSetextReplace2,""),b=this.blockquote(S);u[u.length-1]=b;let C=S.substring(b.raw.length).replace(/^\n/,""),E=C?C.split(`
|
|
58
|
+
`).length:0,A=E?o.slice(0,-E):o;if(A.length>0&&(i=`${i}
|
|
59
|
+
${A.join(`
|
|
60
|
+
`)}`),l=l.substring(0,l.length-k.text.length)+b.text,o=o.slice(A.length),o.length>0&&this.rules.other.blockquoteStart.test(o[0]))continue;break}else if((x==null?void 0:x.type)==="list"){let k=x,w=k.raw+`
|
|
61
|
+
`+o.join(`
|
|
62
|
+
`),S=this.list(w);u[u.length-1]=S;let b=S.raw.length>k.raw.length?w.slice(k.raw.length+1,S.raw.length).split(`
|
|
63
|
+
`).length:0;if(b>0){let C=o.slice(0,b).join(`
|
|
64
|
+
`);i=`${i}
|
|
65
|
+
${C}`,l=`${l}
|
|
66
|
+
${C}`}o=o.slice(b);continue}}return{type:"blockquote",raw:i,tokens:u,text:l}}}list(e){var o;let r=this.rules.block.list.exec(e);if(r){if(!this.options.pedantic&&((o=this.lexer.state.lastToken)==null?void 0:o.type)==="text"&&!this.rules.other.listInterruptsParagraph.test(e))return;let i=e,l=()=>i.length-e.length,u=r[1].trim(),c=u.length>1,d={type:"list",raw:"",ordered:c,start:c?+u.slice(0,-1):"",loose:!1,items:[]};u=c?`\\d{1,9}\\${u.slice(-1)}`:`\\${u}`,this.options.pedantic&&(u=c?u:"[*+-]");let p=this.rules.other.listItemRegex(u),h=!1;for(;e;){let y=!1,x="";if(!(r=p.exec(e))||this.rules.block.hr.test(e))break;let k=l();e=e.substring(r[0].length);let w=r[2].split(`
|
|
67
|
+
`,1)[0],S=r[1].length,b=this.options.pedantic?Oa(w,S):w.replace(this.rules.other.leadingSpaceTab,P=>Oa(P,S)),C=e.split(`
|
|
68
|
+
`,1)[0],E=!b.trim(),A=0;if(this.options.pedantic?(A=2,x=b.trimStart()):E?A=S+1:(A=b.search(this.rules.other.nonSpaceChar),A=A>4?1:A,x=b.slice(A),A+=S),E&&this.rules.other.blankLine.test(C)&&(e=e.substring(C.length+1),y=!0),!y){let P=this.rules.other.nextBulletRegex(A),_=this.rules.other.hrRegex(A),N=this.rules.other.fencesBeginRegex(A),j=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(A):this.rules.other.headingBeginRegex(A),F=this.rules.other.htmlBeginRegex(A),M=this.rules.other.blockquoteBeginRegex(A),G=!1;for(;e;){let q=e.split(`
|
|
69
|
+
`,1)[0],W;if(C=q,this.options.pedantic?(C=C.replace(this.rules.other.listReplaceNesting," "),W=C):W=C.replace(this.rules.other.leadingSpaceTab,K=>Oa(K)),N.test(C)||j.test(C)||F.test(C)||M.test(C)||P.test(C)||_.test(C))break;if(W.search(this.rules.other.nonSpaceChar)>=A||!C.trim())x+=`
|
|
70
|
+
`+W.slice(A),G=!1;else{if(E||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(b)||j.test(b)||F.test(b)||_.test(b))break;if(!this.options.pedantic&&!G){let H=b.replace(this.rules.other.nestedContainerMarkers,"");if(this.rules.block.fences.test(H)||this.rules.block.heading.test(H)||this.rules.block.hr.test(H))break}let K=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(C)&&this.rules.block.lheading.test(`${b}
|
|
71
|
+
${C}`)?` ${W.replace(/^ {0,3}/,"")}`:C;x+=`
|
|
72
|
+
`+K,G=!0}E=!C.trim(),e=e.substring(q.length+1),b=W.slice(A)}}let I=i.slice(k,l());d.loose||(h?d.loose=!0:this.rules.other.doubleBlankLine.test(I)&&(h=!0)),d.items.push({type:"list_item",raw:I,task:!!this.options.gfm&&this.rules.other.listIsTask.test(x),loose:!1,text:x,tokens:[]})}let m=d.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;d.raw=i.slice(0,l()).trimEnd();for(let y of d.items)if(this.lexer.state.top=!1,y.tokens=this.lexer.blockTokens(y.text,[]),!d.loose){let x=y.tokens.filter(w=>w.type==="space"),k=x.length>0&&x.some(w=>this.rules.other.anyLine.test(w.raw));d.loose=k}for(let y of d.items){let x=y.tokens[0];if(y.task&&((x==null?void 0:x.type)==="text"||(x==null?void 0:x.type)==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),x.raw=x.raw.replace(this.rules.other.listReplaceTask,""),x.text=x.text.replace(this.rules.other.listReplaceTask,"");for(let w=this.lexer.inlineQueue.length-1;w>=0;w--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[w].src)){this.lexer.inlineQueue[w].src=this.lexer.inlineQueue[w].src.replace(this.rules.other.listReplaceTask,"");break}let k=this.rules.other.listTaskCheckbox.exec(y.raw);if(k){let w={type:"checkbox",raw:k[0]+" ",checked:k[0]!=="[ ]"};y.checked=w.checked,d.loose?y.tokens[0]&&["paragraph","text"].includes(y.tokens[0].type)&&"tokens"in y.tokens[0]&&y.tokens[0].tokens?(y.tokens[0].raw=w.raw+y.tokens[0].raw,y.tokens[0].text=w.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(w)):y.tokens.unshift({type:"paragraph",raw:w.raw,text:w.raw,tokens:[w]}):y.tokens.unshift(w)}}else y.task&&(y.task=!1)}if(d.loose)for(let y of d.items){y.loose=!0;for(let x of y.tokens)x.type==="text"&&(x.type="paragraph")}return d}}html(e){let r=this.rules.block.html.exec(e);if(r){let o=im(r[0]);return{type:"html",block:!0,raw:o,pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:o}}}def(e){let r=this.rules.block.def.exec(e);if(r){if(!this.rules.other.startAngleBracket.test(r[2])&&lm(r[2],"()")!==-1)return;let o=au(r[1]),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",l=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:o,raw:Eo(r[0],`
|
|
73
|
+
`),href:i,title:l}}}table(e){var c;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let o=sm(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(c=r[3])!=null&&c.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
74
|
+
`):[],u={type:"table",raw:Eo(r[0],`
|
|
75
|
+
`),header:[],align:[],rows:[]};if(o.length===i.length){for(let d of i)this.rules.other.tableAlignRight.test(d)?u.align.push("right"):this.rules.other.tableAlignCenter.test(d)?u.align.push("center"):this.rules.other.tableAlignLeft.test(d)?u.align.push("left"):u.align.push(null);for(let d=0;d<o.length;d++)u.header.push({text:o[d],tokens:this.lexer.inline(o[d]),header:!0,align:u.align[d]});for(let d of l)u.rows.push(sm(d,u.header.length).map((p,h)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:u.align[h]})));return u}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r){let o=r[1].trim();return{type:"heading",raw:Eo(r[0],`
|
|
76
|
+
`),depth:r[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let o=r[1].charAt(r[1].length-1)===`
|
|
77
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:o,tokens:this.lexer.inline(o)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let r=this.rules.inline.link.exec(e);if(r){let o=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&um(e,r[1],o,this.rules))return;let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let d=Eo(i.slice(0,-1),"\\");if((i.length-d.length)%2===0)return}else{let d=lm(r[2],"()");if(d===-2)return;if(d>-1){let p=(r[0].indexOf("!")===0?5:4)+r[1].length+d;r[2]=r[2].substring(0,d),r[0]=r[0].substring(0,p).trim(),r[3]=""}}let l=Eo(r[0].slice(0,-1),"\\");if((r[0].length-l.length)%2===0)return;let u=r[2],c="";if(this.options.pedantic){let d=this.rules.other.pedanticHrefTitle.exec(u);d&&(u=d[1],c=d[3])}else c=r[3]?r[3].slice(1,-1):"";return u=u.trim(),this.rules.other.startAngleBracket.test(u)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?u=u.slice(1):u=u.slice(1,-1)),am(r,{href:u&&u.replace(this.rules.inline.anyPunctuation,"$1"),title:c&&c.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let o;if((o=this.rules.inline.reflink.exec(e))||(o=this.rules.inline.nolink.exec(e))){let i=o[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&um(e,o[1],i,this.rules))return;let l=r[au(o[2]||o[1])];if(!l){let u=o[0].charAt(0);return{type:"text",raw:u,text:u}}return am(o,l,o[0],this.lexer,this.rules)}}emStrong(e,r,o=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||!i[1]&&!i[2]&&!i[3]&&!i[4])return;let l=i[0][0],u=o===l,c=r.length-e.length,d=c;for(;!this.options.pedantic&&d>0&&r[d-1]===l;)d--;let p=[...r.slice(Math.max(0,d-2),d)].at(-1)??"",h=p==="*"||p==="_"||!!this.rules.inline.punctuation.exec(p);d<c&&(o=p);let m=d<c?h:o==="*"||o==="_"||!!this.rules.inline.punctuation.exec(o);if(i[4]&&o.match(this.rules.other.unicodeAlphaNumeric))return;let y=i[1]||i[3]||"";if(!y||!o||m){let x=[...i[0]].length-1,k,w,S=x,b=0,C=c-d+x,E=!this.options.pedantic&&!!p.trim()&&(!!y||l==="*"&&!h);if(l!=="*"&&l!=="_")return;let A=l==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,I=db(this,r,l),P=r.length-e.length+x;if(I<P)return;r=r.slice(-1*e.length+x);let _=I-P;for(A.lastIndex=0;(i=A.exec(r))!==null&&!(i.index>_);){if(k=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!k)continue;if(w=[...k].length,i[3]||i[4]){S+=w;continue}else if(i[5]||i[6]||E){if(u&&(i[5]||i[6]))break;if(C%3&&!((C+w)%3)){b+=w;continue}}if(S-=w,S>0)continue;w=Math.min(w,w+S+b);let N=[...i[0]][0].length,j=e.slice(0,x+i.index+N+w);if(Math.min(x,w)%2){let M=j.slice(1,-1);return{type:"em",raw:j,text:M,tokens:this.lexer.inlineTokens(M)}}let F=j.slice(2,-2);return{type:"strong",raw:j,text:F,tokens:this.lexer.inlineTokens(F)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let o=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(o),l=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return i&&l&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:r[0],text:o}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e,r,o=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!o||this.rules.inline.punctuation.exec(o))){let l=[...i[0]].length-1,u,c,d=l,p=this.rules.inline.delRDelim,h=pb(this,r),m=r.length-e.length+l;if(h<m)return;r=r.slice(-1*e.length+l);let y=h-m;for(p.lastIndex=0;(i=p.exec(r))!==null&&!(i.index>y);){if(u=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!u||(c=[...u].length,c!==l))continue;if(i[3]||i[4]){d+=c;continue}if(d-=c,d>0)continue;c=Math.min(c,c+d);let x=[...i[0]][0].length,k=e.slice(0,l+i.index+x+c),w=k.slice(l,-l);return{type:"del",raw:k,text:w,tokens:this.lexer.inlineTokens(w)}}}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let o,i;return r[2]==="@"?(o=r[1],i="mailto:"+o):(o=r[1],i=o),{type:"link",raw:r[0],text:o,href:i,autolink:!0,tokens:[{type:"text",raw:o,text:o}]}}}url(e){var o;let r;if(r=this.rules.inline.url.exec(e)){let i,l;if(r[2]==="@")i=r[0],l="mailto:"+i;else{let u;do u=r[0],r[0]=((o=this.rules.inline._backpedal.exec(r[0]))==null?void 0:o[0])??"";while(u!==r[0]);i=r[0],r[1]==="www."?l="http://"+r[0]:l=r[0]}return{type:"link",raw:r[0],text:i,href:l,autolink:!0,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let o=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:o?r[0]:ub(r[0]),escaped:o}}}},so,Q0,J0,ey,ty,Ds,Hr=(Ds=class{constructor(r){Hg(this,so);je(this,"tokens");je(this,"options");je(this,"state");je(this,"inlineQueue");je(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=r||$s,this.options.tokenizer=this.options.tokenizer||new gi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let o={other:En,block:_a.normal,inline:al.normal};this.options.pedantic?(o.block=_a.pedantic,o.inline=al.pedantic):this.options.gfm&&(o.block=_a.gfm,this.options.breaks?o.inline=al.breaks:o.inline=al.gfm),this.tokenizer.rules=o}static get rules(){return{block:_a,inline:al}}static lex(r,o){return new Ds(o).lex(r)}static lexInline(r,o){return new Ds(o).inlineTokens(r)}lex(r){r=r.replace(En.carriageReturn,`
|
|
78
|
+
`),this.blockTokens(r,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let i=this.inlineQueue[o];this.state.inRawBlock=!1,this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(r,o=[],i=!1){var c,d,p;this.tokenizer.lexer=this;let l=this.state.lastToken;this.options.pedantic&&(r=r.replace(En.tabCharGlobal," ").replace(En.spaceLine,""));let u=1/0;for(;r;){if(r.length<u)u=r.length;else{this.infiniteLoopError(r.charCodeAt(0));break}this.state.lastToken=o.at(-1);let h;if((d=(c=this.options.extensions)==null?void 0:c.block)!=null&&d.some(y=>(h=y.call({lexer:this},r,o))?(r=r.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(r)){r=r.substring(h.raw.length);let y=o.at(-1);h.raw.length===1&&y!==void 0?y.raw+=`
|
|
79
|
+
`:o.push(h);continue}if(h=this.tokenizer.code(r)){r=r.substring(h.raw.length);let y=o.at(-1);(y==null?void 0:y.type)==="paragraph"||(y==null?void 0:y.type)==="text"?(y.raw+=(y.raw.endsWith(`
|
|
80
|
+
`)?"":`
|
|
81
|
+
`)+h.raw,y.text+=`
|
|
82
|
+
`+h.text,this.inlineQueue.at(-1).src=y.text):o.push(h);continue}if(h=this.tokenizer.fences(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(r)){r=r.substring(h.raw.length);let y=o.at(-1);(y==null?void 0:y.type)==="paragraph"||(y==null?void 0:y.type)==="text"?(y.raw+=(y.raw.endsWith(`
|
|
83
|
+
`)?"":`
|
|
84
|
+
`)+h.raw,y.text+=`
|
|
85
|
+
`+h.raw,this.inlineQueue.at(-1).src=y.text):(this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title}),o.push(h));continue}if(h=this.tokenizer.table(r)){r=r.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(r)){r=r.substring(h.raw.length),o.push(h);continue}let m=r;if((p=this.options.extensions)!=null&&p.startBlock){let y=1/0,x=r.slice(1),k;this.options.extensions.startBlock.forEach(w=>{k=w.call({lexer:this},x),typeof k=="number"&&k>=0&&(y=Math.min(y,k))}),y<1/0&&y>=0&&(m=r.substring(0,y+1))}if(this.state.top&&(h=this.tokenizer.paragraph(m))){let y=o.at(-1);i&&(y==null?void 0:y.type)==="paragraph"?(y.raw+=(y.raw.endsWith(`
|
|
86
|
+
`)?"":`
|
|
87
|
+
`)+h.raw,y.text+=`
|
|
88
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=y.text):o.push(h),i=m.length!==r.length,r=r.substring(h.raw.length);continue}if(h=this.tokenizer.text(r)){r=r.substring(h.raw.length);let y=o.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=(y.raw.endsWith(`
|
|
89
|
+
`)?"":`
|
|
90
|
+
`)+h.raw,y.text+=`
|
|
91
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=y.text):o.push(h);continue}if(r){this.infiniteLoopError(r.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=l,o}inline(r,o=[]){return this.inlineQueue.push({src:r,tokens:o}),o}linkInText(r){if(!r.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let i of r.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(i[0])&&r.charAt(i.index-1)!=="!")return!0;for(let i of r.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let l=i[0],u=l.lastIndexOf("[");if(!(l.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,au(l.slice(u+1,-1))))&&!(u>1&&this.linkInText(l.slice(1,u-1))))return!0}return!1}inlineTokens(r,o=[]){this.tokenizer.lexer=this;let i=this.state.linkParenPossible;this.state.linkParenPossible=i&&r.includes(")");try{return il(this,so,Q0).call(this,r,o)}finally{this.state.linkParenPossible=i}}infiniteLoopError(r){let o="Infinite loop on byte: "+r;if(this.options.silent)console.error(o);else throw new Error(o)}},so=new WeakSet,Q0=function(r,o){var l;let i=r.includes("*")||r.includes("_")||r.includes("~")||(l=this.options.hooks)!=null&&l.emStrongMask||this.tokenizer.emStrong!==gi.prototype.emStrong||this.tokenizer.del!==gi.prototype.del?il(this,so,ty).call(this,r):r;cb(this.tokenizer,i);try{return il(this,so,J0).call(this,r,i,o)}finally{fb(this.tokenizer)}},J0=function(r,o,i){var d,p,h;let l=!1,u="",c=1/0;for(;r;){if(r.length<c)c=r.length;else{this.infiniteLoopError(r.charCodeAt(0));break}l||(u=""),l=!1;let m;if((p=(d=this.options.extensions)==null?void 0:d.inline)!=null&&p.some(x=>(m=x.call({lexer:this},r,i))?(r=r.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.escape(r)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.tag(r)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.link(r)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(m.raw.length);let x=i.at(-1);m.type==="text"&&(x==null?void 0:x.type)==="text"?(x.raw+=m.raw,x.text+=m.text):i.push(m);continue}if(m=this.tokenizer.emStrong(r,o,u)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.codespan(r)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.br(r)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.del(r,o,u)){r=r.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.autolink(r)){r=r.substring(m.raw.length),i.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(r))){r=r.substring(m.raw.length),i.push(m);continue}let y=r;if((h=this.options.extensions)!=null&&h.startInline){let x=1/0,k=r.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},k),typeof w=="number"&&w>=0&&(x=Math.min(x,w))}),x<1/0&&x>=0&&(y=r.substring(0,x+1))}if(m=this.tokenizer.inlineText(y)){r=r.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(u=m.raw.slice(-1)),l=!0;let x=i.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=m.raw,x.text+=m.text):i.push(m);continue}if(r){this.infiniteLoopError(r.charCodeAt(0));break}}return i},ey=function(r){let{blockSkip:o,tag:i,autolink:l}=this.tokenizer.rules.inline,u="",c=0,d;for(o.lastIndex=0;d=o.exec(r);){let p=d.index+(d[2]?d[2].length:0),h=d.index+d[0].length;if(r.charAt(p)==="<"){let m=r.slice(p),y=i.exec(m)||l.exec(m);if(!y){o.lastIndex=p+1;continue}h=p+y[0].length,o.lastIndex=h}u+=r.slice(c,p)+"["+"a".repeat(h-p-2)+"]",c=h}return u+r.slice(c)},ty=function(r){var i,l;let o=r;if(this.tokens.links&&r.includes("[")){let u=this.tokenizer.rules.inline.reflinkSearch,c=d=>{let p=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,au(d.slice(p+1,-1))))return d;if(p>1&&d.charAt(0)!=="!"){let h=d.slice(1,p-1);if(this.linkInText(h))return"["+h.replace(u,c)+"]["+"a".repeat(d.length-p-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};o=o.replace(u,c)}return o=o.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(u,c,d)=>d?"+".repeat(u.length):c?c+u.slice(c.length,-c.length).replace(/`/g,"+")+c:u),o=il(this,so,ey).call(this,o),o=((l=(i=this.options.hooks)==null?void 0:i.emStrongMask)==null?void 0:l.call({lexer:this},o))??o,o},Ds),uu=class{constructor(e){je(this,"options");je(this,"parser");this.options=e||$s}space(e){return""}code({text:e,lang:r,escaped:o}){var u;let i=(u=(r||"").match(En.notSpaceStart))==null?void 0:u[0],l=e?e.replace(En.endingNewline,"")+`
|
|
92
|
+
`:"";return i?'<pre><code class="language-'+wr(i)+'">'+(o?l:wr(l,!0))+`</code></pre>
|
|
93
|
+
`:"<pre><code>"+(o?l:wr(l,!0))+`</code></pre>
|
|
94
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
95
|
+
${this.parser.parse(e)}</blockquote>
|
|
96
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
97
|
+
`}hr(e){return`<hr>
|
|
98
|
+
`}list(e){let r=e.ordered,o=e.start,i="";for(let c=0;c<e.items.length;c++){let d=e.items[c];i+=this.listitem(d)}let l=r?"ol":"ul",u=r&&o!==1?' start="'+o+'"':"";return"<"+l+u+`>
|
|
99
|
+
`+i+"</"+l+`>
|
|
100
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
101
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
102
|
+
`}table(e){let r="",o="";for(let l=0;l<e.header.length;l++)o+=this.tablecell(e.header[l]);r+=this.tablerow({text:o});let i="";for(let l=0;l<e.rows.length;l++){let u=e.rows[l];o="";for(let c=0;c<u.length;c++)o+=this.tablecell(u[c]);i+=this.tablerow({text:o})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
103
|
+
<thead>
|
|
104
|
+
`+r+`</thead>
|
|
105
|
+
`+i+`</table>
|
|
106
|
+
`}tablerow({text:e}){return`<tr>
|
|
107
|
+
${e}</tr>
|
|
108
|
+
`}tablecell(e){let r=this.parser.parseInline(e.tokens),o=e.header?"th":"td";return(e.align?`<${o} align="${e.align}">`:`<${o}>`)+r+`</${o}>
|
|
109
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${wr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,text:o,tokens:i,autolink:l}){let u=l?wr(o,!0):this.parser.parseInline(i),c=om(e);if(c===null)return u;e=wr(c,l);let d='<a href="'+e+'"';return r&&(d+=' title="'+wr(r)+'"'),d+=">"+u+"</a>",d}image({href:e,title:r,text:o,tokens:i}){i&&(o=this.parser.parseInline(i,this.parser.textRenderer));let l=om(e);if(l===null)return wr(o);e=l;let u=`<img src="${wr(e)}" alt="${wr(o)}"`;return r&&(u+=` title="${wr(r)}"`),u+=">",u}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:wr(e.text)}},Ad=class{constructor(){je(this,"parser")}strong({text:e,tokens:r}){return r?this.parser.parseInline(r,this):e}em({text:e,tokens:r}){return r?this.parser.parseInline(r,this):e}codespan({text:e}){return e}del({text:e,tokens:r}){return r?this.parser.parseInline(r,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:r}){return r?this.parser.parseInline(r,this):e}image({text:e,tokens:r}){return r?this.parser.parseInline(r,this):e}br(){return`
|
|
110
|
+
`}checkbox({raw:e}){return e}},Wr=class Vf{constructor(r){je(this,"options");je(this,"renderer");je(this,"textRenderer");this.options=r||$s,this.options.renderer=this.options.renderer||new uu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ad,this.textRenderer.parser=this}static parse(r,o){return new Vf(o).parse(r)}static parseInline(r,o){return new Vf(o).parseInline(r)}parse(r){var i,l;this.renderer.parser=this;let o="";for(let u=0;u<r.length;u++){let c=r[u];if((l=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&l[c.type]){let p=c,h=this.options.extensions.renderers[p.type].call({parser:this},p);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=h===!1?"":h??"";continue}}let d=c;switch(d.type){case"space":{o+=this.renderer.space(d);break}case"hr":{o+=this.renderer.hr(d);break}case"heading":{o+=this.renderer.heading(d);break}case"code":{o+=this.renderer.code(d);break}case"table":{o+=this.renderer.table(d);break}case"blockquote":{o+=this.renderer.blockquote(d);break}case"list":{o+=this.renderer.list(d);break}case"checkbox":{o+=this.renderer.checkbox(d);break}case"html":{o+=this.renderer.html(d);break}case"def":{o+=this.renderer.def(d);break}case"paragraph":{o+=this.renderer.paragraph(d);break}case"text":{o+=this.renderer.text(d);break}default:{let p='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return o}parseInline(r,o=this.renderer){var l,u;this.renderer.parser=this;let i="";for(let c=0;c<r.length;c++){let d=r[c];if((u=(l=this.options.extensions)==null?void 0:l.renderers)!=null&&u[d.type]){let h=this.options.extensions.renderers[d.type].call({parser:this},d);if(h!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(d.type)){i+=h===!1?"":h??"";continue}}let p=d;switch(p.type){case"escape":{i+=o.text(p);break}case"html":{i+=o.html(p);break}case"link":{i+=o.link(p);break}case"image":{i+=o.image(p);break}case"checkbox":{i+=o.checkbox(p);break}case"strong":{i+=o.strong(p);break}case"em":{i+=o.em(p);break}case"codespan":{i+=o.codespan(p);break}case"br":{i+=o.br(p);break}case"del":{i+=o.del(p);break}case"text":{i+=o.text(p);break}default:{let h='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},eu,pl=(eu=class{constructor(e){je(this,"options");je(this,"block");this.options=e||$s}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Hr.lex:Hr.lexInline}provideParser(e=this.block){return e?Wr.parse:Wr.parseInline}},je(eu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),je(eu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),eu);function es(e,r){if(Array.isArray(r))for(let o=0;o<r.length;o++)e.push(r[o]);else e.push(r)}var gb=class{constructor(...e){je(this,"defaults",bd());je(this,"options",this.setOptions);je(this,"parse",this.parseMarkdown(!0));je(this,"parseInline",this.parseMarkdown(!1));je(this,"Parser",Wr);je(this,"Renderer",uu);je(this,"TextRenderer",Ad);je(this,"Lexer",Hr);je(this,"Tokenizer",gi);je(this,"Hooks",pl);this.use(...e)}walkTokens(e,r){var i,l;let o=[];for(let u of e)switch(es(o,r.call(this,u)),u.type){case"table":{let c=u;for(let d of c.header)es(o,this.walkTokens(d.tokens,r));for(let d of c.rows)for(let p of d)es(o,this.walkTokens(p.tokens,r));break}case"list":{let c=u;es(o,this.walkTokens(c.items,r));break}default:{let c=u;(l=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&l[c.type]?this.defaults.extensions.childTokens[c.type].forEach(d=>{let p=c[d].flat(1/0);es(o,this.walkTokens(p,r))}):c.tokens&&es(o,this.walkTokens(c.tokens,r))}}return o}use(...e){let r=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(o=>{let i={...o};if(i.async=this.defaults.async||i.async||!1,o.extensions&&(o.extensions.forEach(l=>{if(!l.name)throw new Error("extension name required");if("renderer"in l){let u=r.renderers[l.name];u?r.renderers[l.name]=function(...c){let d=l.renderer.apply(this,c);return d===!1&&(d=u.apply(this,c)),d}:r.renderers[l.name]=l.renderer}if("tokenizer"in l){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=r[l.level];u?u.unshift(l.tokenizer):r[l.level]=[l.tokenizer],l.start&&(l.level==="block"?r.startBlock?r.startBlock.push(l.start):r.startBlock=[l.start]:l.level==="inline"&&(r.startInline?r.startInline.push(l.start):r.startInline=[l.start]))}"childTokens"in l&&l.childTokens&&(r.childTokens[l.name]=l.childTokens)}),i.extensions=r),o.renderer){let l=this.defaults.renderer||new uu(this.defaults);for(let u in o.renderer){if(!(u in l))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let c=u,d=o.renderer[c],p=l[c];l[c]=(...h)=>{let m=d.apply(l,h);return m===!1&&(m=p.apply(l,h)),m===!1?"":m??""}}i.renderer=l}if(o.tokenizer){let l=this.defaults.tokenizer||new gi(this.defaults);for(let u in o.tokenizer){if(!(u in l))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let c=u,d=o.tokenizer[c],p=l[c];l[c]=(...h)=>{let m=d.apply(l,h);return m===!1&&(m=p.apply(l,h)),m}}i.tokenizer=l}if(o.hooks){let l=this.defaults.hooks||new pl;for(let u in o.hooks){if(!(u in l))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let c=u,d=o.hooks[c],p=l[c];pl.passThroughHooks.has(u)?l[c]=h=>{if(l.options.async&&pl.passThroughHooksRespectAsync.has(u))return(async()=>{let y=await d.call(l,h);return p.call(l,y)})();let m=d.call(l,h);return p.call(l,m)}:l[c]=(...h)=>{if(l.options.async)return(async()=>{let y=await d.apply(l,h);return y===!1&&(y=await p.apply(l,h)),y})();let m=d.apply(l,h);return m===!1&&(m=p.apply(l,h)),m}}i.hooks=l}if(o.walkTokens){let l=this.defaults.walkTokens,u=o.walkTokens;i.walkTokens=function(c){let d=[];return es(d,u.call(this,c)),l&&es(d,l.call(this,c)),d}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Hr.lex(e,r??this.defaults)}parser(e,r){return Wr.parse(e,r??this.defaults)}parseMarkdown(e){return(r,o)=>{let i={...o},l={...this.defaults,...i},u=this.onError(!!l.silent,!!l.async);if(this.defaults.async===!0&&i.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l,l.hooks.block=e),l.async)return(async()=>{let c=l.hooks?await l.hooks.preprocess(r):r,d=await(l.hooks?await l.hooks.provideLexer(e):e?Hr.lex:Hr.lexInline)(c,l),p=l.hooks?await l.hooks.processAllTokens(d):d;l.walkTokens&&await Promise.all(this.walkTokens(p,l.walkTokens));let h=await(l.hooks?await l.hooks.provideParser(e):e?Wr.parse:Wr.parseInline)(p,l);return l.hooks?await l.hooks.postprocess(h):h})().catch(u);try{l.hooks&&(r=l.hooks.preprocess(r));let c=(l.hooks?l.hooks.provideLexer(e):e?Hr.lex:Hr.lexInline)(r,l);l.hooks&&(c=l.hooks.processAllTokens(c)),l.walkTokens&&this.walkTokens(c,l.walkTokens);let d=(l.hooks?l.hooks.provideParser(e):e?Wr.parse:Wr.parseInline)(c,l);return l.hooks&&(d=l.hooks.postprocess(d)),d}catch(c){return u(c)}}}onError(e,r){return o=>{if(o.message+=`
|
|
111
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+wr(o.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(o);throw o}}},Fs=new gb;function Wt(e,r){return Fs.parse(e,r)}Wt.options=Wt.setOptions=function(e){return Fs.setOptions(e),Wt.defaults=Fs.defaults,U0(Wt.defaults),Wt};Wt.getDefaults=bd;Wt.defaults=$s;function mb(...e){return Fs.use(...e),Wt.defaults=Fs.defaults,U0(Wt.defaults),Wt}Wt.use=mb;Wt.walkTokens=function(e,r){return Fs.walkTokens(e,r)};Wt.parseInline=Fs.parseInline;Wt.Parser=Wr;Wt.parser=Wr.parse;Wt.Renderer=uu;Wt.TextRenderer=Ad;Wt.Lexer=Hr;Wt.lexer=Hr.lex;Wt.Tokenizer=gi;Wt.Hooks=pl;Wt.parse=Wt;Wt.options;Wt.setOptions;Wt.walkTokens;Wt.parseInline;Wr.parse;Hr.lex;var wf,cm;function yb(){if(cm)return wf;cm=1;function e(z){return z instanceof Map?z.clear=z.delete=z.set=function(){throw new Error("map is read-only")}:z instanceof Set&&(z.add=z.clear=z.delete=function(){throw new Error("set is read-only")}),Object.freeze(z),Object.getOwnPropertyNames(z).forEach(ue=>{const ke=z[ue],Re=typeof ke;(Re==="object"||Re==="function")&&!Object.isFrozen(ke)&&e(ke)}),z}class r{constructor(ue){ue.data===void 0&&(ue.data={}),this.data=ue.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(z){return z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(z,...ue){const ke=Object.create(null);for(const Re in z)ke[Re]=z[Re];return ue.forEach(function(Re){for(const ut in Re)ke[ut]=Re[ut]}),ke}const l="</span>",u=z=>!!z.scope,c=(z,{prefix:ue})=>{if(z.startsWith("language:"))return z.replace("language:","language-");if(z.includes(".")){const ke=z.split(".");return[`${ue}${ke.shift()}`,...ke.map((Re,ut)=>`${Re}${"_".repeat(ut+1)}`)].join(" ")}return`${ue}${z}`};class d{constructor(ue,ke){this.buffer="",this.classPrefix=ke.classPrefix,ue.walk(this)}addText(ue){this.buffer+=o(ue)}openNode(ue){if(!u(ue))return;const ke=c(ue.scope,{prefix:this.classPrefix});this.span(ke)}closeNode(ue){u(ue)&&(this.buffer+=l)}value(){return this.buffer}span(ue){this.buffer+=`<span class="${ue}">`}}const p=(z={})=>{const ue={children:[]};return Object.assign(ue,z),ue};class h{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ue){this.top.children.push(ue)}openNode(ue){const ke=p({scope:ue});this.add(ke),this.stack.push(ke)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ue){return this.constructor._walk(ue,this.rootNode)}static _walk(ue,ke){return typeof ke=="string"?ue.addText(ke):ke.children&&(ue.openNode(ke),ke.children.forEach(Re=>this._walk(ue,Re)),ue.closeNode(ke)),ue}static _collapse(ue){typeof ue!="string"&&ue.children&&(ue.children.every(ke=>typeof ke=="string")?ue.children=[ue.children.join("")]:ue.children.forEach(ke=>{h._collapse(ke)}))}}class m extends h{constructor(ue){super(),this.options=ue}addText(ue){ue!==""&&this.add(ue)}startScope(ue){this.openNode(ue)}endScope(){this.closeNode()}__addSublanguage(ue,ke){const Re=ue.root;ke&&(Re.scope=`language:${ke}`),this.add(Re)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function y(z){return z?typeof z=="string"?z:z.source:null}function x(z){return S("(?=",z,")")}function k(z){return S("(?:",z,")*")}function w(z){return S("(?:",z,")?")}function S(...z){return z.map(ke=>y(ke)).join("")}function b(z){const ue=z[z.length-1];return typeof ue=="object"&&ue.constructor===Object?(z.splice(z.length-1,1),ue):{}}function C(...z){return"("+(b(z).capture?"":"?:")+z.map(Re=>y(Re)).join("|")+")"}function E(z){return new RegExp(z.toString()+"|").exec("").length-1}function A(z,ue){const ke=z&&z.exec(ue);return ke&&ke.index===0}const I=new RegExp(C(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function P(z,{joinWith:ue}){let ke=0;return z.map(Re=>{ke+=1;const ut=ke;let ht=y(Re),we="";for(;ht.length>0;){const Se=I.exec(ht);if(!Se){we+=ht;break}we+=ht.substring(0,Se.index),ht=ht.substring(Se.index+Se[0].length),Se[0][0]==="\\"&&Se[1]?we+="\\"+String(Number(Se[1])+ut):(we+=Se[0],(Se[0]==="("||/^\(\?[<']/.test(Se[0]))&&ke++)}return we}).map(Re=>`(${Re})`).join(ue)}const _=/\b\B/,N="[a-zA-Z]\\w*",j="[a-zA-Z_]\\w*",F="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",G="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W=(z={})=>{const ue=/^#![ ]*\//;return z.binary&&(z.begin=S(ue,/.*\b/,z.binary,/\b.*/)),i({scope:"meta",begin:ue,end:/$/,relevance:0,"on:begin":(ke,Re)=>{ke.index!==0&&Re.ignoreMatch()}},z)},K={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[K]},ne={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[K]},le={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},B=function(z,ue,ke={}){const Re=i({scope:"comment",begin:z,end:ue,contains:[]},ke);Re.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ut=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Re.contains.push({begin:S(/[ ]+/,"(",ut,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Re},V=B("//","$"),U=B("/\\*","\\*/"),T=B("#","$"),D={scope:"number",begin:F,relevance:0},Z={scope:"number",begin:M,relevance:0},X={scope:"number",begin:G,relevance:0},oe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[K,{begin:/\[/,end:/\]/,relevance:0,contains:[K]}]},J={scope:"title",begin:N,relevance:0},re={scope:"title",begin:j,relevance:0},de={begin:"\\.\\s*"+j,relevance:0};var ve=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:K,BINARY_NUMBER_MODE:X,BINARY_NUMBER_RE:G,COMMENT:B,C_BLOCK_COMMENT_MODE:U,C_LINE_COMMENT_MODE:V,C_NUMBER_MODE:Z,C_NUMBER_RE:M,END_SAME_AS_BEGIN:function(z){return Object.assign(z,{"on:begin":(ue,ke)=>{ke.data._beginMatch=ue[1]},"on:end":(ue,ke)=>{ke.data._beginMatch!==ue[1]&&ke.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:N,MATCH_NOTHING_RE:_,METHOD_GUARD:de,NUMBER_MODE:D,NUMBER_RE:F,PHRASAL_WORDS_MODE:le,QUOTE_STRING_MODE:ne,REGEXP_MODE:oe,RE_STARTERS_RE:q,SHEBANG:W,TITLE_MODE:J,UNDERSCORE_IDENT_RE:j,UNDERSCORE_TITLE_MODE:re});function De(z,ue){z.input[z.index-1]==="."&&ue.ignoreMatch()}function _e(z,ue){z.className!==void 0&&(z.scope=z.className,delete z.className)}function $e(z,ue){ue&&z.beginKeywords&&(z.begin="\\b("+z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",z.__beforeBegin=De,z.keywords=z.keywords||z.beginKeywords,delete z.beginKeywords,z.relevance===void 0&&(z.relevance=0))}function Te(z,ue){Array.isArray(z.illegal)&&(z.illegal=C(...z.illegal))}function Ne(z,ue){if(z.match){if(z.begin||z.end)throw new Error("begin & end are not supported with match");z.begin=z.match,delete z.match}}function Qe(z,ue){z.relevance===void 0&&(z.relevance=1)}const tt=(z,ue)=>{if(!z.beforeMatch)return;if(z.starts)throw new Error("beforeMatch cannot be used with starts");const ke=Object.assign({},z);Object.keys(z).forEach(Re=>{delete z[Re]}),z.keywords=ke.keywords,z.begin=S(ke.beforeMatch,x(ke.begin)),z.starts={relevance:0,contains:[Object.assign(ke,{endsParent:!0})]},z.relevance=0,delete ke.beforeMatch},ft=["of","and","for","in","not","or","if","then","parent","list","value"],Fe="keyword";function Ye(z,ue,ke=Fe){const Re=Object.create(null);return typeof z=="string"?ut(ke,z.split(" ")):Array.isArray(z)?ut(ke,z):Object.keys(z).forEach(function(ht){Object.assign(Re,Ye(z[ht],ue,ht))}),Re;function ut(ht,we){ue&&(we=we.map(Se=>Se.toLowerCase())),we.forEach(function(Se){const Me=Se.split("|");Re[Me[0]]=[ht,me(Me[0],Me[1])]})}}function me(z,ue){return ue?Number(ue):it(z)?0:1}function it(z){return ft.includes(z.toLowerCase())}const Rt={},wt=z=>{console.error(z)},se=(z,...ue)=>{console.log(`WARN: ${z}`,...ue)},ce=(z,ue)=>{Rt[`${z}/${ue}`]||(console.log(`Deprecated as of ${z}. ${ue}`),Rt[`${z}/${ue}`]=!0)},Be=new Error;function ge(z,ue,{key:ke}){let Re=0;const ut=z[ke],ht={},we={};for(let Se=1;Se<=ue.length;Se++)we[Se+Re]=ut[Se],ht[Se+Re]=!0,Re+=E(ue[Se-1]);z[ke]=we,z[ke]._emit=ht,z[ke]._multi=!0}function He(z){if(Array.isArray(z.begin)){if(z.skip||z.excludeBegin||z.returnBegin)throw wt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Be;if(typeof z.beginScope!="object"||z.beginScope===null)throw wt("beginScope must be object"),Be;ge(z,z.begin,{key:"beginScope"}),z.begin=P(z.begin,{joinWith:""})}}function lt(z){if(Array.isArray(z.end)){if(z.skip||z.excludeEnd||z.returnEnd)throw wt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Be;if(typeof z.endScope!="object"||z.endScope===null)throw wt("endScope must be object"),Be;ge(z,z.end,{key:"endScope"}),z.end=P(z.end,{joinWith:""})}}function gt(z){z.scope&&typeof z.scope=="object"&&z.scope!==null&&(z.beginScope=z.scope,delete z.scope)}function bt(z){gt(z),typeof z.beginScope=="string"&&(z.beginScope={_wrap:z.beginScope}),typeof z.endScope=="string"&&(z.endScope={_wrap:z.endScope}),He(z),lt(z)}function Qt(z){function ue(we,Se){return new RegExp(y(we),"m"+(z.case_insensitive?"i":"")+(z.unicodeRegex?"u":"")+(Se?"g":""))}class ke{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Se,Me){Me.position=this.position++,this.matchIndexes[this.matchAt]=Me,this.regexes.push([Me,Se]),this.matchAt+=E(Se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Se=this.regexes.map(Me=>Me[1]);this.matcherRe=ue(P(Se,{joinWith:"|"}),!0),this.lastIndex=0}exec(Se){this.matcherRe.lastIndex=this.lastIndex;const Me=this.matcherRe.exec(Se);if(!Me)return null;const Ue=Me.findIndex((Kt,Vt)=>Vt>0&&Kt!==void 0),Ze=this.matchIndexes[Ue];return Me.splice(0,Ue),Object.assign(Me,Ze)}}class Re{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Se){if(this.multiRegexes[Se])return this.multiRegexes[Se];const Me=new ke;return this.rules.slice(Se).forEach(([Ue,Ze])=>Me.addRule(Ue,Ze)),Me.compile(),this.multiRegexes[Se]=Me,Me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Se,Me){this.rules.push([Se,Me]),Me.type==="begin"&&this.count++}exec(Se){const Me=this.getMatcher(this.regexIndex);Me.lastIndex=this.lastIndex;let Ue=Me.exec(Se);if(this.resumingScanAtSamePosition()&&!(Ue&&Ue.index===this.lastIndex)){const Ze=this.getMatcher(0);Ze.lastIndex=this.lastIndex+1,Ue=Ze.exec(Se)}return Ue&&(this.regexIndex+=Ue.position+1,this.regexIndex===this.count&&this.considerAll()),Ue}}function ut(we){const Se=new Re;return we.contains.forEach(Me=>Se.addRule(Me.begin,{rule:Me,type:"begin"})),we.terminatorEnd&&Se.addRule(we.terminatorEnd,{type:"end"}),we.illegal&&Se.addRule(we.illegal,{type:"illegal"}),Se}function ht(we,Se){const Me=we;if(we.isCompiled)return Me;[_e,Ne,bt,tt].forEach(Ze=>Ze(we,Se)),z.compilerExtensions.forEach(Ze=>Ze(we,Se)),we.__beforeBegin=null,[$e,Te,Qe].forEach(Ze=>Ze(we,Se)),we.isCompiled=!0;let Ue=null;return typeof we.keywords=="object"&&we.keywords.$pattern&&(we.keywords=Object.assign({},we.keywords),Ue=we.keywords.$pattern,delete we.keywords.$pattern),Ue=Ue||/\w+/,we.keywords&&(we.keywords=Ye(we.keywords,z.case_insensitive)),Me.keywordPatternRe=ue(Ue,!0),Se&&(we.begin||(we.begin=/\B|\b/),Me.beginRe=ue(Me.begin),!we.end&&!we.endsWithParent&&(we.end=/\B|\b/),we.end&&(Me.endRe=ue(Me.end)),Me.terminatorEnd=y(Me.end)||"",we.endsWithParent&&Se.terminatorEnd&&(Me.terminatorEnd+=(we.end?"|":"")+Se.terminatorEnd)),we.illegal&&(Me.illegalRe=ue(we.illegal)),we.contains||(we.contains=[]),we.contains=[].concat(...we.contains.map(function(Ze){return jn(Ze==="self"?we:Ze)})),we.contains.forEach(function(Ze){ht(Ze,Me)}),we.starts&&ht(we.starts,Se),Me.matcher=ut(Me),Me}if(z.compilerExtensions||(z.compilerExtensions=[]),z.contains&&z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return z.classNameAliases=i(z.classNameAliases||{}),ht(z)}function Xt(z){return z?z.endsWithParent||Xt(z.starts):!1}function jn(z){return z.variants&&!z.cachedVariants&&(z.cachedVariants=z.variants.map(function(ue){return i(z,{variants:null},ue)})),z.cachedVariants?z.cachedVariants:Xt(z)?i(z,{starts:z.starts?i(z.starts):null}):Object.isFrozen(z)?i(z):z}var dn="11.12.0";class pn extends Error{constructor(ue,ke){super(ue),this.name="HTMLInjectionError",this.html=ke}}const nn=o,sn=i,Cn=Symbol("nomatch"),Ut=7,hn=function(z){const ue=Object.create(null),ke=Object.create(null),Re=[];let ut=!0;const ht="Could not find the language '{}', did you forget to load/include a language module?",we={disableAutodetect:!0,name:"Plain text",contains:[]};let Se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m};function Me(xe){return Se.noHighlightRe.test(xe)}function Ue(xe){let We=xe.className+" ";We+=xe.parentNode?xe.parentNode.className:"";const mt=Se.languageDetectRe.exec(We);if(mt){const vt=Gn(mt[1]);return vt||(se(ht.replace("{}",mt[1])),se("Falling back to no-highlight mode for this block.",xe)),vt?mt[1]:"no-highlight"}return We.split(/\s+/).find(vt=>Me(vt)||Gn(vt))}function Ze(xe,We,mt){let vt="",qt="";typeof We=="object"?(vt=xe,mt=We.ignoreIllegals,qt=We.language):(ce("10.7.0","highlight(lang, code, ...args) has been deprecated."),ce("10.7.0",`Please use highlight(code, options) instead.
|
|
112
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),qt=xe,vt=We),mt===void 0&&(mt=!0);const Ht={code:vt,language:qt};wn("before:highlight",Ht);const Rr=Ht.result?Ht.result:Kt(Ht.language,Ht.code,mt);return Rr.code=Ht.code,wn("after:highlight",Rr),Rr}function Kt(xe,We,mt,vt){const qt=Object.create(null);function Ht(Ce,Le){return Ce.keywords[Le]}function Rr(){if(!Pe.keywords){Ct.addText(ct);return}let Ce=0;Pe.keywordPatternRe.lastIndex=0;let Le=Pe.keywordPatternRe.exec(ct),rt="";for(;Le;){rt+=ct.substring(Ce,Le.index);const Tt=St.case_insensitive?Le[0].toLowerCase():Le[0],Pt=Ht(Pe,Tt);if(Pt){const[Ft,fo]=Pt;if(Ct.addText(rt),rt="",qt[Tt]=(qt[Tt]||0)+1,qt[Tt]<=Ut&&(Bn+=fo),Ft.startsWith("_"))rt+=Le[0];else{const hs=St.classNameAliases[Ft]||Ft;bn(Le[0],hs)}}else rt+=Le[0];Ce=Pe.keywordPatternRe.lastIndex,Le=Pe.keywordPatternRe.exec(ct)}rt+=ct.substring(Ce),Ct.addText(rt)}function Lo(){if(ct==="")return;let Ce=null;if(typeof Pe.subLanguage=="string"){if(!ue[Pe.subLanguage]){Ct.addText(ct);return}Ce=Kt(Pe.subLanguage,ct,!0,Jt[Pe.subLanguage]),Jt[Pe.subLanguage]=Ce._top}else Ce=jt(ct,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(Bn+=Ce.relevance),Ct.__addSublanguage(Ce._emitter,Ce.language)}function Ln(){Pe.subLanguage!=null?Lo():Rr(),ct=""}function bn(Ce,Le){Ce!==""&&(Ct.startScope(Le),Ct.addText(Ce),Ct.endScope())}function Do(Ce,Le){let rt=1;const Tt=Le.length-1;for(;rt<=Tt;){if(!Ce._emit[rt]){rt++;continue}const Pt=St.classNameAliases[Ce[rt]]||Ce[rt],Ft=Le[rt];Pt?bn(Ft,Pt):(ct=Ft,Rr(),ct=""),rt++}}function ee(Ce,Le){return Ce.scope&&typeof Ce.scope=="string"&&Ct.openNode(St.classNameAliases[Ce.scope]||Ce.scope),Ce.beginScope&&(Ce.beginScope._wrap?(bn(ct,St.classNameAliases[Ce.beginScope._wrap]||Ce.beginScope._wrap),ct=""):Ce.beginScope._multi&&(Do(Ce.beginScope,Le),ct="")),Pe=Object.create(Ce,{parent:{value:Pe}}),Pe}function fe(Ce,Le,rt){let Tt=A(Ce.endRe,rt);if(Tt){if(Ce["on:end"]){const Pt=new r(Ce);Ce["on:end"](Le,Pt),Pt.isMatchIgnored&&(Tt=!1)}if(Tt){for(;Ce.endsParent&&Ce.parent;)Ce=Ce.parent;return Ce}}if(Ce.endsWithParent)return fe(Ce.parent,Le,rt)}function be(Ce){return Pe.matcher.regexIndex===0?(ct+=Ce[0],1):(Cr=!0,0)}function Je(Ce){const Le=Ce[0],rt=Ce.rule,Tt=new r(rt),Pt=[rt.__beforeBegin,rt["on:begin"]];for(const Ft of Pt)if(Ft&&(Ft(Ce,Tt),Tt.isMatchIgnored))return be(Le);return rt.skip?ct+=Le:(rt.excludeBegin&&(ct+=Le),Ln(),!rt.returnBegin&&!rt.excludeBegin&&(ct=Le)),ee(rt,Ce),rt.returnBegin?0:Le.length}function dt(Ce){const Le=Ce[0],rt=We.substring(Ce.index),Tt=fe(Pe,Ce,rt);if(!Tt)return Cn;const Pt=Pe;Pe.endScope&&Pe.endScope._wrap?(Ln(),bn(Le,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(Ln(),Do(Pe.endScope,Ce)):Pt.skip?ct+=Le:(Pt.returnEnd||Pt.excludeEnd||(ct+=Le),Ln(),Pt.excludeEnd&&(ct=Le));do Pe.scope&&Ct.closeNode(),!Pe.skip&&!Pe.subLanguage&&(Bn+=Pe.relevance),Pe=Pe.parent;while(Pe!==Tt.parent);return Tt.starts&&ee(Tt.starts,Ce),Pt.returnEnd?0:Le.length}function at(){const Ce=[];for(let Le=Pe;Le!==St;Le=Le.parent)Le.scope&&Ce.unshift(Le.scope);Ce.forEach(Le=>Ct.openNode(Le))}let kt={};function Bt(Ce,Le){const rt=Le&&Le[0];if(ct+=Ce,rt==null)return Ln(),0;if(kt.type==="begin"&&Le.type==="end"&&kt.index===Le.index&&rt===""){if(ct+=We.slice(Le.index,Le.index+1),!ut){const Tt=new Error(`0 width match regex (${xe})`);throw Tt.languageName=xe,Tt.badRule=kt.rule,Tt}return 1}if(kt=Le,Le.type==="begin")return Je(Le);if(Le.type==="illegal"&&!mt){const Tt=new Error('Illegal lexeme "'+rt+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw Tt.mode=Pe,Tt}else if(Le.type==="end"){const Tt=dt(Le);if(Tt!==Cn)return Tt}if(Le.type==="illegal"&&rt==="")return Le.index===We.length||(ct+=`
|
|
113
|
+
`),1;if(er>1e5&&er>Le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ct+=rt,rt.length}const St=Gn(xe);if(!St)throw wt(ht.replace("{}",xe)),new Error('Unknown language: "'+xe+'"');const nt=Qt(St);let Oe="",Pe=vt||nt;const Jt={},Ct=new Se.__emitter(Se);at();let ct="",Bn=0,gn=0,er=0,Cr=!1;try{if(St.__emitTokens)St.__emitTokens(We,Ct);else{for(Pe.matcher.considerAll();;){er++,Cr?Cr=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=gn;const Ce=Pe.matcher.exec(We);if(!Ce)break;const Le=We.substring(gn,Ce.index),rt=Bt(Le,Ce);gn=Ce.index+rt}Bt(We.substring(gn))}return Ct.finalize(),Oe=Ct.toHTML(),{language:xe,value:Oe,relevance:Bn,illegal:!1,_emitter:Ct,_top:Pe}}catch(Ce){if(Ce.message&&Ce.message.includes("Illegal"))return{language:xe,value:nn(We),illegal:!0,relevance:0,_illegalBy:{message:Ce.message,index:gn,context:We.slice(gn-100,gn+100),mode:Ce.mode,resultSoFar:Oe},_emitter:Ct};if(ut)return{language:xe,value:nn(We),illegal:!1,relevance:0,errorRaised:Ce,_emitter:Ct,_top:Pe};throw Ce}}function Vt(xe){const We={value:nn(xe),illegal:!1,relevance:0,_top:we,_emitter:new Se.__emitter(Se)};return We._emitter.addText(xe),We}function jt(xe,We){We=We||Se.languages||Object.keys(ue);const mt=Vt(xe),vt=We.filter(Gn).filter(co).map(Ln=>Kt(Ln,xe,!1));vt.unshift(mt);const qt=vt.sort((Ln,bn)=>{if(Ln.relevance!==bn.relevance)return bn.relevance-Ln.relevance;if(Ln.language&&bn.language){if(Gn(Ln.language).supersetOf===bn.language)return 1;if(Gn(bn.language).supersetOf===Ln.language)return-1}return 0}),[Ht,Rr]=qt,Lo=Ht;return Lo.secondBest=Rr,Lo}function Kn(xe,We,mt){const vt=We&&ke[We]||mt;xe.classList.add("hljs"),xe.classList.add(`language-${vt}`)}function yn(xe){let We=null;const mt=Ue(xe);if(Me(mt))return;if(wn("before:highlightElement",{el:xe,language:mt}),xe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",xe);return}if(xe.children.length>0&&(Se.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(xe)),Se.throwUnescapedHTML))throw new pn("One of your code blocks includes unescaped HTML.",xe.innerHTML);We=xe;const vt=We.textContent,qt=mt?Ze(vt,{language:mt,ignoreIllegals:!0}):jt(vt);xe.innerHTML=qt.value,xe.dataset.highlighted="yes",Kn(xe,mt,qt.language),xe.result={language:qt.language,re:qt.relevance,relevance:qt.relevance},qt.secondBest&&(xe.secondBest={language:qt.secondBest.language,relevance:qt.secondBest.relevance}),wn("after:highlightElement",{el:xe,result:qt,text:vt})}function Nn(xe){Se=sn(Se,xe)}const vn=()=>{kr(),ce("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Jn(){kr(),ce("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Mn=!1;function kr(){function xe(){kr()}if(document.readyState==="loading"){Mn||window.addEventListener("DOMContentLoaded",xe,!1),Mn=!0;return}document.querySelectorAll(Se.cssSelector).forEach(yn)}function Fr(xe,We){let mt=null;try{mt=We(z)}catch(vt){if(wt("Language definition for '{}' could not be registered.".replace("{}",xe)),ut)wt(vt);else throw vt;mt=we}mt.name||(mt.name=xe),ue[xe]=mt,mt.rawDefinition=We.bind(null,z),mt.aliases&&uo(mt.aliases,{languageName:xe})}function Sr(xe){delete ue[xe];for(const We of Object.keys(ke))ke[We]===xe&&delete ke[We]}function cr(){return Object.keys(ue)}function Gn(xe){return xe=(xe||"").toLowerCase(),ue[xe]||ue[ke[xe]]}function uo(xe,{languageName:We}){typeof xe=="string"&&(xe=[xe]),xe.forEach(mt=>{ke[mt.toLowerCase()]=We})}function co(xe){const We=Gn(xe);return We&&!We.disableAutodetect}function Lt(xe){xe["before:highlightBlock"]&&!xe["before:highlightElement"]&&(xe["before:highlightElement"]=We=>{xe["before:highlightBlock"](Object.assign({block:We.el},We))}),xe["after:highlightBlock"]&&!xe["after:highlightElement"]&&(xe["after:highlightElement"]=We=>{xe["after:highlightBlock"](Object.assign({block:We.el},We))})}function fr(xe){Lt(xe),Re.push(xe)}function Gr(xe){const We=Re.indexOf(xe);We!==-1&&Re.splice(We,1)}function wn(xe,We){const mt=xe;Re.forEach(function(vt){vt[mt]&&vt[mt](We)})}function Er(xe){return ce("10.7.0","highlightBlock will be removed entirely in v12.0"),ce("10.7.0","Please use highlightElement now."),yn(xe)}Object.assign(z,{highlight:Ze,highlightAuto:jt,highlightAll:kr,highlightElement:yn,highlightBlock:Er,configure:Nn,initHighlighting:vn,initHighlightingOnLoad:Jn,registerLanguage:Fr,unregisterLanguage:Sr,listLanguages:cr,getLanguage:Gn,registerAliases:uo,autoDetection:co,inherit:sn,addPlugin:fr,removePlugin:Gr}),z.debugMode=function(){ut=!1},z.safeMode=function(){ut=!0},z.versionString=dn,z.regex={concat:S,lookahead:x,either:C,optional:w,anyNumberOfTimes:k};for(const xe in ve)typeof ve[xe]=="object"&&e(ve[xe]);return Object.assign(z,ve),z},At=hn({});return At.newInstance=()=>hn({}),wf=At,At.HighlightJS=At,At.default=At,wf}var vb=yb();const Il=B0(vb);function xb(e){const u={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:u,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:u,illegal:/["']/}]}]}}function wb(e){const r=e.regex,o=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],d={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","sentinel","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},m={begin:/\{\{/,relevance:0},y={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p,m,h]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p,m,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,m,h]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,m,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",k=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,w=`\\b|${i.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${k}))[eE][+-]?(${x})[jJ]?(?=${w})`},{begin:`(${k})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${w})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${w})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${w})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${w})`},{begin:`\\b(${x})[jJ](?=${w})`}]},b={className:"comment",begin:r.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",p,S,y,e.HASH_COMMENT_MODE]}]};return h.contains=[y,S,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[p,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,b,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,o],scope:{1:"keyword",3:"title.function"},contains:[C]},{variants:[{match:[/\bclass/,/\s+/,o,/\s*/,/\(\s*/,o,/\s*\)/]},{match:[/\bclass/,/\s+/,o]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,C,y]}]}}function bb(e){const r=e.regex,o=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+i+"|"+r.optional(l)+"[a-zA-Z_]\\w*"+r.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},h,{scope:"string",begin:/<.*?>/},o,e.C_BLOCK_COMMENT_MODE]},x={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),o,e.C_BLOCK_COMMENT_MODE]},k=[y,x],w={className:"title",begin:r.optional(l)+e.IDENT_RE,relevance:0},S=r.optional(l)+e.IDENT_RE+"\\s*\\(",b=12,C=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],E=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],A=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],I=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],N={type:E,keyword:C,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:A},j={className:"function.dispatch",relevance:0,keywords:{_hint:I},begin:r.concat(/\b/,`(?!${C.join("|")})`,e.IDENT_RE,r.lookahead(/(<[^<>]+>|)\s*\(/))},F=[j,...k,d,o,e.C_BLOCK_COMMENT_MODE,m,h],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:F.concat([{begin:/\(/,end:/\)/,keywords:N,contains:F.concat(["self"]),relevance:0}]),relevance:0},G={className:"function",begin:"("+c+"[\\*&\\s]+){1,"+b+"}"+S,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:N,relevance:0},{begin:S,returnBegin:!0,contains:[w],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[o,e.C_BLOCK_COMMENT_MODE,h,m,d,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",o,e.C_BLOCK_COMMENT_MODE,h,m,d]}]},d,o,e.C_BLOCK_COMMENT_MODE,...k]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:N,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,G,j,F,[...k,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:N,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:N},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}var pi="[0-9](_*[0-9])*",Na=`\\.(${pi})`,Ma="[0-9a-fA-F](_*[0-9a-fA-F])*",fm={className:"number",variants:[{begin:`(\\b(${pi})((${Na})|\\.)?|(${Na}))[eE][+-]?(${pi})[fFdD]?\\b`},{begin:`\\b(${pi})((${Na})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Na})[fFdD]?\\b`},{begin:`\\b(${pi})[fFdD]\\b`},{begin:`\\b0[xX]((${Ma})\\.?|(${Ma})?\\.(${Ma}))[pP][+-]?(${pi})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ma})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ny(e,r,o){return o===-1?"":e.replace(r,i=>ny(e,r,o-1))}function kb(e){const r=e.regex,o="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i="(?:(?:\\s*\\[\\s*])+)?",l=o+"<@@@>"+i,c="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+l+")?")+"|"+l+")",d=ny("(?:\\s*<\\s*"+c+"(?:\\s*,\\s*"+c+")*\\s*>)?",/<@@@>/g,2),x={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},k={className:"meta",begin:"@"+o,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},w={className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:x,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,o],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:[o,r.concat(d,i,/\s+/),o,i,/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,o],className:{1:"keyword",3:"title.class"},contains:[w,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:[o,r.concat(d,i,/\s+/),o,/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:x,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[k,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,fm,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},fm,k]}}const ry=48,lo=(e,r=0)=>{const o=new Int32Array(e.length);for(let i=0;i<e.length;i++)o[i]=e.charCodeAt(i)-ry-r;return o},Eu=e=>{const r=new Int32Array(e.length+1);for(let o=0;o<e.length;o++)r[o+1]=r[o]+e[o];return r},ss=e=>{const r=new Int32Array(e.length);let o=0;for(let i=0;i<e.length;i++){const l=e.charCodeAt(i)-ry;o+=l>>>1^-(l&1),r[i]=o}return r},Sb=384,Eb=[],Os=Eu(lo("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),Rb=Eu(lo(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),Cb="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",Tb=(()=>{const e=Os.length-1,r=new Int32Array(e);for(let l=e-1;l>=0;l--){let u=1,c=l+1;for(let d=Os[l];d<Os[l+1];d++)u+=r[c],c+=r[c];r[l]=u}const o=new Int32Array(Os[e]);let i=0;for(let l=0;l<e;l++){let u=l+1;for(let c=Os[l];c<Os[l+1];c++)o[i++]=u,u+=r[u]}return o})(),Ib=lo("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),Ab=Eu(lo("123333359346463635126536711576")),Pb=lo("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),_b=lo("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),Ob=ss("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),Nb=(()=>{const e=new Int32Array(319).fill(-1),r=ss("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),o=ss("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let i=0;i<r.length;i++)e[r[i]]=o[i];return e})(),Mb="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const r=e.split(" "),o=r.shift();for(let i=0;i<r.length;i++)r[i]=o+r[i];return r}),dm=ss("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),Lb=ss("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),Db=ss("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),oy=new Int32Array(995),sy=new Int32Array(995),iy=new Int32Array(995);let Hf="";const Wf=new Int32Array(1038);{const e=new Map;let r=0,o=0;for(let i=0;i<dm.length;i++)for(const l of Mb[Db[i]]){let u=e.get(l);u===void 0&&(u=r++,e.set(l,u),Wf[u*2]=Hf.length,Wf[u*2+1]=l.length,Hf+=l),oy[o]=dm[i],sy[o]=Lb[i],iy[o]=u,o++}}const Fb=ss("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),zb=Eu(lo("1::24444432:442:44:44>222222:44:4421322511111311111114")),jb=ss("24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222"),Bb=lo("ij"),$b=lo(""),Ub=lo("1");var Vb={GROUP_COUNT:Sb,customValidatorNames:Eb,edgeStart:Os,labelStart:Rb,labelText:Cb,edgeTarget:Tb,nodeGroup:Ib,nodeVlist:Nb,vlistPat:Ab,vlistOps:Pb,vlistRef:_b,vlistGroup:Ob,litAnchor:oy,litGroup:sy,litPool:iy,poolOffsets:Wf,poolText:Hf,adjGid:Fb,adjStart:zb,adjTgt:jb,patGid:Bb,patTgt:$b,postfixLookupGroups:Ub,orderSensitiveModifiers:"* ** after backdrop before details-content file first-letter first-line marker placeholder selection"};const Hb="line"in new Error,Jr=-1,As=-1,bf=(e,r,o)=>{let i=2166136261;for(let l=r;l<o;l++)i=Math.imul(i^e.charCodeAt(l),16777619);return i},tu=(e,r,o)=>{const i=o-r;let l=Math.imul(i,2654435761)^e.charCodeAt(r);if(i>3){const u=i>>2,c=i>>1;l=Math.imul(l^e.charCodeAt(r+1)<<8^e.charCodeAt(r+2)<<16^e.charCodeAt(r+u),2246822507),l=Math.imul(l^e.charCodeAt(r+c)<<8^e.charCodeAt(r+c+u)<<16^e.charCodeAt(o-3),3266489909),l^=e.charCodeAt(o-2)<<8^e.charCodeAt(o-1)<<16;for(let d=r+3,p=o-4;d<r+8&&d<p;d++,p--)l=Math.imul(l^e.charCodeAt(d)^e.charCodeAt(p)<<8,16777619)}return l^l>>>15|0},Wb=(e,r,o={})=>{const{GROUP_COUNT:i,edgeStart:l,labelStart:u,labelText:c,edgeTarget:d,nodeGroup:p,nodeVlist:h,vlistPat:m,vlistOps:y,vlistRef:x,vlistGroup:k,litAnchor:w,litGroup:S,litPool:b,poolOffsets:C,poolText:E,adjGid:A,adjStart:I,adjTgt:P,patGid:_,patTgt:N,postfixLookupGroups:j,customValidatorNames:F,orderSensitiveModifiers:M}=e,G=new Int32Array(i).fill(-1);for(let ee=0;ee<A.length;ee++)G[A[ee]]=ee;let q=0;for(let ee=0;ee+1<I.length;ee++){const fe=I[ee+1]-I[ee];fe>q&&(q=fe)}let W=32;for(;W<2*(1+q+_.length);)W<<=1;const K=new Int32Array(x.length+1);for(let ee=0;ee<x.length;ee++)K[ee+1]=K[ee]+m[x[ee]+1]-m[x[ee]];const H=new Uint8Array(i);for(let ee=0;ee<j.length;ee++)H[j[ee]]=1;const ne=l.length-1,le=new Uint8Array(ne);let B=0,V=!0;for(let ee=0;ee<w.length;ee++){le[w[ee]]=1;const fe=C[b[ee]*2+1];fe>B&&(B=fe);const be=E.charCodeAt(C[b[ee]*2]);(be===91||be===40)&&(V=!1)}let U=1;for(;U<w.length*2;)U<<=1;const T=new Int32Array(U).fill(-1);for(let ee=0;ee<w.length;ee++){const fe=C[b[ee]*2];let be=(bf(E,fe,fe+C[b[ee]*2+1])^Math.imul(w[ee],2654435761)|0)&U-1;for(;T[be]!==-1;)be=be+1&U-1;T[be]=ee}const D=(ee,fe,be,Je)=>{let dt=(bf(fe,be,Je)^Math.imul(ee,2654435761)|0)&U-1;const at=Je-be;for(;;){const kt=T[dt];if(kt===-1)return-1;if(w[kt]===ee&&C[b[kt]*2+1]===at){const Bt=C[b[kt]*2];let St=!0;for(let nt=0;nt<at;nt++)if(E.charCodeAt(Bt+nt)!==fe.charCodeAt(be+nt)){St=!1;break}if(St)return S[kt]}dt=dt+1&U-1}},Z=o.cacheSize??8192,X=o.prefix??e.prefix??"",oe=X===""?"":X+":",J=oe.length,re=(F??[]).map(ee=>{throw new Error("cn: missing validator "+ee)}),de=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,De=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let _e=0,$e=-1,Te=-1,Ne=-1,Qe=-1;const tt=ee=>ee>=97&&ee<=122||ee>=65&&ee<=90||ee>=48&&ee<=57||ee===95,ft=ee=>/\s/.test(String.fromCharCode(ee)),Fe=(ee,fe,be)=>{if(_e=0,$e=-1,be-fe<3)return;const Je=ee.charCodeAt(fe),dt=ee.charCodeAt(be-1);if(Je===91&&dt===93)_e=1;else if(Je===40&&dt===41)_e=2;else return;Ne=fe+1,Qe=be-1;let at=fe+1;if(tt(ee.charCodeAt(at))){for(at++;at<be-1;){const kt=ee.charCodeAt(at);if(!tt(kt)&&kt!==45)break;at++}at<be-2&&ee.charCodeAt(at)===58&&($e=fe+1,Te=at,Ne=at+1)}},Ye=(ee,fe,be,Je)=>{if(be-fe!==Je.length)return!1;for(let dt=0;dt<Je.length;dt++)if(ee.charCodeAt(fe+dt)!==Je.charCodeAt(dt))return!1;return!0},me=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,it=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rt=ee=>!!ee&&!Number.isNaN(Number(ee)),wt=(ee,fe,be)=>{if(be-fe<11||!Ye(ee,fe,fe+10,"@container"))return!1;if(ee.charCodeAt(fe+10)===47)return be-fe>=12;const Je=ee.charCodeAt(fe+11);return Je===115&&be-fe>=17&&Ye(ee,fe+10,fe+16,"-size/")||Je===110&&be-fe>=19&&Ye(ee,fe+10,fe+18,"-normal/")},se=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],ce="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(ee=>ee.split(" ")),Be=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ge=(ee,fe,be,Je)=>{if(ee>=10){if(ee>=25)return re[ee-25](fe.slice(be,Je));const dt=ee-10;if(_e!==se[dt])return!1;if($e>=0){for(const at of ce[dt])if(Ye(fe,$e,Te,at))return!0;return!1}switch(Be[dt]){case 0:return!1;case 1:return!0;case 2:{const at=fe.slice(Ne,Qe);return de.test(at)&&!ae.test(at)}case 3:return Rt(fe.slice(Ne,Qe));case 4:return De.test(fe.slice(Ne,Qe));default:return ve.test(fe.slice(Ne,Qe))}}switch(ee){case 0:return!0;case 1:return _e===0;case 2:return _e===1;case 3:return _e===2;case 4:return me.test(fe.slice(be,Je));case 5:return Rt(fe.slice(be,Je));case 6:{const dt=fe.slice(be,Je);return!!dt&&Number.isInteger(Number(dt))}case 7:return Je>be&&fe.charCodeAt(Je-1)===37&&Rt(fe.slice(be,Je-1));case 8:return it.test(fe.slice(be,Je));default:return wt(fe,be,Je)}},He=new Set(typeof M=="string"?M.split(" "):M),lt=(ee,fe,be,Je,dt,at)=>{const kt=bf(fe,be,Je)^(dt?2654435769:0)|0;let Bt=ee.get(kt);if(Bt!==void 0)e:for(let Oe=0;Oe<Bt.length;Oe++){const Pe=Bt[Oe];if(!(Pe.imp!==dt||Pe.k.length!==Je-be)){for(let Jt=0;Jt<Pe.k.length;Jt++)if(Pe.k.charCodeAt(Jt)!==fe.charCodeAt(be+Jt))continue e;return Pe.id}}else ee.set(kt,Bt=[]);const St=fe.slice(be,Je),nt=at(St);return Bt.push({k:St,imp:dt,id:nt}),nt};let gt=new Map,bt=new Map,Qt=2;const Xt=4096,jn=(ee,fe)=>{const be=[];let Je=0,dt=0,at=0;for(let nt=0;nt<ee.length;nt++){const Oe=ee.charCodeAt(nt);Je===0&&dt===0&&Oe===58?(be.push(ee.slice(at,nt)),at=nt+1):Oe===91?Je++:Oe===93?Je--:Oe===40?dt++:Oe===41&&dt--}be.push(ee.slice(at));let kt=be[0];if(be.length>1){const nt=[];let Oe=[];for(const Pe of be)Pe.charCodeAt(0)===91||He.has(Pe)?(Oe.length&&(nt.push(...Oe.sort()),Oe=[]),nt.push(Pe)):Oe.push(Pe);Oe.length&&nt.push(...Oe.sort()),kt=nt.join(":")}const Bt=fe?kt+" !":kt;let St=bt.get(Bt);return St===void 0&&bt.set(Bt,St=Qt++),St};let dn=new Map,pn=i;const nn=i+4096,sn=()=>pn++,Cn=2097152,Ut=8192,hn=new Int32Array(Ut),At=new Array(Ut).fill(null),z=new Int32Array(Ut),ue=new Int32Array(Ut),ke=new Uint8Array(Ut);let Re=0;const ut=(ee,fe,be,Je,dt,at,kt,Bt)=>{let St=ee;if(At[ee]!==null)if(At[ee|1]===null)St=ee|1;else if((Re++&3)===0)St=ee|Re>>2&1;else return;At[St]=fe.slice(be,Je),hn[St]=dt,z[St]=at,ue[St]=kt,ke[St]=Bt},ht=()=>At.fill(null);let we=256,Se=[new Int32Array(we),new Int32Array(we),new Int32Array(we),new Int32Array(we)],[Me,Ue,Ze,Kt]=Se,Vt=new Uint8Array(we),jt=new Uint8Array(we);const Kn=()=>{we*=2,Se=Se.map(fe=>{const be=new Int32Array(we);return be.set(fe),be}),[Me,Ue,Ze,Kt]=Se;const ee=new Uint8Array(we);ee.set(Vt),Vt=ee,jt=new Uint8Array(we)};let yn=64,Nn=new Int32Array(yn),vn=new Int32Array(yn);const Jn=new Int32Array(i);let Mn=2048,kr=21,Fr=new Float64Array(Mn),Sr=new Int32Array(Mn),cr=0;const Gn=(ee,fe)=>{if(ee===0&&fe<i)return Jn[fe]===cr?1:(Jn[fe]=cr,0);const be=ee*2097152+fe+1;let Je=Math.imul(be,2654435761)>>>kr;for(;Sr[Je]===cr;){if(Fr[Je]===be)return 1;Je=Je+1&Mn-1}return Fr[Je]=be,Sr[Je]=cr,0},uo=(ee,fe,be,Je,dt)=>{if(be-fe>=2&&ee.charCodeAt(fe)===91&&ee.charCodeAt(be-1)===93){let at=-1;for(let kt=fe+1;kt<be-1;kt++)if(ee.charCodeAt(kt)===58){at=kt;break}return at===-1||at===fe+1?Jr:lt(dn,ee,fe+1,at,0,sn)}if(Je>=0&&p[Je]>=0)return p[Je];for(let at=dt-1;at>=0;at--){const kt=vn[at];if(kt>be)continue;const Bt=Nn[at],St=be-kt;if(le[Bt]===1&&St>0&&St<=B){const ct=ee.charCodeAt(kt);if(V===!1||ct!==91&&ct!==40){const Bn=D(Bt,ee,kt,be);if(Bn>=0)return Bn}}const nt=h[Bt];if(nt<0)continue;const Oe=x[nt],Pe=m[Oe],Jt=m[Oe+1];if(Pe===Jt)continue;Fe(ee,kt,be);const Ct=K[nt]-Pe;for(let ct=Pe;ct<Jt;ct++)if(ge(y[ct],ee,kt,be))return k[Ct+ct]}return Jr},co=ee=>{const fe=ee.length;let be=0,Je=0,dt=!1;(Qt>Xt||gt.size>Xt)&&(gt=new Map,bt=new Map,Qt=2,ht()),pn>nn&&(dn=new Map,pn=i,ht());let at=0;for(;at<fe;){let nt=ee.charCodeAt(at);if(nt===32||nt>=9&&nt<=13||nt>=160&&ft(nt)){nt!==32&&(dt=!0),at++;continue}const Oe=at;let Pe=0;for(;at<fe;){if(nt=ee.charCodeAt(at),nt<=32){if(nt===32)break;if(nt>=9&&nt<=13){dt=!0;break}}else if(nt>=160&&ft(nt)){dt=!0;break}Pe=Math.imul(Pe^nt,16777619),at++}const Jt=at,Ct=Jt-Oe;be===we&&Kn();const ct=be++;Me[ct]=Oe,Ue[ct]=Jt,Je+=Ct,Pe^=Math.imul(Ct,2654435761);const Bn=Pe^Pe>>>15|0,gn=Bn&8190;{let zt=-1;if(hn[gn]===Bn&&At[gn]!==null&&At[gn].length===Ct?zt=gn:hn[gn|1]===Bn&&At[gn|1]!==null&&At[gn|1].length===Ct&&(zt=gn|1),zt>=0){const nr=At[zt];let Tn=!0;for(let gr=0;gr<Ct;gr++)if(nr.charCodeAt(gr)!==ee.charCodeAt(Oe+gr)){Tn=!1;break}if(Tn){Ze[ct]=z[zt],Kt[ct]=ue[zt],Vt[ct]=ke[zt];continue}}}let er=Oe;if(J!==0){if(Jt-Oe<=J||!ee.startsWith(oe,Oe)){Ze[ct]=Jr,ut(gn,ee,Oe,Jt,Bn,Jr,0,0);continue}er=Oe+J}let Cr=0,Ce=0,Le=-1,rt=-1;for(let zt=er;zt<Jt;zt++){const nr=ee.charCodeAt(zt);if(Cr===0&&Ce===0){if(nr===58){Le=zt;continue}if(nr===47){rt=zt;continue}}nr===91?Cr++:nr===93?Cr--:nr===40?Ce++:nr===41&&Ce--}const Tt=Le>=er?Le+1:er;let Pt=Tt,Ft=Jt,fo=!1,hs=0;Ft>Pt&&ee.charCodeAt(Ft-1)===33?(fo=!0,Ft--):Ft>Pt&&ee.charCodeAt(Pt)===33&&(fo=!0,Pt++,hs=1);let dr=-1;rt>Tt&&(dr=rt+hs,dr>=Ft&&(dr=-1));let Ni=Pt;Ft-Pt>1&&ee.charCodeAt(Pt)===45&&(Ni=Pt+1);let pr=0,hr=0,po=0,Dl=-1,$n=0;(h[0]>=0||le[0]===1)&&(Nn[0]=0,vn[0]=Ni,$n=1);let ho=As,Yr=0;for(let zt=Ni;zt<Ft;zt++)if(zt===dr&&(ho=hr<po?As:pr,Yr=$n),pr!==As){const nr=ee.charCodeAt(zt);let Tn=-1;if(hr<po)c.charCodeAt(hr)===nr?(hr++,hr===po&&(Tn=pr=Dl)):pr=As;else{const gr=l[pr],go=l[pr+1];let Hs=As;for(let Tr=gr;Tr<go;Tr++){const jo=u[Tr];if(c.charCodeAt(jo)===nr){u[Tr+1]-jo===1?Tn=Hs=d[Tr]:(hr=jo+1,po=u[Tr+1],Dl=d[Tr],Hs=pr);break}}pr=Hs}if(Tn>=0&&(h[Tn]>=0||le[Tn]===1)&&zt+1<Ft&&ee.charCodeAt(zt+1)===45){if($n===yn){yn*=2;const gr=new Int32Array(yn);gr.set(Nn),Nn=gr;const go=new Int32Array(yn);go.set(vn),vn=go}Nn[$n]=Tn,vn[$n]=zt+2,$n++}}dr===Ft&&(ho=hr<po?As:pr,Yr=$n);const Fo=hr<po?As:pr;let tr,Vs=!1;if(dr>=0)if(Vs=!0,tr=uo(ee,Pt,dr,ho,Yr),tr!==Jr&&tr<i&&H[tr]){const zt=uo(ee,Pt,Ft,Fo,$n);zt!==Jr&&zt!==tr&&(tr=zt,Vs=!1)}else tr===Jr&&(tr=uo(ee,Pt,Ft,Fo,$n),Vs=!1);else tr=uo(ee,Pt,Ft,Fo,$n);let gs=0,zo=0;tr===Jr?Ze[ct]=Jr:(zo=Vs?1:0,gs=er>=Le?fo?1:0:lt(gt,ee,er,Le,fo?1:0,zt=>jn(zt,fo)),Ze[ct]=tr,Vt[ct]=zo,Kt[ct]=gs),ut(gn,ee,Oe,Jt,Bn,tr,gs,zo)}if(be===0)return"";if(be===1)return Me[0]===0&&Ue[0]===fe?ee:ee.slice(Me[0],Ue[0]);if(be*W>Mn){for(;be*W>Mn;)Mn<<=1,kr--;Fr=new Float64Array(Mn),Sr=new Int32Array(Mn)}if(Qt>=Cn||pn>=Cn)throw new Error("cn: too many distinct classes in one merge");cr=cr+1|0,cr===0&&(Jn.fill(0),Sr.fill(0),cr=1);let kt=!1;for(let nt=be-1;nt>=0;nt--){const Oe=Ze[nt];if(Oe===Jr){jt[nt]=1;continue}const Pe=Kt[nt];if(Gn(Pe,Oe)===1){jt[nt]=0,kt=!0;continue}if(jt[nt]=1,Oe<i){const Jt=G[Oe];if(Jt>=0)for(let Ct=I[Jt];Ct<I[Jt+1];Ct++)Gn(Pe,P[Ct]);if(Vt[nt]&1)for(let Ct=0;Ct<_.length;Ct++)_[Ct]===Oe&&Gn(Pe,N[Ct])}}if(!kt&&!dt&&fe===Je+be-1)return ee;let Bt="",St=0;for(;St<be;){if(!jt[St]){St++;continue}const nt=Me[St];let Oe=Ue[St],Pe=St+1;for(;Pe<be&&jt[Pe]&&Me[Pe]===Oe+1&&ee.charCodeAt(Oe)===32;)Oe=Ue[Pe],Pe++;Bt.length>0&&(Bt+=" "),Bt+=ee.slice(nt,Oe),St=Pe}return Bt},Lt=16384,fr=new Int32Array(Lt*2);let Gr=0,wn=1,Er=Object.create(null),xe=Object.create(null),We=new Map,mt=new Map,vt=0,qt=0;const Ht=()=>{Gr^=Lt,wn=wn+1|0,qt=0},Rr=ee=>{let fe=Er[ee];if(fe!==void 0)return fe;const be=tu(ee,0,ee.length),Je=(be&16383)+Gr,dt=fr[Je]===(be^wn)||fr[Je^Lt]===(be^wn-1);return dt&&(fe=xe[ee],fe!==void 0)?(Er[ee]=fe,fe):(fe=co(ee),dt?(Er[ee]=fe,++vt>Z&&(vt=0,xe=Er,Er=Object.create(null),Ht())):(fr[Je]=be^wn,++qt>Lt&&Ht()),fe)},Lo=ee=>{let fe=We.get(ee);if(fe!==void 0)return fe;const be=tu(ee,0,ee.length),Je=(be&16383)+Gr,dt=fr[Je]===(be^wn)||fr[Je^Lt]===(be^wn-1);return dt&&(fe=mt.get(ee),fe!==void 0)?(We.set(ee,fe),fe):(fe=co(ee),dt?(We.set(ee,fe),++vt>Z&&(vt=0,mt=We,We=new Map,Ht())):(fr[Je]=be^wn,++qt>Lt&&Ht()),fe)},Ln=ee=>{const fe=tu(ee,0,ee.length),be=(fe&16383)+Gr;return fr[be]===(fe^wn)||fr[be^Lt]===(fe^wn-1)?!0:(fr[be]=fe^wn,++qt>Lt&&Ht(),!1)},bn=Z===0?co:Hb?ee=>{const fe=We.get(ee);return fe!==void 0?fe:Lo(ee)}:Rr;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?bn(arguments[0]):bn(Gb.apply(null,arguments))},mergeString:bn,seenBefore:Z===0?()=>!1:Ln,mergeUncached:co}},cu=(e,r)=>{if(!e)return"";if(typeof e=="string")return e;let o="";if(typeof e.length=="number"&&(!r||Array.isArray(e))){const i=e;for(let l=0;l<i.length;l++){const u=i[l];if(!u)continue;const c=typeof u=="string"?u:cu(u,r);c&&(o&&(o+=" "),o+=c)}return o}if(r){if(typeof e=="number")return""+e;if(typeof e=="object")for(const i in e)e[i]&&(o&&(o+=" "),o+=i)}return o},Kb=(e,r)=>{let o="";for(let i=0;i<e.length;i++){const l=e[i];if(!l)continue;const u=typeof l=="string"?l:cu(l,r);u&&(o&&(o+=" "),o+=u)}return o},Gb=function(){return Kb(arguments,!1)},Yb=256,pm=16,Xb=1024,kf=4096,qb=(e,r)=>{const o=r===void 0?()=>!0:r.seenBefore,i=r===void 0?e:r.mergeUncached;let l=new Map,u=new Map,c=0,d=null,p=null,h=[],m=[],y=0;const x=(C,E,A)=>{p===null&&(p=new Array(kf).fill(""),h=new Array(kf).fill(""),m=new Array(kf).fill(""));const I=tu(C,0,C.length)&4094;if(p[I]===C&&h[I]===E)return m[I];if(p[I|1]===C&&h[I|1]===E)return m[I|1];const P=e(A?E+" "+C:C),_=p[I]===""?I:I|(p[I|1]===""?1:y++&1);return p[_]=C,h[_]=E,m[_]=P,P},k=(C,E,A,I)=>{let P=0;if(E){if(E!==C.a0)return!1;P=1}if(A){if(A!==(P===0?C.a0:C.a1))return!1;P++}if(I){if(I!==(P===0?C.a0:P===1?C.a1:C.a2))return!1;P++}return P===C.t},w=(C,E)=>{const A=C.a;let I=0;for(let P=0;P<E.length;P++){const _=E[P];if(_){if(_!==A[I])return!1;I++}}return I===C.t},S=(C,E)=>{const A=C.length,I=d===null?null:d.n;if(!E){if(I!==null&&w(I,C))return d=I,I.r;if(d!==null&&d!==I&&w(d,C))return d.r}let P="",_=-1,N=0,j=!1;for(let G=0;G<A;G++){let q=C[G];if(q){if(typeof q!="string"){if(q=C[G]=cu(q,!0),!q)continue;j=!0}_<0&&(P=q,_=G),N++}}if(N===0)return"";if(N===1)return e(P);if(j){if(I!==null&&w(I,C))return d=I,I.r;if(d!==null&&d!==I&&w(d,C))return d.r}let F=l.get(P);F===void 0&&(F=u.get(P),F!==void 0&&l.set(P,F));let M=null;if(F!==void 0){if(F.skip>0){F.skip--,d=null;let q=P;for(let W=_+1;W<A;W++){const K=C[W];K&&(q+=" "+K)}return x(q,"",!1)}const G=F.e;e:for(let q=0;q<G.length;q++){const W=G[q];if(W.t!==N)continue;const K=W.a;let H=1;for(let ne=_+1;ne<A;ne++){const le=C[ne];if(le&&le!==K[H++])continue e}M=W;break}M!==null&&(F.miss=0)}if(M===null){let G=P;const q=[P];for(let K=_+1;K<A;K++){const H=C[K];H&&(G+=" "+H,q.push(H))}if(!o(G))return i(G);M={r:e(G),t:q.length,a0:q[0],a1:q[1],a2:q[2]??"",a:q,n:null},F===void 0?l.set(P,F={e:[],miss:0,skip:0,at:0}):++F.miss>pm&&(F.miss=pm,F.skip=Xb,F.e.length=0,F.at=0);const W=F.e;W.length<Yb?W.push(M):(W[F.at]=M,F.at=F.at+1&255),++c>1e3&&(c=0,u=l,l=new Map)}return d!==null&&d!==M&&(d.n=M),d=M,M.r},b=C=>Array.isArray(C)?S(C.slice(),!1):e(cu(C,!0));return function(C,E,A){const I=arguments.length;if((I|1)===3){const N=d;if(N!==null){const j=N.n;if(j!==null&&k(j,C,E,A))return d=j,j.r;if(N!==j&&k(N,C,E,A))return N.r}if(I===2&&typeof E=="string"&&E!==""){const j=l.get(C);if(j!==void 0&&j.skip>0)return j.skip--,d=null,x(E,C,!0)}return S([C,E,A],!0)}if(I===1)return typeof C=="string"?e(C):b(C);const P=d;if(P!==null){const N=P.n;if(N!==null){const j=N.a;let F=0,M=!0;for(let G=0;G<I;G++){const q=arguments[G];if(q){if(q!==j[F]){M=!1;break}F++}}if(M&&F===N.t)return d=N,N.r}if(P!==N){const j=P.a;let F=0,M=!0;for(let G=0;G<I;G++){const q=arguments[G];if(q){if(q!==j[F]){M=!1;break}F++}}if(M&&F===P.t)return P.r}}const _=[];for(let N=0;N<I;N++)_.push(arguments[N]);return S(_,!0)}},hm=Wb(Vb),Xe=qb(hm.mergeString,hm);function _n(e,r,o){const i=e[r];return i!==void 0?i:(console.warn(`[kumo] Unknown variant "${r}". Expected one of: ${Object.keys(e).join(", ")}. Falling back to "${o}".`),e[o])}const Zb=Symbol.for("react.lazy");function Qb(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zb}function Jb(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function ly(e){if(!Qb(e))return e;let r;try{r=Po.Children.toArray(e)[0]}catch(o){if(Jb(o))throw o;return e}return Po.isValidElement(r)?r:e}const ek="inline-flex w-fit flex-none shrink-0 items-center justify-self-start gap-1 rounded-full px-2 py-0.5 text-xs/4 font-medium whitespace-nowrap [a:hover_&]:ring [a:hover_&]:ring-current",Kf={variant:{primary:{classes:"bg-kumo-badge-inverted text-kumo-badge-inverted",description:"Primary badge"},secondary:{classes:"bg-kumo-fill text-kumo-badge-neutral-subtle",description:"Secondary badge"},error:{classes:"bg-kumo-danger-tint text-kumo-danger",description:"Error badge"},warning:{classes:"bg-kumo-warning-tint text-kumo-warning",description:"Warning badge"},success:{classes:"bg-kumo-success-tint text-kumo-success",description:"Success badge"},destructive:{classes:"bg-kumo-badge-red text-white",description:"Deprecated. Use red instead."},info:{classes:"bg-kumo-info-tint text-kumo-info",description:"Info badge"},beta:{classes:"border border-dashed border-kumo-brand bg-transparent text-kumo-link",description:"Indicates beta or experimental features"},outline:{classes:"border border-kumo-fill bg-kumo-base text-kumo-default",description:"Bordered badge with base background"},red:{classes:"bg-kumo-badge-red text-white",description:"Red badge"},green:{classes:"bg-kumo-badge-green text-white",description:"Green badge"},neutral:{classes:"bg-kumo-badge-neutral text-white",description:"Neutral badge"},orange:{classes:"bg-kumo-badge-orange text-black",description:"Orange badge"},purple:{classes:"bg-kumo-badge-purple text-white",description:"Purple badge"},teal:{classes:"bg-kumo-badge-teal text-white",description:"Teal badge"},"teal-subtle":{classes:"bg-kumo-badge-teal-subtle text-kumo-badge-teal-subtle",description:"Subtle teal badge"},blue:{classes:"bg-kumo-badge-blue text-white",description:"Blue badge"}},appearance:{filled:{classes:"",description:"Filled badge with background color (default)"},dot:{classes:"gap-1.5 bg-transparent text-kumo-default ring ring-kumo-hairline",description:"Outlined badge with a colored circle dot indicating status"}},dotColor:{none:{classes:"",description:"No dot indicator (used when appearance is not dot, or variant has no dot color)"},success:{classes:"bg-kumo-success",description:"Green dot for success status"},warning:{classes:"bg-kumo-badge-orange",description:"Orange dot for warning status"},error:{classes:"bg-kumo-badge-red",description:"Red dot for error status"},neutral:{classes:"bg-kumo-badge-neutral",description:"Neutral dot for informational status"}}},Ms={variant:"primary",appearance:"filled",dotColor:"none"};function tk({variant:e=Ms.variant,appearance:r=Ms.appearance}={}){const o=_n(Kf.variant,e,Ms.variant).classes,i=_n(Kf.appearance,r,Ms.appearance).classes;return Xe(ek,r==="dot"?"":o,i)}const nk=e=>{const r=ly(e);if(!r)return null;const o=r,i=Po.isValidElement(r)?r:O.jsx(o,{});return O.jsx("span",{className:"flex h-lh w-3 shrink-0 items-center justify-center [&>svg]:size-3",children:i})};function Sf({variant:e=Ms.variant,appearance:r=Ms.appearance,className:o,icon:i,children:l}){const u=r==="dot"?_n(Kf.dotColor,e,Ms.dotColor).classes:"";return O.jsxs("span",{"data-kumo-component":"Badge",className:Xe(tk({variant:e,appearance:r}),i&&"pl-1.5",o),children:[u?O.jsx("span",{"aria-hidden":"true",className:Xe("size-1.75 shrink-0 rounded-full",u)}):null,nk(i),l]})}const rk=v.forwardRef(function({to:r,href:o,...i},l){return O.jsx("a",{ref:l,href:o??r??void 0,...i})}),ok=v.createContext(rk);function ay(){return v.useContext(ok)}const gm={};function On(e,r){const o=v.useRef(gm);return o.current===gm&&(o.current=e(r)),o}function zs(e,r,o,i){const l=On(uy).current;return ik(l,e,r,o,i)&&cy(l,[e,r,o,i]),l.callback}function sk(e){const r=On(uy).current;return lk(r,e)&&cy(r,e),r.callback}function uy(){return{callback:null,cleanup:null,refs:[]}}function ik(e,r,o,i,l){return e.refs[0]!==r||e.refs[1]!==o||e.refs[2]!==i||e.refs[3]!==l}function lk(e,r){return e.refs.length!==r.length||e.refs.some((o,i)=>o!==r[i])}function cy(e,r){if(e.refs=r,r.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){const i=Array(r.length).fill(null);for(let l=0;l<r.length;l+=1){const u=r[l];if(u!=null)switch(typeof u){case"function":{const c=u(o);typeof c=="function"&&(i[l]=c);break}case"object":u.current=o}}e.cleanup=()=>{for(let l=0;l<r.length;l+=1){const u=r[l];if(u!=null)switch(typeof u){case"function":{const c=i[l];typeof c=="function"?c():u(null);break}case"object":u.current=null}}}}}}const ak=parseInt(v.version,10);function Ru(e){return ak>=e}function mm(e){if(!v.isValidElement(e))return null;const r=e,o=r.props;return(Ru(19)?o==null?void 0:o.ref:r.ref)??null}function Gf(e,r){if(e&&!r)return e;if(!e&&r)return r;if(e||r)return{...e,...r}}let Yf;Yf=new Set;function fy(e,r){return function(...i){{const l=i.join(" "),u=`${r}: ${l}`,c=`${e}:${u}`;Yf.has(c)||(Yf.add(c),e==="warn"?console.warn(u):console.error(u))}}}const uk=fy("warn","Base UI");function on(){}const is=Object.freeze([]),cn=Object.freeze({});function ck(e,r){const o={};for(const i in e){const l=e[i];if(r!=null&&r.hasOwnProperty(i)){const u=r[i](l);u!=null&&Object.assign(o,u);continue}l===!0?o[`data-${i.toLowerCase()}`]="":l&&(o[`data-${i.toLowerCase()}`]=l.toString())}return o}function fk(e,r){return typeof e=="function"?e(r):e}function dk(e,r){return typeof e=="function"?e(r):e}const dy={};function ro(e,r,o,i,l){if(!o&&!i&&!l&&!e)return fu(r);let u=fu(e);return r&&(u=hl(u,r)),o&&(u=hl(u,o)),i&&(u=hl(u,i)),l&&(u=hl(u,l)),u}function pk(e){if(e.length===0)return dy;if(e.length===1)return fu(e[0]);let r=fu(e[0]);for(let o=1;o<e.length;o+=1)r=hl(r,e[o]);return r}function fu(e){return hy(e)?{...e(dy)}:hk(e)}function hl(e,r){return hy(r)?r(e):gk(e,r)}function hk(e){const r={...e};for(const o in r){const i=r[o];py(o,i)&&(r[o]=gy(i))}return r}function gk(e,r){if(!r)return e;for(const o in r){const i=r[o];switch(o){case"style":e[o]=Gf(e.style,i);break;case"className":e[o]=my(e.className,i);break;default:py(o,i)?e[o]=mk(e[o],i):e[o]=i}}return e}function py(e,r){const o=e.charCodeAt(0),i=e.charCodeAt(1),l=e.charCodeAt(2);return o===111&&i===110&&l>=65&&l<=90&&(typeof r=="function"||typeof r>"u")}function hy(e){return typeof e=="function"}function mk(e,r){return r?e?(...o)=>{const i=o[0];if(yy(i)){const u=i;du(u);const c=r(...o);return u.baseUIHandlerPrevented||e==null||e(...o),c}const l=r(...o);return e==null||e(...o),l}:gy(r):e}function gy(e){return e&&((...r)=>{const o=r[0];return yy(o)&&du(o),e(...r)})}function du(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function my(e,r){return r?e?r+" "+e:r:e}function yy(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Mt(e,r,o={}){let i=r.render;o.enabled!==!1&&(i=kk(i));const l=yk(r,o,i);if(o.enabled===!1)return null;const u=o.state??cn;return Sk(e,i,l,u)}function yk(e,r,o){const{className:i,style:l}=e,{state:u=cn,ref:c,props:d,stateAttributesMapping:p,enabled:h=!0}=r,m=h?fk(i,u):void 0,y=h?dk(l,u):void 0,x=h?ck(u,p):cn,k=h&&d?vk(d):void 0,w=h?Gf(x,k)??{}:cn;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=sk([w.ref,mm(o),...c]):w.ref=zs(w.ref,mm(o),c):zs(null,null)),h?(m!==void 0&&(w.className=my(w.className,m)),y!==void 0&&(w.style=Gf(w.style,y)),w):cn}function vk(e){return Array.isArray(e)?pk(e):ro(void 0,e)}const xk=Symbol.for("react.lazy"),wk=/^[A-Z][A-Za-z0-9$]*$/,bk=/[a-z]/;function kk(e){if((e==null?void 0:e.$$typeof)!==xk)return e;const r=v.Children.toArray(e)[0];return v.isValidElement(r)?r:e}function Sk(e,r,o,i){if(r){if(typeof r=="function")return Ek(r),r(o,i);const l=ro(o,r.props);if(l.ref=o.ref,!v.isValidElement(r))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
114
|
+
`));return v.cloneElement(r,l)}return Rk(e,o)}function Ek(e){const r=e.name;r.length!==0&&wk.test(r)&&bk.test(r)&&uk(`The \`render\` prop received a function named \`${r}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function Rk(e,r){return e==="button"?v.createElement("button",{type:"button",...r,key:r.key}):e==="img"?v.createElement("img",{alt:"",...r,key:r.key}):v.createElement(e,r)}function vy(e){return Mt(e.defaultTagName??"div",e,e)}const xy=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"link-external-icon",...e,children:[O.jsx("path",{d:"M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15"}),O.jsx("path",{d:"M14 4H20M20 4V10M20 4L11 13"})]});xy.displayName="Link.ExternalIcon";const Ck={variant:{inline:{classes:"text-kumo-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",description:"Inline text link that flows with content"},current:{classes:"text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors",description:"Link that inherits color from parent text"},plain:{classes:"text-kumo-link hover:text-kumo-link/70 transition-colors",description:"Link without underline decoration"}}},ym={variant:"inline"};function Tk({variant:e=ym.variant}={}){return Xe(_n(Ck.variant,e,ym.variant).classes)}const wy=v.forwardRef(function({className:r,variant:o="inline",render:i,...l},u){const c=ay();v.useEffect(()=>{"to"in l&&l.to!==void 0&&console.warn(`[kumo] Link: The \`to\` prop is deprecated. Use \`href\` instead.
|
|
115
|
+
|
|
116
|
+
If your app uses a client-side router, configure a LinkProvider that
|
|
117
|
+
maps \`href\` to your router's navigation prop. See:
|
|
118
|
+
https://kumo.cfops.it/utilities/link-provider
|
|
119
|
+
|
|
120
|
+
Migration example:
|
|
121
|
+
Before: <Link to="/page">…</Link>
|
|
122
|
+
After: <Link href="/page">…</Link>`)},[]);const d={"data-kumo-component":"Link",className:Xe(Tk({variant:o}),"group/link inline-flex items-center gap-[0.1875em] has-[>[data-kumo-component=Badge]]:rounded-full")};return vy({render:i??O.jsx(c,{}),ref:u,props:ro(d,l,{className:r})})});wy.displayName="Link";const Ik=Object.assign(wy,{ExternalIcon:xy}),Ak={size:{sm:{value:16,description:"Small loader for inline use"},base:{value:24,description:"Default loader size"},lg:{value:32,description:"Large loader for prominent loading states"}}},Xf={size:"base"};function Pk({size:e=Xf.size}={}){return typeof e=="number"?e:_n(Ak.size,e,Xf.size).value}const by=({className:e,size:r=Xf.size,"aria-label":o="Loading"})=>{const i=Pk({size:r});return O.jsxs("svg",{width:i,height:i,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",className:e,role:"status","aria-label":o,children:[O.jsxs("circle",{cx:"12",cy:"12",r:"9.5",fill:"none",strokeWidth:"2",strokeLinecap:"round",children:[O.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 12 12",to:"360 12 12",dur:"2s",repeatCount:"indefinite"}),O.jsx("animate",{attributeName:"stroke-dasharray",values:"0 150;42 150;42 150",keyTimes:"0;0.5;1",dur:"1.5s",repeatCount:"indefinite"}),O.jsx("animate",{attributeName:"stroke-dashoffset",values:"0;-16;-59",keyTimes:"0;0.5;1",dur:"1.5s",repeatCount:"indefinite"})]}),O.jsx("circle",{cx:"12",cy:"12",r:"9.5",fill:"none",opacity:.1,strokeWidth:"2",strokeLinecap:"round"})]})},_k=v.createContext(null);function Pd(){return v.useContext(_k)}const Ok=()=>{},Ae=typeof document<"u"?v.useLayoutEffect:Ok,Zn={...iw};var ds=$0();function Cu(){return typeof window<"u"}function zn(e){return _d(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function _o(e){var r;return(r=(_d(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function _d(e){return Cu()?e instanceof Node||e instanceof Yt(e).Node:!1}function Ot(e){return Cu()?e instanceof Element||e instanceof Yt(e).Element:!1}function $t(e){return Cu()?e instanceof HTMLElement||e instanceof Yt(e).HTMLElement:!1}function ls(e){return!Cu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}function Al(e){const{overflow:r,overflowX:o,overflowY:i,display:l}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&l!=="inline"&&l!=="contents"}function Nk(e){return/^(table|td|th)$/.test(zn(e))}function Tu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Mk=/transform|translate|scale|rotate|perspective|filter/,Lk=/paint|layout|strict|content/,Ps=e=>!!e&&e!=="none";let Ef;function Od(e){const r=Ot(e)?ur(e):e;return Ps(r.transform)||Ps(r.translate)||Ps(r.scale)||Ps(r.rotate)||Ps(r.perspective)||!Nd()&&(Ps(r.backdropFilter)||Ps(r.filter))||Mk.test(r.willChange||"")||Lk.test(r.contain||"")}function Dk(e){let r=oo(e);for(;$t(r)&&!To(r);){if(Od(r))return r;if(Tu(r))return null;r=oo(r)}return null}function Nd(){return Ef==null&&(Ef=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ef}function To(e){return/^(html|body|#document)$/.test(zn(e))}function ur(e){return Yt(e).getComputedStyle(e)}function Iu(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oo(e){if(zn(e)==="html")return e;const r=e.assignedSlot||e.parentNode||ls(e)&&e.host||_o(e);return ls(r)?r.host:r}function ky(e){const r=oo(e);return To(r)?(e.ownerDocument||e).body:$t(r)&&Al(r)?r:ky(r)}function xl(e,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const l=ky(e),u=l===((i=e.ownerDocument)==null?void 0:i.body),c=Yt(l);if(u){const d=qf(c);return r.concat(c,c.visualViewport||[],Al(l)?l:[],d&&o?xl(d):[])}else return r.concat(l,xl(l,[],o))}function qf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Si=Math.min,Io=Math.max,Ei=Math.round,La=Math.floor,Ao=e=>({x:e,y:e}),Fk={left:"right",right:"left",bottom:"top",top:"bottom"};function Sy(e,r,o){return Io(e,Si(r,o))}function as(e,r){return typeof e=="function"?e(r):e}function br(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function Md(e){return e==="x"?"y":"x"}function Ld(e){return e==="y"?"height":"width"}function Dr(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function Dd(e){return Md(Dr(e))}function zk(e,r,o){o===void 0&&(o=!1);const i=to(e),l=Dd(e),u=Ld(l);let c=l==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=pu(c)),[c,pu(c)]}function jk(e){const r=pu(e);return[Zf(e),r,Zf(r)]}function Zf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vm=["left","right"],xm=["right","left"],Bk=["top","bottom"],$k=["bottom","top"];function Uk(e,r,o){switch(e){case"top":case"bottom":return o?r?xm:vm:r?vm:xm;case"left":case"right":return r?Bk:$k;default:return[]}}function Vk(e,r,o,i){const l=to(e);let u=Uk(br(e),o==="start",i);return l&&(u=u.map(c=>c+"-"+l),r&&(u=u.concat(u.map(Zf)))),u}function pu(e){const r=br(e);return Fk[r]+e.slice(r.length)}function Hk(e){var r,o,i,l;return{top:(r=e.top)!=null?r:0,right:(o=e.right)!=null?o:0,bottom:(i=e.bottom)!=null?i:0,left:(l=e.left)!=null?l:0}}function Ey(e){return typeof e!="number"?Hk(e):{top:e,right:e,bottom:e,left:e}}function wl(e){const{x:r,y:o,width:i,height:l}=e;return{width:i,height:l,top:o,left:r,right:r+i,bottom:o+l,x:r,y:o}}function wm(e,r,o){let{reference:i,floating:l}=e;const u=Dr(r),c=Dd(r),d=Ld(c),p=br(r),h=u==="y",m=i.x+i.width/2-l.width/2,y=i.y+i.height/2-l.height/2,x=i[d]/2-l[d]/2;let k;switch(p){case"top":k={x:m,y:i.y-l.height};break;case"bottom":k={x:m,y:i.y+i.height};break;case"right":k={x:i.x+i.width,y};break;case"left":k={x:i.x-l.width,y};break;default:k={x:i.x,y:i.y}}const w=to(r);return w&&(k[c]+=x*(w==="end"?1:-1)*(o&&h?-1:1)),k}async function Wk(e,r){var o;r===void 0&&(r={});const{x:i,y:l,platform:u,rects:c,elements:d,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:x=!1,padding:k=0}=as(r,e),w=Ey(k),S=d[x?y==="floating"?"reference":"floating":y],b=wl(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(S)))==null||o?S:S.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(d.floating)),boundary:h,rootBoundary:m,strategy:p})),C=y==="floating"?{x:i,y:l,width:c.floating.width,height:c.floating.height}:c.reference,E=await(u.getOffsetParent==null?void 0:u.getOffsetParent(d.floating)),A=await(u.isElement==null?void 0:u.isElement(E))&&await(u.getScale==null?void 0:u.getScale(E))||{x:1,y:1},I=wl(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:C,offsetParent:E,strategy:p}):C);return{top:(b.top-I.top+w.top)/A.y,bottom:(I.bottom-b.bottom+w.bottom)/A.y,left:(b.left-I.left+w.left)/A.x,right:(I.right-b.right+w.right)/A.x}}const Kk=50,Gk=async(e,r,o)=>{const{placement:i="bottom",strategy:l="absolute",middleware:u=[],platform:c}=o,d=c.detectOverflow?c:{...c,detectOverflow:Wk},p=await(c.isRTL==null?void 0:c.isRTL(r));let h=await c.getElementRects({reference:e,floating:r,strategy:l}),{x:m,y}=wm(h,i,p),x=i,k=0;const w={};for(let S=0;S<u.length;S++){const b=u[S];if(!b)continue;const{name:C,fn:E}=b,{x:A,y:I,data:P,reset:_}=await E({x:m,y,initialPlacement:i,placement:x,strategy:l,middlewareData:w,rects:h,platform:d,elements:{reference:e,floating:r}});m=A??m,y=I??y,w[C]={...w[C],...P},_&&k<Kk&&(k++,typeof _=="object"&&(_.placement&&(x=_.placement),_.rects&&(h=_.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:l}):_.rects),{x:m,y}=wm(h,x,p)),S=-1)}return{x:m,y,placement:x,strategy:l,middlewareData:w}},Yk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var o,i;const{placement:l,middlewareData:u,rects:c,initialPlacement:d,platform:p,elements:h}=r,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:x,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=as(e,r);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const C=br(l),E=Dr(d),A=br(d)===d,I=await(p.isRTL==null?void 0:p.isRTL(h.floating)),P=x||(A||!S?[pu(d)]:jk(d)),_=w!=="none";!x&&_&&P.push(...Vk(d,S,w,I));const N=[d,...P],j=await p.detectOverflow(r,b),F=[];let M=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&F.push(j[C]),y){const K=zk(l,c,I);F.push(j[K[0]],j[K[1]])}if(M=[...M,{placement:l,overflows:F}],!F.every(K=>K<=0)){var G,q;const K=(((G=u.flip)==null?void 0:G.index)||0)+1,H=N[K];if(H&&(!(y==="alignment"&&E!==Dr(H))||M.every(le=>Dr(le.placement)===E?le.overflows[0]>0:!0)))return{data:{index:K,overflows:M},reset:{placement:H}};let ne=(q=M.filter(le=>le.overflows[0]<=0).sort((le,B)=>le.overflows[1]-B.overflows[1])[0])==null?void 0:q.placement;if(!ne)switch(k){case"bestFit":{var W;const le=(W=M.filter(B=>{if(_){const V=Dr(B.placement);return V===E||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,U)=>V+U,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:W[0];le&&(ne=le);break}case"initialPlacement":ne=d}if(l!==ne)return{reset:{placement:ne}}}return{}}}},Ry=new Set(["left","top"]);async function Xk(e,r){const{placement:o,platform:i,elements:l}=e,u=await(i.isRTL==null?void 0:i.isRTL(l.floating)),c=br(o),d=to(o),p=Dr(o)==="y",h=Ry.has(c)?-1:1,m=u&&p?-1:1,y=as(r,e);let{mainAxis:x,crossAxis:k,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return d&&typeof w=="number"&&(k=d==="end"?w*-1:w),p?{x:k*m,y:x*h}:{x:x*h,y:k*m}}const qk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var o,i;const{x:l,y:u,placement:c,middlewareData:d}=r,p=await Xk(r,e);return c===((o=d.offset)==null?void 0:o.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:l+p.x,y:u+p.y,data:{...p,placement:c}}}}},Zk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:o,y:i,placement:l,platform:u}=r,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:E=>{let{x:A,y:I}=E;return{x:A,y:I}}},...h}=as(e,r),m={x:o,y:i},y=await u.detectOverflow(r,h),x=Dr(l),k=Md(x);let w=m[k],S=m[x];const b=(E,A)=>Sy(A+y[E==="y"?"top":"left"],A,A-y[E==="y"?"bottom":"right"]);c&&(w=b(k,w)),d&&(S=b(x,S));const C=p.fn({...r,[k]:w,[x]:S});return{...C,data:{x:C.x-o,y:C.y-i,enabled:{[k]:c,[x]:d}}}}}},Qk=function(e){return e===void 0&&(e={}),{options:e,fn(r){var o,i;const{x:l,y:u,placement:c,rects:d,middlewareData:p}=r,{offset:h=0,mainAxis:m=!0,crossAxis:y=!0}=as(e,r),x={x:l,y:u},k=Dr(c),w=Md(k);let S=x[w],b=x[k];const C=as(h,r),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(o=C.mainAxis)!=null?o:0,crossAxis:(i=C.crossAxis)!=null?i:0};if(m){const P=w==="y"?"height":"width",_=d.reference[w]-d.floating[P]+E.mainAxis,N=d.reference[w]+d.reference[P]-E.mainAxis;S<_?S=_:S>N&&(S=N)}if(y){var A,I;const P=w==="y"?"width":"height",_=Ry.has(br(c)),N=d.reference[k]-d.floating[P]+(_&&((A=p.offset)==null?void 0:A[k])||0)+(_?0:E.crossAxis),j=d.reference[k]+d.reference[P]+(_?0:((I=p.offset)==null?void 0:I[k])||0)-(_?E.crossAxis:0);b<N?b=N:b>j&&(b=j)}return{[w]:S,[k]:b}}}},Jk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){const{placement:o,rects:i,platform:l,elements:u}=r,{apply:c=()=>{},...d}=as(e,r),p=await l.detectOverflow(r,d),h=br(o),m=to(o),y=Dr(o)==="y",{width:x,height:k}=i.floating;let w,S;h==="top"||h==="bottom"?(w=h,S=m===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,w=m==="end"?"top":"bottom");const b=k-p.top-p.bottom,C=x-p.left-p.right,E=Si(k-p[w],b),A=Si(x-p[S],C),I=r.middlewareData.shift,P=!I;let _=E,N=A;I!=null&&I.enabled.x&&(N=C),I!=null&&I.enabled.y&&(_=b),P&&!m&&(y?N=x-2*Io(p.left,p.right):_=k-2*Io(p.top,p.bottom)),await c({...r,availableWidth:N,availableHeight:_});const j=await l.getDimensions(u.floating);return x!==j.width||k!==j.height?{reset:{rects:!0}}:{}}}};function Cy(e){const r=ur(e);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const l=$t(e),u=l?e.offsetWidth:o,c=l?e.offsetHeight:i,d=Ei(o)!==u||Ei(i)!==c;return d&&(o=u,i=c),{width:o,height:i,$:d}}function Fd(e){return Ot(e)?e:e.contextElement}function mi(e){const r=Fd(e);if(!$t(r))return Ao(1);const o=r.getBoundingClientRect(),{width:i,height:l,$:u}=Cy(r);let c=(u?Ei(o.width):o.width)/i,d=(u?Ei(o.height):o.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const eS=Ao(0);function Ty(e){const r=Yt(e);return!Nd()||!r.visualViewport?eS:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function tS(e,r,o){return r===void 0&&(r=!1),!!o&&r&&o===Yt(e)}function js(e,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const l=e.getBoundingClientRect(),u=Fd(e);let c=Ao(1);r&&(i?Ot(i)&&(c=mi(i)):c=mi(e));const d=tS(u,o,i)?Ty(u):Ao(0);let p=(l.left+d.x)/c.x,h=(l.top+d.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(u&&i){const x=Yt(u),k=Ot(i)?Yt(i):i;let w=x,S=qf(w);for(;S&&k!==w;){const b=mi(S),C=S.getBoundingClientRect(),E=ur(S),A=C.left+(S.clientLeft+parseFloat(E.paddingLeft))*b.x,I=C.top+(S.clientTop+parseFloat(E.paddingTop))*b.y;p*=b.x,h*=b.y,m*=b.x,y*=b.y,p+=A,h+=I,w=Yt(S),S=qf(w)}}return wl({width:m,height:y,x:p,y:h})}function Au(e,r){const o=Iu(e).scrollLeft;return r?r.left+o:js(_o(e)).left+o}function Iy(e,r){const o=e.getBoundingClientRect();return{x:o.left+r.scrollLeft-Au(e,o),y:o.top+r.scrollTop}}function nS(e){let{elements:r,rect:o,offsetParent:i,strategy:l}=e;const u=l==="fixed",c=_o(i),d=r?Tu(r.floating):!1;if(i===c||d&&u)return o;let p={scrollLeft:0,scrollTop:0},h=Ao(1);const m=Ao(0),y=$t(i);if((y||!u)&&((zn(i)!=="body"||Al(c))&&(p=Iu(i)),y)){const k=js(i);h=mi(i),m.x=k.x+i.clientLeft,m.y=k.y+i.clientTop}const x=c&&!y&&!u?Iy(c,p):Ao(0);return{width:o.width*h.x,height:o.height*h.y,x:o.x*h.x-p.scrollLeft*h.x+m.x+x.x,y:o.y*h.y-p.scrollTop*h.y+m.y+x.y}}function rS(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function oS(e){const r=Iu(e),o=e.ownerDocument.body,i=Io(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),l=Io(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let u=-r.scrollLeft+Au(e);const c=-r.scrollTop;return ur(o).direction==="rtl"&&(u+=Io(e.clientWidth,o.clientWidth)-i),{width:i,height:l,x:u,y:c}}const sS=25;function iS(e,r,o){o===void 0&&(o="viewport");const i=o==="layoutViewport",l=Yt(e),u=_o(e),c=l.visualViewport;let d=u.clientWidth,p=u.clientHeight,h=0,m=0;if(c){const y=!Nd()||r==="fixed";i?y||(h=-c.offsetLeft,m=-c.offsetTop):(d=c.width,p=c.height,y&&(h=c.offsetLeft,m=c.offsetTop))}if(Au(u)<=0){const y=u.ownerDocument,x=y.body,k=getComputedStyle(x),w=y.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,S=Math.abs(u.clientWidth-x.clientWidth-w),b=getComputedStyle(u).scrollbarGutter==="stable both-edges"?S/2:S;b<=sS&&(d-=b)}return{width:d,height:p,x:h,y:m}}function lS(e,r){const o=js(e,!0,r==="fixed"),i=o.top+e.clientTop,l=o.left+e.clientLeft,u=mi(e);return{width:e.clientWidth*u.x,height:e.clientHeight*u.y,x:l*u.x,y:i*u.y}}function bm(e,r,o){let i;if(r==="viewport"||r==="layoutViewport")i=iS(e,o,r);else if(r==="document")i=oS(_o(e));else if(Ot(r))i=lS(r,o);else{const l=Ty(e);i={x:r.x-l.x,y:r.y-l.y,width:r.width,height:r.height}}return wl(i)}function aS(e,r){const o=r.get(e);if(o)return o;let i=xl(e,[],!1).filter(d=>Ot(d)&&zn(d)!=="body"),l=null;const u=ur(e).position==="fixed";let c=u?oo(e):e;for(;Ot(c)&&!To(c);){const d=ur(c),p=Od(c),h=l?l.position:u?"fixed":"";!p&&(h==="fixed"||h==="absolute"&&d.position==="static")?i=i.filter(m=>m!==c):l=d,c=oo(c)}return r.set(e,i),i}function uS(e){let{element:r,boundary:o,rootBoundary:i,strategy:l}=e;const u=[...o==="clippingAncestors"?Tu(r)?[]:aS(r,this._c):[].concat(o),i],c=bm(r,u[0],l);let d=c.top,p=c.right,h=c.bottom,m=c.left;for(let y=1;y<u.length;y++){const x=bm(r,u[y],l);d=Io(x.top,d),p=Si(x.right,p),h=Si(x.bottom,h),m=Io(x.left,m)}return{width:p-m,height:h-d,x:m,y:d}}function cS(e){const{width:r,height:o}=Cy(e);return{width:r,height:o}}function fS(e,r,o){const i=$t(r),l=_o(r),u=o==="fixed",c=js(e,!0,u,r);let d={scrollLeft:0,scrollTop:0};const p=Ao(0);if((i||!u)&&((zn(r)!=="body"||Al(l))&&(d=Iu(r)),i)){const m=js(r,!0,u,r);p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}!i&&l&&(p.x=Au(l));const h=l&&!i&&!u?Iy(l,d):Ao(0);return{x:c.left+d.scrollLeft-p.x-h.x,y:c.top+d.scrollTop-p.y-h.y,width:c.width,height:c.height}}function Rf(e){return ur(e).position==="static"}function km(e,r){if(!$t(e)||ur(e).position==="fixed")return null;if(r)return r(e);let o=e.offsetParent;return _o(e)===o&&(o=o.ownerDocument.body),o}function Ay(e,r){const o=Yt(e);if(Tu(e))return o;if(!$t(e)){let l=oo(e);for(;l&&!To(l);){if(Ot(l)&&!Rf(l))return l;l=oo(l)}return o}let i=km(e,r);for(;i&&Nk(i)&&Rf(i);)i=km(i,r);return i&&To(i)&&Rf(i)&&!Od(i)?o:i||Dk(e)||o}const dS=async function(e){const r=this.getOffsetParent||Ay,o=this.getDimensions,i=await o(e.floating);return{reference:fS(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function pS(e){return ur(e).direction==="rtl"}const Py={convertOffsetParentRelativeRectToViewportRelativeRect:nS,getDocumentElement:_o,getClippingRect:uS,getOffsetParent:Ay,getElementRects:dS,getClientRects:rS,getDimensions:cS,getScale:mi,isElement:Ot,isRTL:pS};function _y(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function hS(e,r,o){let i=null,l;const u=_o(e);function c(){var m;clearTimeout(l),(m=i)==null||m.disconnect(),i=null}function d(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),c();const x=e.getBoundingClientRect(),{left:k,top:w,width:S,height:b}=x;if(m||r(),!S||!b)return;const C=La(w),E=La(u.clientWidth-(k+S)),A=La(u.clientHeight-(w+b)),I=La(k),P={rootMargin:-C+"px "+-E+"px "+-A+"px "+-I+"px",threshold:Io(0,Si(1,y))||1};let _=!0;function N(j){const F=j[0].intersectionRatio;if(!_y(x,e.getBoundingClientRect()))return d();if(F!==y){if(!_)return d();F?d(!1,F):l=setTimeout(()=>{d(!1,1e-7)},1e3)}_=!1}try{i=new IntersectionObserver(N,{...P,root:u.ownerDocument})}catch{i=new IntersectionObserver(N,P)}i.observe(e)}const p=Yt(e),h=()=>d(o);return p.addEventListener("resize",h),d(!0),()=>{p.removeEventListener("resize",h),c()}}function Sm(e,r,o,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,h=Fd(e),m=l||u?[...h?xl(h):[],...r?xl(r):[]]:[];m.forEach(C=>{l&&C.addEventListener("scroll",o),u&&C.addEventListener("resize",o)});const y=h&&d?hS(h,o,u):null;let x=-1,k=null;c&&(k=new ResizeObserver(C=>{let[E]=C;E&&E.target===h&&k&&r&&(k.unobserve(r),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var A;(A=k)==null||A.observe(r)})),o()}),h&&!p&&k.observe(h),r&&k.observe(r));let w,S=p?js(e):null;p&&b();function b(){const C=js(e);S&&!_y(S,C)&&o(),S=C,w=requestAnimationFrame(b)}return o(),()=>{var C;m.forEach(E=>{l&&E.removeEventListener("scroll",o),u&&E.removeEventListener("resize",o)}),y==null||y(),(C=k)==null||C.disconnect(),k=null,p&&cancelAnimationFrame(w)}}const gS=qk,mS=Zk,yS=Yk,vS=Jk,xS=Qk,wS=(e,r,o)=>{const i=new Map,l=o??{},u={...Py,...l.platform,_c:i};return Gk(e,r,{...l,platform:u})};var nu=typeof document<"u"?v.useLayoutEffect:function(){};function hu(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let o,i,l;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!hu(e[i],r[i]))return!1;return!0}if(l=Object.keys(e),o=l.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,l[i]))return!1;for(i=o;i--!==0;){const u=l[i];if(!(u==="_owner"&&e.$$typeof)&&!hu(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function Oy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Em(e,r){const o=Oy(e);return Math.round(r*o)/o}function Cf(e){const r=v.useRef(e);return nu(()=>{r.current=e}),r}function bS(e){e===void 0&&(e={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l,elements:{reference:u,floating:c}={},transform:d=!0,whileElementsMounted:p,open:h}=e,[m,y]=v.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[x,k]=v.useState(i);hu(x,i)||k(i);const[w,S]=v.useState(null),[b,C]=v.useState(null),E=v.useCallback(B=>{B!==_.current&&(_.current=B,S(B))},[]),A=v.useCallback(B=>{B!==N.current&&(N.current=B,C(B))},[]),I=u||w,P=c||b,_=v.useRef(null),N=v.useRef(null),j=v.useRef(m),F=p!=null,M=Cf(p),G=Cf(l),q=Cf(h),W=v.useCallback(()=>{if(!_.current||!N.current)return;const B={placement:r,strategy:o,middleware:x};G.current&&(B.platform=G.current),wS(_.current,N.current,B).then(V=>{const U={...V,isPositioned:q.current!==!1};K.current&&!hu(j.current,U)&&(j.current=U,ds.flushSync(()=>{y(U)}))})},[x,r,o,G,q]);nu(()=>{h===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,y(B=>({...B,isPositioned:!1})))},[h]);const K=v.useRef(!1);nu(()=>(K.current=!0,()=>{K.current=!1}),[]),nu(()=>{if(I&&(_.current=I),P&&(N.current=P),I&&P){if(M.current)return M.current(I,P,W);W()}},[I,P,W,M,F]);const H=v.useMemo(()=>({reference:_,floating:N,setReference:E,setFloating:A}),[E,A]),ne=v.useMemo(()=>({reference:I,floating:P}),[I,P]),le=v.useMemo(()=>{const B={position:o,left:0,top:0};if(!ne.floating)return B;const V=Em(ne.floating,m.x),U=Em(ne.floating,m.y);return d?{...B,transform:"translate("+V+"px, "+U+"px)",...Oy(ne.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:V,top:U}},[o,d,ne.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:W,refs:H,elements:ne,floatingStyles:le}),[m,W,H,ne,le])}const kS=(e,r)=>{const o=gS(e);return{name:o.name,fn:o.fn,options:[e,r]}},SS=(e,r)=>{const o=mS(e);return{name:o.name,fn:o.fn,options:[e,r]}},ES=(e,r)=>({fn:xS(e).fn,options:[e,r]}),RS=(e,r)=>{const o=yS(e);return{name:o.name,fn:o.fn,options:[e,r]}},CS=(e,r)=>{const o=vS(e);return{name:o.name,fn:o.fn,options:[e,r]}};function TS(){if(typeof navigator>"u")return{userAgent:"",platform:"",maxTouchPoints:0};{const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:r,version:o})=>`${r}/${o}`).join(" "),platform:e.platform??navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:IS,platform:AS,maxTouchPoints:PS}=TS(),Pu=IS.toLowerCase(),bl=AS.toLowerCase(),_u=/^i(os$|p)/.test(bl)||bl==="macintel"&&PS>1,Rm="android",Qf=bl===Rm||Pu.includes(Rm),Ny=!_u&&bl.startsWith("mac");bl.startsWith("win");const _S=Ny||_u,zd=/jsdom|happydom/.test(Pu);function eo(e){e.preventDefault(),e.stopPropagation()}function OS(e){return"nativeEvent"in e}function Ri(e){return e.pointerType===""&&e.isTrusted?!0:Qf&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function jd(e){return zd?!1:!Qf&&e.width===0&&e.height===0||e.type==="pointerdown"&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"&&(Qf||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function os(e,r){const o=["mouse","pen"];return r||o.push("",void 0),o.includes(e)}function NS(e){const r=e.type;return r==="click"||r==="mousedown"||r==="keydown"||r==="keyup"}function qn(e){var o;let r=e.activeElement;for(;((o=r==null?void 0:r.shadowRoot)==null?void 0:o.activeElement)!=null;)r=r.shadowRoot.activeElement;return r}function et(e,r){var i;if(!e||!r)return!1;const o=(i=r.getRootNode)==null?void 0:i.call(r);if(e.contains(r))return!0;if(o&&ls(o)){let l=r;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function Ci(e,r){let o=e;for(;o;){if(Ot(o)&&o.matches(r))return o;o=o.assignedSlot??o.parentNode??(ls(o)?o.host:null)}return null}function Rn(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const MS="data-base-ui-focusable",LS="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",My="ArrowLeft",Ly="ArrowRight",DS="ArrowUp",FS="ArrowDown",Dy="data-starting-style",zS="data-ending-style",jS={[Dy]:""},BS={[zS]:""},Pl={transitionStatus(e){return e==="starting"?jS:e==="ending"?BS:null}},$S="data-open",US="data-closed",VS="data-anchor-hidden",Fy="data-popup-open",HS="data-pressed",WS={[Fy]:""},KS={[Fy]:"",[HS]:""},GS={[$S]:""},YS={[US]:""},XS={[VS]:""},Bd={open(e){return e?WS:null}},qS={open(e){return e?KS:null}},_l={open(e){return e?GS:YS},anchorHidden(e){return e?XS:null}},zy={..._l,...Pl},Jf="data-trigger-disabled";function gu(e,r){if(!Ot(e))return!1;const o=e;if(r.hasElement(o))return!o.hasAttribute(Jf);for(const[,i]of r.entries())if(et(i,o))return!i.hasAttribute(Jf);return!1}function Tf(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const o=e;return o.target!=null&&r.contains(o.target)}function ZS(e){return e.matches("html,body")}function Ol(e){return $t(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function QS(e){return Ci(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${LS}`)!=null}function ed(e){return e?e.getAttribute("role")==="combobox"&&Ol(e):!1}function JS(e){if(!e||zd)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function mu(e){return e?e.hasAttribute("data-base-ui-focusable")?e:e.querySelector("[data-base-ui-focusable]")||e:null}function _t(e){return(e==null?void 0:e.ownerDocument)||document}function yi(e,r){return r<0||r>=e.length}function ru(e,r){return vi(e.current,{disabledIndices:r})}function td(e,r){return vi(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:r})}function eE(e,r,o){const{decrement:i,loopFocus:l,allowEscape:u,disabledIndices:c,minIndex:d,maxIndex:p}=o,h=()=>vi(e,{startingIndex:r,decrement:i,disabledIndices:c});let m,y=!1;if(!l)m=i?Math.max(d,h()):Math.min(p,h());else if(i?r<=d:r>=p){const x=i?-1:e.length;u&&r!==x?m=-1:(m=i?p:d,y=!0)}else m=h();return{index:yi(e,m)?-1:m,wrapped:y}}function vi(e,{startingIndex:r=-1,decrement:o=!1,disabledIndices:i,amount:l=1}={}){let u=r;do u+=o?-l:l;while(u>=0&&u<=e.length-1&&xi(e,u,i));return u}function xi(e,r,o){if(typeof o=="function"?o(r):(o==null?void 0:o.includes(r))??!1)return!0;const i=e[r];return i?!Ou(i)||i.matches(":disabled")?!0:!o&&(i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"):!1}function tE(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Ou(e,r=e?ur(e):null){return!e||!e.isConnected||!r||tE(r)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():r.display!=="none"&&r.display!=="contents"}const nE='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function rE(e){const r=e.assignedSlot;if(r)return r;if(e.parentElement)return e.parentElement;const o=e.getRootNode();return ls(o)?o.host:null}function nd(e){for(const r of Array.from(e.children))if(zn(r)==="summary")return r;return null}function oE(e,r){const o=nd(r);return!!o&&(e===o||et(o,e))}function jy(e){const r=e?zn(e):"";return e!=null&&e.matches(nE)&&(r!=="summary"||e.parentElement!=null&&zn(e.parentElement)==="details"&&nd(e.parentElement)===e)&&(r!=="details"||nd(e)==null)&&(r!=="input"||e.type!=="hidden")}function By(e){if(!jy(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let r=e;r;r=rE(r)){const o=r!==e,i=zn(r)==="slot";if(r.hasAttribute("inert")||o&&zn(r)==="details"&&!r.open&&!oE(e,r)||r.hasAttribute("hidden")||!i&&!sE(r,o))return!1}return!0}function sE(e,r){const o=ur(e);return r?o.display!=="none":Ou(e,o)}function $y(e){const r=e.tabIndex;if(r<0){const o=zn(e);if(o==="details"||o==="audio"||o==="video"||$t(e)&&e.isContentEditable)return 0}return r}function If(e){if(zn(e)!=="input")return null;const r=e;return r.type==="radio"&&r.name!==""?r:null}function iE(e,r){const o=If(e);if(!o)return!0;const i=r.find(l=>{const u=If(l);return(u==null?void 0:u.name)===o.name&&u.form===o.form&&u.checked});return i?i===o:r.find(l=>{const u=If(l);return(u==null?void 0:u.name)===o.name&&u.form===o.form})===o}function Uy(e){if($t(e)&&zn(e)==="slot"){const r=e.assignedElements({flatten:!0});if(r.length>0)return r}return $t(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Vy(e,r){Uy(e).forEach(o=>{jy(o)&&r.push(o),Vy(o,r)})}function Hy(e,r,o){Uy(e).forEach(i=>{$t(i)&&i.matches(r)&&o.push(i),Hy(i,r,o)})}function $d(e){return By(e)&&$y(e)>=0}function Wy(e){const r=[];return Vy(e,r),r.filter(By)}function Nu(e){const r=Wy(e);return r.filter(o=>$y(o)>=0&&iE(o,r))}function Ky(e,r){const o=Nu(e),i=o.length;if(i===0)return;const l=qn(_t(e)),u=o.indexOf(l);return o[u===-1?r===1?0:i-1:u+r]}function Gy(e){return Ky(_t(e).body,1)||e}function Yy(e){return Ky(_t(e).body,-1)||e}function yl(e,r){const o=r||e.currentTarget,i=e.relatedTarget;return!i||!et(o,i)}function lE(e){Nu(e).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function Cm(e){const r=[];Hy(e,"[data-tabindex]",r),r.forEach(o=>{const i=o.dataset.tabindex;delete o.dataset.tabindex,i?o.setAttribute("tabindex",i):o.removeAttribute("tabindex")})}var j0;const Oo=typeof CSS<"u"&&!!((j0=CSS.supports)!=null&&j0.call(CSS,"-webkit-backdrop-filter:none"));!Oo&&Pu.includes("firefox");!Oo&&Pu.includes("chrom");function xt(e,r,o,i){let l=!1,u=!1;const c=i??cn;return{reason:e,event:r??new Event("base-ui"),cancel(){l=!0},allowPropagation(){u=!0},get isCanceled(){return l},get isPropagationAllowed(){return u},trigger:o,...c}}const us="none",Ud="trigger-press",Mr="trigger-hover",Af="trigger-focus",aE="outside-press",Pf="item-press",uE="close-press",Xy="focus-out",cE="escape-key",Tm="list-navigation",fE="cancel-open",qy="disabled",Im="missing",Am="initial",Vd="imperative-action",dE="window-resize";function Et(e,r,o,i){return e.addEventListener(r,o,i),()=>{e.removeEventListener(r,o,i)}}function no(...e){return()=>{for(let r=0;r<e.length;r+=1){const o=e[r];o&&o()}}}const _f=Zn.useInsertionEffect,pE=_f&&_f!==Zn.useLayoutEffect?_f:e=>e();function Ie(e){const r=On(hE).current;return r.next=e,pE(r.effect),r.trampoline}function hE(){const e={next:void 0,callback:gE,trampoline:(...r)=>{var o;return(o=e.callback)==null?void 0:o.call(e,...r)},effect:()=>{e.callback=e.next}};return e}function gE(){throw new Error("Base UI: Cannot call an event handler while rendering.")}const Zy={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Qy={...Zy,position:"fixed",margin:0,top:0,left:0},mE={...Zy,position:"absolute"};function Hd(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}let Pm=0;function yE(e,r="mui"){const o=v.useRef(void 0),i=Hd(),l=e??o.current;return v.useEffect(()=>{o.current==null&&(Pm+=1,o.current=`${r}-${Pm}`,e==null&&i())},[e,r,i]),l}const _m=Zn.useId;function Mu(e,r){if(_m!==void 0){const o=_m();return e??(r?`${r}-${o}`:o)}return yE(e,r)}function vE(){const e=new Map;return{emit(r,o){var i;(i=e.get(r))==null||i.forEach(l=>l(o))},on(r,o){e.has(r)||e.set(r,new Set),e.get(r).add(o)},off(r,o){var i;(i=e.get(r))==null||i.delete(o)}}}const Jy=v.createContext(null);Jy.displayName="FloatingNodeContext";const ev=v.createContext(null);ev.displayName="FloatingTreeContext";const Lu=()=>{var e;return((e=v.useContext(Jy))==null?void 0:e.id)||null},Pi=e=>{const r=v.useContext(ev);return e??r};var Of={exports:{}},Nf={};/**
|
|
123
|
+
* @license React
|
|
124
|
+
* use-sync-external-store-shim.production.js
|
|
125
|
+
*
|
|
126
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the MIT license found in the
|
|
129
|
+
* LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/var Om;function xE(){if(Om)return Nf;Om=1;var e=El();function r(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var o=typeof Object.is=="function"?Object.is:r,i=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function d(y,x){var k=x(),w=i({inst:{value:k,getSnapshot:x}}),S=w[0].inst,b=w[1];return u(function(){S.value=k,S.getSnapshot=x,p(S)&&b({inst:S})},[y,k,x]),l(function(){return p(S)&&b({inst:S}),y(function(){p(S)&&b({inst:S})})},[y]),c(k),k}function p(y){var x=y.getSnapshot;y=y.value;try{var k=x();return!o(y,k)}catch{return!0}}function h(y,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return Nf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Nf}var Nm;function tv(){return Nm||(Nm=1,Of.exports=xE()),Of.exports}var Du=tv(),Mf={exports:{}},Lf={};/**
|
|
131
|
+
* @license React
|
|
132
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
133
|
+
*
|
|
134
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the MIT license found in the
|
|
137
|
+
* LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/var Mm;function wE(){if(Mm)return Lf;Mm=1;var e=El(),r=tv();function o(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var i=typeof Object.is=="function"?Object.is:o,l=r.useSyncExternalStore,u=e.useRef,c=e.useEffect,d=e.useMemo,p=e.useDebugValue;return Lf.useSyncExternalStoreWithSelector=function(h,m,y,x,k){var w=u(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=d(function(){function C(_){if(!E){if(E=!0,A=_,_=x(_),k!==void 0&&S.hasValue){var N=S.value;if(k(N,_))return I=N}return I=_}if(N=I,i(A,_))return N;var j=x(_);return k!==void 0&&k(N,j)?(A=_,N):(A=_,I=j)}var E=!1,A,I,P=y===void 0?null:y;return[function(){return C(m())},P===null?void 0:function(){return C(P())}]},[m,y,x,k]);var b=l(h,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=b},[b]),p(b),b},Lf}var Lm;function bE(){return Lm||(Lm=1,Mf.exports=wE()),Mf.exports}var kE=bE();const rd=[];let od;function SE(){return od}function EE(e){rd.push(e)}function Wd(e){const r=(o,i)=>{const l=On(RE).current;let u;try{od=l;for(const c of rd)c.before(l);u=e(o,i);for(const c of rd)c.after(l);l.didInitialize=!0}finally{od=void 0}return u};return r.displayName=e.displayName||e.name,r}function nv(e){return v.forwardRef(Wd(e))}function RE(){return{didInitialize:!1}}const CE=_S,kl=v.forwardRef(function(r,o){const[i,l]=v.useState();Ae(()=>{CE&&Oo&&l("button")},[]);const u={tabIndex:0,role:i};return O.jsx("span",{...r,ref:o,style:Qy,"aria-hidden":i?void 0:!0,...u,"data-base-ui-focus-guard":""})});kl.displayName="FocusGuard";function wi(e){return`data-base-ui-${e}`}const TE={style:{transition:"none"}},IE="data-base-ui-click-trigger",AE={fallbackAxisSide:"none"},PE={fallbackAxisSide:"end"},_E={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Kd=v.createContext(null);Kd.displayName="PortalContext";const rv=()=>v.useContext(Kd),OE=wi("portal");function ov(e={}){var S;const{ref:r,container:o,componentProps:i=cn,elementProps:l}=e,u=Mu(),c=(S=rv())==null?void 0:S.portalNode,[d,p]=v.useState(null),[h,m]=v.useState(null),y=Ie(b=>{b!==null&&m(b)}),x=v.useRef(null);Ae(()=>{if(o===null){x.current&&(x.current=null,m(null),p(null));return}const b=(o&&(_d(o)?o:o.current))??c??document.body;if(b==null){x.current&&(x.current=null,m(null),p(null));return}x.current!==b&&(x.current=b,m(null),p(b))},[o,c]);const k=Mt("div",i,{ref:[r,y],props:[{id:u,[OE]:""},l]}),w=d&&k?ds.createPortal(k,d):null;return{node:h,nodeId:v.isValidElement(k)?k.props.id:void 0,subtree:w}}const Gd=v.forwardRef(function(r,o){const{render:i,className:l,style:u,children:c,container:d,portalOwnerRole:p,...h}=r,{node:m,nodeId:y,subtree:x}=ov({container:d,ref:o,componentProps:r,elementProps:h}),k=v.useRef(null),w=v.useRef(null),S=v.useRef(null),b=v.useRef(null),[C,E]=v.useState(null),A=v.useRef(!1),I=C==null?void 0:C.modal,P=C==null?void 0:C.open,_=!!C&&!C.modal&&C.open&&!!m;v.useEffect(()=>{if(!m||I)return;function j(F){m&&F.relatedTarget&&yl(F)&&(F.type==="focusin"?A.current&&(Cm(m),A.current=!1):(lE(m),A.current=!0))}return no(Et(m,"focusin",j,!0),Et(m,"focusout",j,!0))},[m,I]),Ae(()=>{!m||P!==!0||!A.current||(Cm(m),A.current=!1)},[P,m]);const N=v.useMemo(()=>({beforeOutsideRef:k,afterOutsideRef:w,beforeInsideRef:S,afterInsideRef:b,portalNode:m,setFocusManagerState:E}),[m]);return O.jsxs(v.Fragment,{children:[x,O.jsxs(Kd.Provider,{value:N,children:[_&&m&&O.jsx(kl,{"data-type":"outside",ref:k,onFocus:j=>{var F,M;if(yl(j,m))(F=S.current)==null||F.focus();else{const G=C?C.domReference:null;(M=Yy(G))==null||M.focus()}}}),_&&m&&O.jsx("span",{role:p,"aria-owns":y,style:_E}),m&&ds.createPortal(c,m),_&&m&&O.jsx(kl,{"data-type":"outside",ref:w,onFocus:j=>{var F,M;if(yl(j,m))(F=b.current)==null||F.focus();else{const G=C?C.domReference:null;(M=Gy(G))==null||M.focus(),C!=null&&C.closeOnFocusOut&&(C==null||C.onOpenChange(!1,xt("focus-out",j.nativeEvent)))}}})]})]})});Gd.displayName="FloatingPortal";let bi;function NE(e){bi??(bi=new WeakMap);let r=bi.get(e);return r||(r=new WeakMap,bi.set(e,r)),r}var Yd=class{constructor(){je(this,"idMap",new Map)}add(e,r){{const o=NE(this),i=o.get(r);if(i!==void 0&&i!==e)throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");const l=this.idMap.get(e);l!==void 0&&l!==r&&o.delete(l),o.set(r,e)}this.idMap.set(e,r)}delete(e){var r;{const o=this.idMap.get(e);o!==void 0&&((r=bi==null?void 0:bi.get(this))==null||r.delete(o))}this.idMap.delete(e)}hasElement(e){for(const r of this.idMap.values())if(r===e)return!0;return!1}hasMatchingElement(e){for(const r of this.idMap.values())if(e(r))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};const ME=Ru(19)?DE:FE;function sv(e,r,o,i,l){return ME(e,r,o,i,l)}function LE(e,r,o,i,l){const u=v.useCallback(()=>r(e.getSnapshot(),o,i,l),[e,r,o,i,l]);return Du.useSyncExternalStore(e.subscribe,u,u)}EE({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let r=!1;for(let o=0;o<e.syncHooks.length;o+=1){const i=e.syncHooks[o],l=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,l)||(r=!0,i.value=l)}return r&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=r=>{const o=new Set;for(const l of e.syncHooks)o.add(l.store);const i=[];for(const l of o)i.push(l.subscribe(r));return()=>{for(const l of i)l()}}),Du.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function DE(e,r,o,i,l){const u=SE();if(!u)return LE(e,r,o,i,l);const c=u.syncIndex;u.syncIndex+=1;let d;return u.didInitialize?(d=u.syncHooks[c],(d.store!==e||d.selector!==r||!Object.is(d.a1,o)||!Object.is(d.a2,i)||!Object.is(d.a3,l))&&(d.store!==e&&(u.didChangeStore=!0),d.store=e,d.selector=r,d.a1=o,d.a2=i,d.a3=l,d.value=r(e.getSnapshot(),o,i,l))):(d={store:e,selector:r,a1:o,a2:i,a3:l,value:r(e.getSnapshot(),o,i,l)},u.syncHooks.push(d)),d.value}function FE(e,r,o,i,l){return kE.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,u=>r(u,o,i,l))}var zE=class{constructor(e){je(this,"subscribe",e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}));je(this,"getSnapshot",()=>this.state);this.state=e,this.listeners=new Set,this.updateTick=0}static create(e){return new this(e)}setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const r=this.updateTick;for(const o of this.listeners){if(r!==this.updateTick)return;o(e)}}update(e){for(const r in e)if(!Object.is(this.state[r],e[r])){this.setState({...this.state,...e});return}}set(e,r){Object.is(this.state[e],r)||this.setState({...this.state,[e]:r})}notifyAll(){const e={...this.state};this.setState(e)}use(e,r,o,i){return sv(this,e,r,o,i)}},Fu=class extends zE{constructor(e,r={},o){super(e),this.context=r,this.selectors=o}useSyncedValue(e,r){v.useDebugValue(e);const o=this;Ae(()=>{o.state[e]!==r&&o.set(e,r)},[o,e,r])}useSyncedValueWithCleanup(e,r){const o=this;Ae(()=>(o.state[e]!==r&&o.set(e,r),()=>{o.set(e,void 0)}),[o,e,r])}useSyncedValues(e){const r=this;{v.useDebugValue(e,u=>Object.keys(u));const i=v.useRef(Object.keys(e)).current,l=Object.keys(e);(i.length!==l.length||i.some((u,c)=>u!==l[c]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const o=Object.values(e);Ae(()=>{r.update(e)},[r,...o])}useControlledProp(e,r){v.useDebugValue(e);const o=this,i=r!==void 0;Ae(()=>{i&&!Object.is(o.state[e],r)&&o.setState({...o.state,[e]:r})},[o,e,r,i]);{const l=this.controlledValues??(this.controlledValues=new Map);l.has(e)||l.set(e,i);const u=l.get(e);u!==void 0&&u!==i&&console.error(`A component is changing the ${u?"":"un"}controlled state of ${e.toString()} to be ${u?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,r,o,i){const l=this.selectors[e];return l(this.state,r,o,i)}useState(e,r,o,i){return v.useDebugValue(e),sv(this,this.selectors[e],r,o,i)}useContextCallback(e,r){v.useDebugValue(e);const o=Ie(r??on);this.context[e]=o}useStateSetter(e){const r=v.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(e,o)}),r.current}observe(e,r){let o;typeof e=="function"?o=e:o=this.selectors[e];let i=o(this.state);return r(i,i,this),this.subscribe(l=>{const u=o(l);if(!Object.is(i,u)){const c=i;i=u,r(u,c,this)}})}};const jE={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};var iv=class extends Fu{constructor(r){const{syncOnly:o,nested:i,onOpenChange:l,triggerElements:u,...c}=r;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:l,dataRef:{current:{}},events:vE(),nested:i,triggerElements:u},jE);je(this,"syncOpenEvent",(r,o)=>{(!r||!this.state.open||o!=null&&NS(o))&&(this.context.dataRef.current.openEvent=r?o:void 0)});je(this,"dispatchOpenChange",(r,o)=>{this.syncOpenEvent(r,o.event);const i={open:r,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",i)});je(this,"setOpen",(r,o)=>{var i,l,u,c;if(this.syncOnly){(l=(i=this.context).onOpenChange)==null||l.call(i,r,o);return}this.dispatchOpenChange(r,o),(c=(u=this.context).onOpenChange)==null||c.call(u,r,o)});this.syncOnly=o}};function Xd(e){v.useEffect(e,is)}const ul=0;var cs=class lv{constructor(){je(this,"currentId",ul);je(this,"clear",()=>{this.currentId!==ul&&(clearTimeout(this.currentId),this.currentId=ul)});je(this,"disposeEffect",()=>this.clear)}static create(){return new lv}start(r,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ul,o()},r)}isStarted(){return this.currentId!==ul}};function Qn(){const e=On(cs.create).current;return Xd(e.disposeEffect),e}function un(e){const r=On(BE,e).current;return r.next=e,Ae(r.effect),r}function BE(e){const r={current:e,next:e,effect:()=>{r.current=r.next}};return r}const Da=null;let Dm=globalThis.requestAnimationFrame;var $E=class{constructor(){je(this,"callbacks",[]);je(this,"callbacksCount",0);je(this,"nextId",1);je(this,"startId",1);je(this,"isScheduled",!1);je(this,"tick",e=>{var i;this.isScheduled=!1;const r=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let l=0;l<r.length;l+=1)(i=r[l])==null||i.call(r,e)})}request(e){const r=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const o=Dm!==requestAnimationFrame&&(Dm=requestAnimationFrame,!0);return(!this.isScheduled||o)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(e){const r=e-this.startId;r<0||r>=this.callbacks.length||this.callbacks[r]!==null&&(this.callbacks[r]=null,this.callbacksCount-=1)}};let Fa=new $E;var ts=class av{constructor(){je(this,"currentId",Da);je(this,"cancel",()=>{this.currentId!==Da&&(Fa.cancel(this.currentId),this.currentId=Da)});je(this,"disposeEffect",()=>this.cancel)}static create(){return new av}static request(r){return Fa.request(r)}static cancel(r){return Fa.cancel(r)}request(r){this.cancel(),this.currentId=Fa.request(()=>{this.currentId=Da,r()})}};function Ti(){const e=On(ts.create).current;return Xd(e.disposeEffect),e}function Fm(e,r){return e.getAnimations(r).filter(o=>{var l;const i=(l=o.effect)==null?void 0:l.getTiming();return(i==null?void 0:i.duration)!==1/0&&(i==null?void 0:i.iterations)!==1/0})}function Co(e){return e==null?e:"current"in e?e.current:e}let za=null;function UE(e){if(!za){const r=[];za=r,queueMicrotask(()=>{za=null,ds.flushSync(()=>{for(const o of r)o()})})}za.push(e)}function VE(e,r=!1,o=!1){const i=Ti();return Ie((l,u=null)=>{i.cancel();const c=Co(e);if(c==null)return;const d=c,p=()=>{if(!o){ds.flushSync(l);return}UE(()=>{u!=null&&u.aborted||l()})};if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){l();return}function h(){Promise.all(Fm(d).map(m=>m.finished.then(on))).then(()=>{u!=null&&u.aborted||p()},()=>{if(!(u!=null&&u.aborted)){if(Fm(d).some(m=>m.pending||m.playState!=="finished")){h();return}p()}})}if(r){const m=Dy;if(!d.hasAttribute(m)){i.request(h);return}const y=new MutationObserver(()=>{d.hasAttribute(m)||(y.disconnect(),h())});y.observe(d,{attributes:!0,attributeFilter:[m]}),u==null||u.addEventListener("abort",()=>y.disconnect(),{once:!0});return}i.request(h)})}function _i(e){const{enabled:r=!0,open:o,ref:i,batch:l=!1,onComplete:u}=e,c=Ie(u),d=VE(i,o,l);v.useEffect(()=>{if(!r)return;const p=new AbortController;return d(c,p.signal),()=>{p.abort()}},[r,o,c,d])}function qd(e,r=!1,o=!1,i=!1){const[l,u]=v.useState(e&&r?"idle":void 0),[c,d]=v.useState(e&&!i);return e&&!c&&(d(!0),u("starting")),!e&&c&&l!=="ending"&&!o&&u("ending"),!e&&!c&&l==="ending"&&u(void 0),Ae(()=>{if(!e&&c&&l!=="ending"&&o){const p=ts.request(()=>{u("ending")});return()=>{ts.cancel(p)}}},[e,c,l,o]),Ae(()=>{if(!e||r||l===void 0)return;const p=ts.request(()=>{u(void 0)});return()=>{ts.cancel(p)}},[r,e,l]),Ae(()=>{if(!e||!r)return;e&&c&&l!=="idle"&&u("starting");const p=ts.request(()=>{u("idle")});return()=>{ts.cancel(p)}},[r,e,c,l]),{mounted:c,setMounted:d,transitionStatus:l}}function fs(e,r,o=!0){return e.filter(i=>i.parentId===r).flatMap(i=>{var l;return[...!o||(l=i.context)!=null&&l.open?[i]:[],...fs(e,i.id,o)]})}function zm(e,r){var l;let o=[],i=(l=e.find(u=>u.id===r))==null?void 0:l.parentId;for(;i;){const u=e.find(c=>c.id===i);i=u==null?void 0:u.parentId,u&&(o=o.concat(u))}return o}function HE(){return!1}function WE(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Zd(e,r={}){const{enabled:o=!0,escapeKey:i=!0,outsidePress:l=!0,outsidePressEvent:u="sloppy",referencePress:c=HE,bubbles:d,externalTree:p}=r,h=e.useState("open"),m=e.useState("floatingElement"),{dataRef:y,events:x}=e.context,k=Pi(p),w=Ie(typeof l=="function"?l:()=>!1),S=typeof l=="function"?w:l,b=S!==!1,C=Ie(()=>u),{escapeKey:E,outsidePress:A}=WE(d),I=v.useRef(!1),P=v.useRef(!1),_=v.useRef(!1),N=v.useRef(!1),j=v.useRef(!1),F=v.useRef(""),M=v.useRef(null),G=Qn(),q=Qn(),W=Qn(),K=Ie(()=>{q.clear(),y.current.insideReactTree=!1}),H=Ie(X=>{var J;const oe=(J=y.current.floatingContext)==null?void 0:J.nodeId;return(k?fs(k.nodesRef.current,oe):[]).some(re=>{var de;return((de=re.context)==null?void 0:de.open)&&!re.context.dataRef.current[X]})}),ne=Ie(X=>Tf(X,e.select("floatingElement"))||Tf(X,e.select("domReferenceElement"))),le=Ie(X=>{c()&&e.setOpen(!1,xt(Ud,X.nativeEvent))}),B=Ie(X=>{if(!h||!o||!i||X.key!=="Escape")return;const oe=OS(X)?X.nativeEvent:X;if(j.current||oe.isComposing||!E&&H("__escapeKeyBubbles"))return;const J=xt(cE,oe);e.setOpen(!1,J),J.isCanceled||X.preventDefault(),!E&&!J.isPropagationAllowed&&X.stopPropagation()}),V=Ie(()=>{y.current.insideReactTree=!0,q.start(0,K)}),U=Ie(X=>{if(!h||!o||X.button!==0)return;const oe=Rn(X.nativeEvent);et(e.select("floatingElement"),oe)&&(I.current||(I.current=!0,P.current=!1))}),T=Ie(X=>{!h||!o||(X.defaultPrevented||X.nativeEvent.defaultPrevented)&&I.current&&(P.current=!0)});v.useEffect(()=>{function X(oe){oe.open||(N.current=!1)}return x.on("openchange",X),()=>{x.off("openchange",X)}},[x]),v.useEffect(()=>K,[K]),v.useEffect(()=>{if(!h||!o)return h||(N.current=!1,j.current=!1,F.current="",M.current=null),K;y.current.__escapeKeyBubbles=E,y.current.__outsidePressBubbles=A;const X=new cs,oe=_t(m);function J(){W.clear(),j.current=!0}function re(){j.current=!0,W.start(Oo?5:0,()=>{j.current=!1})}function de(){_.current=!0,X.start(0,()=>{_.current=!1})}function ae(){I.current=!1,P.current=!1}function ve(){const se=F.current,ce=se==="pen"||!se?"mouse":se,Be=C(),ge=typeof Be=="function"?Be():Be;return typeof ge=="string"?ge:ge[ce]}function De(se){const ce=ve();return ce==="intentional"&&se.type!=="click"||ce==="sloppy"&&se.type==="click"}function _e(se){var ge;const ce=(ge=y.current.floatingContext)==null?void 0:ge.nodeId,Be=k&&fs(k.nodesRef.current,ce).some(He=>{var lt;return Tf(se,(lt=He.context)==null?void 0:lt.elements.floating)});return ne(se)||Be}function $e(se){if(De(se)){se.type!=="click"&&!ne(se)&&(X.clear(),_.current=!1),K();return}if(y.current.insideReactTree){K();return}const ce=Rn(se),Be=`[${wi("inert")}]`,ge=Ot(ce)?ce.getRootNode():null,He=Array.from((ls(ge)?ge:_t(e.select("floatingElement"))).querySelectorAll(Be)),lt=e.context.triggerElements;if(ce&&(lt.hasElement(ce)||lt.hasMatchingElement(bt=>et(bt,ce))))return;let gt=Ot(ce)?ce:null;for(;gt&&!To(gt);){const bt=oo(gt);if(To(bt)||!Ot(bt))break;gt=bt}if(!(He.length&&Ot(ce)&&!ZS(ce)&&!et(ce,e.select("floatingElement"))&&He.every(bt=>!et(gt,bt)))){if($t(ce)&&!("touches"in se)){const bt=To(ce),Qt=ur(ce),Xt=/auto|scroll/,jn=bt||Xt.test(Qt.overflowX),dn=bt||Xt.test(Qt.overflowY),pn=jn&&ce.clientWidth>0&&ce.scrollWidth>ce.clientWidth,nn=dn&&ce.clientHeight>0&&ce.scrollHeight>ce.clientHeight,sn=Qt.direction==="rtl",Cn=nn&&(sn?se.offsetX<=ce.offsetWidth-ce.clientWidth:se.offsetX>ce.clientWidth),Ut=pn&&se.offsetY>ce.clientHeight;if(Cn||Ut)return}if(!_e(se)){if(ve()==="intentional"){if(se.detail!==0&&!Ri(se)&&!N.current)return;if(_.current){X.clear(),_.current=!1;return}}typeof S=="function"&&!S(se)||H("__outsidePressBubbles")||(e.setOpen(!1,xt(aE,se)),K())}}}function Te(se){ve()!=="sloppy"||se.pointerType==="touch"||!e.select("open")||!o||ne(se)||$e(se)}function Ne(se){if(ve()!=="sloppy"||!e.select("open")||!o||ne(se))return;const ce=se.touches[0];ce&&(M.current={startTime:Date.now(),startX:ce.clientX,startY:ce.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},G.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}function Qe(se,ce){const Be=Rn(se);if(!Be)return;const ge=Et(Be,se.type,()=>{ce(se),ge()})}function tt(se){F.current="touch",Qe(se,Ne)}function ft(se){G.clear(),se.type==="pointerdown"&&(se.button===0&&(N.current=!0),F.current=se.pointerType),!(se.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)&&Qe(se,ce=>{ce.type==="pointerdown"?Te(ce):$e(ce)})}function Fe(se){if(se.type==="pointercancel"&&(N.current=!1),!I.current)return;const ce=P.current;if(ae(),ve()==="intentional"){if(se.type==="pointercancel"){ce&&de();return}if(!_e(se)){if(ce){de();return}typeof S=="function"&&!S(se)||(X.clear(),_.current=!0,K())}}}function Ye(se){if(ve()!=="sloppy"||!M.current||ne(se))return;const ce=se.touches[0];if(!ce)return;const Be=Math.abs(ce.clientX-M.current.startX),ge=Math.abs(ce.clientY-M.current.startY),He=Math.sqrt(Be*Be+ge*ge);He>5&&(M.current.dismissOnTouchEnd=!0),He>10&&($e(se),G.clear(),M.current=null)}function me(se){Qe(se,Ye)}function it(se){ve()!=="sloppy"||!M.current||ne(se)||(M.current.dismissOnTouchEnd&&$e(se),G.clear(),M.current=null)}function Rt(se){Qe(se,it)}const wt=no(i&&no(Et(oe,"keydown",B),Et(oe,"compositionstart",J),Et(oe,"compositionend",re)),b&&no(Et(oe,"click",ft,!0),Et(oe,"pointerdown",ft,!0),Et(oe,"pointerup",Fe,!0),Et(oe,"pointercancel",Fe,!0),Et(oe,"mousedown",ft,!0),Et(oe,"mouseup",Fe,!0),Et(oe,"touchstart",tt,{capture:!0,passive:!0}),Et(oe,"touchmove",me,{capture:!0,passive:!0}),Et(oe,"touchend",Rt,{capture:!0,passive:!0})));return()=>{wt(),X.clear(),ae(),_.current=!1}},[y,m,i,b,S,h,o,E,A,B,K,C,H,ne,k,e,G,W]);const D=v.useMemo(()=>({onKeyDown:B,onPointerDown:le,onClick:le}),[B,le]),Z=v.useMemo(()=>({onKeyDown:B,onPointerDown:T,onMouseDown:T,onClickCapture:V,onMouseDownCapture(X){V(),U(X)},onPointerDownCapture(X){V(),U(X)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[B,V,U,T]);return v.useMemo(()=>o?{reference:D,floating:Z,trigger:D}:{},[o,D,Z])}function KE(e){const{popupStore:r,treatPopupAsFloatingElement:o=!1,floatingRootContext:i,floatingId:l,nested:u,onOpenChange:c}=e,d=r.useState("open"),p=r.useState("activeTriggerElement"),h=r.useState(o?"popupElement":"positionerElement"),m=c;return r.useSyncedValue("floatingId",l),Ae(()=>{const y={open:d,floatingId:l,referenceElement:p,floatingElement:h};Ot(p)&&(y.domReferenceElement=p),i.state.positionReference===i.state.referenceElement&&(y.positionReference=p),i.update(y)},[d,l,p,h,i]),i.context.onOpenChange=m,i.context.nested=u,i}function uv(e){const{open:r,ref:o,preventUnmountOnClose:i,setPreventUnmountOnClose:l,onUnmount:u,animateInitialOpen:c}=e,d=Ie(l),{mounted:p,setMounted:h,transitionStatus:m}=qd(r,!1,!1,c),y=r?!1:i;Ae(()=>{r&&d(!1)},[r,d]);const x=v.useRef(p),k=v.useRef(!1),w=Hd(),S=()=>{x.current=!1,h(!1),u()};Ae(()=>{x.current=p,k.current&&(k.current=!1,!r&&p&&S())});const b=Ie(()=>{if(x.current){if(r){k.current=!0,w();return}S()}});return _i({enabled:p&&!r&&!y,open:r,ref:o,onComplete(){r||b()}}),{mounted:p,transitionStatus:m,preventUnmountingOnClose:y,forceUnmount:b}}const Qd={tabIndex:-1,[MS]:""};function GE(e){return r=>r==="touch"?e.current:!0}function cv(e,r=!1){const o=Mu(),i=Lu()!=null,l=On(()=>e(o,i)).current;return KE({popupStore:l,treatPopupAsFloatingElement:r,floatingRootContext:l.state.floatingRootContext,floatingId:o,nested:i,onOpenChange:l.setOpen}),l}function fv({handle:e,store:r}){return Ae(()=>e.attachStore(r),[e,r]),null}function jm(e){const r=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==r&&e.set("triggerCount",r)}function YE(e,r){const o=v.useRef(null);return Ie(i=>{const l=o.current;if(l!==null){if(l.element===i&&l.store===r&&l.id===e)return;o.current=null;const u=l.store;u.context.triggerElements.getById(l.id)===l.element&&(u.context.triggerElements.delete(l.id),jm(u))}i!==null&&e!==void 0&&(o.current={store:r,id:e,element:i},r.context.triggerElements.add(e,i),jm(r))})}function dv(e,r,o,i=!1){let l=e.preventUnmountingOnClose;r?l=!1:i&&(l=!0);const u=(o==null?void 0:o.id)??null;let c=e.activeTriggerId,d=e.activeTriggerElement;return(u||r)&&(c=u,d=o??null),{open:r,preventUnmountingOnClose:l,activeTriggerId:c,activeTriggerElement:d,openedWithoutTrigger:r?o==null:e.openedWithoutTrigger}}function pv(e){let r=!1;return e.preventUnmountOnClose=()=>{r=!0},()=>r}function XE(e,r,o,i={}){var m,y,x;const l=o.reason,u=l===Mr,c=r&&l==="trigger-focus",d=!r&&(l==="trigger-press"||l==="escape-key"),p=pv(o);if((y=(m=e.context).onOpenChange)==null||y.call(m,r,o),o.isCanceled)return;(x=i.onBeforeDispatch)==null||x.call(i),e.state.floatingRootContext.dispatchOpenChange(r,o);const h=()=>{const k=dv(e.state,r,o.trigger,p()),w={...i.extraState,...k};c?w.instantType="focus":d?w.instantType="dismiss":u&&(w.instantType=void 0),e.update(w)};u?ds.flushSync(h):h()}function hv(e,r,o,i){const l=o.useState("isMountedByTrigger",e),u=YE(e,o),c=Ie(p=>{const h=o.select("open"),m=o.select("activeTriggerId");if(m===e){const y={activeTriggerElement:p,...h?i:null};o.update(y);return}if(m==null&&h&&!o.state.openedWithoutTrigger){const y={activeTriggerId:e??null,activeTriggerElement:p,...i};o.update(y)}}),d=Ie(p=>{u(p),p&&c(p)});return Ae(()=>(d(r.current),()=>d(null)),[d,r,o,e]),Ae(()=>{if(l){const p={activeTriggerElement:r.current,...i};o.update(p)}},[l,o,r,...Object.values(i)]),{registerTrigger:d,isMountedByThisTrigger:l}}function gv(e,r={}){const{closeOnActiveTriggerUnmount:o=!1}=r,i=v.useRef(null),l=e.useState("open"),u=e.useState("triggerCount"),c=e.useState("activeTriggerId"),d=e.useState("activeTriggerElement");Ae(()=>{if(!l){i.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0),e.state.openedWithoutTrigger&&e.set("openedWithoutTrigger",!1);return}const p=e.context.triggerElements.size,h={};e.state.triggerCount!==p&&(h.triggerCount=p);const m=e.select("activeTriggerId");let y=null;if(m){const x=e.context.triggerElements.getById(m);if(x)i.current=m,x!==e.state.activeTriggerElement&&(h.activeTriggerElement=x);else{for(const[k,w]of e.context.triggerElements.entries())if(w===e.state.activeTriggerElement){h.activeTriggerId=k,h.activeTriggerElement=w,i.current=k;break}h.activeTriggerId===void 0&&(i.current===m?y=m:i.current=null)}}else i.current=null;if(!y&&!m&&!e.state.openedWithoutTrigger&&p===1){const x=e.context.triggerElements.entries().next();if(!x.done){const[k,w]=x.value;h.activeTriggerId=k,h.activeTriggerElement=w,i.current=k}}(h.triggerCount!==void 0||h.activeTriggerId!==void 0||h.activeTriggerElement!==void 0)&&e.update(h),y&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===y&&!e.context.triggerElements.getById(y)){const x=xt(us);e.setOpen(!1,x),x.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[l,e,u,c,d,o])}function mv(e,r,o,i){const{mounted:l,transitionStatus:u,forceUnmount:c}=uv({open:e,ref:r.context.popupRef,preventUnmountOnClose:r.useState("preventUnmountingOnClose"),setPreventUnmountOnClose:d=>r.set("preventUnmountingOnClose",d),animateInitialOpen:i,onUnmount(){var d,p;r.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),(p=(d=r.context).onOpenChangeComplete)==null||p.call(d,!1)}});return On(()=>(r.set("mounted",l),null)),r.useSyncedValues({mounted:l,transitionStatus:u}),{forceUnmount:c,transitionStatus:u}}function yv(e,r){e.useSyncedValues(r),Ae(()=>()=>{e.update({activeTriggerProps:cn,inactiveTriggerProps:cn,popupProps:cn})},[e])}function qE(e,r){Ae(()=>{!r&&e.state.openMethod!==null&&e.set("openMethod",null)},[r,e]),Ae(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}function ZE(e,r){return r!=null&&!os(r)?0:typeof e=="function"?e():e}function Sl(e,r,o){const i=ZE(e,o);return typeof i=="number"?i:i==null?void 0:i[r]}function Bm(e){return typeof e=="function"?e():e}function vv(e,r){return r||e==="click"||e==="mousedown"}function QE(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}var JE=class xv{constructor(){je(this,"pointerType");je(this,"interactedInside",!1);je(this,"handler");je(this,"blockMouseMove",!0);je(this,"performedPointerEventsMutation",!1);je(this,"pointerEventsScopeElement",null);je(this,"pointerEventsReferenceElement",null);je(this,"pointerEventsFloatingElement",null);je(this,"restTimeoutPending",!1);je(this,"openChangeTimeout",new cs);je(this,"restTimeout",new cs);je(this,"handleCloseOptions");je(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});je(this,"disposeEffect",()=>this.dispose)}static create(){return new xv}};const yu=new WeakMap;function vu(e){var o,i,l;if(!e.performedPointerEventsMutation)return;const r=e.pointerEventsScopeElement;r&&yu.get(r)===e&&((o=e.pointerEventsScopeElement)==null||o.style.removeProperty("pointer-events"),(i=e.pointerEventsReferenceElement)==null||i.style.removeProperty("pointer-events"),(l=e.pointerEventsFloatingElement)==null||l.style.removeProperty("pointer-events"),yu.delete(r)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function wv(e,r){const{scopeElement:o,referenceElement:i,floatingElement:l}=r,u=yu.get(o);u&&u!==e&&vu(u),vu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=i,e.pointerEventsFloatingElement=l,yu.set(o,e),o.style.pointerEvents="none",i.style.pointerEvents="auto",l.style.pointerEvents="auto"}function Jd(e){const r=e.context.dataRef.current,o=On(()=>r.hoverInteractionState??JE.create()).current;return r.hoverInteractionState||(r.hoverInteractionState=o),Xd(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}function eR(e,r={}){const{enabled:o=!0,closeDelay:i=0,nodeId:l}=r,u=e.useState("open"),c=e.useState("floatingElement"),d=e.useState("domReferenceElement"),{dataRef:p}=e.context,h=Pi(),m=Lu(),y=Jd(e),x=Qn(),k=Ie(()=>{var b;return vv((b=p.current.openEvent)==null?void 0:b.type,y.interactedInside)}),w=Ie(()=>{var b;return QE((b=p.current.openEvent)==null?void 0:b.type)}),S=Ie(()=>{vu(y)});Ae(()=>{u||(y.pointerType=void 0,y.restTimeoutPending=!1,y.interactedInside=!1,S())},[u,y,S]),v.useEffect(()=>S,[S]),Ae(()=>{var b,C,E,A,I;if(o&&u&&(b=y.handleCloseOptions)!=null&&b.blockPointerEvents&&w()&&Ot(d)&&c){const P=d,_=c,N=_t(c),j=(E=(C=h==null?void 0:h.nodesRef.current.find(q=>q.id===m))==null?void 0:C.context)==null?void 0:E.elements.floating;j&&(j.style.pointerEvents="");const F=y.pointerEventsScopeElement!==_?y.pointerEventsScopeElement:null,M=j!==_?j:null,G=((I=(A=y.handleCloseOptions)==null?void 0:A.getScope)==null?void 0:I.call(A))??F??M??Ci(P,"[data-rootownerid]")??N.body;return wv(y,{scopeElement:G,referenceElement:P,floatingElement:_}),()=>{S()}}},[o,u,d,c,y,w,h,m,S]),v.useEffect(()=>{if(!o)return;function b(){return!!(h&&m&&fs(h.nodesRef.current,m).length>0)}function C(N){const j=Sl(i,"close",y.pointerType),F=()=>{e.setOpen(!1,xt(Mr,N)),h==null||h.events.emit("floating.closed",N)};j?y.openChangeTimeout.start(j,F):(y.openChangeTimeout.clear(),F())}function E(N){const j=Rn(N);if(!QS(j)){y.interactedInside=!1;return}y.interactedInside=Ci(j,"[aria-haspopup]")!=null}function A(){y.openChangeTimeout.clear(),x.clear(),h==null||h.events.off("floating.closed",P),S()}function I(N){var M;if(b()&&h){h.events.on("floating.closed",P);return}if(gu(N.relatedTarget,e.context.triggerElements))return;const j=((M=p.current.floatingContext)==null?void 0:M.nodeId)??l,F=N.relatedTarget;if(!(h&&j&&Ot(F)&&fs(h.nodesRef.current,j,!1).some(G=>{var q;return et((q=G.context)==null?void 0:q.elements.floating,F)}))){if(y.handler){y.handler(N);return}S(),w()&&!k()&&C(N)}}function P(N){!h||!m||b()||x.start(0,()=>{h.events.off("floating.closed",P),e.setOpen(!1,xt(Mr,N)),h.events.emit("floating.closed",N)})}const _=c;return no(_&&Et(_,"mouseenter",A),_&&Et(_,"mouseleave",I),_&&Et(_,"pointerdown",E,!0),()=>{h==null||h.events.off("floating.closed",P)})},[o,c,e,p,i,l,w,k,S,y,h,m,x])}const tR={current:null};function nR(e,r={}){const{enabled:o=!0,delay:i=0,handleClose:l=null,mouseOnly:u=!1,restMs:c=0,move:d=!0,triggerElementRef:p=tR,externalTree:h,isActiveTrigger:m=!0,getHandleCloseContext:y,isClosing:x,shouldOpen:k,guardStaleOpen:w=!1}=r,{dataRef:S,events:b}=e.context,C=Pi(h),E=Jd(e),A=v.useRef(!1),I=un(l),P=un(i),_=un(c),N=un(o),j=un(k),F=un(x),M=Ie(()=>{var H;return vv((H=S.current.openEvent)==null?void 0:H.type,E.interactedInside)}),G=Ie(()=>{var H;return((H=j.current)==null?void 0:H.call(j))!==!1}),q=Ie((H,ne,le)=>{const B=e.context.triggerElements;if(B.hasElement(ne))return!H||!et(H,ne);if(!Ot(le))return!1;const V=le;return B.hasMatchingElement(U=>et(U,V))&&(!H||!et(H,V))}),W=Ie(()=>{E.handler&&(_t(e.select("domReferenceElement")).removeEventListener("mousemove",E.handler),E.handler=void 0)}),K=Ie(()=>{vu(E)});return m&&(E.handleCloseOptions=l==null?void 0:l.__options),v.useEffect(()=>W,[W]),v.useEffect(()=>{if(!o)return;function H(ne){ne.open?A.current=!1:(A.current=ne.reason===Mr,W(),E.openChangeTimeout.clear(),E.restTimeout.clear(),E.blockMouseMove=!0,E.restTimeoutPending=!1)}return b.on("openchange",H),()=>{b.off("openchange",H)}},[o,b,E,W]),v.useEffect(()=>{if(!o)return;function H(T,D=!0){const Z=Sl(P.current,"close",E.pointerType);Z?E.openChangeTimeout.start(Z,()=>{e.setOpen(!1,xt(Mr,T)),C==null||C.events.emit("floating.closed",T)}):D&&(E.openChangeTimeout.clear(),e.setOpen(!1,xt(Mr,T)),C==null||C.events.emit("floating.closed",T))}const ne=p.current??(m?e.select("domReferenceElement"):null);if(!Ot(ne))return;function le(T){var Qe;if(E.openChangeTimeout.clear(),E.blockMouseMove=!1,u&&!os(E.pointerType))return;const D=Bm(_.current),Z=Sl(P.current,"open",E.pointerType),X=Rn(T),oe=T.currentTarget??null,J=e.select("domReferenceElement");let re=oe;if(Ot(X)&&!e.context.triggerElements.hasElement(X)){for(const tt of e.context.triggerElements.elements())if(et(tt,X)){re=tt;break}}Ot(oe)&&Ot(J)&&!e.context.triggerElements.hasElement(oe)&&et(oe,J)&&(re=J);const de=re==null?!1:q(J,re,X),ae=e.select("open"),ve=((Qe=F.current)==null?void 0:Qe.call(F))??e.select("transitionStatus")==="ending",De=!ae&&ve&&A.current,_e=!de&&Ot(re)&&Ot(J)&&et(J,re)&&De,$e=D>0&&!Z,Te=de&&(ae||De)||_e,Ne=!ae||de;if(Te){G()&&e.setOpen(!0,xt(Mr,T,re));return}$e||(Z?E.openChangeTimeout.start(Z,()=>{Ne&&G()&&e.setOpen(!0,xt(Mr,T,re))}):Ne&&G()&&e.setOpen(!0,xt(Mr,T,re)))}function B(T){if(M()){K();return}W();const D=e.select("domReferenceElement"),Z=_t(D);E.restTimeout.clear(),E.restTimeoutPending=!1;const X=S.current.floatingContext??(y==null?void 0:y());if(!gu(T.relatedTarget,e.context.triggerElements)){if(I.current&&X){e.select("open")||E.openChangeTimeout.clear();const oe=p.current;E.handler=I.current({...X,tree:C,x:T.clientX,y:T.clientY,onClose(){K(),W(),N.current&&!M()&&oe===e.select("domReferenceElement")&&H(T,!0)}}),Z.addEventListener("mousemove",E.handler),E.handler(T);return}(E.pointerType!=="touch"||!et(e.select("floatingElement"),T.relatedTarget))&&H(T)}}function V(T){et(ne,T.relatedTarget)||(E.openChangeTimeout.clear(),E.restTimeout.clear(),E.restTimeoutPending=!1)}const U=w?Et(ne,"mouseout",V):void 0;return d?no(Et(ne,"mousemove",le,{once:!0}),Et(ne,"mouseenter",le),Et(ne,"mouseleave",B),U):no(Et(ne,"mouseenter",le),Et(ne,"mouseleave",B),U)},[W,K,S,P,e,o,I,E,m,q,M,u,d,_,p,C,N,y,F,G,w]),v.useMemo(()=>{if(!o)return;function H(ne){E.pointerType=ne.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(ne){var X,oe,J;const{nativeEvent:le}=ne,B=ne.currentTarget,V=e.select("domReferenceElement"),U=e.select("open"),T=q(V,B,ne.target);if(u&&!os(E.pointerType))return;if(U&&T&&((X=E.handleCloseOptions)!=null&&X.blockPointerEvents)){const re=e.select("floatingElement");if(re){const de=((J=(oe=E.handleCloseOptions)==null?void 0:oe.getScope)==null?void 0:J.call(oe))??B.ownerDocument.body;wv(E,{scopeElement:de,referenceElement:B,floatingElement:re})}}const D=Bm(_.current);if(U&&!T||D===0||!T&&E.restTimeoutPending&&ne.movementX**2+ne.movementY**2<2)return;E.restTimeout.clear();function Z(){if(E.restTimeoutPending=!1,M())return;const re=e.select("open");!E.blockMouseMove&&(!re||T)&&G()&&e.setOpen(!0,xt(Mr,le,B))}E.pointerType==="touch"?ds.flushSync(()=>{Z()}):T&&U?Z():(E.restTimeoutPending=!0,E.restTimeout.start(D,Z))}}},[o,E,M,q,u,e,_,G])}const $m=.1,rR=$m*$m,Gt=.5;function ja(e,r,o,i,l,u){return i>=r!=u>=r&&e<=(l-o)*(r-i)/(u-i)+o}function Ba(e,r,o,i,l,u,c,d,p,h){let m=!1;return ja(e,r,o,i,l,u)&&(m=!m),ja(e,r,l,u,c,d)&&(m=!m),ja(e,r,c,d,p,h)&&(m=!m),ja(e,r,p,h,o,i)&&(m=!m),m}function oR(e,r,o){return e>=o.x&&e<=o.x+o.width&&r>=o.y&&r<=o.y+o.height}function $a(e,r,o,i,l,u){return e>=Math.min(o,l)&&e<=Math.max(o,l)&&r>=Math.min(i,u)&&r<=Math.max(i,u)}function sR(e={}){const{blockPointerEvents:r=!1}=e,o=new cs,i=({x:l,y:u,placement:c,elements:d,onClose:p,nodeId:h,tree:m})=>{const y=c==null?void 0:c.split("-")[0];let x=!1,k=null,w=null,S=typeof performance<"u"?performance.now():0;function b(E,A){const I=performance.now(),P=I-S;if(k===null||w===null||P===0)return k=E,w=A,S=I,!1;const _=E-k,N=A-w,j=_*_+N*N,F=P*P*rR;return k=E,w=A,S=I,j<F}function C(){o.clear(),p()}return function(A){o.clear();const I=d.domReference,P=d.floating;if(!I||!P||y==null||l==null||u==null)return;const{clientX:_,clientY:N}=A,j=Rn(A),F=A.type==="mouseleave",M=et(P,j),G=et(I,j);if(M&&(x=!0,!F))return;if(G&&(x=!1,!F)){x=!0;return}if(F&&Ot(A.relatedTarget)&&et(P,A.relatedTarget))return;function q(){return!!(m&&fs(m.nodesRef.current,h).length>0)}function W(){q()||C()}if(q())return;const K=I.getBoundingClientRect(),H=P.getBoundingClientRect(),ne=l>H.right-H.width/2,le=u>H.bottom-H.height/2,B=H.width>K.width,V=H.height>K.height,U=(B?K:H).left,T=(B?K:H).right,D=(V?K:H).top,Z=(V?K:H).bottom;if(y==="top"&&u>=K.bottom-1||y==="bottom"&&u<=K.top+1||y==="left"&&l>=K.right-1||y==="right"&&l<=K.left+1){W();return}let X=!1;switch(y){case"top":X=$a(_,N,U,K.top+1,T,H.bottom-1);break;case"bottom":X=$a(_,N,U,H.top+1,T,K.bottom-1);break;case"left":X=$a(_,N,H.right-1,Z,K.left+1,D);break;case"right":X=$a(_,N,K.right-1,Z,H.left+1,D)}if(X)return;if(x&&!oR(_,N,K)){W();return}if(!F&&b(_,N)){W();return}let oe=!1;switch(y){case"top":{const J=B?Gt/2:Gt*4,re=B||ne?l+J:l-J,de=B?l-J:ne?l+J:l-J,ae=u+Gt+1,ve=ne||B?H.bottom-Gt:H.top,De=ne?B?H.bottom-Gt:H.top:H.bottom-Gt;oe=Ba(_,N,re,ae,de,ae,H.left,ve,H.right,De);break}case"bottom":{const J=B?Gt/2:Gt*4,re=B||ne?l+J:l-J,de=B?l-J:ne?l+J:l-J,ae=u-Gt,ve=ne||B?H.top+Gt:H.bottom,De=ne?B?H.top+Gt:H.bottom:H.top+Gt;oe=Ba(_,N,re,ae,de,ae,H.left,ve,H.right,De);break}case"left":{const J=V?Gt/2:Gt*4,re=V||le?u+J:u-J,de=V?u-J:le?u+J:u-J,ae=l+Gt+1,ve=le||V?H.right-Gt:H.left,De=le?V?H.right-Gt:H.left:H.right-Gt;oe=Ba(_,N,ve,H.top,De,H.bottom,ae,re,ae,de);break}case"right":{const J=V?Gt/2:Gt*4,re=V||le?u+J:u-J,de=V?u-J:le?u+J:u-J,ae=l-Gt,ve=le||V?H.left+Gt:H.right,De=le?V?H.left+Gt:H.right:H.left+Gt;oe=Ba(_,N,ae,re,ae,de,ve,H.top,De,H.bottom);break}}oe?x||o.start(40,W):W()}};return i.__options={...e,blockPointerEvents:r},i}function bv(e,r,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new iv({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:r,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:r,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:cn,inactiveTriggerProps:cn,popupProps:cn}}const vl=e=>e.triggerIdProp??e.activeTriggerId,xu=e=>e.openProp??e.open,Um=e=>{var r;return(((r=e.popupElement)==null?void 0:r.id)??e.floatingId)||void 0};function kv(e,r){return r!==void 0&&xu(e)&&vl(e)===r}function iR(e,r){return kv(e,r)?!0:r!==void 0&&xu(e)&&vl(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}const Sv={open:xu,mounted:e=>e.mounted,transitionStatus:e=>xu(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:vl,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Um,isTriggerActive:(e,r)=>r!==void 0&&vl(e)===r,isOpenedByTrigger:(e,r)=>kv(e,r),isMountedByTrigger:(e,r)=>r!==void 0&&vl(e)===r&&e.mounted,triggerProps:(e,r)=>r?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,r)=>iR(e,r)?Um(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Ev(e){const r=v.useCallback(i=>e===void 0?on:e.subscribeStore(i),[e]),o=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return Du.useSyncExternalStore(r,o,()=>e==null?void 0:e.serverStore)}const Df=Ny&&Oo;function lR(e,r={}){const{enabled:o=!0,delay:i}=r,{events:l,dataRef:u}=e.context,c=v.useRef(!1),d=v.useRef(null),p=v.useRef(!0),h=Qn();v.useEffect(()=>{const y=e.select("domReferenceElement");if(!o)return;const x=Yt(y);function k(){const b=e.select("domReferenceElement");!e.select("open")&&$t(b)&&b===qn(_t(b))&&(c.current=!0,d.current=b)}function w(){p.current=!0}function S(){p.current=!1}return no(Et(x,"blur",k),Df&&Et(x,"keydown",w,!0),Df&&Et(x,"pointerdown",S,!0))},[e,o]),v.useEffect(()=>{if(!o)return;function y(x){if(x.reason==="trigger-press"||x.reason==="escape-key"){const k=e.select("domReferenceElement");Ot(k)&&(d.current=k,c.current=!0)}}return l.on("openchange",y),()=>{l.off("openchange",y)}},[l,o,e]);const m=v.useMemo(()=>{function y(){c.current=!1,d.current=null}return{onMouseLeave(){y()},onFocus(x){const k=x.currentTarget;if(c.current){if(d.current===k)return;y()}const w=Rn(x.nativeEvent);if(Ot(w)){if(Df&&!x.relatedTarget){if(!p.current&&!Ol(w))return}else if(!JS(w))return}const S=gu(x.relatedTarget,e.context.triggerElements),{nativeEvent:b,currentTarget:C}=x;if(e.select("open")&&S||!i){e.setOpen(!0,xt(Af,b,C));return}h.start(i,()=>{c.current||e.setOpen(!0,xt(Af,b,C))})},onBlur(x){y();const k=x.relatedTarget,w=x.nativeEvent,S=Ot(k)&&k.hasAttribute(wi("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{var E;const b=e.select("domReferenceElement"),C=qn(_t(b));!k&&C===b||et((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,C)||et(b,C)||S||gu(k??C,e.context.triggerElements)||e.setOpen(!1,xt(Af,w))})}}},[u,i,e,h]);return v.useMemo(()=>o?{reference:m,trigger:m}:{},[o,m])}function Kr(e){return Mu(e,"base-ui")}const Rv=v.forwardRef(function(r,o){const{children:i,container:l,className:u,render:c,style:d,...p}=r,{node:h,subtree:m}=ov({container:l,ref:o,componentProps:r,elementProps:p});return!m&&!h?null:O.jsxs(v.Fragment,{children:[m,h&&ds.createPortal(i,h)]})});Rv.displayName="FloatingPortalLite";const Cv=v.createContext(void 0);Cv.displayName="DirectionContext";function ep(){var e;return((e=v.useContext(Cv))==null?void 0:e.direction)??"ltr"}function aR(e){const{nodeId:r,externalTree:o,rootContext:i}=e,l=i.useState("referenceElement"),u=i.useState("floatingElement"),c=i.useState("domReferenceElement"),d=i.useState("open"),p=i.useState("floatingId"),[h,m]=v.useState(null),y=v.useRef(null),x=Pi(o),k=v.useMemo(()=>({reference:l,floating:u,domReference:c}),[l,u,c]),w=bS({...e,elements:{...k,...h&&{reference:h}}}),S=v.useCallback(A=>{const I=Ot(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;m(I),w.refs.setReference(I)},[w.refs]),b=v.useMemo(()=>({...w.refs,setPositionReference:S,domReference:y}),[w.refs,S]),C=v.useMemo(()=>({...w.elements,domReference:c}),[w.elements,c]),E=v.useMemo(()=>({...w,dataRef:i.context.dataRef,open:d,onOpenChange:i.setOpen,events:i.context.events,floatingId:p,refs:b,elements:C,nodeId:r,rootStore:i}),[w,b,C,r,i,d,p]);return Ae(()=>{c&&(y.current=c)},[c]),Ae(()=>{i.context.dataRef.current.floatingContext=E;const A=x==null?void 0:x.nodesRef.current.find(I=>I.id===r);A&&(A.context=E)}),v.useMemo(()=>({...w,context:E,refs:b,elements:C,rootStore:i}),[w,b,C,E,i])}const uR=e=>({name:"arrow",options:e,async fn(r){const{x:o,y:i,placement:l,rects:u,platform:c,elements:d,middlewareData:p}=r,{element:h,padding:m=0}=as(e,r)||{};if(h==null)return{};const y=Ey(m),x={x:o,y:i},k=Dd(l),w=Ld(k),S=await c.getDimensions(h),b=k==="y",C=b?"top":"left",E=b?"bottom":"right",A=b?"clientHeight":"clientWidth",I=u.reference[w]+u.reference[k]-x[k]-u.floating[w],P=x[k]-u.reference[k],_=d.floating[A]||u.floating[w],N=I/2-P/2,j=_/2-S[w]/2-1,F=Math.min(y[C],j),M=Math.min(y[E],j),G=F,q=_-S[w]-M,W=_/2-S[w]/2+N,K=Sy(G,W,q),H=!p.arrow&&to(l)!=null&&W!==K&&u.reference[w]/2-(W<G?F:M)-S[w]/2<0,ne=H?W<G?W-G:W-q:0;return{[k]:x[k]+ne,data:{[k]:K,centerOffset:W-K-ne,...H&&{alignmentOffset:ne}},reset:H}}}),cR=(e,r)=>{const{name:o,fn:i}=uR(e);return{name:o,fn:i,options:[e,r]}},fR={name:"hide",async fn(e){const{width:r,height:o,x:i,y:l}=e.rects.reference,u=r===0&&o===0&&i===0&&l===0,c=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:c.top-o>=0||c.right-r>=0||c.bottom-o>=0||c.left-r>=0||u}}}},dR={sideX:"left",sideY:"top"},pR="--available-width",hR="--available-height",gR="--anchor-width",mR="--anchor-height",yR="--transform-origin",Vm=pR,Hm=hR;function Tv(e,r,o){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?o?"inline-start":"inline-end":"right",bottom:"bottom",left:i?o?"inline-end":"inline-start":"left"}[r]}function Wm(e,r,o){const{rects:i,placement:l}=e;return{side:Tv(r,br(l),o),align:to(l)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function Iv(e){return vR(e,aR)}function vR(e,r){var ue,ke;const{anchor:o,positionMethod:i="absolute",side:l="bottom",sideOffset:u=0,align:c="center",alignOffset:d=0,collisionBoundary:p,collisionPadding:h=5,sticky:m=!1,arrowPadding:y=5,disableAnchorTracking:x=!1,inline:k,keepMounted:w=!1,floatingRootContext:S,mounted:b,collisionAvoidance:C,shift:E,nodeId:A,adaptiveOrigin:I,lazyFlip:P=!1,externalTree:_}=e,N=C.side||"flip",j=C.align||"flip",F=C.fallbackAxisSide||"end",M=(E==null?void 0:E.crossAxis)??!1,G=E==null?void 0:E.rootBoundary,q=typeof o=="function"?o:void 0,W=Ie(q),K=q?W:o,H=un(o),ne=un(b),le=ep()==="rtl",[B,V]=v.useState(null);!b&&B!==null&&V(null);const U=P==="placement",T=B?br(B):null,D=B&&U?to(B)||"center":null,Z=T||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":le?"left":"right","inline-start":le?"right":"left"}[l],X=D||c,oe=X==="center"?Z:`${Z}-${X}`;let J=h;typeof J=="number"?J={top:J,right:J,bottom:J,left:J}:J&&(J={top:J.top||0,right:J.right||0,bottom:J.bottom||0,left:J.left||0});const re=1,de=l==="bottom"?re:0,ae=l==="top"?re:0,ve=l==="right"?re:0,De=l==="left"?re:0,_e={boundary:p==="clipping-ancestors"?"clippingAncestors":p,padding:J},$e=v.useRef(null),Te=un(u),Ne=un(d),Qe=typeof u!="function"?u:0,tt=typeof d!="function"?d:0,ft=[];k&&ft.push(k),ft.push(kS(Re=>{const ut=Wm(Re,l,le),ht=typeof Te.current=="function"?Te.current(ut):Te.current,we=typeof Ne.current=="function"?Ne.current(ut):Ne.current;return{mainAxis:ht,crossAxis:we,alignmentAxis:we}},[Qe,tt,le,l]));const Fe=j==="none"&&N!=="shift",Ye=!Fe&&(m||M||N==="shift"),me=N==="none"?null:RS({..._e,padding:{top:J.top+re+de,right:J.right+re+De,bottom:J.bottom+re+ae,left:J.left+re+ve},mainAxis:!M&&N==="flip",crossAxis:j==="flip"?"alignment":!1,fallbackAxisSideDirection:F}),it=Fe?null:SS({..._e,rootBoundary:G,mainAxis:j!=="none",crossAxis:Ye,limiter:m||M?void 0:ES(Re=>{if(!$e.current)return{};const{width:ut,height:ht}=$e.current.getBoundingClientRect(),we=Dr(br(Re.placement)),Se=we==="y"?ut:ht,Me=we==="y"?J.left+J.right:J.top+J.bottom;return{offset:Se/2+Me/2}})},[_e,m,M,G,J,j]);N==="shift"||j==="shift"||X==="center"?ft.push(it,me):ft.push(me,it),ft.push(CS({..._e,apply({elements:{floating:Re},availableWidth:ut,availableHeight:ht,rects:we}){if(!ne.current)return;const Se=Re.style;Se.setProperty(Vm,`${ut}px`),Se.setProperty(Hm,`${ht}px`);const Me=Yt(Re).devicePixelRatio||1,{x:Ue,y:Ze,width:Kt,height:Vt}=we.reference,jt=(Math.round((Ue+Kt)*Me)-Math.round(Ue*Me))/Me,Kn=(Math.round((Ze+Vt)*Me)-Math.round(Ze*Me))/Me;Se.setProperty(gR,`${jt}px`),Se.setProperty(mR,`${Kn}px`)}}),cR(Re=>({element:$e.current||_t(Re.elements.floating).createElement("div"),padding:$e.current?y:0}),[y]),{name:"transformOrigin",fn(Re){var vn,Jn,Mn,kr,Fr,Sr;const{elements:{floating:ut},middlewareData:ht,placement:we,platform:Se,rects:Me,y:Ue}=Re,Ze=br(we),Kt=to(we),Vt=Dr(Ze)==="y",jt=$e.current,Kn=typeof u=="function"?u(Wm(Re,l,le)):u;let yn;!jt&&Kt&&Math.abs(Vt?((vn=ht.shift)==null?void 0:vn.x)||0:((Jn=ht.shift)==null?void 0:Jn.y)||0)<=1?yn=Kt==="start"===(Vt&&((Mn=Se.isRTL)==null?void 0:Mn.call(Se,ut))===!0)?"100%":"0%":yn=`${(Vt?((kr=ht.arrow)==null?void 0:kr.x)||0:((Fr=ht.arrow)==null?void 0:Fr.y)||0)+(Vt?(jt==null?void 0:jt.clientWidth)||0:(jt==null?void 0:jt.clientHeight)||0)/2}px`;let Nn=Ze==="top"||Ze==="left"?`calc(100% + ${Kn}px)`:`${-Kn}px`;return Ye&&Vt&&Math.abs(((Sr=ht.shift)==null?void 0:Sr.y)||0)>Kn&&(Nn=`${Me.reference.y+Me.reference.height/2-Ue}px`),ut.style.setProperty(yR,Vt?`${yn} ${Nn}`:`${Nn} ${yn}`),{}}},fR,I),Ae(()=>{!b&&S&&S.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[b,S]);const Rt=v.useMemo(()=>({ancestorScroll:!x,elementResize:!x&&typeof ResizeObserver<"u",layoutShift:!x&&typeof IntersectionObserver<"u"}),[x]),{refs:wt,elements:se,x:ce,y:Be,middlewareData:ge,update:He,placement:lt,context:gt,isPositioned:bt,floatingStyles:Qt}=r({rootContext:S,open:w?b:void 0,placement:oe,middleware:ft,strategy:i,whileElementsMounted:w?void 0:(...Re)=>Sm(...Re,Rt),nodeId:A,externalTree:_}),{sideX:Xt,sideY:jn}=ge.adaptiveOrigin||dR,dn=bt?i:"fixed",pn=v.useMemo(()=>{let Re;return bt?I?Re={position:dn,[Xt]:ce,[jn]:Be}:Re={...Qt,position:dn}:Re={position:dn,top:0,left:0},Re[Vm]="100vw",Re[Hm]="100vh",bt||(Re.opacity=0),Re},[I,dn,Xt,ce,jn,Be,Qt,bt]),nn=v.useRef(null);Ae(()=>{if(!b)return;const Re=H.current,ut=typeof Re=="function"?Re():Re,ht=(Km(ut)?ut.current:ut)||null;ht!==nn.current&&(wt.setPositionReference(ht),nn.current=ht)},[b,wt,K,H]),v.useEffect(()=>{if(!b)return;const Re=H.current;typeof Re!="function"&&Km(Re)&&Re.current!==nn.current&&(wt.setPositionReference(Re.current),nn.current=Re.current)},[b,wt,K,H]),v.useEffect(()=>{if(w&&b&&se.reference&&se.floating)return Sm(se.reference,se.floating,He,Rt)},[w,b,se,He,Rt]);const sn=br(lt),Cn=Tv(l,sn,le),Ut=to(lt)||"center",hn=!!((ue=ge.hide)!=null&&ue.referenceHidden);Ae(()=>{P&&b&&bt&&(sn!==Z||U&&Ut!==X)&&V(lt)},[P,U,b,bt,lt,sn,Ut,Z,X]);const At=v.useMemo(()=>{var Re,ut;return{position:"absolute",top:(Re=ge.arrow)==null?void 0:Re.y,left:(ut=ge.arrow)==null?void 0:ut.x}},[ge.arrow]),z=((ke=ge.arrow)==null?void 0:ke.centerOffset)!==0;return v.useMemo(()=>({positionerStyles:pn,arrowStyles:At,arrowRef:$e,arrowUncentered:z,side:Cn,align:Ut,physicalSide:sn,anchorHidden:hn,refs:wt,context:gt,isPositioned:bt,update:He}),[pn,At,$e,z,Cn,Ut,sn,hn,wt,gt,bt,He])}function Km(e){return e!=null&&"current"in e}function tp(e){return e==="starting"?TE:cn}function Av(e,r,{styles:o,transitionStatus:i,props:l,refs:u,hidden:c,inert:d=!1}){const p={...o};return d&&(p.pointerEvents="none"),Mt("div",e,{state:r,ref:u,props:[{role:"presentation",hidden:c,style:p},tp(i),l],stateAttributesMapping:_l})}const np=v.createContext(void 0);np.displayName="TooltipRootContext";function Nl(e){const r=v.useContext(np);if(r===void 0&&!e)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return r}const Pv=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new cs,currentIdRef:{current:null},currentContextRef:{current:null}});Pv.displayName="FloatingDelayGroupContext";function xR(e,r){e.current=r.current}function wR(e,r={open:!1}){const{open:o}=r,i=e.useState("floatingId"),{currentIdRef:l,delayRef:u,timeoutMs:c,initialDelayRef:d,currentContextRef:p,hasProvider:h,timeout:m}=v.useContext(Pv),[y,x]=v.useState(!1),k=v.useRef(o);return Ae(()=>{k.current=o},[o]),Ae(()=>{function w(){var S;(S=p.current)==null||S.setIsInstantPhase(!1),l.current=null,p.current=null,u.current=d.current,m.clear()}if(l.current&&!o&&l.current===i){if(x(!1),c){const S=i;return m.start(c,()=>{e.select("open")||l.current&&l.current!==S||w()}),()=>{(k.current||l.current!==S)&&m.clear()}}w()}},[o,i,l,u,c,d,p,m,e]),Ae(()=>{if(!o)return;const w=p.current,S=l.current;m.clear(),p.current={onOpenChange:e.setOpen,setIsInstantPhase:x},l.current=i,u.current={open:0,close:Sl(d.current,"close")},S!==null&&S!==i?(x(!0),w==null||w.setIsInstantPhase(!0),w==null||w.onOpenChange(!1,xt(us))):(x(!1),w==null||w.setIsInstantPhase(!1))},[o,i,e,l,u,d,p,m]),Ae(()=>()=>{if(l.current===i){if(p.current=null,!k.current)return;l.current=null,xR(u,d),m.clear()}},[p,l,u,i,d,m]),v.useMemo(()=>({activeIdRef:l,hasProvider:h,delayRef:u,isInstantPhase:y}),[l,h,u,y])}function bR(e,r){let o=null,i=null,l=!1;return{contextElement:e||void 0,getBoundingClientRect(){var k;const u=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c=r.axis==="x"||r.axis==="both",d=r.axis==="y"||r.axis==="both",p=["mouseenter","mousemove"].includes(((k=r.dataRef.current.openEvent)==null?void 0:k.type)||"")&&r.pointerType!=="touch",h=r.axis==="y"?u.width:0,m=r.axis==="x"?u.height:0;let y=u.x,x=u.y;return o==null&&r.x&&c&&(o=u.x-r.x),i==null&&r.y&&d&&(i=u.y-r.y),y-=o||0,x-=i||0,(!l||p)&&(y=c&&r.x!=null?r.x:y,x=d&&r.y!=null?r.y:x),l=!0,{width:h,height:m,x:y,y:x,top:x,right:y+h,bottom:x+m,left:y}}}}function Gm(e){return e!=null&&e.clientX!=null}function kR(e,r={}){const{enabled:o=!0,axis:i="both"}=r,l=e.useState("open"),u=e.useState("floatingElement"),c=e.useState("domReferenceElement"),d=e.context.dataRef,p=v.useRef(!1),h=v.useRef(null),[m,y]=v.useState(),[x,k]=v.useState([]),w=Ie(A=>{e.set("positionReference",A)}),S=Ie((A,I,P)=>{p.current||d.current.openEvent&&!Gm(d.current.openEvent)||e.set("positionReference",bR(P??c,{x:A,y:I,axis:i,dataRef:d,pointerType:m}))}),b=Ie(A=>{l?h.current||(S(A.clientX,A.clientY,A.currentTarget),k([])):S(A.clientX,A.clientY,A.currentTarget)}),C=os(m)?u:l;v.useEffect(()=>{if(!o){w(c);return}if(!C)return;function A(){var _;(_=h.current)==null||_.call(h),h.current=null}const I=Yt(u);function P(_){const N=Rn(_);et(u,N)?A():S(_.clientX,_.clientY)}return!d.current.openEvent||Gm(d.current.openEvent)?h.current=Et(I,"mousemove",P):w(c),A},[C,o,u,d,c,e,S,w,x]),v.useEffect(()=>()=>{e.set("positionReference",null)},[e]),v.useEffect(()=>{o&&!u&&(p.current=!1)},[o,u]),v.useEffect(()=>{!o&&l&&(p.current=!0)},[o,l]);const E=v.useMemo(()=>{function A(I){y(I.pointerType)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:b,onMouseEnter:b}},[b]);return v.useMemo(()=>o?{reference:E,trigger:E}:{},[o,E])}const SR={...Sv,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,r)=>r?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};var ER=class extends Fu{constructor(r,o,i){const l=new Yd;super(RR(r,l,o,i),CR(l),SR);je(this,"setOpen",(r,o)=>{XE(this,r,o,{extraState:{openChangeReason:o.reason}})})}cancelPendingOpen(r){this.state.floatingRootContext.dispatchOpenChange(!1,xt(Ud,r))}};function RR(e,r,o,i=!1){return{...bv(r,o,i),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function CR(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const _v=Wd(function(r){const{disabled:o=!1,defaultOpen:i=!1,open:l,disableHoverablePopup:u=!1,trackCursorAxis:c="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:h,handle:m,triggerId:y,defaultTriggerId:x=null,children:k}=r,w=cv((G,q)=>new ER({open:i,openProp:l,activeTriggerId:x,triggerIdProp:y},G,q));w.useControlledProp("openProp",l),w.useControlledProp("triggerIdProp",y),w.useContextCallback("onOpenChange",p),w.useContextCallback("onOpenChangeComplete",h);const S=w.useState("open"),b=!o&&S,C=w.useState("activeTriggerId"),E=w.useState("mounted"),A=w.useState("payload");w.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:u,disabled:o}),gv(w,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:I,transitionStatus:P}=mv(b,w),_=w.useState("isInstantPhase"),N=w.useState("instantType"),j=w.useState("lastOpenChangeReason"),F=v.useRef(null);Ae(()=>{S&&o&&w.setOpen(!1,xt(qy))},[S,o,w]),Ae(()=>{P==="ending"&&j==="none"||P!=="ending"&&_?(N!=="delay"&&(F.current=N),w.set("instantType","delay")):F.current!==null&&(w.set("instantType",F.current),F.current=null)},[P,_,j,N,w]),Ae(()=>{b&&C==null&&w.set("payload",void 0)},[w,C,b]),v.useImperativeHandle(d,()=>({unmount:I,close:()=>w.setOpen(!1,xt(Vd))}),[I,w]);const M=b||E||!o&&c!=="none";return O.jsxs(np.Provider,{value:w,children:[m&&O.jsx(fv,{handle:m,store:w}),M&&O.jsx(TR,{store:w,disabled:o,trackCursorAxis:c}),typeof k=="function"?k({payload:A}):k]})});_v.displayName="TooltipRoot";function TR({store:e,disabled:r,trackCursorAxis:o}){const i=e.useState("floatingRootContext"),l=Zd(i,{enabled:!r,referencePress:()=>e.select("closeOnClick")}),u=kR(i,{enabled:!r&&o!=="none",axis:o==="none"?void 0:o}),c=v.useMemo(()=>ro(u.reference,l.reference),[u.reference,l.reference]);return yv(e,{activeTriggerProps:c,inactiveTriggerProps:c,popupProps:l.floating??cn}),null}const Ov=v.createContext(void 0);Ov.displayName="TooltipProviderContext";function IR(){return v.useContext(Ov)}const Ym="data-base-ui-tooltip-trigger";function Xm(e){const r=Rn(e);return Ot(r)?r:null}const Nv=nv(function(r,o){const{render:i,className:l,style:u,handle:c,payload:d,disabled:p,delay:h,closeOnClick:m=!0,closeDelay:y,id:x,...k}=r,w=Nl(!0),S=Ev(c)??w;if(!S)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");const b=Kr(x),C=S.useState("isTriggerActive",b),E=S.useState("isOpenedByTrigger",b),A=S.useState("floatingRootContext"),I=v.useRef(null),P=y??0,{registerTrigger:_,isMountedByThisTrigger:N}=hv(b,I,S,{payload:d,closeOnClick:m,closeDelay:P}),j=IR(),{activeIdRef:F,delayRef:M,isInstantPhase:G,hasProvider:q}=wR(A,{open:E}),W=Jd(A);S.useSyncedValue("isInstantPhase",G);const K=S.useState("disabled"),H=p??K,ne=un(H),le=S.useState("trackCursorAxis"),B=S.useState("disableHoverablePopup"),V=v.useRef(!1),U=Qn(),T=v.useRef(void 0);function D(){return q&&F.current!=null?0:h??j??600}function Z(ae){const ve=I.current;if(!ve||!ae)return!1;const De=Ci(ae,`[${Ym}]`);return De!==null&&De!==ve&&et(ve,De)}function X(ae){const ve=Z(ae);return V.current=ve,ve&&(W.openChangeTimeout.clear(),W.restTimeout.clear(),W.restTimeoutPending=!1,U.clear()),ve}const oe=nR(A,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!B&&le!=="both"?sR():null,restMs:D,delay(){return y==null&&q?{close:Sl(M.current,"close")}:{close:P}},triggerElementRef:I,isActiveTrigger:C,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!V.current}}),J=lR(A,{enabled:!H}).reference,re=ae=>{const ve=V.current,De=Xm(ae),_e=X(De),$e=I.current,Te=$e&&De&&et($e,De);if(_e&&S.select("open")&&S.select("lastOpenChangeReason")==="trigger-hover"){S.setOpen(!1,xt(Mr,ae));return}if(ve&&!_e&&Te&&!ne.current&&!S.select("open")&&$e&&os(T.current)){const Ne=()=>{!V.current&&!ne.current&&!S.select("open")&&S.setOpen(!0,xt(Mr,ae,$e))},Qe=D();Qe===0?(U.clear(),Ne()):U.start(Qe,Ne)}},de=S.useState("appliedTriggerProps",N||le!=="none");return Mt("button",r,{state:{open:E},ref:[o,_,I],props:[oe,J,de,{onMouseOver(ae){re(ae.nativeEvent)},onFocus(ae){Z(Xm(ae.nativeEvent))&&ae.preventBaseUIHandler()},onMouseLeave(){V.current=!1,U.clear(),T.current=void 0},onPointerEnter(ae){T.current=ae.pointerType},onPointerDown(ae){T.current=ae.pointerType,S.set("closeOnClick",m),m&&!S.select("open")&&S.cancelPendingOpen(ae.nativeEvent)},onClick(ae){m&&!S.select("open")&&S.cancelPendingOpen(ae.nativeEvent)},id:b,[Jf]:H?"":void 0,[Ym]:H?void 0:""},k],stateAttributesMapping:Bd})});Nv.displayName="TooltipTrigger";const rp=v.createContext(void 0);rp.displayName="TooltipPortalContext";function AR(){const e=v.useContext(rp);if(e===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return e}const Mv=v.forwardRef(function(r,o){const{keepMounted:i=!1,...l}=r;return Nl().useState("mounted")||i?O.jsx(rp.Provider,{value:i,children:O.jsx(Rv,{ref:o,...l})}):null});Mv.displayName="TooltipPortal";const op=v.createContext(void 0);op.displayName="TooltipPositionerContext";function Lv(){const e=v.useContext(op);if(e===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return e}const Dv=v.forwardRef(function(r,o){const{render:i,className:l,anchor:u,positionMethod:c="absolute",side:d="top",align:p="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:y="clipping-ancestors",collisionPadding:x=5,arrowPadding:k=5,sticky:w=!1,disableAnchorTracking:S=!1,collisionAvoidance:b=PE,style:C,...E}=r,A=Nl(),I=AR(),P=A.useState("open"),_=A.useState("mounted"),N=A.useState("trackCursorAxis"),j=A.useState("disableHoverablePopup"),F=A.useState("floatingRootContext"),M=A.useState("instantType"),G=A.useState("transitionStatus"),q=A.useState("adaptiveOrigin"),W=Iv({anchor:u,positionMethod:c,floatingRootContext:F,mounted:_,side:d,sideOffset:h,align:p,alignOffset:m,collisionBoundary:y,collisionPadding:x,sticky:w,arrowPadding:k,disableAnchorTracking:S,keepMounted:I,collisionAvoidance:b,adaptiveOrigin:q}),K=v.useMemo(()=>({open:P,side:W.side,align:W.align,anchorHidden:W.anchorHidden,instant:N!=="none"?"tracking-cursor":M}),[P,W.side,W.align,W.anchorHidden,N,M]),H=Av(r,K,{styles:W.positionerStyles,transitionStatus:G,props:E,refs:[o,A.useStateSetter("positionerElement")],hidden:!_,inert:!P||N==="both"||j});return O.jsx(op.Provider,{value:W,children:H})});Dv.displayName="TooltipPositioner";const Fv=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,d=Nl(),{side:p,align:h}=Lv(),m=d.useState("open"),y=d.useState("instantType"),x=d.useState("transitionStatus"),k=d.useState("popupProps"),w=d.useState("floatingRootContext"),S=d.useState("disabled"),b=d.useState("closeDelay");_i({open:m,ref:d.context.popupRef,onComplete(){var E,A;m&&((A=(E=d.context).onOpenChangeComplete)==null||A.call(E,!0))}}),eR(w,{enabled:!S,closeDelay:b});const C=d.useStateSetter("popupElement");return Mt("div",r,{state:{open:m,side:p,align:h,instant:y,transitionStatus:x},ref:[o,d.context.popupRef,C],props:[Qd,k,tp(x),c],stateAttributesMapping:zy})});Fv.displayName="TooltipPopup";const zv=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,d=Nl(),{arrowRef:p,side:h,align:m,arrowUncentered:y,arrowStyles:x}=Lv(),k={open:d.useState("open"),side:h,align:m,uncentered:y,instant:d.useState("instantType")};return Mt("div",r,{state:k,ref:[o,p],props:[{style:x,"aria-hidden":!0},c],stateAttributesMapping:_l})});zv.displayName="TooltipArrow";function wu({content:e,children:r,align:o,asChild:i,render:l,side:u,className:c,container:d,closeDelay:p,delay:h,...m}){const y=Pd(),x=d??y??void 0,k=l??(i?r:void 0),w=k!==void 0,S=!w&&m.disabled?-1:void 0;return O.jsxs(_v,{...m,children:[O.jsx(Nv,{closeDelay:p,delay:h,className:Xe(!w&&"m-0 inline-flex h-auto min-h-0 items-center border-none bg-transparent p-0 shadow-none","cursor-default",c),render:k,tabIndex:S,children:i?void 0:r}),O.jsx(Mv,{container:x,children:O.jsx(Dv,{align:o,side:u,sideOffset:10,className:"max-w-[var(--available-width)]",children:O.jsxs(Fv,{className:Xe("flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default","shadow-md outline outline-kumo-line","transition-[transform,scale,opacity] duration-150","data-[starting-style]:scale-90 data-[starting-style]:opacity-0","data-[ending-style]:scale-90 data-[ending-style]:opacity-0","data-[instant]:duration-0","kumo-tooltip-popup"),children:[O.jsx(zv,{className:Xe("flex","data-[side=bottom]:top-[-8px]","data-[side=left]:right-[-13px] data-[side=left]:rotate-90","data-[side=right]:left-[-13px] data-[side=right]:-rotate-90","data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"),children:O.jsx(PR,{})}),e]})})})]})}function PR(e){return O.jsxs("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",...e,children:[O.jsx("path",{d:"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",className:"fill-kumo-base"}),O.jsx("path",{d:"M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",className:"fill-kumo-arrow-edge"}),O.jsx("path",{d:"M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",className:"fill-kumo-arrow-stroke"})]})}const _R=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M80,176h96l-48,48ZM128,32,80,80h96Z",opacity:"0.2"}),v.createElement("path",{d:"M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"}))]]),OR=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),v.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),NR=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),v.createElement("path",{d:"M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),MR=v.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),zu=v.forwardRef((e,r)=>{const{alt:o,color:i,size:l,weight:u,mirrored:c,children:d,weights:p,...h}=e,{color:m="currentColor",size:y,weight:x="regular",mirrored:k=!1,...w}=v.useContext(MR);return v.createElement("svg",{ref:r,xmlns:"http://www.w3.org/2000/svg",width:l??y,height:l??y,fill:i??m,viewBox:"0 0 256 256",transform:c||k?"scale(-1, 1)":void 0,...w,...h},!!o&&v.createElement("title",null,o),d,p.get(u??x))});zu.displayName="IconBase";const jv=v.forwardRef((e,r)=>v.createElement(zu,{ref:r,...e,weights:_R}));jv.displayName="CaretUpDownIcon";const Bv=v.forwardRef((e,r)=>v.createElement(zu,{ref:r,...e,weights:OR}));Bv.displayName="CheckIcon";const $v=v.forwardRef((e,r)=>v.createElement(zu,{ref:r,...e,weights:NR}));$v.displayName="InfoIcon";const LR=$v,Ua={shape:{base:{classes:"",description:"Default rectangular button shape"},square:{classes:"items-center justify-center p-0",description:"Square button for icon-only actions"},circle:{classes:"items-center justify-center p-0 rounded-full",description:"Circular button for icon-only actions"}},size:{xs:{classes:"h-5 gap-1 rounded-sm px-1.5 text-xs",description:"Extra small button for compact UIs"},sm:{classes:"h-6.5 gap-1 rounded-md px-2 text-xs",description:"Small button for secondary actions"},base:{classes:"h-9 gap-1.5 rounded-lg px-3 text-base leading-5",description:"Default button size"},lg:{classes:"h-10 gap-2 rounded-lg px-4 text-base leading-5",description:"Large button for primary CTAs"}},compactSize:{xs:{classes:"size-3.5"},sm:{classes:"size-6.5"},base:{classes:"size-9"},lg:{classes:"size-10"}},variant:{primary:{classes:"relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50",description:"High-emphasis button for primary actions"},secondary:{classes:"bg-kumo-base !text-kumo-default ring not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-line data-[state=open]:bg-kumo-base",description:"Default button style for most actions"},ghost:{classes:"text-kumo-default hover:bg-kumo-tint shadow-none",description:"Minimal button with no background"},destructive:{classes:"relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50",description:"Danger button for destructive actions like delete"},"secondary-destructive":{classes:"bg-kumo-base !text-kumo-danger ring not-disabled:hover:!text-kumo-danger not-disabled:hover:ring-kumo-danger/30 disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base",description:"Secondary button with destructive text for less prominent dangerous actions"},outline:{classes:"bg-transparent text-kumo-default ring ring-kumo-line transition-colors not-disabled:hover:text-kumo-strong not-disabled:hover:ring-kumo-focus/25",description:"Bordered button with transparent background"}}},_s={shape:"base",size:"base",variant:"secondary"};function sp({variant:e=_s.variant,size:r=_s.size,shape:o=_s.shape}={}){const i=o==="square"||o==="circle";return Xe("group flex w-max shrink-0 items-center font-medium select-none","border-0 shadow-xs","focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand","cursor-pointer","disabled:cursor-not-allowed disabled:text-kumo-subtle",_n(Ua.size,r,_s.size).classes,_n(Ua.shape,o,_s.shape).classes,i&&_n(Ua.compactSize,r,_s.size).classes,_n(Ua.variant,e,_s.variant).classes)}const DR={xs:"pl-1",sm:"pl-1.5",base:"pl-2.5",lg:"pl-3.5"},Uv=(e,r,o,i)=>{const l=Po.Children.toArray(i).some(u=>u!=="");if(!(e!=="base"||!l||o==null))return DR[r]},Vv=e=>{const r=ly(e);return r?Po.isValidElement(r)?r:O.jsx(r,{}):null},Hv=e=>{if(e==="primary")return"var(--color-kumo-brand)";if(e==="destructive")return"var(--color-kumo-danger)"},Wv=e=>{const r=Hv(e);if(r)return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${r}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${r}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${r}, white 15%)`,"--kumo-button-emphasis-gradient-end":r}},FR=new Set(["href","target","rel","download","hrefLang","media","ping","referrerPolicy","linksExternal"]),zR=e=>{const r={...e};for(const o of Object.keys(r))(o.startsWith("on")||FR.has(o))&&delete r[o];return r},Kv=(e,r,o)=>{const i=o!=null?O.jsx("span",{className:"contents",children:o}):null;return Hv(e)?O.jsxs(O.Fragment,{children:[O.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 rounded-[inherit] bg-linear-to-b from-(--kumo-button-emphasis-gradient-start) to-(--kumo-button-emphasis-gradient-end) shadow-[inset_0_1px_0_0_var(--kumo-button-emphasis-bg)] group-hover:from-(--kumo-button-emphasis-bg)"}),O.jsxs("span",{className:"relative flex items-center gap-1.5",children:[r,i]})]}):O.jsxs(O.Fragment,{children:[r,i]})},jR=e=>{if(typeof e=="string")return e;if(typeof e=="number")return String(e)},ns=Po.forwardRef(({children:e,className:r,disabled:o,loading:i,shape:l="base",size:u="base",variant:c="secondary",icon:d,style:p,title:h,...m},y)=>{const{type:x,...k}=m,w=Wv(c),S=jR(h),b={...k,...!Po.Children.count(e)&&!k["aria-label"]&&!k["aria-labelledby"]&&S&&{"aria-label":S}},C=i?O.jsx(by,{size:u==="lg"?16:14}):Vv(d),E=O.jsx("button",{ref:y,"data-kumo-component":"Button",className:Xe(sp({variant:c,size:u,shape:l}),Uv(l,u,C,e),o&&"cursor-not-allowed opacity-50",r),disabled:i||o,style:w?{...w,...p}:p,type:x??"button",...b,children:Kv(c,C,e)});return h&&(o||i)?O.jsx(wu,{content:h,render:O.jsx("span",{className:"inline-flex"}),children:E}):h?O.jsx(wu,{content:h,render:E}):E});ns.displayName="Button";const Gv=Po.forwardRef(({children:e,className:r,disabled:o=!1,external:i,href:l,shape:u="base",size:c="base",variant:d="ghost",icon:p,style:h,title:m,...y},x)=>{const k=ay(),w=Wv(d),S=i?{target:"_blank",rel:"noopener noreferrer"}:{};if(o)return O.jsx(ns,{...zR(y),className:Xe("select-text",r),"data-kumo-component":"LinkButton",disabled:!0,icon:p,shape:u,size:c,style:h,title:m,variant:d,children:e});const b=Vv(p),C=O.jsx(k,{ref:x,"data-kumo-component":"LinkButton",className:Xe(sp({variant:d,size:c,shape:u}),Uv(u,c,b,e),"flex items-center no-underline! select-text",r),href:l,style:w?{...w,...h}:h,to:typeof l=="string"?l:void 0,...S,...y,children:Kv(d,b,e)});return m?O.jsx(wu,{content:m,render:C}):C});Gv.displayName="LinkButton";const sd=v.createContext({variant:"default",size:"sm"}),BR={default:{accent:"var(--color-kumo-info)",secondary:"text-inherit ring-kumo-info/50 fill-kumo-info hover:!text-inherit hover:!ring-kumo-info/50 hover:bg-kumo-info/10",ghost:"text-inherit fill-kumo-info hover:bg-kumo-info/10"},alert:{accent:"var(--color-kumo-warning)",secondary:"text-inherit ring-kumo-warning/50 fill-kumo-warning hover:!text-inherit hover:!ring-kumo-warning/50 hover:bg-kumo-warning/10",ghost:"text-inherit fill-kumo-warning hover:bg-kumo-warning/10"},error:{accent:"var(--color-kumo-danger)",secondary:"text-inherit ring-kumo-danger/50 fill-kumo-danger hover:!text-inherit hover:!ring-kumo-danger/50 hover:bg-kumo-danger/10",ghost:"text-inherit fill-kumo-danger hover:bg-kumo-danger/10"},secondary:{accent:"var(--color-neutral-700, oklch(37.1% 0 0))",secondary:"text-inherit ring-kumo-focus/20 fill-kumo-subtle hover:!text-inherit hover:!ring-kumo-focus/20 hover:bg-kumo-contrast/10",ghost:"text-inherit fill-kumo-subtle hover:bg-kumo-contrast/10"}};function $R(e){return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${e}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${e}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${e}, white 15%)`,"--kumo-button-emphasis-gradient-end":e}}const Yv=v.forwardRef(function(r,o){const i=v.useContext(sd),l=r.variant??"primary",u=BR[i.variant],c={variant:l==="secondary"?"outline":l,size:i.size,className:Xe(l!=="primary"&&u[l],r.className),style:l==="primary"?{...$R(u.accent),...r.style}:r.style};return r.href!==void 0?O.jsx(Gv,{ref:o,...r,...c}):O.jsx(ns,{ref:o,...r,...c})});Yv.displayName="Banner.Action";const UR="flex w-full",id={variant:{default:{classes:"bg-kumo-info-tint text-kumo-info",iconClasses:"fill-kumo-info",description:"Informational banner for general messages"},alert:{classes:"bg-kumo-warning-tint text-kumo-warning",iconClasses:"fill-kumo-warning",description:"Warning banner for cautionary messages"},error:{classes:"bg-kumo-danger-tint text-kumo-danger",iconClasses:"fill-kumo-danger",description:"Error banner for critical issues"},secondary:{classes:"bg-kumo-contrast/5 text-kumo-default/70",iconClasses:"fill-kumo-interact",description:"Neutral banner for secondary messages"}},size:{base:{classes:"items-start gap-3 rounded-lg px-4 py-3 text-base",description:"Default banner size"},sm:{classes:"items-center gap-2 rounded-md px-3 py-2 text-sm",description:"Compact banner for dialogs and tight spaces"}}},Ls={variant:"default",size:"base"},VR={base:{row:"gap-3",icon:"h-[1.375em]",description:"text-sm",action:"sm"},sm:{row:"gap-2",icon:"h-[1.25em]",description:"text-sm",action:"xs"}};function qm({variant:e=Ls.variant,size:r=Ls.size}={}){const o=_n(id.variant,e,Ls.variant),i=_n(id.size,r,Ls.size);return Xe(UR,o.classes,i.classes)}const Xv=v.forwardRef(function({icon:r,title:o,description:i,action:l,children:u,text:c,variant:d=Ls.variant,size:p=Ls.size,className:h,...m},y){const x=_n(id.variant,d,Ls.variant),k=VR[p],w=p==="sm",S=w&&v.isValidElement(l)&&l.type===Ik;if(o||i)return O.jsx(sd.Provider,{value:{variant:d,size:k.action},children:O.jsxs("div",{ref:y,className:Xe(qm({variant:d,size:p}),h),...m,children:[r&&O.jsx("span",{className:Xe("flex shrink-0 items-center",k.icon,x.iconClasses),children:r}),O.jsxs("div",{className:Xe("flex min-w-0 flex-1 items-center justify-between",k.row,!o&&"pt-px"),children:[w?O.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1.5",children:[o&&O.jsxs("span",{className:"leading-snug font-medium",children:[o,!i&&S&&O.jsx("span",{className:"ml-1.5 [&_[data-kumo-component=Link]]:inline",children:l})]}),i&&O.jsxs("span",{className:Xe(k.description,"leading-snug"),children:[i,S&&O.jsx("span",{className:"ml-1.5 [&_[data-kumo-component=Link]]:inline",children:l})]})]}):O.jsxs("div",{className:"flex flex-col gap-0.5",children:[o&&O.jsx("p",{className:"leading-snug font-medium",children:o}),i&&O.jsx("div",{className:Xe(k.description,"leading-snug"),children:v.isValidElement(i)?i:O.jsx("p",{children:i})})]}),!S&&l!=null&&O.jsx("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})});const b=u??c,C=v.isValidElement(b)?b:O.jsx("p",{children:b});return O.jsx(sd.Provider,{value:{variant:d,size:k.action},children:O.jsxs("div",{ref:y,className:Xe(qm({variant:d,size:p}),h),...m,children:[r&&O.jsx("span",{className:Xe("shrink-0",x.iconClasses),children:r}),C]})})});Xv.displayName="Banner";const Zm=Object.assign(Xv,{Action:Yv}),HR={label:{optional:"(optional)",tooltip:"More information"},layerDialog:{close:"Close",cancel:"Cancel"}},WR=v.createContext(HR);function KR(){return v.useContext(WR)}function GR(e={}){return Xe("m-0 text-base font-medium text-kumo-default")}function Qm(){return Xe("inline-flex items-center gap-1")}function ip({children:e,showOptional:r=!1,optionalLabel:o,tooltip:i,tooltipAriaLabel:l,className:u,htmlFor:c,asContent:d=!1}){const{label:p}=KR(),h=o===void 0?p.optional:o,m=l??p.tooltip,y=O.jsxs(O.Fragment,{children:[e,r&&O.jsx("span",{className:"font-normal text-kumo-subtle",children:h}),i&&O.jsx(wu,{content:i,render:O.jsx(ns,{variant:"ghost",size:"xs",shape:"square","aria-label":m,children:O.jsx(LR,{className:"size-4"})})})]});return d?O.jsx("span",{className:Xe(Qm(),u),children:y}):O.jsx("label",{htmlFor:c,className:Xe(GR(),Qm(),u),children:y})}ip.displayName="Label";const qv=v.createContext(void 0);qv.displayName="FieldsetRootContext";function YR(e=!1){const r=v.useContext(qv);if(!r&&!e)throw new Error("Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.");return r}function XR(e,r){const o=Kr(e);return Ae(()=>(r(o),()=>{r(i=>i===o?void 0:i)}),[o,r]),o}const qR="data-valid",ZR="data-invalid",ju={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},QR={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},JR={disabled:!1,...QR},Us={valid(e){return e===null?null:e?{[qR]:""}:{[ZR]:""}}},eC={invalid:void 0,name:void 0,validityData:{state:ju,errors:[],error:"",value:"",initialValue:null},setValidityData:on,disabled:void 0,setTouched:on,setDirty:on,setFilled:on,setFocused:on,focusOwnerRef:{current:void 0},validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:JR,registerFieldControl:on,validation:{getValidationProps:(e,r=cn)=>r,inputRef:{current:null},registeredInputs:new Map,registerInput:on,getInputControl:()=>null,commit:async()=>{},change:on}},lp=v.createContext(eC);lp.displayName="FieldRootContext";function No(e=!0){const r=v.useContext(lp);if(r.setValidityData===on&&!e)throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");return r}const ap=v.createContext({controlId:void 0,registerControlId:on,resetControlId:on,labelId:void 0,setLabelId:on,messageIds:[],setMessageIds:on,getDescriptionProps:e=>e});ap.displayName="LabelableContext";function Mo(){return v.useContext(ap)}const Zv=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:on,validationMode:"onSubmit",submitCountRef:{current:0}});Zv.displayName="FormContext";function Oi(){return v.useContext(Zv)}function Qv(e={}){const{id:r,fallbackControlId:o,native:i=!1,setLabelId:l,focusControl:u}=e,{controlId:c,setLabelId:d}=Mo(),p=Ie(k=>{d(k),l==null||l(k)}),h=XR(r,p),m=c??o;function y(k){if(u){u(k,m);return}if(!m)return;const w=tC(k.currentTarget,m);$t(w)&&nC(w)}function x(k){const w=Rn(k.nativeEvent);Ci(w,"button,input,select,textarea")||(!k.defaultPrevented&&k.detail>1&&k.preventDefault(),!i&&y(k))}return i?{id:h,htmlFor:m,onMouseDown:x}:{id:h,onClick:x,onPointerDown(k){k.preventDefault()}}}function tC(e,r){let o=e.getRootNode();for(;ls(o);){const i=o.getElementById(r);if(i)return i;o=o.host.getRootNode()}return _t(e).getElementById(r)}function nC(e){e.focus({focusVisible:!0})}function ld(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}const Ff=Object.keys(ju);function rC(e,r){return e.matches(":disabled")?!1:!r||e.form===r?!0:e.form===null&&!e.hasAttribute("form")}function Jm(e,r){let o=null;for(const i of e.keys())if(rC(i,r)){if(!i.validity.valid)return i;o??(o=i)}return o}function e0(e){return{...ju,valid:!e,customError:e}}function zf(e){return e&&e.validationMessage?[e.validationMessage]:[]}function oC(e){const{elementRef:r,formRef:o}=Oi(),{setValidityData:i,validate:l,validityData:u,validationDebounceTime:c,invalid:d,markedDirtyRef:p,state:h,shouldValidateOnChange:m,validationMode:y,registeredFieldIdRef:x}=e,{controlId:k,getDescriptionProps:w}=Mo(),S=Qn(),b=v.useRef(null),C=On(()=>new Map).current,E=v.useRef(0),A=v.useRef(null),I=v.useCallback((F,M)=>(C.set(F,M),()=>{C.delete(F)}),[C]),P=Ie(()=>{var M;const F=Jm(C,r.current);return F&&((M=C.get(F))==null?void 0:M.controlRef.current)||null}),_=Ie(async(F,M=!1)=>{E.current+=1;const G=E.current;function q(X,oe=d){const J=x.current??k;if(J==null)return;const re=o.current.fields.get(J);if(!re)return;const de=ld(X,oe);o.current.fields.set(J,{...re,validityData:de})}function W(X,oe){const J=X.valid===!1?oe:[];return{value:F,state:X,error:J[0]??"",errors:J,initialValue:u.initialValue}}function K(X,oe){const J=X.validity.customError?X.validationMessage:"",re=oe.replace(/\r\n?/g,`
|
|
139
|
+
`);X.setCustomValidity(re),A.current=[X,re,J]}function H(){const X=A.current;A.current=null,X&&(!X[0].willValidate||X[0].validationMessage===X[1])&&X[0].setCustomValidity(X[2])}function ne(X,oe,J){const re=W(X,oe);q(re,J),i(re)}function le(X){const oe=Ff.reduce((re,de)=>(re[de]=X.validity[de],re),{});let J=!1;for(const re of Ff)if(re!=="valid"){if(re==="valueMissing"&&oe[re])J=!0;else if(oe[re])return oe}return J&&!p.current&&(oe.valid=!0,oe.valueMissing=!1),oe}function B(){return C.size>0?Jm(C,r.current):b.current}let V=B();function U(){return V=B(),V!=null&&V.willValidate?le(V):e0(!1)}if(M){if(h.valid!==!1||!V)return;if(!V.validity.valueMissing){H();const X=B(),oe=X!=null&&X.validity.customError?zf(X):[];ne(e0(oe.length>0),oe,!1);return}for(const X of Ff)if(X!=="valid"&&X!=="valueMissing"&&X!=="customError"&&V.validity[X])return}S.clear(),H();let T=U(),D=zf(V);const Z=m();if(D.length===0||Z){const X=Array.from(o.current.fields.values()).reduce((re,de)=>(de.name&&(re[de.name]=de.getValue()),re),{}),oe=l(F,X);let J;if(typeof oe=="object"&&oe!==null&&"then"in oe){if(T.valid===!1?ne(T,D):(y==="onSubmit"||!u.state.customError)&&(T.valid=null,ne(T,D)),J=await oe,G!==E.current)return;T=U()}else J=oe;D=J?[].concat(J).filter(Boolean):[],D.length>0?(T.valid=!1,T.customError=!0,V!=null&&V.willValidate&&K(V,D.join(`
|
|
140
|
+
`))):D=zf(V)}ne(T,D)}),N=Ie((F,M=!1)=>{if(S.clear(),E.current+=1,M)return;const G=m();G&&F!==""&&c?S.start(c,()=>{_(F)}):_(F,!G)}),j=v.useCallback((F,M={})=>ro(w(M),h.valid===!1&&!h.disabled&&!F?{"aria-invalid":!0}:cn),[w,h.disabled,h.valid]);return v.useMemo(()=>({getValidationProps:j,inputRef:b,registeredInputs:C,registerInput:I,getInputControl:P,commit:_,change:N}),[j,C,I,P,_,N])}const Ii=fy("error","Base UI"),Jv=v.createContext({disabled:!1});Jv.displayName="FieldItemContext";function e1(){return v.useContext(Jv)}const t1=function(r){const o=Kr(),[i,l]=v.useState(o),[u,c]=v.useState(),[d,p]=v.useState([]),h=i===void 0?o:i,m=On(()=>new Map),{messageIds:y}=Mo(),x=Ie((b,C)=>{const E=m.current;C===void 0?E.delete(b):E.set(b,C),l(A=>{if(E.size===0)return A;let I;for(const P of E.values()){if(P===A)return A;I===void 0&&(I=P)}return I})}),k=Ie(()=>{m.current.size===0&&l(o)}),w=v.useCallback(b=>{const C=b["aria-describedby"]?b["aria-describedby"].split(" "):[];return C.push(...y,...d),{...b,"aria-describedby":Array.from(new Set(C)).join(" ")||void 0}},[y,d]),S=v.useMemo(()=>({controlId:h,registerControlId:x,resetControlId:k,labelId:u,setLabelId:c,messageIds:d,setMessageIds:p,getDescriptionProps:w}),[h,x,k,u,c,d,p,w]);return O.jsx(ap.Provider,{value:S,children:r.children})};t1.displayName="LabelableProvider";function sC(e){const{change:r,commit:o,invalid:i,markedDirtyRef:l,name:u,setRegisteredFieldName:c,registeredFieldIdRef:d,setValidityData:p,validityData:h}=e,{formRef:m}=Oi(),y=v.useRef(null),x=v.useRef(null),k=v.useRef(!1),w=Ie(()=>{const I=x.current;if(I)return I.getValue?I.getValue():I.value});function S(I){return I.value===void 0?w():I.value}const b=Ie(()=>{const I=x.current;if(l.current=!0,!I){o(h.value);return}o(S(I))});function C(){const I=x.current;!I||!I.id||m.current.fields.set(I.id,{getValue:w,name:u??I.name,controlRef:I.controlRef,validityData:ld(h,i),validate:b})}function E(I=(P=>(P=x.current)==null?void 0:P.id)()){I&&m.current.fields.delete(I)}function A(I){if(k.current)return;k.current=!0;const P=S(I);p(_=>_.initialValue===P?_:{..._,initialValue:P})}return Ae(()=>{const I=x.current;!I||!I.id||(c(u?void 0:I.name),m.current.fields.set(I.id,{getValue:w,name:u??I.name,controlRef:I.controlRef,validityData:ld(h,i),validate:b}))},[m,w,i,u,c,b,h]),Ae(()=>{const I=m.current.fields;return()=>{var _;const P=(_=x.current)==null?void 0:_.id;P&&I.delete(P)}},[m]),[b,Ie((I,P)=>{var j;if(!P){y.current===I&&(y.current=null,r(void 0,!0),E(),x.current=null,c(void 0),d.current=void 0);return}const _=(j=x.current)==null?void 0:j.id,N=y.current;N&&N!==I&&r(void 0,!0),y.current=I,x.current=P,u||c(P.name),d.current=P.id,_&&_!==P.id&&E(_),A(P),C()})]}const n1=v.forwardRef(function(r,o){var tt;const{errors:i,validationMode:l,submitCountRef:u}=Oi(),{render:c,className:d,validate:p,validationDebounceTime:h=0,validationMode:m=l,name:y,disabled:x=!1,invalid:k,dirty:w,touched:S,actionsRef:b,style:C,...E}=r,A=(tt=YR(!0))==null?void 0:tt.disabled,I=Ie(p||(()=>null)),P=A||x,[_,N]=v.useState(!1),[j,F]=v.useState(!1),[M,G]=v.useState(!1),[q,W]=v.useState(!1),K=v.useRef(void 0),H=w??j,ne=S??_,le=v.useRef(H),B=v.useRef(void 0),[V,U]=v.useState(),T=y??V;Ae(()=>{w!==void 0&&(le.current=w)},[w]);const D=Ie(ft=>{w===void 0&&(ft&&(le.current=!0),F(ft))}),Z=Ie(ft=>{S===void 0&&N(ft)}),X=Ie(()=>m==="onChange"||m==="onSubmit"&&u.current>0),oe=T&&Object.hasOwn(i,T)?i[T]:null,J=!!(Array.isArray(oe)?oe.length:oe),re=k===!0||J,[de,ae]=v.useState({state:ju,error:"",errors:[],value:null,initialValue:null}),ve=!re&&(P?null:de.state.valid),De=v.useMemo(()=>({disabled:P,touched:ne,dirty:H,valid:ve,filled:M,focused:q}),[P,ne,H,ve,M,q]),_e=oC({setValidityData:ae,validate:I,validityData:de,validationDebounceTime:h,invalid:re,markedDirtyRef:le,state:De,shouldValidateOnChange:X,validationMode:m,registeredFieldIdRef:B}),[$e,Te]=sC({change:_e.change,commit:_e.commit,invalid:re,markedDirtyRef:le,name:y,setRegisteredFieldName:U,registeredFieldIdRef:B,setValidityData:ae,validityData:de});v.useImperativeHandle(b,()=>({validate:$e}),[$e]);const Ne=v.useMemo(()=>({invalid:re,name:T,validityData:de,setValidityData:ae,disabled:P,setTouched:Z,setDirty:D,setFilled:G,setFocused:W,focusOwnerRef:K,validationMode:m,shouldValidateOnChange:X,state:De,registerFieldControl:Te,validation:_e}),[re,T,de,P,Z,D,G,W,m,X,De,Te,_e]),Qe=Mt("div",r,{ref:o,state:De,props:E,stateAttributesMapping:Us});return O.jsx(lp.Provider,{value:Ne,children:Qe})});n1.displayName="FieldRootInner";const r1=v.forwardRef(function(r,o){return O.jsx(t1,{children:O.jsx(n1,{...r,ref:o})})});r1.displayName="FieldRoot";const o1=v.forwardRef(function(r,o){const{render:i,className:l,style:u,id:c,nativeLabel:d=!0,...p}=r,h=No(!1),m=e1(),{labelId:y}=Mo(),x={...h.state,disabled:h.disabled||m.disabled},k=v.useRef(null),w=Qv({id:y??c,native:d});return v.useEffect(()=>{var b,C;if(!k.current)return;const S=k.current.tagName==="LABEL";if(d){if(!S){const E=((b=Zn.captureOwnerStack)==null?void 0:b.call(Zn))||"";Ii(`<Field.Label> expected a <label> element because the \`nativeLabel\` prop is true. Rendering a non-<label> disables native label association, so \`htmlFor\` will not work. Use a real <label> in the \`render\` prop, or set \`nativeLabel\` to \`false\`.${E}`)}}else if(S){const E=((C=Zn.captureOwnerStack)==null?void 0:C.call(Zn))||"";Ii(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${E}`)}},[d]),Mt("label",r,{ref:[o,k],state:x,props:[w,p],stateAttributesMapping:Us})});o1.displayName="FieldLabel";function up(e={}){const{id:r,enabled:o=!0}=e,{controlId:i,registerControlId:l,resetControlId:u}=Mo(),c=Kr(),d=On(()=>Symbol()),p=v.useRef(!1),h=v.useRef(!1),m=Ie(()=>{!p.current||l===on||(p.current=!1,l(d.current,void 0))});return Ae(()=>{if(!o||l===on){m();return}let y;if(r!==void 0)h.current=!0,y=r;else if(h.current)y=c;else{u();return}if(y===void 0){m();return}p.current=!0,l(d.current,y)},[r,o,l,u,c,d,m]),Ae(()=>m,[m]),(o?i:void 0)??r??c}function s1(e,r,o,i,l=!0,u){const{registerFieldControl:c}=No(),d=On(()=>Symbol());Ae(()=>{const p=d.current;if(!l){c(p,void 0);return}c(p,{controlRef:e,getValue:i,id:r,name:u,value:o})},[e,l,i,r,u,c,d,o]),Ae(()=>{const p=d.current;return()=>{c(p,void 0)}},[c,d])}function cp(e,r){const o=v.useRef(e),i=Ie(r);Ae(()=>{o.current!==e&&i(o.current),o.current=e},[e,i])}function ad({controlled:e,default:r,name:o,state:i="value"}){const{current:l}=v.useRef(e!==void 0),[u,c]=v.useState(()=>r),d=l&&e!==void 0?e:u;{v.useEffect(()=>{l!==(e!==void 0)&&Ii([`A component is changing the ${l?"":"un"}controlled ${i} state of ${o} to be ${l?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
141
|
+
`))},[i,o,e]);const{current:p}=v.useRef(r);v.useEffect(()=>{!l&&t0(p)!==t0(r)&&Ii([`A component is changing the default ${i} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
|
|
142
|
+
`))},[r])}return[d,v.useCallback(p=>{l||c(p)},[])]}function t0(e){let r=0;const o=new WeakMap;try{return JSON.stringify(e,function(l,u){if(!(l==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof u=="bigint")return`__bigint__:${u}`;if(u!==null&&typeof u=="object"){const c=o.get(u);if(c!==void 0)return`__object__:${c}`;o.set(u,r),r+=1}return u}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}function iC(e,r,o=Object.is){const{length:i}=e;if(i!==r.length)return!1;for(let l=0;l<i;l+=1)if(!o(e[l],r[l]))return!1;return!0}function i1(e,r,o){const{setFocused:i,focusOwnerRef:l}=No(),u=Ie(c=>{(c?!e:l.current===u)&&(l.current=c&&u,i(c))});return Ae(()=>{var d;const c=r.current;return((d=c==null?void 0:c.getRootNode())==null?void 0:d.activeElement)===c&&u(!0),()=>u(!1)},[e,r,u]),u}const fp=v.createContext(void 0);fp.displayName="CompositeRootContext";function dp(e=!1){const r=v.useContext(fp);if(r===void 0&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return r}function jf(e,r,{detail:o=0,pointerType:i=""}={}){e.dispatchEvent(new(Yt(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:o,pointerType:i,shiftKey:r.shiftKey,ctrlKey:r.ctrlKey,altKey:r.altKey,metaKey:r.metaKey}))}function lC(e){const{focusableWhenDisabled:r,disabled:o,composite:i=!1,tabIndex:l=0,isNativeButton:u}=e,c=i&&r!==!1,d=i&&r===!1;return{props:v.useMemo(()=>{const p={onKeyDown(h){o&&r&&h.key!=="Tab"&&h.preventDefault()}};return i||(p.tabIndex=l,!u&&o&&(p.tabIndex=r?l:-1)),(u&&(r||c)||!u&&o)&&(p["aria-disabled"]=o),u&&(!r||d)&&(p.disabled=o),p},[i,o,r,c,d,u,l])}}function Ml(e={}){const{disabled:r=!1,focusableWhenDisabled:o,tabIndex:i=0,native:l=!0,composite:u}=e,c=v.useRef(null),d=dp(!0),p=u??d!==void 0,{props:h}=lC({focusableWhenDisabled:o,disabled:r,composite:p,tabIndex:i,isNativeButton:l});v.useEffect(()=>{var x,k;if(!c.current)return;const y=Va(c.current);if(l){if(!y){const w=((x=Zn.captureOwnerStack)==null?void 0:x.call(Zn))||"";Ii(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${w}`)}}else if(y){const w=((k=Zn.captureOwnerStack)==null?void 0:k.call(Zn))||"";Ii(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${w}`)}},[l]);const m=v.useCallback(()=>{const y=c.current;Va(y)&&p&&r&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[r,h.disabled,p]);return Ae(m,[m]),{getButtonProps:v.useCallback((y={})=>{const{onClick:x,onMouseDown:k,onKeyUp:w,onKeyDown:S,onPointerDown:b,...C}=y;return ro({onClick(E){if(r){E.preventDefault();return}x==null||x(E)},onMouseDown(E){r||k==null||k(E)},onKeyDown(E){if(r||(du(E),S==null||S(E),E.baseUIHandlerPrevented))return;const A=E.target===E.currentTarget,I=E.currentTarget,P=Va(I),_=!l&&aC(I),N=A&&(l?P:!_),j=E.key==="Enter",F=E.key===" ",M=I.getAttribute("role"),G=(M==null?void 0:M.startsWith("menuitem"))||M==="option"||M==="gridcell";if(A&&p&&F){if(E.defaultPrevented&&G)return;E.preventDefault(),(!l||P)&&(E.preventBaseUIHandler(),jf(I,E));return}if(!N||l||!F&&!j){A&&_&&F&&E.preventDefault();return}E.defaultPrevented||(E.preventDefault(),j&&(E.preventBaseUIHandler(),jf(I,E)))},onKeyUp(E){if(!r){if(du(E),w==null||w(E),E.target===E.currentTarget&&l&&p&&Va(E.currentTarget)&&E.key===" "){E.preventDefault();return}E.baseUIHandlerPrevented||E.target===E.currentTarget&&!l&&!p&&!E.defaultPrevented&&E.key===" "&&(E.preventBaseUIHandler(),jf(E.currentTarget,E))}},onPointerDown(E){if(r){E.preventDefault();return}b==null||b(E)}},l?{type:"button"}:{role:"button"},h,C)},[r,h,p,l]),buttonRef:Ie(y=>{c.current=y,m()})}}function Va(e){return $t(e)&&e.tagName==="BUTTON"}function aC(e){return $t(e)&&e.tagName==="A"&&!!e.href}function uC(e){const{open:r=!1,onOpenChange:o,elements:i={}}=e,l=Mu(),u=Lu()!=null;{const d=i.reference;d&&!Ot(d)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const c=On(()=>new iv({open:r,transitionStatus:void 0,onOpenChange:o,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new Yd,floatingId:l,syncOnly:!1,nested:u})).current;return Ae(()=>{const d={open:r,floatingId:l};i.reference!==void 0&&(d.referenceElement=i.reference,d.domReferenceElement=Ot(i.reference)?i.reference:null),i.floating!==void 0&&(d.floatingElement=i.floating),c.update(d)},[r,l,i.reference,i.floating,c]),c.context.onOpenChange=o,c.context.nested=u,c}function l1(e){return Ru(19)?e:e?"true":void 0}function gl(e,r=Number.MIN_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,o))}function cC(e,r){const o=(r??Yt(e).getComputedStyle(e)).transform;let i=0,l=0,u=1;if(o&&o!=="none"){const c=o.match(/matrix(?:3d)?\(([^)]+)\)/);if(c){const d=c[1].split(", ").map(parseFloat);d.length===6?(i=d[4],l=d[5],u=Math.sqrt(d[0]*d[0]+d[1]*d[1])):d.length===16&&(i=d[12],l=d[13],u=d[0])}}return{x:i,y:l,scale:u}}const fC={...Us,...Pl},a1=v.forwardRef(function(r,o){const{render:i,id:l,className:u,match:c,style:d,...p}=r,h=Kr(l),{validityData:m,state:y,name:x}=No(!1),{setMessageIds:k}=Mo(),{errors:w}=Oi(),S=x&&Object.hasOwn(w,x)?w[x]:null,b=!!(Array.isArray(S)?S.length:S),C=typeof c=="string";let E=!1;c===!0?E=!0:y.disabled?E=!1:C?E=!!m.state[c]:E=b||m.state.valid===!1;const{mounted:A,transitionStatus:I,setMounted:P}=qd(E);Ae(()=>{if(!(!E||!h))return k(ne=>ne.concat(h)),()=>{k(ne=>ne.filter(le=>le!==h))}},[E,h,k]);const _=v.useRef(null),[N,j]=v.useState(null),[F,M]=v.useState(null);let G=m.error;!C&&b?G=S:m.errors.length>1&&(G=m.errors);let q=G;Array.isArray(G)&&(q=G.length>1?O.jsx("ul",{children:G.map(ne=>O.jsx("li",{children:ne},ne))}):G[0]);const W=Array.isArray(G)?JSON.stringify(G):G;E&&W!==F&&(M(W),j(q)),_i({open:E,ref:_,onComplete(){E||P(!1)}});const K={...y,transitionStatus:I},H=Mt("div",r,{ref:[o,_],state:K,props:[{id:h,children:E?q:N},p],stateAttributesMapping:fC,enabled:A});return A?H:null});a1.displayName="FieldError";const u1=v.forwardRef(function(r,o){const{render:i,id:l,className:u,style:c,...d}=r,p=Kr(l),h=No(!1),m=e1(),{setMessageIds:y}=Mo(),x={...h.state,disabled:h.disabled||m.disabled};return Ae(()=>{if(p)return y(k=>k.concat(p)),()=>{y(k=>k.filter(w=>w!==p))}},[p,y]),Mt("p",r,{ref:o,state:x,props:[{id:p},d],stateAttributesMapping:Us})});u1.displayName="FieldDescription";function dC(e){if(e)return typeof e=="string"?{message:e,match:!0}:e}function pC({controlFirst:e=!1}={}){return Xe("grid gap-2","has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center","has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center",e&&["has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center","has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center","[&>label]:flex-1"])}function n0(e){return e==null||typeof e=="boolean"||e===""}function c1({children:e,label:r,required:o,labelTooltip:i,error:l,description:u,controlFirst:c=!1,hideLabel:d=!1}){const p=o===!1,h=!n0(r)||p||!n0(i);return O.jsxs(r1,{className:pC({controlFirst:c}),children:[!d&&h&&O.jsx(o1,{className:"m-0 text-base font-medium text-kumo-default select-none",children:O.jsx(ip,{showOptional:p,tooltip:i,asContent:!0,children:r})}),e,l?O.jsx(a1,{className:Xe("text-sm leading-snug text-kumo-danger","col-span-full"),match:l.match,children:l.message}):u&&O.jsx(u1,{className:Xe("text-sm leading-snug text-kumo-subtle","col-span-full"),children:u})]})}const f1=v.forwardRef(function(r,o){const{render:i,className:l,id:u,name:c,value:d,disabled:p=!1,onValueChange:h,defaultValue:m,autoFocus:y=!1,style:x,...k}=r,{state:w,name:S,disabled:b,setTouched:C,setDirty:E,validityData:A,setFilled:I,validationMode:P,validation:_}=No(),{clearErrors:N,elementRef:j,submitCountRef:F}=Oi(),M=b||p,G=S??c,q={...w,disabled:M},{labelId:W}=Mo(),K=up({id:u}),H=d!==void 0,ne=d==null?void 0:String(d),le=Ie(()=>{var T;return(T=_.inputRef.current)==null?void 0:T.value});s1(_.inputRef,K,ne,le,!M,c),Ae(()=>{var D;const T=ne??((D=_.inputRef.current)==null?void 0:D.value);T!==void 0&&I(T!=="")},[ne,m,_.inputRef,I]),cp(ne,()=>{ne!==void 0&&(N(G),E(ne!==(A.initialValue??"")),_.change(ne))});const B=v.useRef(null),V=i1(M,B),U=Qn();return Mt("input",r,{ref:[o,B],state:q,props:[{id:K,disabled:M,name:G,ref:_.inputRef,"aria-labelledby":W,autoFocus:y,...H?{value:d}:{defaultValue:m},onChange(T){const D=T.currentTarget.value,Z=xt(us,T.nativeEvent);h==null||h(D,Z),!H&&(E(D!==(A.initialValue??"")),I(D!==""),!T.nativeEvent.defaultPrevented&&!Z.isCanceled&&(N(G),_.change(D)))},onFocus(){V(!0)},onBlur(T){if(C(!0),V(!1),P==="onBlur"){const D=T.currentTarget.value;_.commit(D),H&&queueMicrotask(()=>{var X;const Z=(X=_.inputRef.current)==null?void 0:X.value;Z!==void 0&&Z!==D&&Z!==(A.initialValue??"")&&_.commit(Z)})}},onKeyDown(T){if(T.currentTarget.tagName==="INPUT"&&T.key==="Enter"){C(!0);const D=T.currentTarget.value,Z=T.currentTarget.form;if(Z&&Z===j.current&&!T.defaultPrevented){const X=T.currentTarget,oe=F.current;U.start(0,()=>{F.current===oe&&_.commit(X.value)})}else _.commit(D)}}},k,T=>_.getValidationProps(M,T)],stateAttributesMapping:Us})});f1.displayName="FieldControl";const d1=v.forwardRef(function(r,o){return O.jsx(f1,{ref:o,...r})});d1.displayName="Input";const r0={size:{xs:{classes:"h-5 gap-1 rounded-sm px-1.5 text-xs",description:"Extra small input for compact UIs"},sm:{classes:"h-6.5 gap-1 rounded-md px-2 text-xs",description:"Small input for secondary fields"},base:{classes:"h-9 gap-1.5 rounded-lg px-3 text-base",description:"Default input size"},lg:{classes:"h-10 gap-2 rounded-lg px-4 text-base",description:"Large input for prominent fields"}},variant:{default:{classes:"focus:ring-kumo-focus/50 focus:ring-[1.5px]",description:"Default input appearance"},error:{classes:"!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]",description:"Error state for validation failures"}}},Ha={size:"base",variant:"default"};function hC({variant:e=Ha.variant,size:r=Ha.size,parentFocusIndicator:o=!1,focusIndicator:i=!1}={}){return Xe("border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-hidden","kumo-input-placeholder disabled:text-kumo-inactive",_n(r0.size,r,Ha.size).classes,_n(r0.variant,e,Ha.variant).classes,o&&"has-focus-visible:outline-hidden",o&&(e==="error"?"focus-within:ring-[1.5px] focus-within:ring-kumo-danger/50":"focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50"),i&&(e==="error"?"focus:ring-[1.5px] focus:ring-kumo-danger/50":"focus:ring-[1.5px] focus:ring-kumo-focus/50"))}const p1=v.forwardRef((e,r)=>{const{className:o,size:i="base",variant:l,label:u,labelTooltip:c,description:d,error:p,passwordManagerIgnore:h=!1,...m}=e;l==="error"&&console.warn('[Kumo Input]: variant="error" is deprecated. Error styling is now automatically applied when the `error` prop is truthy. Simply remove the variant prop and pass an error message instead.');const y=l??(p?"error":"default"),{required:x}=m;{const w=!!u,S=!!m["aria-label"],b=!!m["aria-labelledby"];!w&&!S&&!b&&console.warn(`[Kumo Input]: Input must have an accessible name. Provide either:
|
|
143
|
+
- label prop: <Input label='Email' />
|
|
144
|
+
- aria-label: <Input aria-label='Email address' />
|
|
145
|
+
- aria-labelledby for custom label association`)}const k=O.jsx(d1,{ref:r,className:Xe(hC({size:i,variant:y,focusIndicator:!0}),h&&"keeper-ignore",o),...h?{"data-1p-ignore":"true","data-bwignore":"true","data-form-type":"other","data-lpignore":"true"}:{},...m});return u||p||d?O.jsx(c1,{label:u,required:x,labelTooltip:c,description:d,error:dC(p),children:k}):k});p1.displayName="Input";const ou={variant:{heading:{classes:"text-lg font-semibold",description:"Heading text (16px by default, 20px at large size)"},heading1:{classes:"text-3xl font-semibold",description:"Deprecated large heading for page titles; use heading instead"},heading2:{classes:"text-2xl font-semibold",description:"Deprecated medium heading for section titles; use heading instead"},heading3:{classes:"text-lg font-semibold",description:"Deprecated small heading for subsections; use heading instead"},body:{classes:"text-kumo-default",description:"Default body text"},secondary:{classes:"text-kumo-subtle",description:"Muted text for secondary information"},success:{classes:"text-kumo-link",description:"Success state text"},error:{classes:"text-kumo-danger",description:"Error state text"},mono:{classes:"font-mono",description:"Monospace text for code"},"mono-secondary":{classes:"font-mono text-kumo-subtle",description:"Muted monospace text"}},size:{xs:{classes:"text-xs/[inherit]",description:"Extra small text"},sm:{classes:"text-sm/[inherit]",description:"Small text"},base:{classes:"text-base/[inherit]",description:"Default text size"},lg:{classes:"text-lg/[inherit]",description:"Large text"}}},h1={variant:"body",size:"base"},gC=["heading1","heading2","heading3"];function g1(e){return gC.includes(e)}function mC(e,r){return e==="heading"?r==="lg"?"text-xl":"":g1(e)?"":["mono","mono-secondary"].includes(e)?r==="lg"?ou.size.base.classes:ou.size.sm.classes:_n(ou.size,r,h1.size).classes}function yC({variant:e="body",bold:r=!1,size:o="base",truncate:i=!1,children:l,DANGEROUS_className:u,DANGEROUS_style:c,as:d,...p},h){const m=["body","secondary","success","error"].includes(e),y=v.useMemo(()=>d||(["mono","mono-secondary"].includes(e)||e==="heading"||g1(e)?"span":"p"),[e,d]);return O.jsx(y,{ref:h,className:Xe("text-kumo-default",_n(ou.variant,e,h1.variant).classes,mC(e,o),m&&r?"font-medium":"",i&&"min-w-0 truncate",u),style:c,...p,children:l})}const Ro=v.forwardRef(yC);let Wa=0;function su(e,r={}){const{preventScroll:o=!1,sync:i=!1,shouldFocus:l}=r;cancelAnimationFrame(Wa);function u(){l&&!l()||e==null||e.focus({preventScroll:o})}if(i)return u(),on;const c=requestAnimationFrame(u);return Wa=c,()=>{Wa===c&&(cancelAnimationFrame(c),Wa=0)}}const o0="data-base-ui-inert";let cl=new WeakMap,Ka=new WeakSet,fl=new WeakMap,Bf=0;function m1(e){return e?ls(e)?e.host:m1(e.parentNode):null}const s0=(e,r)=>r.map(o=>{if(e.contains(o))return o;const i=m1(o);return e.contains(i)?i:null}).filter(o=>o!=null),i0=e=>{const r=new Set;return e.forEach(o=>{let i=o;for(;i&&!r.has(i);)r.add(i),i=i.parentNode}),r},l0=(e,r,o)=>{const i=[],l=u=>{!u||o.has(u)||Array.from(u.children).forEach(c=>{zn(c)!=="script"&&(r.has(c)?l(c):i.push(c))})};return l(e),i};function vC(e,r,o,{mark:i=!0}){const l=s0(r,e),u=i?l0(r,i0(l),new Set(l)):[],c=[],d=[];if(o){const p=s0(r,Array.from(r.querySelectorAll("[aria-live]"))),h=l.concat(p);l0(r,i0(h),new Set(h)).forEach(m=>{const y=m.getAttribute("aria-hidden"),x=y!==null&&y!=="false",k=(cl.get(m)||0)+1;cl.set(m,k),c.push(m),k===1&&x&&Ka.add(m),x||m.setAttribute("aria-hidden","true")})}return i&&u.forEach(p=>{const h=(fl.get(p)||0)+1;fl.set(p,h),d.push(p),h===1&&p.setAttribute(o0,"")}),Bf+=1,()=>{c.forEach(p=>{const h=(cl.get(p)||0)-1;cl.set(p,h),h||(Ka.has(p)||p.removeAttribute("aria-hidden"),Ka.delete(p))}),i&&d.forEach(p=>{const h=(fl.get(p)||0)-1;fl.set(p,h),h||p.removeAttribute(o0)}),Bf-=1,Bf||(cl=new WeakMap,Ka=new WeakSet,fl=new WeakMap)}}function a0(e,r={}){const{ariaHidden:o=!1,mark:i=!0}=r,l=_t(e[0]).body;return vC(e,l,o,{mark:i})}function xC(e,r){const o=Yt(Rn(e));return e instanceof o.KeyboardEvent?"keyboard":e instanceof o.FocusEvent?r||"keyboard":"pointerType"in e?e.pointerType||(Ri(e)?"keyboard":r||"mouse"):"touches"in e?"touch":e instanceof o.MouseEvent?r||(e.detail===0?"keyboard":"mouse"):""}const wC=20;let rs=[];function pp(){rs=rs.filter(e=>{var r;return(r=e.deref())==null?void 0:r.isConnected})}function u0(e){pp(),e&&zn(e)!=="body"&&(rs.push(new WeakRef(e)),rs.length>wC&&(rs=rs.slice(-20)))}function c0(){var e;return pp(),(e=rs[rs.length-1])==null?void 0:e.deref()}function bC(e){return e?$d(e)?e:Nu(e)[0]||e:null}function f0(e){var i;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const r=Wy(e).filter(l=>{const u=l.getAttribute("data-tabindex")||"";return $d(l)||l.hasAttribute("data-tabindex")&&!u.startsWith("-")}),o=e.getAttribute("tabindex");r.length===0?o!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function y1(e){const{context:r,children:o,disabled:i=!1,initialFocus:l=!0,returnFocus:u=!0,explicitReturnFocus:c,restoreFocus:d=!1,modal:p=!0,closeOnFocusOut:h=!0,openInteractionType:m="",nextFocusableElement:y,previousFocusableElement:x,beforeContentFocusGuardRef:k,externalTree:w,getInsideElements:S}=e,b=r.useState("open"),C=r.useState("domReferenceElement"),E=r.useState("floatingElement"),{events:A,dataRef:I}=r.context,P=Ie(()=>{var Te;return(Te=I.current.floatingContext)==null?void 0:Te.nodeId}),_=l===!1,N=ed(C)&&_,j=un(l),F=un(u),M=un(c),G=un(m),q=un(b),W=Pi(w),K=rv(),H=v.useRef(!1),ne=v.useRef(!1),le=v.useRef(!1),B=v.useRef(null),V=v.useRef(""),U=v.useRef(""),T=v.useRef(null),D=v.useRef(null),Z=zs(T,k,K==null?void 0:K.beforeInsideRef),X=zs(D,K==null?void 0:K.afterInsideRef),oe=Qn(),J=Qn(),re=Ti(),de=K!=null,ae=mu(E),ve=Ie((Te=ae)=>Te?Nu(Te):[]),De=Ie(()=>(S==null?void 0:S().filter(Te=>Te!=null))??[]);v.useEffect(()=>{if(i||!p)return;function Te(Qe){Qe.key==="Tab"&&et(ae,qn(_t(ae)))&&ve().length===0&&!N&&eo(Qe)}const Ne=_t(ae);return Et(Ne,"keydown",Te)},[i,ae,p,N,ve]),v.useEffect(()=>{if(i||!b)return;const Te=_t(ae);function Ne(){le.current=!1}function Qe(ft){const Fe=Rn(ft),Ye=De(),me=et(E,Fe)||et(C,Fe)||et(K==null?void 0:K.portalNode,Fe)||Ye.some(it=>it===Fe||et(it,Fe));le.current=!me,U.current=ft.pointerType||"keyboard",Ci(Fe,"[data-base-ui-click-trigger]")&&(ne.current=!0,J.start(0,()=>{ne.current=!1}))}function tt(){U.current="keyboard"}return no(Et(Te,"pointerdown",Qe,!0),Et(Te,"pointerup",Ne,!0),Et(Te,"pointercancel",Ne,!0),Et(Te,"keydown",tt,!0),Ne)},[i,E,C,ae,b,K,J,De]),v.useEffect(()=>{if(i||!h)return;const Te=_t(ae);function Ne(){ne.current=!0,J.start(0,()=>{ne.current=!1})}function Qe(Ye){const me=Rn(Ye);$d(me)&&(B.current=me)}function tt(Ye){const me=Ye.relatedTarget,it=Ye.currentTarget,Rt=Rn(Ye);p&&me==null&&Rt!=null&&et(E,Rt)&&u0(Rt),queueMicrotask(()=>{const wt=P(),se=r.context.triggerElements,ce=De(),Be=(me==null?void 0:me.hasAttribute(wi("focus-guard")))&&[T.current,D.current,K==null?void 0:K.beforeInsideRef.current,K==null?void 0:K.afterInsideRef.current,K==null?void 0:K.beforeOutsideRef.current,K==null?void 0:K.afterOutsideRef.current,Co(x),Co(y)].includes(me),ge=!(et(C,me)||et(E,me)||et(me,E)||et(K==null?void 0:K.portalNode,me)||ce.some(He=>He===me||et(He,me))||se.hasMatchingElement(He=>et(He,me))||Be||W&&(fs(W.nodesRef.current,wt).find(He=>{var lt,gt;return et((lt=He.context)==null?void 0:lt.elements.floating,me)||et((gt=He.context)==null?void 0:gt.elements.domReference,me)})||zm(W.nodesRef.current,wt).find(He=>{var lt,gt,bt;return[(lt=He.context)==null?void 0:lt.elements.floating,mu((gt=He.context)==null?void 0:gt.elements.floating)].includes(me)||((bt=He.context)==null?void 0:bt.elements.domReference)===me})));if(it===C&&ae&&f0(ae),d&&it!==C&&!Ou(Rt)&&qn(Te)===Te.body){if($t(ae)&&(ae.focus(),d==="popup")){re.request(()=>{ae.focus()});return}const He=ve(),lt=B.current,gt=(lt&&He.includes(lt)?lt:null)||He[He.length-1]||ae;$t(gt)&>.focus()}if(I.current.insideReactTree){I.current.insideReactTree=!1;return}(N||!p)&&me&&ge&&!ne.current&&(N||me!==c0())&&(H.current=!0,r.setOpen(!1,xt(Xy,Ye)))})}function ft(){le.current||(I.current.insideReactTree=!0,oe.start(0,()=>{I.current.insideReactTree=!1}))}const Fe=$t(C)?C:null;if(!(!E&&!Fe))return no(Fe&&Et(Fe,"focusout",tt),Fe&&Et(Fe,"pointerdown",Ne),E&&Et(E,"focusin",Qe),E&&Et(E,"focusout",tt),E&&K&&Et(E,"focusout",ft,!0))},[i,C,E,ae,p,W,K,r,h,d,ve,N,P,I,oe,J,re,y,x,De]),v.useEffect(()=>{var ft,Fe,Ye;if(i||!E||!b)return;const Te=Array.from(((ft=K==null?void 0:K.portalNode)==null?void 0:ft.querySelectorAll(`[${wi("portal")}]`))||[]),Ne=(Ye=(Fe=(W?zm(W.nodesRef.current,P()):[]).find(me=>{var it;return ed(((it=me.context)==null?void 0:it.elements.domReference)||null)}))==null?void 0:Fe.context)==null?void 0:Ye.elements.domReference,Qe=a0([E,...Te,T.current,D.current,K==null?void 0:K.beforeOutsideRef.current,K==null?void 0:K.afterOutsideRef.current,...De(),Ne,Co(x),Co(y),N?C:null].filter(me=>me!=null),{ariaHidden:p||N,mark:!1}),tt=a0([E,...Te].filter(me=>me!=null));return()=>{tt(),Qe()}},[b,i,C,E,p,K,N,W,P,y,x,De]),Ae(()=>{if(!b||i||!$t(ae))return;V.current="",U.current="";const Te=_t(ae),Ne=qn(Te);queueMicrotask(()=>{const Qe=j.current,tt=typeof Qe=="function"?Qe(G.current||""):Qe;if(tt===void 0||tt===!1||et(ae,Ne))return;let ft=null;const Fe=()=>(ft==null&&(ft=ve(ae)),ft[0]||ae);let Ye;tt===!0||tt===null?Ye=Fe():Ye=Co(tt),Ye=Ye||Fe();const me=et(ae,qn(Te)),it=I.current.openEvent,Rt=(it==null?void 0:it.type)==="mousedown"&&Ri(it);su(Ye,{sync:Rt,preventScroll:Ye===ae,shouldFocus(){if(!q.current)return!1;if(me)return!0;const wt=qn(Te);return!(wt!==Ye&&et(ae,wt))}})})},[i,b,ae,ve,j,G,q,I]);const _e=v.useRef(null);Ae(()=>{if(i||!ae){_e.current=null;return}_e.current&&(_e.current.cancelled=!0,_e.current=null);const Te=_t(ae),Ne=qn(Te),Qe=G.current==null;u0(Ne);function tt(Fe){var Ye;if(Fe.open||(V.current=xC(Fe.nativeEvent,U.current)),(Fe.reason==="focus-out"&&((Ye=Fe.triggerElement)!=null&&Ye.hasAttribute(wi("focus-guard")))||Fe.reason==="trigger-hover"&&Fe.nativeEvent.type==="mouseleave")&&(H.current=!0),Fe.reason==="outside-press")if(Fe.nested)H.current=!1;else if(Ri(Fe.nativeEvent)||jd(Fe.nativeEvent))H.current=!1;else{let me=!1;_t(ae).createElement("div").focus({get preventScroll(){return me=!0,!1}}),me?H.current=!1:H.current=!0}}A.on("openchange",tt);function ft(Fe){const Ye=F.current;let me=typeof Ye=="function"?Ye(Fe):Ye;if(me===void 0||me===!1)return null;me===null&&(me=!0);const it=C!=null&&C.isConnected?C:null,Rt=Ne!=null&&Ne.isConnected&&zn(Ne)!=="body"?Ne:null;let wt=Qe?Rt||it:it||Rt;return wt||(wt=c0()||null),typeof me=="boolean"?wt:Co(me)||wt||null}return()=>{A.off("openchange",tt);const Fe=qn(Te),Ye=De(),me=et(E,Fe)||Ye.some(ce=>ce===Fe||et(ce,Fe))||W&&fs(W.nodesRef.current,P(),!1).some(ce=>{var Be;return et((Be=ce.context)==null?void 0:Be.elements.floating,Fe)}),it=F.current,Rt=V.current,wt=ft(Rt),se={cancelled:!1};_e.current=se,queueMicrotask(()=>{_e.current===se&&(_e.current=null);const ce=bC(wt),Be=M.current??typeof it!="boolean";if(!se.cancelled&&it&&!H.current&&$t(ce)&&(!(!Be&&ce!==Fe&&Fe!==Te.body)||me)){const ge={preventScroll:!0};Rt==="keyboard"&&(ge.focusVisible=!0),ce.focus(ge)}H.current=!1})}},[i,E,ae,F,M,G,A,W,C,P,De]),Ae(()=>{if(!Oo||b||!E)return;const Te=qn(_t(E));!$t(Te)||!Ol(Te)||et(E,Te)&&Te.blur()},[b,E]),Ae(()=>{if(!(i||!K))return K.setFocusManagerState({modal:p,closeOnFocusOut:h,open:b,onOpenChange:r.setOpen,domReference:C}),()=>{K.setFocusManagerState(null)}},[i,K,p,b,r,h,C]),Ae(()=>{if(!(i||!ae))return f0(ae),()=>{queueMicrotask(pp)}},[i,ae]);const $e=!i&&(p?!N:!0)&&(de||p);return O.jsxs(v.Fragment,{children:[$e&&O.jsx(kl,{"data-type":"inside",ref:Z,onFocus:Te=>{var Ne,Qe;if(p){const tt=ve();su(tt[tt.length-1])}else K!=null&&K.portalNode&&(H.current=!1,yl(Te,K.portalNode)?(Ne=Gy(C))==null||Ne.focus():(Qe=Co(x??K.beforeOutsideRef))==null||Qe.focus())}}),o,$e&&O.jsx(kl,{"data-type":"inside",ref:X,onFocus:Te=>{var Ne,Qe;p?su(ve()[0]):K!=null&&K.portalNode&&(h&&(H.current=!0),yl(Te,K.portalNode)?(Ne=Yy(C))==null||Ne.focus():(Qe=Co(y??K.afterOutsideRef))==null||Qe.focus())}})]})}function kC(e){const r=v.useRef(""),o=v.useCallback(i=>{i.defaultPrevented||(r.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:v.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,r.current),r.current=""},[e]),onPointerDown:o}}function v1(e,r){const{onClick:o,onPointerDown:i}=kC(Ie((l,u)=>{(typeof e=="function"?e():e)||r(u||(_u?"touch":""))}));return v.useMemo(()=>({onClick:o,onPointerDown:i}),[o,i])}function SC(e){const[r,o]=v.useState(null),i=v1(e,o);return cp(e,l=>{l&&!e&&o(null)}),v.useMemo(()=>({openMethod:r,triggerProps:i}),[r,i])}const hp=v.forwardRef(function(r,o){const{cutout:i,...l}=r;let u;if(i){const c=i.getBoundingClientRect();u=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${c.left}px ${c.top}px,${c.left}px ${c.bottom}px,${c.right}px ${c.bottom}px,${c.right}px ${c.top}px,${c.left}px ${c.top}px)`}return O.jsx("div",{ref:o,role:"presentation","data-base-ui-inert":"",...l,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:u}})});hp.displayName="InternalBackdrop";let d0={},p0={},h0="";function Bu(e,r){return Al(e)?e:r}function g0(e,r,o){return/hidden|clip/.test(e.getComputedStyle(Bu(r,o)).overflowY)}function EC(e){if(typeof document>"u")return!1;const r=_t(e);return Yt(r).innerWidth-r.documentElement.clientWidth>0}function RC(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=_t(e),o=r.documentElement,i=r.body,l=Bu(o,i),u=l.style.overflowY,c=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",l.style.overflowY="scroll";const d=l.offsetWidth;l.style.overflowY="hidden";const p=l.offsetWidth;return l.style.overflowY=u,o.style.scrollbarGutter=c,d===p}function CC(e){const r=_t(e),o=r.documentElement,i=r.body,l=Bu(o,i),u={overflowY:l.style.overflowY,overflowX:l.style.overflowX};return Object.assign(l.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(l.style,u)}}function TC(e){var k;const r=_t(e),o=r.documentElement,i=r.body,l=Yt(o);let u=0,c=0,d=!1;const p=ts.create();if(Oo&&(((k=l.visualViewport)==null?void 0:k.scale)??1)!==1)return()=>{};function h(){const w=l.getComputedStyle(o),S=l.getComputedStyle(i),b=(w.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";u=o.scrollTop,c=o.scrollLeft,d0={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},h0=o.style.scrollBehavior,p0={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const C=o.scrollHeight>o.clientHeight,E=o.scrollWidth>o.clientWidth,A=w.overflowY==="scroll"||S.overflowY==="scroll",I=w.overflowX==="scroll"||S.overflowX==="scroll",P=Math.max(0,l.innerWidth-i.clientWidth),_=Math.max(0,l.innerHeight-i.clientHeight),N=parseFloat(S.marginTop)+parseFloat(S.marginBottom),j=parseFloat(S.marginLeft)+parseFloat(S.marginRight),F=Bu(o,i);if(d=RC(e),d){o.style.scrollbarGutter=b,F.style.overflowY="hidden",F.style.overflowX="hidden";return}Object.assign(o.style,{scrollbarGutter:b,overflowY:"hidden",overflowX:"hidden"}),(C||A)&&(o.style.overflowY="scroll"),(E||I)&&(o.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:N||_?`calc(100dvh - ${N+_}px)`:"100dvh",width:j||P?`calc(100vw - ${j+P}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=u,i.scrollLeft=c,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function m(){Object.assign(o.style,d0),Object.assign(i.style,p0),d||(o.scrollTop=u,o.scrollLeft=c,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=h0)}function y(){m(),p.request(h)}h();const x=Et(l,"resize",y);return()=>{p.cancel(),m(),typeof l.removeEventListener=="function"&&x()}}var IC=class{constructor(){je(this,"lockCount",0);je(this,"restore",null);je(this,"timeoutLock",cs.create());je(this,"timeoutUnlock",cs.create());je(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});je(this,"unlock",()=>{var e;this.lockCount===0&&this.restore&&((e=this.restore)==null||e.call(this),this.restore=null)})}acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}lock(e){if(this.lockCount===0||this.restore!==null)return;const r=_t(e),o=r.documentElement,i=r.body,l=Yt(o);if(g0(l,o,i)){const c=new l.MutationObserver(()=>{g0(l,o,i)||(c.disconnect(),this.restore=null,this.lock(e))}),d={attributes:!0};c.observe(o,d),c.observe(i,d),this.restore=()=>c.disconnect();return}const u=_u||!EC(e);this.restore=u?CC(e):TC(e)}};const AC=new IC;function x1(e=!0,r=null){Ae(()=>{if(e)return AC.acquire(r)},[e,r])}function w1(e,r={}){const{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:d=0,reason:p=Ud}=r,h=e.context.dataRef,m=v.useRef(void 0),y=Ti(),x=Qn(),k=v.useMemo(()=>{function w(b,C,E,A){const I=xt(p,C,E);b&&A==="touch"&&d>0?x.start(d,()=>{e.setOpen(!0,I)}):e.setOpen(b,I)}function S(b,C,E){const A=h.current.openEvent,I=e.select("domReferenceElement")!==C;return b&&I||!b||!l?!0:A&&(typeof c=="function"?c():c)?!E(A.type):!1}return{onPointerDown(b){m.current=os(b.pointerType,!0)&&jd(b.nativeEvent)?"virtual":b.pointerType},onMouseDown(b){const C=m.current,E=b.nativeEvent,A=e.select("open");if(b.button!==0||i==="click"||os(C,!0)&&u)return;const I=S(A,b.currentTarget,j=>j==="click"||j==="mousedown"),P=Rn(E),_=Ol(P);if(_||C==="virtual"){w(I,E,_?P:b.currentTarget,C);return}const N=b.currentTarget;y.request(()=>{w(I,E,N,C)})},onClick(b){if(i==="mousedown-only")return;const C=m.current;if(i==="mousedown"&&C){m.current=void 0;return}os(C,!0)&&u||w(S(e.select("open"),b.currentTarget,E=>E==="click"||E==="mousedown"||E==="keydown"||E==="keyup"),b.nativeEvent,b.currentTarget,C)},onKeyDown(){m.current=void 0}}},[h,i,u,p,e,c,l,y,x,d]);return v.useMemo(()=>o?{reference:k}:cn,[o,k])}function m0(e){return Oo&&e.movementX===0&&e.movementY===0}function $u(e,r,o){switch(e){case"vertical":return r;case"horizontal":return o;default:return r||o}}function Ga(e,r){return $u(r,e==="ArrowUp"||e==="ArrowDown",e==="ArrowLeft"||e==="ArrowRight")}function $f(e,r,o){return $u(r,e==="ArrowDown",o?e==="ArrowLeft":e==="ArrowRight")||e==="Enter"||e===" "||e===""}function PC(e,r,o){return $u(r,o?e===My:e===Ly,e===FS)}function _C(e,r,o,i){const l=o?e===Ly:e===My,u=e===DS;return r==="both"||r==="horizontal"&&i?e==="Escape":$u(r,l,u)}function OC(e,r){const{listRef:o,activeIndex:i,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:d=!1,loopFocus:p=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:x="auto",focusItemOnHover:k=!0,openOnArrowKeyDown:w=!0,disabledIndices:S=void 0,orientation:b="vertical",triggerOrientation:C=b,parentOrientation:E,id:A,resetOnPointerLeave:I=!0,externalTree:P,nestedReturnFocusRef:_,grid:N}=r,j=N!=null;d&&(p||console.warn("`useListNavigation` looping must be enabled to allow escaping."),y||console.warn("`useListNavigation` must be virtual to allow escaping.")),b==="vertical"&&j&&console.warn("In grid list navigation mode, the `orientation` should",'be either "horizontal" or "both".');const F=e.useState("open"),M=e.useState("floatingElement"),G=e.useState("domReferenceElement"),q=e.context.dataRef,W=mu(M),K=ed(G),H=un(W),ne=Lu(),le=Pi(P),B=v.useRef(x),V=v.useRef(c??-1),U=v.useRef(null),T=v.useRef(!0),D=Ie(se=>{l(V.current===-1?null:V.current,se)}),Z=v.useRef(!!M),X=v.useRef(F),oe=v.useRef(!1),J=v.useRef(!1),re=v.useRef(null),de=un(S),ae=un(F),ve=un(c),De=un(I),_e=Ti(),$e=Ti(),Te=Ie(()=>{_e.cancel();function se(ge){y||(re.current=su(ge,{sync:oe.current,preventScroll:!0}))}const ce=o.current[V.current],Be=J.current;ce&&se(ce),(oe.current?ge=>ge():ge=>_e.request(ge))(()=>{var He;const ge=o.current[V.current]||ce;ge&&(ce||se(ge),Ye&&(Be||!T.current)&&((He=ge.scrollIntoView)==null||He.call(ge,{block:"nearest",inline:"nearest"})))})});Ae(()=>{q.current.orientation=b},[q,b]),Ae(()=>{F||(U.current=null),(!F||x!=="auto")&&(B.current=x)},[F,x]),Ae(()=>{u&&(F&&M?(V.current=c??-1,B.current&&c!=null&&(J.current=!0,D())):Z.current&&(V.current=-1,D()))},[u,F,M,c,D]),Ae(()=>{if(u){if(!F){oe.current=!1;return}if(M)if(i==null){if(oe.current=!1,ve.current!=null)return;if(Z.current&&(V.current=-1,Te()),(!X.current||!Z.current)&&B.current&&(U.current!=null||B.current===!0&&U.current==null)){let se=0;const ce=()=>{o.current[0]==null?(se<2&&(se?Be=>$e.request(Be):queueMicrotask)(ce),se+=1):(V.current=U.current==null||$f(U.current,C,m)||h?ru(o):td(o),U.current=null,D())};ce()}}else yi(o.current,i)||(V.current=i,Te(),J.current=!1)}},[u,F,M,i,ve,h,o,C,m,D,Te,$e]),Ae(()=>{var He,lt;if(!u||M||!le||y||!Z.current)return;const se=le.nodesRef.current,ce=(lt=(He=se.find(gt=>gt.id===ne))==null?void 0:He.context)==null?void 0:lt.elements.floating,Be=qn(_t(G??ce??null)),ge=se.some(gt=>gt.context&&et(gt.context.elements.floating,Be));ce&&!ge&&T.current&&ce.focus({preventScroll:!0})},[u,M,G,le,ne,y]),Ae(()=>{X.current=F,Z.current=!!M});const Ne=i!=null,Qe=Ie(se=>{if(!ae.current)return;const ce=o.current.indexOf(se.currentTarget);ce!==-1&&(V.current!==ce||i!==ce)&&(V.current=ce,D(se))}),tt=Ie(()=>{var se,ce,Be;return E??((Be=(ce=(se=le==null?void 0:le.nodesRef.current.find(ge=>ge.id===ne))==null?void 0:se.context)==null?void 0:ce.dataRef)==null?void 0:Be.current.orientation)}),ft=Ie(()=>ru(o,de.current)),Fe=Ie(se=>{if(T.current=!1,oe.current=!0,se.which===229||!ae.current&&se.currentTarget===H.current)return;if(h&&_C(se.key,b,m,j)){Ga(se.key,tt())||eo(se),e.setOpen(!1,xt(Tm,se.nativeEvent));const He=(_==null?void 0:_.current)??G;$t(He)&&He.focus();return}i!=null&&i!==V.current&&!yi(o.current,i)&&(V.current=i);const ce=V.current,Be=ru(o,S),ge=td(o,S);if(K||(se.key==="Home"&&(eo(se),V.current=Be,D(se)),se.key==="End"&&(eo(se),V.current=ge,D(se))),N!=null){const He=N(se,V.current,o,b,p,m,S,Be,ge);if(He!=null&&He!==V.current&&(V.current=He,D(se)),b==="both")return}if(Ga(se.key,b)){eo(se);const He=qn(se.currentTarget.ownerDocument);if(F&&!y&&et(se.currentTarget,He)&&!o.current.some(bt=>bt!=null&&et(bt,He))){V.current=$f(se.key,b,m)?Be:ge,D(se),i===V.current&&Te();return}const{index:lt,wrapped:gt}=eE(o.current,ce,{decrement:!$f(se.key,b,m),loopFocus:p,allowEscape:d,disabledIndices:S,minIndex:Be,maxIndex:ge});gt&&(oe.current=!1),V.current=lt,D(se)}}),Ye=v.useMemo(()=>({onFocus(se){oe.current=!0,Qe(se)},onClick({currentTarget:se}){y||se.focus({preventScroll:!0})},onMouseMove(se){m0(se)||(oe.current=!0,J.current=!1,k&&Qe(se))},onPointerLeave(se){var Be;if(!ae.current||!T.current||se.pointerType==="touch")return;oe.current=!0;const ce=se.relatedTarget;if(!(!k||o.current.includes(ce))&&De.current&&((Be=re.current)==null||Be.call(re),re.current=null,V.current=-1,D(se),!y)){const ge=H.current,He=qn(_t(ge));ge&&et(ge,He)&&ge.focus({preventScroll:!0})}}}),[Qe,ae,H,k,o,D,De,y]),me=v.useMemo(()=>y&&F&&Ne&&{"aria-activedescendant":`${A}-${i}`},[y,F,Ne,A,i]),it=v.useMemo(()=>({...K?{}:me,onKeyDown(se){if(se.key==="Tab"&&se.shiftKey&&F&&!y){const ce=Rn(se.nativeEvent);if(ce&&!et(H.current,ce))return;eo(se);const Be=xt(Xy,se.nativeEvent);e.setOpen(!1,Be);const ge=(_==null?void 0:_.current)??G;!Be.isCanceled&&$t(ge)&&ge.focus();return}Fe(se)},onPointerMove(se){m0(se)||(T.current=!0)}}),[me,Fe,H,K,e,F,y,G,_]),Rt=v.useMemo(()=>{function se(ge){e.setOpen(!0,xt(Tm,ge.nativeEvent,ge.currentTarget))}function ce(ge){x==="auto"&&Ri(ge.nativeEvent)&&(B.current=!y)}function Be(ge){B.current=x,x==="auto"&&jd(ge.nativeEvent)&&(B.current=!0)}return{onKeyDown(ge){var Xt;const He=e.select("open");T.current=!1;const lt=ge.key.startsWith("Arrow"),gt=PC(ge.key,tt(),m),bt=Ga(ge.key,He?b:C),Qt=(h?gt:bt)||ge.key==="Enter"||ge.key.trim()==="";if(y&&He&&(!h||Ol(ge.currentTarget)))return Fe(ge);if(!(!He&&!w&<)){if(Qt){const jn=Ga(ge.key,tt());U.current=h&&jn?null:ge.key}if(h){gt&&(eo(ge),He?(V.current=ft(),D(ge),y&&((Xt=H.current)==null||Xt.focus())):se(ge));return}bt&&(ve.current!=null&&(V.current=ve.current),eo(ge),!He&&w?se(ge):Fe(ge),He&&D(ge))}},onFocus(ge){ge.target===ge.currentTarget&&e.select("open")&&!y&&(V.current=-1,D(ge))},onPointerDown:Be,onPointerEnter:Be,onMouseDown:ce,onClick:ce}},[Fe,x,ft,h,D,e,w,b,C,tt,m,ve,y,H]),wt=v.useMemo(()=>({...me,...Rt}),[me,Rt]);return v.useMemo(()=>u?{reference:wt,floating:it,item:Ye,trigger:Rt}:{},[u,wt,it,Rt,Ye])}function NC(e){const r=v.useRef(!0);r.current&&(r.current=!1,e())}const b1=(e,r)=>Object.is(e,r);function Bs(e,r,o){return e==null||r==null?Object.is(e,r):o(e,r)}function MC(e,r,o){return Array.isArray(e)&&Array.isArray(r)?!iC(e,r,(i,l)=>Bs(i,l,o)):e!==r}function ud(e,r,o){return e?e.some(i=>i===void 0?!1:Bs(r,i,o)):!1}function iu(e,r,o){return e?e.findIndex(i=>i===void 0?!1:Bs(i,r,o)):-1}function LC(e,r){if(r!==b1)return i=>ud(e,i,r);const o=new Set(e);return o.delete(void 0),i=>o.has(i)&&(i!==0||e.some(l=>Object.is(i,l)))}function k1(e,r,o,i){const l=i&&Array.isArray(r)?e.findIndex(LC(r,o)):iu(e,r,o);return l===-1?null:l}function DC(e,r,o,i,l,u){return ud(i,r,l)?u!=null&&e>u&&ud(i,o[u],l)?u:e:e===u?k1(o,i,l,!0):u}function FC(e,r,o){return e.filter(i=>!Bs(r,i,o))}function cd(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function zC(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function S1(e){return zC(e==null?void 0:e[0])}function jC(e){return S1(e)?e.flatMap(r=>r.items):e}function BC(e){if(!Array.isArray(e))return e!=null&&"null"in e;const r=e;if(S1(r)){for(const o of r)for(const i of o.items)if(i&&i.value==null&&i.label!=null)return!0;return!1}for(const o of r)if(o&&o.value==null&&o.label!=null)return!0;return!1}function E1(e,r){if(r&&e!=null)return r(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return cd(e)}function hi(e,r){return r&&e!=null?r(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?cd(e.value):cd(e)}function R1(e,r,o){function i(){return E1(e,o)}if(o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(r&&!Array.isArray(r))return(Object.hasOwn(r,e)?r[e]:void 0)??i();if(Array.isArray(r)){const l=jC(r);if(e==null||typeof e!="object"){const u=l.find(c=>c.value===e);return u&&u.label!=null?u.label:i()}if("value"in e){const u=l.find(c=>c&&c.value===e.value);if(u&&u.label!=null)return u.label}}return i()}function $C(e,r,o){return e.reduce((i,l,u)=>(u>0&&i.push(", "),i.push(O.jsx(v.Fragment,{children:R1(l,r,o)},u)),i),[])}const gp=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});gp.displayName="CompositeListContext";function UC(){return v.useContext(gp)}function mp(e){const{children:r,elementsRef:o,labelsRef:i,onMapChange:l}=e,u=Ie(l),[,c]=v.useState(0),d=On(HC).current,p=On(VC).current,h=v.useRef(0),m=v.useRef(!0),y=v.useRef(null),x=v.useRef(null),k=Ie(()=>{m.current||(m.current=!0,c(P=>P+1))}),w=Ie((P,_)=>{p.set(P,_),k()}),S=Ie(P=>{p.delete(P),k()}),b=Ie(P=>{const _=new Map;return o.current.length=0,i&&(i.current.length=0),P.forEach(N=>{var j,F;_.set(N.element,{...N.registration.metadata??{},index:N.index}),o.current[N.index]=N.element,i&&(i.current[N.index]=N.registration.label!==void 0?N.registration.label:((F=(j=N.registration.textRef)==null?void 0:j.current)==null?void 0:F.textContent)??N.element.textContent)}),h.current=o.current.length,_});function C(P){var j;if((j=x.current)==null||j.disconnect(),x.current=null,typeof MutationObserver!="function"||P.length<2)return;const _=new MutationObserver(F=>{if(!GC(F))return;let M=null;for(const G of P)if(G.isConnected){if(M&&C1(M,G)>0){_.disconnect(),k();return}M=G}});x.current=_;const N=new Set;for(let F=1;F<P.length;F+=1){const M=KC(P[F-1],P[F]);M&&N.add(M)}N.forEach(F=>_.observe(F,{childList:!0}))}const E=Ie(()=>{const[P,_]=WC(p),N=b(P),j=y.current,F=!j||j.length!==P.length||P.some((M,G)=>{const q=j[G];return M.index!==q.index||M.element!==q.element||M.registration.index!==q.registration.index||M.registration.metadata!==q.registration.metadata});C(_),y.current=P,m.current=!1,F&&(d.forEach(M=>M(N)),u(N))});Ae(()=>(!m.current&&y.current&&b(y.current),()=>{o.current=[],i&&(i.current=[])}),[o,i,b]),Ae(()=>{m.current&&E()}),Ae(()=>()=>{var P;(P=x.current)==null||P.disconnect(),m.current=!0},[]);const A=Ie(P=>(d.add(P),()=>{d.delete(P)})),I=v.useMemo(()=>({register:w,unregister:S,subscribeMapChange:A,nextIndexRef:h}),[w,S,A,h]);return O.jsx(gp.Provider,{value:I,children:r})}function VC(){return new Map}function HC(){return new Set}function WC(e){const r=new Set,o=[],i=[];e.forEach((u,c)=>{if(!c.isConnected)return;const d=u.index,p={index:d??-1,element:c,registration:u};d===null?i.push(p):d>=0&&(r.add(d),o.push(p))});let l=0;return i.sort((u,c)=>C1(u.element,c.element)),i.forEach(u=>{for(;r.has(l);)l+=1;u.index=l,o.push(u),l+=1}),r.size>0&&o.sort((u,c)=>u.index-c.index),[o,i.map(u=>u.element)]}function KC(e,r){let o=e.parentElement;for(;o&&!o.contains(r);)o=o.parentElement;return o}function GC(e){for(const r of e)for(let o=0;o<r.removedNodes.length;o+=1)if(r.removedNodes[o].isConnected)return!0;return!1}function C1(e,r){return e.nextElementSibling===r?-1:r.nextElementSibling===e?1:e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function T1(e={}){const{guess:r,label:o,metadata:i,textRef:l,index:u}=e,{register:c,unregister:d,subscribeMapChange:p,nextIndexRef:h}=UC(),m=v.useRef(-1),[y,x]=v.useState(u==null&&r?()=>{if(m.current===-1){const b=h.current;h.current+=1,m.current=b}return m.current}:-1),k=u??y,w=v.useRef(null),S=v.useCallback(b=>{const C=w.current;C&&d(C),w.current=b,b&&c(b,{metadata:i??null,index:u??null,label:o,textRef:l})},[u,c,d,i,o,l]);return Ae(()=>{if(u==null)return p(b=>{var E;const C=w.current?(E=b.get(w.current))==null?void 0:E.index:null;C!=null&&x(C)})},[u,p]),{ref:S,index:k}}function YC(e,r){const{listRef:o,elementsRef:i,activeIndex:l,onMatch:u,disabledIndices:c,onTyping:d,enabled:p=!0,resetMs:h=750,selectedIndex:m=null}=r,y=Ie(d),x=e.useState("open"),k=Qn(),w=v.useRef(""),S=v.useRef(m??l??-1),b=v.useRef(null),C=Ie(I=>{function P(q){return i==null?void 0:i.current[q]}function _(q){const W=P(q);return W&&!Ou(W)||W!=null&&W.matches(":disabled")?!1:c==null||!xi(is,q,c)}function N(q,W,K=0){var le;if(q.length===0)return-1;const H=(K%q.length+q.length)%q.length,ne=W.toLowerCase();for(let B=0;B<q.length;B+=1){const V=(H+B)%q.length;if(!(!((le=q[V])!=null&&le.toLowerCase().startsWith(ne))||!_(V)))return V}return-1}const j=o.current;if(w.current.length>0&&I.key===" "&&(eo(I),y==null||y(!0)),w.current.length>0&&w.current[0]!==" "&&N(j,w.current)===-1&&I.key!==" "&&(y==null||y(!1)),j==null||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;x&&I.key!==" "&&(eo(I),y==null||y(!0));const F=w.current==="";F&&(S.current=m??l??-1),j.every((q,W)=>{var K,H;return q&&_(W)?((K=q[0])==null?void 0:K.toLowerCase())!==((H=q[1])==null?void 0:H.toLowerCase()):!0})&&w.current===I.key&&(w.current="",S.current=b.current),w.current+=I.key,k.start(h,()=>{w.current="",S.current=b.current,y==null||y(!1)});const M=((F?m??l??-1:S.current)??0)+1,G=N(j,w.current,M);G!==-1?(u==null||u(G,I),b.current=G):I.key!==" "&&(w.current="",y==null||y(!1))}),E=Ie(I=>{const P=I.relatedTarget,_=e.select("domReferenceElement"),N=e.select("floatingElement");et(_,P)||et(N,P)||(k.clear(),w.current="",S.current=b.current,y==null||y(!1))});Ae(()=>{!x&&m!==null||(k.clear(),b.current=null,w.current!==""&&(w.current="",y==null||y(!1)))},[x,m,k,y]);const A=v.useMemo(()=>({onKeyDown:C,onBlur:E}),[C,E]);return v.useMemo(()=>p?{reference:A,floating:A}:{},[p,A])}function XC(e){return e==null?void 0:`${e}-label`}function qC(e,r){return e??r}const Ya=5;function ZC(e,r){const o=QC(r);return e.clientX>=o.left-Ya&&e.clientX<=o.right+Ya&&e.clientY>=o.top-Ya&&e.clientY<=o.bottom+Ya}function QC(e){const r=e.getBoundingClientRect(),o=Yt(e);if(zd)return r;const i=o.getComputedStyle(e,"::before"),l=o.getComputedStyle(e,"::after");if(!(i.content!=="none"||l.content!=="none"))return r;const u=parseFloat(i.width)||0,c=parseFloat(i.height)||0,d=parseFloat(l.width)||0,p=parseFloat(l.height)||0,h=Math.max(r.width,u,d),m=Math.max(r.height,c,p),y=h-r.width,x=m-r.height;return{left:r.left-y/2,right:r.right+y/2,top:r.top-x/2,bottom:r.bottom+x/2}}const I1=v.memo(v.forwardRef(function(r,o){const{render:i,className:l,style:u,keepMounted:c,selected:d,...p}=r,h=v.useRef(null),{transitionStatus:m,setMounted:y}=qd(d),x=Mt("span",r,{ref:[o,h],state:{selected:d,transitionStatus:m},props:[{"aria-hidden":!0,children:"✔️"},p],stateAttributesMapping:Pl});return _i({batch:!0,enabled:!d,open:d,ref:h,onComplete(){d||y(!1)}}),x}));I1.displayName="ItemIndicator";const JC=20;function eT(e,r,o,i){const[l,u]=v.useState(!1);Ae(()=>{if(!e||!r||o==null){u(!1);return}const c=_t(o).documentElement.clientWidth,d=o.offsetWidth;u(c>0&&d>0&&d>=c-JC)},[e,r,o]),x1(e&&(!r||l),i)}const A1=v.createContext(void 0);A1.displayName="ToolbarRootContext";function tT(e){return v.useContext(A1)}function P1(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const _1="ArrowUp",O1="ArrowDown",fd="ArrowLeft",dd="ArrowRight",nT="Home",yp=new Set([_1,O1,fd,dd,nT,"End"]),rT="Shift",oT=[rT,"Control","Alt","Meta"];function sT(e){return $t(e)&&e.tagName==="INPUT"}function y0(e){return!!(sT(e)&&e.selectionStart!=null||$t(e)&&e.tagName==="TEXTAREA")}function v0(e,r,o,i){if(!e||!r||!r.scrollTo)return;let l=e.scrollLeft,u=e.scrollTop;const c=e.clientWidth<e.scrollWidth,d=e.clientHeight<e.scrollHeight;if(c&&i!=="vertical"){const p=x0(e,r,"left"),h=Xa(e),m=Xa(r);o==="ltr"&&(p+r.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?l=p+r.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:p-m.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(l=p-m.scrollMarginLeft-h.scrollPaddingLeft)),o==="rtl"&&(p-m.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft?l=p-m.scrollMarginLeft-h.scrollPaddingLeft:p+r.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(l=p+r.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(d&&i!=="horizontal"){const p=x0(e,r,"top"),h=Xa(e),m=Xa(r);p-m.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?u=p-m.scrollMarginTop-h.scrollPaddingTop:p+r.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(u=p+r.offsetHeight+m.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:l,top:u,behavior:"auto"})}function x0(e,r,o){const i=o==="left"?"offsetLeft":"offsetTop";let l=0;for(;r.offsetParent&&(l+=r[i],r.offsetParent!==e);)r=r.offsetParent;return l}function Xa(e){const r=getComputedStyle(e);return{scrollMarginTop:parseFloat(r.scrollMarginTop)||0,scrollMarginRight:parseFloat(r.scrollMarginRight)||0,scrollMarginBottom:parseFloat(r.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(r.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(r.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(r.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(r.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(r.scrollPaddingLeft)||0}}const iT="data-composite-item-active";function lT(e){const{loopFocus:r=!0,orientation:o="both",grid:i,onLoop:l,direction:u,highlightedIndex:c,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:h=!1,stopEventPropagation:m,disabledIndices:y,modifierKeys:x=is}=e,[k,w]=v.useState(0),S=i!=null,b=v.useRef(null),C=zs(b,p),E=v.useRef([]),A=v.useRef(!1),I=v.useRef(null),P=c??k,_=Ie((M,G=!1)=>{if(I.current=E.current[M]??null,(d??w)(M),G){const q=E.current[M];v0(b.current,q,u,o)}}),N=Ie(M=>{var K;if(M.size===0)return;if(A.current){const H=E.current,ne=H.indexOf(I.current);if(ne===-1){const le=H[P];!le||xi(H,P,y)?_(aT(H,y)):I.current=le}else ne!==P&&_(ne);return}A.current=!0;const G=Array.from(M.keys()),q=G.find(H=>H==null?void 0:H.hasAttribute("data-composite-item-active"))??null,W=q?((K=M.get(q))==null?void 0:K.index)??-1:-1;if(W!==-1)_(W);else if(xi(G,P,y)){const H=vi(G,{disabledIndices:y});yi(G,H)||_(H)}v0(b.current,q,u,o)});Ae(()=>{if(y==null||c!=null||!A.current)return;const M=E.current;if(xi(M,P,y)){const G=vi(M,{disabledIndices:y});yi(M,G)||_(G)}},[y,c,P,E,_]);const j=Ie((M,G,q)=>l?l(M,G,q,E):q),F=Ie(M=>{const G=M.key==="Home"||M.key==="End";if(!yp.has(M.key)||!h&&G||uT(M,x)||!b.current)return;const q=u==="rtl",W=q?fd:dd,K=q?dd:fd,H=o==="vertical"?O1:W,ne=o==="vertical"?_1:K,le=Rn(M.nativeEvent);if(le!=null&&y0(le)&&!P1(le)){const Z=le.selectionStart,X=le.selectionEnd,oe=le.value;if(Z==null||M.shiftKey||Z!==X||M.key!==ne&&Z<oe.length||M.key!==H&&Z>0)return}let B=P;const V=ru(E,y),U=td(E,y);i!=null&&(B=i({disabledIndices:y,elementsRef:E,event:M,highlightedIndex:P,loopFocus:r,maxIndex:U,minIndex:V,onLoop:j,orientation:o,rtl:q}));const T=o!=="vertical"&&M.key===W||o!=="horizontal"&&M.key==="ArrowDown",D=o!=="vertical"&&M.key===K||o!=="horizontal"&&M.key==="ArrowUp";h&&(M.key==="Home"?B=V:M.key==="End"&&(B=U)),B===P&&(T||D)&&(r&&B===U&&T?(B=V,l&&(B=l(M,P,B,E))):r&&B===V&&D?(B=U,l&&(B=l(M,P,B,E))):B=vi(E.current,{startingIndex:B,decrement:D,disabledIndices:y})),B!==P&&!yi(E.current,B)&&(m&&M.stopPropagation(),(S||G||T||D)&&M.preventDefault(),_(B,!0),queueMicrotask(()=>{var Z;(Z=E.current[B])==null||Z.focus()}))});return{props:{ref:C,onFocus(M){const G=b.current,q=Rn(M.nativeEvent);!G||q==null||!y0(q)||q.setSelectionRange(0,q.value.length)},onKeyDown:F},highlightedIndex:P,onHighlightedIndexChange:_,elementsRef:E,onMapChange:N,relayKeyboardEvent:F}}function aT(e,r){let o=-1;for(let i=0;i<e.length;i+=1){const l=e[i];if(!(!l||xi(e,i,r))){if(l.hasAttribute("data-composite-item-active"))return i;o===-1&&(o=i)}}return Math.max(o,0)}function uT(e,r){for(const o of oT)if(!r.includes(o)&&e.getModifierState(o))return!0;return!1}function cT(e){const{render:r,className:o,style:i,refs:l=is,props:u=is,state:c=cn,stateAttributesMapping:d,highlightedIndex:p,onHighlightedIndexChange:h,orientation:m,grid:y,loopFocus:x,onLoop:k,enableHomeAndEndKeys:w,onMapChange:S,stopEventPropagation:b=!0,rootRef:C,disabledIndices:E,modifierKeys:A,highlightItemOnHover:I=!1,tag:P="div",..._}=e,{props:N,highlightedIndex:j,onHighlightedIndexChange:F,elementsRef:M,onMapChange:G,relayKeyboardEvent:q}=lT({grid:y,loopFocus:x,onLoop:k,orientation:m,highlightedIndex:p,onHighlightedIndexChange:h,rootRef:C,stopEventPropagation:b,enableHomeAndEndKeys:w,direction:ep(),disabledIndices:E,modifierKeys:A}),W=Mt(P,e,{state:c,ref:l,props:[N,...u,_],stateAttributesMapping:d}),K=v.useMemo(()=>({highlightedIndex:j,onHighlightedIndexChange:F,highlightItemOnHover:I,relayKeyboardEvent:q}),[j,F,I,q]);return O.jsx(fp.Provider,{value:K,children:O.jsx(mp,{elementsRef:M,onMapChange:H=>{S==null||S(H),G(H)},children:W})})}function fT(e={}){const{highlightItemOnHover:r,highlightedIndex:o,onHighlightedIndexChange:i}=dp(),{ref:l,index:u}=T1(e),c=o===u,d=v.useRef(null),p=zs(l,d);return{compositeProps:{tabIndex:c?0:-1,onFocus(){i(u)},onMouseMove(){const h=d.current;if(!r||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!c&&!m&&h.focus()}},compositeRef:p,index:u}}const dT="overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line",pT="flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline",hT="-my-2 flex shrink-0 items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle",gT="relative flex shrink-0 flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill";function mT(e={}){return Xe(dT)}function N1(e){return v.Children.toArray(e).some(r=>v.isValidElement(r)?r.type===xp||r.type===vp?!0:r.type===v.Fragment?N1(r.props.children):!1:!1)}const M1=v.forwardRef(function({children:r,className:o,render:i,...l},u){const c=N1(r),d={className:Xe(c?pT:mT(),o)};return vy({defaultTagName:"div",render:i,ref:u,props:ro(d,l,{children:r})})});function vp({children:e,className:r,...o}){return O.jsx("div",{className:Xe(hT,r),...o,children:e})}function xp({children:e,className:r,...o}){return O.jsx("div",{className:Xe(gT,r),...o,children:e})}M1.displayName="LayerCard";vp.displayName="LayerCard.Secondary";xp.displayName="LayerCard.Primary";const L1=Object.assign(M1,{Primary:xp,Secondary:vp}),wp=v.createContext(void 0);wp.displayName="DialogRootContext";function ps(e){const r=v.useContext(wp);if(!e&&r===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return r}const bp=v.createContext(void 0);bp.displayName="DialogPortalContext";function yT(){const e=v.useContext(bp);if(e===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return e}const vT="data-nested-dialog-open",xT={..._l,...Pl,nestedDialogOpen(e){return e?{[vT]:""}:null}},pd=v.forwardRef(function(r,o){const{keepMounted:i=!1,...l}=r,u=ps(),c=u.useState("mounted"),d=u.useState("modal"),p=u.useState("open");return c||i?O.jsx(bp.Provider,{value:i,children:O.jsxs(Gd,{ref:o,...l,children:[c&&d===!0&&O.jsx(hp,{ref:u.context.internalBackdropRef,inert:l1(!p)}),r.children]})}):null});pd.displayName="DialogPortal";function wT({store:e,parentContext:r,isDrawer:o}){const i=e.useState("open"),l=e.useState("mounted"),u=e.useState("disablePointerDismissal"),c=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[h,m]=v.useState(0),[y,x]=v.useState(0),k=h===0,w=Zd(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(S){if(!e.context.outsidePressEnabledRef.current||"button"in S&&S.button!==0)return!1;if("touches"in S){if(S.type==="touchend"){if(S.changedTouches.length!==1||S.touches.length!==0)return!1}else if(S.touches.length!==1)return!1}const b=Rn(S);if(k&&!u){if(c){const C=e.context.internalBackdropRef.current,E=e.context.backdropRef.current;return C||E?C===b||E===b||et(b,d)&&!(b!=null&&b.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:k});return x1(i&&c===!0,d),e.useContextCallback("onNestedDialogOpen",(S,b)=>{!e.select("open")&&!e.select("mounted")||(m(S),x(b))}),Ae(()=>{!i&&!l&&(m(0),x(0))},[i,l]),Ae(()=>(r!=null&&r.onNestedDialogOpen&&i&&r.onNestedDialogOpen(h+1,y+(o?1:0)),()=>{r!=null&&r.onNestedDialogOpen&&i&&r.onNestedDialogOpen(0,0)}),[o,i,h,y,r]),yv(e,{activeTriggerProps:w.reference,inactiveTriggerProps:w.trigger,popupProps:w.floating,nestedOpenDialogCount:h,nestedOpenDrawerCount:y}),null}const bT={...Sv,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};var kT=class extends Fu{constructor(r,o,i){const l=new Yd,u=ST(r,l,o,i);super(u,ET(l),bT);je(this,"setOpen",(r,o)=>{var i,l;o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!r&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),(l=(i=this.context).onOpenChange)==null||l.call(i,r,o),!o.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(r,o),this.update(dv(this.state,r,o.trigger)))})}};function ST(e,r,o,i=!1){return{...bv(r,o,i),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function ET(e){return{popupRef:v.createRef(),backdropRef:v.createRef(),internalBackdropRef:v.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function D1(e,r){const{children:o,open:i,defaultOpen:l=!1,onOpenChange:u,onOpenChangeComplete:c,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:h,handle:m,triggerId:y,defaultTriggerId:x=null}=r,k=e==="drawer",w=e==="alert-dialog",S=w?!0:p,b=w||d,C=w?"alertdialog":"dialog",E=ps(!0),A={modal:S,disablePointerDismissal:b,nested:E!=null,role:C},I=cv((M,G)=>new kT({open:l,openProp:i,activeTriggerId:x,triggerIdProp:y,...A},M,G),!0);I.useControlledProp("openProp",i),I.useControlledProp("triggerIdProp",y),I.useSyncedValues(A),I.useContextCallback("onOpenChange",u),I.useContextCallback("onOpenChangeComplete",c);const P=I.useState("open"),_=I.useState("mounted"),N=I.useState("payload");qE(I,P),gv(I);const{forceUnmount:j}=mv(P,I);v.useImperativeHandle(h,()=>({unmount:j,close:()=>I.setOpen(!1,xt(Vd))}),[j,I]);const F=P||_||m!=null;return O.jsxs(wp.Provider,{value:I,children:[m&&O.jsx(fv,{handle:m,store:I}),F&&O.jsx(wT,{store:I,parentContext:E==null?void 0:E.context,isDrawer:k}),typeof o=="function"?o({payload:N}):o]})}const hd=v.forwardRef(function(r,o){const{render:i,className:l,style:u,forceRender:c=!1,...d}=r,p=ps(),h=p.useState("open"),m=p.useState("nested"),y=p.useState("mounted"),x={open:h,transitionStatus:p.useState("transitionStatus")};return Mt("div",r,{state:x,ref:[p.context.backdropRef,o],stateAttributesMapping:zy,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:c||!m})});hd.displayName="DialogBackdrop";const RT="--nested-dialogs",gd=v.forwardRef(function(r,o){const{render:i,className:l,style:u,finalFocus:c,initialFocus:d,...p}=r,h=ps(),m=h.useState("descriptionElementId"),y=h.useState("disablePointerDismissal"),x=h.useState("floatingRootContext"),k=h.useState("popupProps"),w=h.useState("modal"),S=h.useState("mounted"),b=h.useState("nested"),C=h.useState("nestedOpenDialogCount"),E=h.useState("open"),A=h.useState("openMethod"),I=h.useState("titleElementId"),P=h.useState("transitionStatus"),_=h.useState("role"),N=x.useState("floatingId");yT(),_i({open:E,ref:h.context.popupRef,onComplete(){var q,W;E&&((W=(q=h.context).onOpenChangeComplete)==null||W.call(q,!0))}});const j=d===void 0?GE(h.context.popupRef):d,F=C>0,M=h.useStateSetter("popupElement"),G=Mt("div",r,{state:{open:E,nested:b,transitionStatus:P,nestedDialogOpen:F},props:[k,{id:N,"aria-labelledby":I,"aria-describedby":m,role:_,...Qd,hidden:!S,onKeyDown(q){yp.has(q.key)&&q.stopPropagation()},style:{[RT]:C}},p],ref:[o,h.context.popupRef,M],stateAttributesMapping:xT});return O.jsx(y1,{context:x,openInteractionType:A,disabled:!S,closeOnFocusOut:!y,initialFocus:j,returnFocus:c,modal:w!==!1,restoreFocus:"popup",children:G})});gd.displayName="DialogPopup";const md=v.forwardRef(function(r,o){const{render:i,className:l,style:u,disabled:c=!1,nativeButton:d=!0,...p}=r,h=ps(),m=h.useState("open"),{getButtonProps:y,buttonRef:x}=Ml({disabled:c,native:d}),k={disabled:c};function w(S){m&&h.setOpen(!1,xt(uE,S.nativeEvent))}return Mt("button",r,{state:k,ref:[o,x],props:[{onClick:w},p,y]})});md.displayName="DialogClose";const yd=v.forwardRef(function(r,o){const{render:i,className:l,style:u,id:c,...d}=r,p=ps(),h=Kr(c);return p.useSyncedValueWithCleanup("descriptionElementId",h),Mt("p",r,{ref:o,props:[{id:h},d]})});yd.displayName="DialogDescription";const vd=v.forwardRef(function(r,o){const{render:i,className:l,style:u,id:c,...d}=r,p=ps(),h=Kr(c);return p.useSyncedValueWithCleanup("titleElementId",h),Mt("h2",r,{ref:o,props:[{id:h},d]})});vd.displayName="DialogTitle";const kp=nv(function(r,o){const{render:i,className:l,style:u,disabled:c=!1,nativeButton:d=!0,id:p,payload:h,handle:m,...y}=r,x=ps(!0),k=Ev(m)??x;if(!k)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");const w=Kr(p),S=k.useState("floatingRootContext"),b=k.useState("isOpenedByTrigger",w),C=k.useState("triggerPopupId",w),E=v.useRef(null),{registerTrigger:A,isMountedByThisTrigger:I}=hv(w,E,k,{payload:h}),{getButtonProps:P,buttonRef:_}=Ml({disabled:c,native:d}),N=w1(S),j=v1(()=>k.select("open"),G=>{k.set("openMethod",G)}),F={disabled:c,open:b},M=k.useState("triggerProps",I);return Mt("button",r,{state:F,ref:[_,o,A,E],props:[N.reference,M,j,{[IE]:"",id:w,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":C},y,P],stateAttributesMapping:Bd})});kp.displayName="DialogTrigger";const F1=Wd(function(r){return D1("dialog",r)});F1.displayName="DialogRoot";function CT(e){return D1("alert-dialog",e)}const TT=kp,IT={size:{base:{classes:"sm:w-96",description:"Default dialog width (384px)"},sm:{classes:"sm:w-72",description:"Small dialog for simple confirmations (288px)"},lg:{classes:"sm:w-[32rem]",description:"Large dialog for complex content (512px)"},xl:{classes:"sm:w-[48rem]",description:"Extra large dialog for detailed views (768px)"}}},bu={size:"base",role:"dialog"},xd=v.createContext("dialog");function Ll(){return v.useContext(xd)}function AT({size:e=bu.size}={}){return Xe("shadow-m ring ring-kumo-line fixed top-8 left-1/2 sm:top-16 w-full max-w-[calc(100vw-2rem)] max-h-[calc(100dvh-4rem)] sm:max-h-[calc(100dvh-6rem)] -translate-x-1/2 overflow-x-hidden overflow-y-auto overscroll-contain rounded-xl bg-kumo-base text-kumo-default duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0",_n(IT.size,e,bu.size).classes)}function PT({className:e,children:r,style:o,size:i=bu.size,container:l}){const u=Ll(),c=Pd();return O.jsxs(pd,{container:l??c??void 0,children:[O.jsx(hd,{className:"fixed inset-0 bg-kumo-recessed opacity-80 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0"}),O.jsx(L1,{render:O.jsx(gd,{}),className:Xe(AT({size:i}),e),style:{transitionProperty:"scale, opacity",transitionTimingFunction:"var(--default-transition-timing-function)","--tw-shadow":"0 20px 25px -5px rgb(0 0 0 / 0.03), 0 8px 10px -6px rgb(0 0 0 / 0.03)",...o},children:r})]})}function z1(e){if(e.role==="alertdialog"){const{children:l,role:u,...c}=e;return O.jsx(xd.Provider,{value:u,children:O.jsx(CT,{...c,children:l})})}const{children:r,role:o=bu.role,...i}=e;return O.jsx(xd.Provider,{value:o,children:O.jsx(F1,{...i,children:r})})}z1.displayName="Dialog.Root";function j1({children:e,...r}){return Ll()==="alertdialog"?O.jsx(TT,{"data-kumo-component":"Dialog","data-kumo-part":"trigger",...r,children:e}):O.jsx(kp,{"data-kumo-component":"Dialog","data-kumo-part":"trigger",...r,children:e})}j1.displayName="Dialog.Trigger";function B1({className:e,...r}){const o=(Ll()==="alertdialog",vd);return O.jsx(o,{className:e,...r})}B1.displayName="Dialog.Title";function $1({className:e,...r}){const o=(Ll()==="alertdialog",yd);return O.jsx(o,{className:e,...r})}$1.displayName="Dialog.Description";function U1({children:e,...r}){const o=(Ll()==="alertdialog",md);return O.jsx(o,{"data-kumo-component":"Dialog","data-kumo-part":"close",...r,children:e})}U1.displayName="Dialog.Close";const dl=Object.assign(PT,{Root:z1,Trigger:j1,Title:B1,Description:$1,Close:U1}),_T={variant:{default:{classes:"skeleton-line",description:"Flat grey bar with a sliding shimmer"},sketch:{classes:"relative h-2 w-(--skeleton-width)",description:"Wireframe-style bar: rounded fill with a sliding shimmer, a 1px outline, and construction strokes that overshoot each corner by 4px"}}},w0={variant:"default"},qa="absolute bg-kumo-fill",OT=(e,r)=>Math.floor(Math.random()*(r-e+1)+e),b0=(e,r)=>(Math.random()*(r-e)+e).toFixed(2),NT=({variant:e=w0.variant,minWidth:r=30,maxWidth:o=100,minDuration:i=1.3,maxDuration:l=1.7,minDelay:u=0,maxDelay:c=.5,blockHeight:d,className:p})=>{const{width:h,duration:m,delay:y}=v.useMemo(()=>({width:OT(r,o),duration:b0(i,l),delay:b0(u,c)}),[r,o,i,l,u,c]),x={"--skeleton-width":`${h}%`,"--shimmer-duration":`${m}s`,"--shimmer-delay":`${y}s`},k=_n(_T.variant,e,w0.variant).classes,w=e==="sketch"?O.jsxs("div",{className:Xe(k,p),style:x,"data-variant":"sketch",children:[O.jsx("div",{className:"absolute inset-0 overflow-hidden rounded-lg bg-kumo-recessed",children:O.jsx("div",{className:"absolute inset-0 animate-[shimmer_var(--shimmer-duration,1.5s)_var(--shimmer-delay,0s)_infinite_ease-in-out] bg-linear-to-r from-transparent via-kumo-contrast/8 to-transparent motion-reduce:animate-none"})}),O.jsx("div",{className:Xe(qa,"-inset-x-1 top-0 h-px")}),O.jsx("div",{className:Xe(qa,"-inset-x-1 bottom-0 h-px")}),O.jsx("div",{className:Xe(qa,"-inset-y-1 left-0 w-px")}),O.jsx("div",{className:Xe(qa,"-inset-y-1 right-0 w-px")}),O.jsx("div",{className:"absolute inset-0 rounded-lg border border-kumo-interact"})]}):O.jsx("div",{className:Xe(k,p),style:x});if(d!==void 0){const S=typeof d=="number"?`${d}px`:d;return O.jsx("div",{className:"flex items-center",style:{height:S},children:w})}return w};function MT(e){const[r,o]=v.useState({current:e,previous:null});return Object.is(e,r.current)||o({current:e,previous:r.current}),r.previous}const V1=v.forwardRef(function(r,o){const{className:i,render:l,orientation:u="horizontal",style:c,...d}=r;return Mt("div",r,{state:{orientation:u},ref:o,props:[{role:"presentation"},d]})});V1.displayName="ListboxSeparator";function H1(e,r){return Math.max(0,e-r)}function LT(e,r){if(r<=0)return 0;const o=gl(e,0,r),i=o,l=r-o,u=i<=1,c=l<=1;return u&&c?i<=l?0:r:u?0:c?r:o}const Za="base-ui-disable-scrollbar",ku={className:Za,getElement(e){return O.jsx("style",{nonce:e,href:Za,precedence:"base-ui:low",children:`.${Za}{scrollbar-width:none}.${Za}::-webkit-scrollbar{display:none}`})}};ku.getElement.displayName="styleDisableScrollbar.getElement";const W1=v.createContext(void 0);W1.displayName="CSPContext";const DT={disableStyleElements:!1};function K1(){return v.useContext(W1)??DT}const Sp=v.createContext(void 0);Sp.displayName="SelectRootContext";const Ep=v.createContext(void 0);Ep.displayName="SelectFloatingContext";function ao(){const e=v.useContext(Sp);if(e===void 0)throw new Error("Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");return e}function G1(){const e=v.useContext(Ep);if(e===void 0)throw new Error("Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");return e}const FT={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:r,multiple:o,itemToStringValue:i}=e;return r==null?!1:o&&Array.isArray(r)?r.length>0:hi(r,i)!==""},hasNullItemLabel:(e,r)=>r?BC(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,r)=>e.activeIndex===r,isSelected:(e,r)=>{const o=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(l=>Bs(r,l,o)):Bs(r,i,o)},isSelectedByFocus:(e,r)=>e.selectedIndex===r,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function zT(e){const{id:r,value:o,defaultValue:i=null,onValueChange:l,open:u,defaultOpen:c=!1,onOpenChange:d,name:p,form:h,autoComplete:m,disabled:y=!1,readOnly:x=!1,required:k=!1,modal:w=!0,actionsRef:S,inputRef:b,onOpenChangeComplete:C,items:E,multiple:A=!1,itemToStringLabel:I,itemToStringValue:P,isItemEqualToValue:_=b1,highlightItemOnHover:N=!0,children:j}=e,{clearErrors:F}=Oi(),{setDirty:M,setTouched:G,setFocused:q,validityData:W,setFilled:K,name:H,disabled:ne,validation:le,validationMode:B}=No(),V=up({id:r}),U=ne||y,T=H??p,[D,Z]=ad({controlled:o,default:A?i??is:i,name:"Select",state:"value"}),[X,oe]=ad({controlled:u,default:c,name:"Select",state:"open"}),J=v.useRef([]),re=v.useRef([]),de=v.useRef(null),ae=v.useRef(null),ve=v.useRef(0),De=v.useRef(null),_e=v.useRef([]),$e=v.useRef(!1),Te=v.useRef(null),Ne=v.useRef(null),Qe=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),tt=v.useRef(!1),ft=v.useRef(D),{openMethod:Fe,triggerProps:Ye}=SC(X),me=On(()=>new Fu({id:V,labelId:void 0,modal:w,multiple:A,disabled:U,readOnly:x,required:k,highlightItemOnHover:N,itemToStringLabel:I,itemToStringValue:P,isItemEqualToValue:_,value:D,open:X,mounted:X,transitionStatus:void 0,items:E,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:cn,triggerProps:cn,itemRoot:{props:cn,multiple:A,disabled:U,readOnly:x,isItemEqualToValue:_},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:on,setOpen:on,handleScrollArrowVisibility:on,onOpenChangeComplete:on,listRef:J,popupRef:de,scrollHandlerRef:ae,scrollArrowsMountedCountRef:ve,valueRef:De,valuesRef:_e,labelsRef:re,typingRef:$e,selectionRef:Qe,firstItemTextRef:Te,selectedItemTextRef:Ne,alignItemWithTriggerActiveRef:tt,initialValueRef:ft},FT)).current,[it,Rt]=v.useState(!1),{mounted:wt,transitionStatus:se,forceUnmount:ce}=uv({open:X,ref:de,preventUnmountOnClose:it,setPreventUnmountOnClose:Rt,onUnmount(){me.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C==null||C(!1)}}),Be=me.useState("activeIndex"),ge=me.useState("selectedIndex"),He=me.useState("triggerElement"),lt=me.useState("positionerElement"),gt=MT(Fe),bt=Fe??gt,Qt=v.useMemo(()=>A?"":hi(D,P),[A,D,P]),Xt=v.useMemo(()=>A&&Array.isArray(D)?D.map(Ue=>hi(Ue,P)):hi(D,P),[A,D,P]),jn=un(He),dn=Ie(()=>Xt);s1(jn,V,D,dn,!U,p);const pn=A?Array.isArray(D)&&D.length>0:D!=null&&Qt!=="";Ae(()=>{K(pn)},[pn,K]),Ae(function(){const Ze=k1(_e.current,D,_,A);Ze===null&&(Ne.current=null),!X&&me.set("selectedIndex",Ze)},[A,X,D,_,me]),cp(D,()=>{F(T),M(MC(D,W.initialValue,_)),le.change(D)});const nn=Ie((Ue,Ze)=>{const Kt=Ze,Vt=pv(Kt);d==null||d(Ue,Kt),!Ze.isCanceled&&(Ue||Rt(Vt()),oe(Ue),!Ue&&(Ze.reason==="focus-out"||Ze.reason==="outside-press")&&(G(!0),q(!1),B==="onBlur"&&le.commit(D)))});v.useImperativeHandle(S,()=>({unmount:ce,close:()=>{me.state.open&&nn(!1,xt(Vd))}}),[ce,nn,me]);const sn=Ie((Ue,Ze)=>{l==null||l(Ue,Ze),!Ze.isCanceled&&Z(Ue)}),Cn=Ie(Ue=>{const Ze=H1(Ue.scrollHeight,Ue.clientHeight),Kt=LT(Ue.scrollTop,Ze),Vt=Kt>0,jt=Kt<Ze;me.set("scrollUpArrowVisible",Vt),me.set("scrollDownArrowVisible",jt)}),Ut=uC({open:X,onOpenChange:nn,elements:{reference:He,floating:lt}}),hn=w1(Ut,{enabled:!U,event:"mousedown"}),At=Zd(Ut),z=OC(Ut,{enabled:!U,listRef:J,activeIndex:Be,selectedIndex:ge,disabledIndices:is,onNavigate(Ue){Ue===null&&!X||me.set("activeIndex",Ue)},focusItemOnHover:N}),ue=YC(Ut,{enabled:!U&&(X||!x&&!A),listRef:re,activeIndex:Be,selectedIndex:ge,disabledIndices:Ue=>P1(J.current[Ue]),onMatch(Ue){X?me.set("activeIndex",Ue):sn(_e.current[Ue],xt(us))},onTyping(Ue){$e.current=Ue}}),ke=v.useMemo(()=>ro(ue.reference,z.reference,At.reference,hn.reference,Ye),[hn.reference,ue.reference,z.reference,At.reference,Ye]),Re=v.useMemo(()=>ro(Qd,ue.floating,z.floating,At.floating),[ue.floating,z.floating,At.floating]),ut=z.item??cn,ht=v.useMemo(()=>({props:ut,multiple:A,disabled:U,readOnly:x,isItemEqualToValue:_}),[ut,A,U,x,_]);me.useContextCallback("setValue",sn),me.useContextCallback("setOpen",nn),me.useContextCallback("handleScrollArrowVisibility",Cn),me.useContextCallback("onOpenChangeComplete",C),NC(()=>{me.update({popupProps:Re,triggerProps:ke,itemRoot:ht})}),me.useSyncedValues({id:V,modal:w,multiple:A,disabled:U,readOnly:x,required:k,highlightItemOnHover:N,value:D,open:X,mounted:wt,transitionStatus:se,popupProps:Re,triggerProps:ke,itemRoot:ht,items:E,itemToStringLabel:I,itemToStringValue:P,isItemEqualToValue:_,openMethod:bt});const we=zs(b,le.inputRef),Se=A?void 0:T,Me=v.useMemo(()=>!A||!Array.isArray(D)||!T?null:D.map(Ue=>{const Ze=hi(Ue,P);return O.jsx("input",{type:"hidden",form:h,name:T,value:Ze,disabled:U},Ze)}),[A,D,h,T,P,U]);return O.jsxs(Sp.Provider,{value:me,children:[O.jsx(Ep.Provider,{value:Ut,children:j}),O.jsx("input",{...le.getValidationProps(U,{onFocus(){var Ue;(Ue=me.state.triggerElement)==null||Ue.focus({focusVisible:!0})},onChange(Ue){if(Ue.nativeEvent.defaultPrevented||U||x)return;const Ze=Ue.currentTarget.value,Kt=xt(us,Ue.nativeEvent);function Vt(){if(A)return;const jt=Ze.toLowerCase();let Kn=_e.current.findIndex(Nn=>hi(Nn,P).toLowerCase()===jt||E1(Nn,I).toLowerCase()===jt);Kn===-1&&(Kn=_e.current.findIndex((Nn,vn)=>{const Jn=re.current[vn];return Jn!=null&&Jn.toLowerCase()===jt}));const yn=_e.current[Kn];yn!=null&&sn(yn,Kt)}me.set("forceMount",!0),queueMicrotask(Vt)}}),id:V&&Se==null?`${V}-hidden-input`:void 0,form:h,name:Se,autoComplete:m,value:Qt,disabled:U,required:k&&!(A&&pn),readOnly:x,ref:we,style:T?mE:Qy,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Me]})}const Y1=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,d=c;delete d.id;const p=No(),h=ao(),m=h.useState("triggerElement"),y=h.useState("id"),x=XC(y),k=Qv({id:x,fallbackControlId:(m==null?void 0:m.id)??y,setLabelId(w){const S=typeof w=="function"?w(h.state.labelId):w;h.set("labelId",S)}});return Mt("div",r,{ref:o,state:p.state,props:[k,c],stateAttributesMapping:Us})});Y1.displayName="SelectLabel";const jT="data-popup-side",BT=400,$T={...qS,...Us,popupSide:e=>e?{[jT]:e}:null,value:()=>null},X1=v.forwardRef(function(r,o){var ve;const{render:i,className:l,id:u,disabled:c=!1,nativeButton:d=!0,style:p,...h}=r,{setTouched:m,validationMode:y,validation:x,state:k,disabled:w}=No(),{labelId:S}=Mo(),b=ao(),C=b.useState("readOnly"),E=b.useState("required"),A=b.useState("disabled"),I=w||A||c,P=b.useState("open"),_=b.useState("mounted"),N=b.useState("value"),j=b.useState("triggerProps"),F=b.useState("positionerElement"),M=b.useState("listElement"),G=b.useState("popupSide"),q=b.useState("id"),W=b.useState("labelId"),K=b.useState("hasSelectedValue"),H=_&&F?G:null,ne=u??q,le=qC(S,W);up({id:u});const B=un(F),V=v.useRef(null),U=i1(I,V),{getButtonProps:T,buttonRef:D}=Ml({disabled:I,native:d}),Z=b.useStateSetter("triggerElement"),X=Qn(),oe=Qn(),J=Qn();v.useEffect(()=>{if(P)return J.start(BT,()=>{b.context.selectionRef.current.allowUnselectedMouseUp=!0,b.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{J.clear()};b.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},oe.clear()},[P,b,oe,J]);const re=ro(j,{id:ne,role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-controls":P?(M==null?void 0:M.id)??((ve=mu(F))==null?void 0:ve.id):void 0,"aria-labelledby":le,"aria-readonly":C||void 0,"aria-required":E||void 0,tabIndex:I?-1:0,onFocus(De){U(!0),P&&b.context.alignItemWithTriggerActiveRef.current&&b.context.setOpen(!1,xt(us,De.nativeEvent)),X.start(0,()=>{b.set("forceMount",!0)})},onBlur(De){et(F,De.relatedTarget)||(m(!0),U(!1),y==="onBlur"&&x.commit(N))},onMouseDown(De){if(P)return;const _e=_t(De.currentTarget);function $e(Te){if(!V.current)return;const Ne=Te.target;et(V.current,Ne)||et(B.current,Ne)||ZC(Te,V.current)||b.context.setOpen(!1,xt(fE,Te))}oe.start(0,()=>{_e.addEventListener("mouseup",$e,{once:!0})})}},h,T),de=x.getValidationProps(I,re);de.role="combobox";const ae={...k,open:P,disabled:I,value:N,readOnly:C,popupSide:H,placeholder:!K};return Mt("button",r,{ref:[o,V,D,Z],state:ae,stateAttributesMapping:$T,props:de})});X1.displayName="SelectTrigger";const UT={value:()=>null},q1=v.forwardRef(function(r,o){const{className:i,render:l,children:u,placeholder:c,style:d,...p}=r,h=ao(),m=h.useState("value"),y=h.useState("items"),x=h.useState("itemToStringLabel"),k=h.useState("hasSelectedValue"),w=!k&&c!=null&&u==null,S=h.useState("hasNullItemLabel",w),b={value:m,placeholder:!k};let C=null;return typeof u=="function"?C=u(m):u!=null?C=u:w&&!S?C=c:Array.isArray(m)?C=$C(m,y,x):C=R1(m,y,x),Mt("span",r,{state:b,ref:[o,h.context.valueRef],props:[{children:C},p],stateAttributesMapping:UT})});q1.displayName="SelectValue";const Z1=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,d={open:ao().useState("open")};return Mt("span",r,{state:d,ref:o,props:[{"aria-hidden":!0,children:"▼"},c],stateAttributesMapping:Bd})});Z1.displayName="SelectIcon";const Q1=v.forwardRef(function(r,o){const i=ao(),l=i.useState("mounted"),u=i.useState("forceMount");return l||u?O.jsx(Gd,{ref:o,...r}):null});Q1.displayName="SelectPortal";const Rp=v.createContext(void 0);Rp.displayName="SelectPositionerContext";function J1(){const e=v.useContext(Rp);if(!e)throw new Error("Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");return e}function Su(e,r){e&&Object.assign(e.style,r)}const ex={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},VT={position:"fixed"},tx=v.forwardRef(function(r,o){const{anchor:i,className:l,render:u,positionMethod:c,side:d,align:p,sideOffset:h,alignOffset:m,collisionBoundary:y="clipping-ancestors",collisionPadding:x,arrowPadding:k,sticky:w,disableAnchorTracking:S,alignItemWithTrigger:b=!0,collisionAvoidance:C=AE,style:E,...A}=r,I=ao(),P=G1(),_=I.useState("open"),N=I.useState("mounted"),j=I.useState("modal"),F=I.useState("value"),M=I.useState("openMethod"),G=I.useState("positionerElement"),q=I.useState("triggerElement"),W=I.useState("isItemEqualToValue"),K=I.useState("transitionStatus"),H=v.useRef(null),ne=v.useRef(null),[le,B]=v.useState(b),V=N&&le&&M!=="touch";!N&&le!==b&&B(b),v.useImperativeHandle(I.context.alignItemWithTriggerActiveRef,()=>V),eT((V||j)&&_,M==="touch",G,q);const U=Iv({anchor:i,floatingRootContext:P,positionMethod:c,mounted:N,side:d,sideOffset:h,align:p,alignOffset:m,arrowPadding:k,collisionBoundary:y,collisionPadding:x,sticky:w,disableAnchorTracking:S??V,collisionAvoidance:C,keepMounted:!0}),T=V?"none":U.side,D=V?VT:U.positionerStyles,Z={open:_,side:T,align:U.align,anchorHidden:U.anchorHidden};Ae(()=>{I.set("popupSide",U.side)},[I,U.side]);const X=I.useStateSetter("positionerElement"),oe=Av(r,Z,{styles:D,transitionStatus:K,props:A,refs:[o,X],hidden:!N,inert:!_}),J=v.useRef(0),re=Ie(ae=>{if(I.context.valuesRef.current.length===0)return;const ve=J.current;J.current=ae.size;const De=xt(us);if(ve!==0&&!I.state.multiple&&F!==null&&iu(I.context.valuesRef.current,F,W)===-1){const _e=I.context.initialValueRef.current,$e=_e!=null&&iu(I.context.valuesRef.current,_e,W)!==-1?_e:null;I.context.setValue($e,De),$e===null&&(I.set("selectedIndex",null),I.context.selectedItemTextRef.current=null)}if(ve!==0&&I.state.multiple&&Array.isArray(F)){const _e=F.filter($e=>iu(I.context.valuesRef.current,$e,W)!==-1);_e.length!==F.length&&(I.context.setValue(_e,De),_e.length===0&&(I.set("selectedIndex",null),I.context.selectedItemTextRef.current=null))}if(_&&V){I.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const _e={height:""};Su(G,_e),Su(I.context.popupRef.current,_e)}}),de=v.useMemo(()=>({...U,side:T,alignItemWithTriggerActive:V,setControlledAlignItemWithTrigger:B,scrollUpArrowRef:H,scrollDownArrowRef:ne}),[U,T,V,B]);return O.jsx(mp,{elementsRef:I.context.listRef,labelsRef:I.context.labelsRef,onMapChange:re,children:O.jsxs(Rp.Provider,{value:de,children:[N&&j&&O.jsx(hp,{inert:l1(!_),cutout:q}),oe]})})});tx.displayName="SelectPositioner";const k0="--transform-origin",HT={..._l,...Pl},nx=v.forwardRef(function(r,o){const{render:i,className:l,style:u,finalFocus:c,...d}=r,p=ao(),h=p.useState("multiple"),m=p.useState("readOnly"),y=p.useState("highlightItemOnHover"),x=G1(),{side:k,align:w,alignItemWithTriggerActive:S,isPositioned:b,setControlledAlignItemWithTrigger:C}=J1(),E=tT()!=null,A=ep(),{nonce:I,disableStyleElements:P}=K1(),_=p.useState("id"),N=p.useState("open"),j=p.useState("openMethod"),F=p.useState("mounted"),M=p.useState("popupProps"),G=p.useState("transitionStatus"),q=p.useState("triggerElement"),W=p.useState("positionerElement"),K=p.useState("listElement"),H=v.useRef(!1),ne=v.useRef(!1),le=v.useRef({}),B=Ti(),V=Ie(Z=>{if(!W||!p.context.popupRef.current||!ne.current)return;const X=W.style.top==="0px",oe=W.style.bottom==="0px";if(H.current||!S||!X&&!oe){p.context.handleScrollArrowVisibility(Z);return}const J=E0(W),re=ml(W.getBoundingClientRect().height,"y",J),de=_t(W),ae=Yt(W),ve=ae.getComputedStyle(W),De=parseFloat(ve.marginTop),_e=parseFloat(ve.marginBottom),$e=S0(ae.getComputedStyle(p.context.popupRef.current)),Te=Math.min(de.documentElement.clientHeight-De-_e,$e),Ne=Z.scrollTop,Qe=Qa(Z);let tt=null;const ft=it=>{W.style.height=`${it}px`},Fe=X?Qe-Ne:Ne,Ye=Math.min(re+Fe,Te);if(Fe<=1){const it=gl(Fe,0,Te-re);it>0&&ft(re+it),Z.scrollTop=X?Qe:0,Te-(re+it)<=1&&(H.current=!0),p.context.handleScrollArrowVisibility(Z);return}Te-Ye>1?tt=X?1/0:0:oe&&Ne<Qe&&(tt=Ne-(Fe-(re+Fe-Te)));const me=Math.ceil(Ye);if(me!==0&&ft(me),tt!=null){const it=gl(tt,0,Qa(Z));Math.abs(Z.scrollTop-it)>1&&(Z.scrollTop=it)}me>=Te-1&&(H.current=!0),p.context.handleScrollArrowVisibility(Z)});v.useImperativeHandle(p.context.scrollHandlerRef,()=>V,[V]),_i({open:N,ref:p.context.popupRef,onComplete(){N&&p.context.onOpenChangeComplete(!0)}});const U={open:N,transitionStatus:G,side:k,align:w};Ae(()=>{!W||!p.context.popupRef.current||Object.keys(le.current).length||(le.current={top:W.style.top||"0",left:W.style.left||"0",right:W.style.right,height:W.style.height,bottom:W.style.bottom,minHeight:W.style.minHeight,maxHeight:W.style.maxHeight,marginTop:W.style.marginTop,marginBottom:W.style.marginBottom})},[p,W]),Ae(()=>{N||S||(ne.current=!1,H.current=!1,Su(W,le.current))},[N,S,W]),Ae(()=>{var oe,J;const Z=p.context.popupRef.current;if(!N||!q||!W||!Z||S&&!b||p.state.transitionStatus==="ending")return;if(ne.current=!0,Z.style.removeProperty(k0),!S){B.request(()=>p.context.handleScrollArrowVisibility(K||Z));return}const X=WT(Z);try{let re=p.context.selectedItemTextRef.current;re!=null&&re.isConnected||(re=!p.select("hasSelectedValue")&&((oe=p.context.firstItemTextRef.current)!=null&&oe.isConnected)?p.context.firstItemTextRef.current:null);const de=p.context.valueRef.current,ae=Yt(W),ve=ae.getComputedStyle(W),De=ae.getComputedStyle(Z),_e=_t(q),$e=E0(q),Te=Ja(q.getBoundingClientRect(),$e),Ne=Ja(W.getBoundingClientRect(),$e),Qe=Te.height,tt=K||Z,ft=tt.scrollHeight,Fe=parseFloat(De.borderBottomWidth),Ye=parseFloat(ve.marginTop)||10,me=parseFloat(ve.marginBottom)||10,it=parseFloat(ve.minHeight)||100,Rt=S0(De),wt=5,se=5,ce=20,Be=_e.documentElement.clientHeight-Ye-me,ge=_e.documentElement.clientWidth,He=Be-Te.bottom+Qe;let lt,gt=A==="rtl"?Te.right-Ne.width:Te.left,bt=0;if(re&&de){const At=Ja(de.getBoundingClientRect(),$e);lt=Ja(re.getBoundingClientRect(),$e),gt=Ne.left+(A==="rtl"?At.right-lt.right:At.left-lt.left);const z=At.top-Te.top+At.height/2;bt=lt.top-Ne.top+lt.height/2-z}const Qt=He+bt+me+Fe;let Xt=Math.min(Be,Qt);const jn=Be-Ye-me,dn=Qt-Xt,pn=ge-se;W.style.left=`${gl(gt,wt,pn-Ne.width)}px`,W.style.height=`${Xt}px`,W.style.maxHeight="none",W.style.marginTop=`${Ye}px`,W.style.marginBottom=`${me}px`,Z.style.height="100%";const nn=Qa(tt),sn=dn>=nn-1;sn&&(Xt=Math.min(Be,Ne.height)-(dn-nn));const Cn=Te.top<ce||Te.bottom>Be-ce||Math.ceil(Xt)+1<Math.min(ft,it),Ut=(((J=ae.visualViewport)==null?void 0:J.scale)??1)!==1&&Oo;if(Cn||Ut){Su(W,le.current),C(!1);return}const hn=Math.max(it,Xt);if(sn){const At=Math.max(0,Be-Qt);W.style.top=Ne.height>=jn?"0":`${At}px`,W.style.height=`${Xt}px`,tt.scrollTop=Qa(tt)}else W.style.bottom="0",tt.scrollTop=dn;if(lt){const At=Ne.top,z=Ne.height,ue=lt.top+lt.height/2,ke=gl(z>0?(ue-At)/z*100:50,0,100);Z.style.setProperty(k0,`50% ${ke}%`)}(hn===Be||Xt>=Rt)&&(H.current=!0),p.context.handleScrollArrowVisibility(tt),y&&p.state.selectedIndex===null&&p.state.activeIndex===null&&p.context.listRef.current[0]!=null&&p.set("activeIndex",0)}finally{X()}},[p,N,W,q,S,C,B,K,y,A,b]),v.useEffect(()=>{if(!S||!W||!N)return;const Z=Yt(W);function X(oe){p.context.setOpen(!1,xt(dE,oe))}return Et(Z,"resize",X)},[p,S,W,N]);const T={...K?{role:"presentation"}:{role:"listbox","aria-multiselectable":h||void 0,"aria-readonly":m||void 0,id:`${_}-list`},onKeyDown(Z){E&&yp.has(Z.key)&&Z.stopPropagation()},onScroll(Z){K||V(Z.currentTarget)},...S&&{style:K?{height:"100%"}:ex},className:!K&&S?ku.className:void 0},D=Mt("div",r,{ref:[o,p.context.popupRef],state:U,stateAttributesMapping:HT,props:[M,T,tp(G),d]});return O.jsxs(v.Fragment,{children:[!P&&ku.getElement(I),O.jsx(y1,{context:x,modal:!1,disabled:!F,openInteractionType:j,returnFocus:c,restoreFocus:!0,children:D})]})});nx.displayName="SelectPopup";function S0(e){const r=e.maxHeight;return r.endsWith("px")&&parseFloat(r)||1/0}function Qa(e){return H1(e.scrollHeight,e.clientHeight)}function E0(e){return Py.getScale(e)}function ml(e,r,o){return e/o[r]}function Ja(e,r){return wl({x:ml(e.x,"x",r),y:ml(e.y,"y",r),width:ml(e.width,"x",r),height:ml(e.height,"y",r)})}const R0=[["transform","none"],["scale","1"],["translate","0 0"]];function WT(e){const{style:r}=e,o={};for(const[i,l]of R0)o[i]=r.getPropertyValue(i),r.setProperty(i,l,"important");return()=>{for(const[i]of R0){const l=o[i];l?r.setProperty(i,l):r.removeProperty(i)}}}const rx=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,d=ao(),p=d.useState("multiple"),h=d.useState("readOnly"),{alignItemWithTriggerActive:m}=J1(),y=d.useState("hasScrollArrows"),x=d.useState("openMethod"),k={id:`${d.useState("id")}-list`,role:"listbox","aria-multiselectable":p||void 0,"aria-readonly":h||void 0,onScroll(S){var b,C;(C=(b=d.context.scrollHandlerRef).current)==null||C.call(b,S.currentTarget)},...m&&{style:ex},className:y&&x!=="touch"?ku.className:void 0},w=d.useStateSetter("listElement");return Mt("div",r,{ref:[o,w],props:[k,c]})});rx.displayName="SelectList";const Cp=v.createContext(void 0);Cp.displayName="SelectItemContext";function ox(){const e=v.useContext(Cp);if(!e)throw new Error("Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");return e}const sx=v.memo(v.forwardRef(function(r,o){const{render:i,className:l,style:u,value:c=null,label:d,disabled:p=!1,nativeButton:h=!1,...m}=r,y=v.useRef(null),x=T1({guess:!0,label:d,textRef:y}),k=ao(),{props:w,multiple:S,disabled:b,readOnly:C,isItemEqualToValue:E}=k.useState("itemRoot"),A=b||p,I=k.useState("isActive",x.index),P=k.useState("open"),_=k.useState("isSelected",c),N=k.useState("isSelectedByFocus",x.index),j=x.index,F=v.useRef(null);Ae(()=>{const U=k.context.valuesRef.current;return U[j]=c,()=>{delete U[j]}},[j,c,k]),Ae(()=>{const U=k.state.value,T=k.state.selectedIndex;let D=T,Z;S&&Array.isArray(U)?(D=DC(j,c,k.context.valuesRef.current,U,E,T),Z=D===j,j===T&&!Z&&(k.context.selectedItemTextRef.current=null)):(Z=U!==void 0&&Bs(c,U,E),Z&&(D=j)),k.set("selectedIndex",D),Z&&y.current&&(k.context.selectedItemTextRef.current=y.current)},[j,S,E,k,c]);const M=v.useRef("mouse"),G=v.useRef(!1),{getButtonProps:q,buttonRef:W}=Ml({disabled:A,focusableWhenDisabled:!0,native:h,composite:!0}),K={disabled:A,selected:_,highlighted:I};function H(U){if(b||C)return;const T=k.state.value;if(S){const D=Array.isArray(T)?T:[],Z=_?FC(D,c,E):[...D,c];k.context.setValue(Z,xt(Pf,U))}else k.context.setValue(c,xt(Pf,U)),k.context.setOpen(!1,xt(Pf,U))}function ne(){k.context.selectionRef.current.dragY=0}const le={role:"option","aria-selected":_,tabIndex:P&&I?0:-1,onKeyDown(U){k.set("activeIndex",j),U.key===" "&&k.context.typingRef.current&&U.preventDefault()},onClick(U){const T=M.current!=="touch",D=U.nativeEvent.pointerType,Z=T&&Ri(U.nativeEvent)&&(D!==void 0||I),X=T&&!Z&&!G.current;G.current=!1,!(A||X)&&H(U.nativeEvent)},onPointerEnter(U){M.current=U.pointerType},onPointerMove(U){if(U.pointerType==="mouse"&&U.buttons===1){const T=k.context.selectionRef.current;T.dragY+=U.movementY,T.dragY**2>=64&&(T.allowUnselectedMouseUp=!0)}},onPointerDown(U){M.current=U.pointerType,G.current=!0,ne()},onMouseUp(){var D;if(ne(),A||M.current==="touch"||G.current)return;const U=!k.context.selectionRef.current.allowSelectedMouseUp&&_,T=!k.context.selectionRef.current.allowUnselectedMouseUp&&!_;U||T||(G.current=!0,(D=F.current)==null||D.click(),G.current=!1)}},B=Mt("div",r,{ref:[W,o,x.ref,F],state:K,props:[w,le,m,q]}),V=v.useMemo(()=>({selected:_,index:j,textRef:y,selectedByFocus:N}),[_,j,y,N]);return O.jsx(Cp.Provider,{value:V,children:B})}));sx.displayName="SelectItem";const ix=v.forwardRef(function(r,o){const{selected:i}=ox();return r.keepMounted||i?O.jsx(I1,{...r,selected:i,ref:o}):null});ix.displayName="SelectItemIndicator";const lx=v.memo(v.forwardRef(function(r,o){const{index:i,textRef:l,selectedByFocus:u}=ox(),c=ao(),{render:d,className:p,style:h,...m}=r,y=v.useCallback(x=>{x&&(i===0&&(c.context.firstItemTextRef.current=x),u&&(c.context.selectedItemTextRef.current=x))},[c,i,u]);return Mt("div",r,{ref:[y,o,l],props:m})}));lx.displayName="SelectItemText";const Tp=v.createContext(void 0);Tp.displayName="SelectGroupContext";function KT(){const e=v.useContext(Tp);if(e===void 0)throw new Error("Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");return e}const ax=v.forwardRef(function(r,o){const{render:i,className:l,style:u,...c}=r,[d,p]=v.useState(),h=v.useMemo(()=>({labelId:d,setLabelId:p}),[d,p]),m=Mt("div",r,{ref:o,props:[{role:"group","aria-labelledby":d},c]});return O.jsx(Tp.Provider,{value:h,children:m})});ax.displayName="SelectGroup";const ux=v.forwardRef(function(r,o){const{render:i,className:l,style:u,id:c,...d}=r,{setLabelId:p}=KT(),h=Kr(c);return Ae(()=>(p(h),()=>{p(m=>m===h?void 0:m)}),[h,p]),Mt("div",r,{ref:o,props:[{id:h,"aria-hidden":!0},d]})});ux.displayName="SelectGroupLabel";const GT=V1,cx={size:"base"};function YT({size:e=cx.size}={}){return Xe(sp({size:e}),"bg-kumo-control disabled:bg-kumo-control/50 data-[state=open]:bg-kumo-control","justify-between font-normal","focus:opacity-100 focus:ring-kumo-focus/50 focus-visible:ring-inset *:in-focus:opacity-100")}const C0={xs:{iconSize:12,className:"text-kumo-subtle"},sm:{iconSize:14,className:"text-kumo-subtle"},base:{iconSize:16,className:"text-kumo-subtle"},lg:{iconSize:18,className:"text-kumo-subtle"}};function fx(e){if(e==null||typeof e!="object"||Array.isArray(e)||"$$typeof"in e||e instanceof Promise)return!1;const r=e;return"label"in r&&r.label!==void 0}function dx(e){return Array.isArray(e)?e:Object.entries(e).map(([r,o])=>({value:r,label:fx(o)?o.label:o}))}function XT(e){const r=dx(e),o=new Map;if(!Array.isArray(e))for(const[i,l]of Object.entries(e))fx(l)&&o.set(i,{disabled:l.disabled});return r.filter(i=>i.value!==null).map((i,l)=>{const u=typeof i.value=="string"?i.value:`option-${l}`,c=typeof i.value=="string"?o.get(i.value):void 0;return O.jsx(px,{value:i.value,disabled:c==null?void 0:c.disabled,children:i.label},u)})}function Lr({children:e,className:r,render:o,renderValue:i,label:l,hideLabel:u,placeholder:c,loading:d,size:p=cx.size,labelTooltip:h,description:m,error:y,required:x,container:k,side:w="bottom",sideOffset:S=4,align:b="start",alignOffset:C,alignItemWithTrigger:E=!1,anchor:A,arrowPadding:I,positionMethod:P,collisionAvoidance:_,collisionBoundary:N,collisionPadding:j,sticky:F,disableAnchorTracking:M,...G}){const q=v.useId(),W=Pd(),K=k??W??void 0,H=G,ne=H["aria-label"],le=H["aria-labelledby"];u!==void 0&&console.warn('[Kumo Select]: `hideLabel` is deprecated. For hidden labels, use `aria-label` instead of `label` + `hideLabel={true}`.\n Migration:\n - For visible labels: <Select label="Country" /> (hideLabel no longer needed)\n - For hidden labels: <Select aria-label="Select a country" /> (remove label and hideLabel)');const B=l&&u!==!0,V=le??(l&&!B?q:void 0),U=ne??(!l&&!V?c:void 0),T=B&&ne===void 0&&le===void 0?{}:{"aria-labelledby":V},D=G.items?dx(G.items):void 0,Z=e||(G.items?XT(G.items):null),X=i?De=>{const _e=c!=null?O.jsx("span",{className:"text-kumo-placeholder",children:c}):null;if(De==null||De==="")return _e;const $e=i(De);return $e??_e}:void 0,{items:oe,...J}=G,re=l?O.jsx(Y1,{className:"m-0 text-base font-medium text-kumo-default select-none",children:O.jsx(ip,{showOptional:x===!1,tooltip:u?void 0:h,asContent:!0,children:l})}):null,de=O.jsxs(X1,{"data-kumo-component":"Select","data-kumo-part":"trigger",render:o,className:Xe(YT({size:p}),G.disabled&&"cursor-not-allowed opacity-50",y&&"!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50",r),"aria-label":U,...T,children:[d?O.jsx(NT,{className:"w-32"}):O.jsx(q1,{placeholder:c,className:"min-w-0 truncate data-[placeholder]:text-kumo-placeholder",children:X}),O.jsx(Z1,{className:Xe("flex shrink-0 items-center",C0[p].className),children:O.jsx(jv,{size:C0[p].iconSize,className:"fill-current"})})]}),ae=O.jsxs(zT,{...J,items:D,disabled:d||G.disabled,required:x,children:[re,de,O.jsx(Q1,{container:K,children:O.jsx(tx,{side:w,sideOffset:S,align:b,alignOffset:C,alignItemWithTrigger:E,anchor:A,arrowPadding:I,positionMethod:P,collisionAvoidance:_,collisionBoundary:N,collisionPadding:j,sticky:F,disableAnchorTracking:M,children:O.jsx(nx,{className:Xe("flex flex-col","max-h-[var(--available-height)] bg-kumo-base text-kumo-default","rounded-lg shadow-lg ring ring-kumo-line","max-w-(--available-width) min-w-(--anchor-width) py-1.5"),children:O.jsx(rx,{className:Xe("min-h-0 flex-1 scroll-pt-2 scroll-pb-2 overflow-y-auto overscroll-none"),children:Z})})})})]});if(B)return O.jsx(c1,{label:l,required:x,labelTooltip:h,description:m,error:y?typeof y=="string"?{message:y,match:!0}:y:void 0,hideLabel:!0,children:ae});const ve=y?typeof y=="string"?{message:y}:y:void 0;return O.jsxs("div",{className:"grid gap-2",children:[l&&O.jsx("span",{id:q,className:"sr-only",children:l}),ae,ve?O.jsx("span",{className:"text-sm text-kumo-danger",children:ve.message}):m&&O.jsx("span",{className:"text-sm leading-snug text-kumo-subtle",children:m})]})}function px({children:e,value:r,disabled:o,className:i}){return O.jsxs(sx,{"data-kumo-component":"Select","data-kumo-part":"option",value:r,disabled:o,className:Xe("group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none focus-visible:outline-hidden","focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset","data-highlighted:bg-kumo-tint","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",i),children:[O.jsx(lx,{children:e}),O.jsx(ix,{children:O.jsx(Bv,{})})]})}const hx=v.forwardRef(({children:e,className:r},o)=>O.jsx(ax,{ref:o,className:Xe(r),children:e}));hx.displayName="Select.Group";const gx=v.forwardRef(({children:e,className:r},o)=>O.jsx(ux,{ref:o,className:Xe("px-3.5 py-1.5 text-sm font-semibold text-kumo-subtle",r),children:e}));gx.displayName="Select.GroupLabel";const mx=v.forwardRef(({className:e},r)=>O.jsx(GT,{ref:r,className:Xe("my-1 h-px bg-kumo-hairline",e)}));mx.displayName="Select.Separator";Lr.Option=px;Lr.Group=hx;Lr.GroupLabel=gx;Lr.Separator=mx;Lr.Option.displayName="Select.Option";const yx=function({color:r="primary",className:o,render:i,as:l,...u}){const c=i??(l?v.createElement(l):void 0);return O.jsx(L1,{className:Xe("overflow-visible rounded-none",o),render:c,...u,"data-surface-color":r,"data-deprecated":"surface"})};yx.displayName="Surface";function T0(e){const r=ur(e);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const l=$t(e),u=l?e.offsetWidth:o,c=l?e.offsetHeight:i;return(Ei(o)!==u||Ei(i)!==c)&&(o=u,i=c),{width:o,height:i}}const qT=()=>()=>{},ZT=()=>!0,QT=()=>!1;function JT(){return Du.useSyncExternalStore(qT,ZT,QT)}function eI(){const[e,r]=v.useState(!1);return v.useEffect(()=>{r(!0)},[]),e}const tI=Ru(18)?JT:eI;function nI(){return!tI()}function rI(e){const{script:r}=e,{nonce:o}=K1();return nI()?O.jsx("script",{nonce:o,dangerouslySetInnerHTML:{__html:r},suppressHydrationWarning:!0}):null}const Ip=v.createContext(void 0);Ip.displayName="TabsRootContext";function Ap(){const e=v.useContext(Ip);if(e===void 0)throw new Error("Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");return e}const oI="data-activation-direction",Uu={tabActivationDirection:e=>({[oI]:e})},vx=v.forwardRef(function(r,o){const{className:i,defaultValue:l=0,onValueChange:u,orientation:c="horizontal",render:d,value:p,style:h,...m}=r,y=r.defaultValue!==void 0,x=v.useRef([]),[k,w]=v.useState(()=>new Map),[S,b]=ad({controlled:p,default:l,name:"Tabs",state:"value"}),C=p!==void 0,[E,A]=v.useState(()=>new Map),I=v.useRef(void 0),P=v.useCallback(re=>wd(E,re),[E]),[_,N]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:j,tabActivationDirection:F}=_;let M=F,G=!1;j!==S&&(M=I0(j,S,c,E),G=j!=null&&S!=null&&P(S)==null);const q=G?j:S,W=j!==q||F!==M;Ae(()=>{W&&N({previousValue:q,tabActivationDirection:M})},[q,W,M]);const K=Ie((re,de)=>{de.activationDirection=I0(S,re,c,E),u==null||u(re,de),!de.isCanceled&&b(()=>re)}),H=Ie((re,de)=>{u==null||u(re,xt(de,void 0,void 0,{activationDirection:"none"}))}),ne=Ie((re,de)=>(w(ae=>{const ve=new Map(ae);return ve.set(re,de),ve}),()=>{w(ae=>{if(ae.get(re)!==de)return ae;const ve=new Map(ae);return ve.delete(re),ve})})),le=v.useCallback(re=>k.get(re),[k]),B=v.useCallback(re=>{for(const de of E.values())if(re===de.value)return de.id},[E]),V=v.useMemo(()=>({getTabElementBySelectedValue:P,getTabIdByPanelValue:B,getTabPanelIdByValue:le,onValueChange:K,orientation:c,registerMountedTabPanel:ne,setTabMap:A,tabActivationDirection:M,value:S}),[P,B,le,K,c,ne,A,M,S]),U=v.useMemo(()=>{for(const re of E.values())if(re.value===S)return re},[E,S]),T=v.useMemo(()=>{for(const re of E.values())if(!re.disabled)return re.value},[E]),D=v.useRef(!y),Z=v.useRef(l),X=v.useRef(y),oe=v.useRef(!1);Ae(()=>{var De;if(C)return;function re(_e,$e){b(()=>_e),N({previousValue:_e,tabActivationDirection:"none"}),H(_e,$e),D.current=!1}if(E.size===0){oe.current&&S!==null&&!((De=I.current)!=null&&De.isConnected)&&re(null,Im);return}oe.current=!0,I.current=E.keys().next().value;const de=U==null?void 0:U.disabled,ae=U==null&&S!==null;if(!de&&S===Z.current&&(X.current=!1),X.current&&de&&S===Z.current)return;const ve=D.current;if(de||ae){const _e=T??null;if(S===_e){D.current=!1;return}let $e=Im;ve?$e=Am:de&&($e=qy),re(_e,$e);return}ve&&U!=null&&(H(S,Am),D.current=!1)},[T,C,H,U,b,E,S]);const J=Mt("div",r,{state:{orientation:c,tabActivationDirection:M},ref:o,props:m,stateAttributesMapping:Uu});return O.jsx(Ip.Provider,{value:V,children:O.jsx(mp,{elementsRef:x,children:J})})});vx.displayName="TabsRoot";function wd(e,r){for(const[o,i]of e.entries())if(r===i.value)return o;return null}function I0(e,r,o,i){if(e==null||r==null)return"none";const[l,u,c]=o==="horizontal"?["left","left","right"]:["top","up","down"],d=wd(i,e),p=wd(i,r);if(d==null||p==null)return d!==p&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof r?r>e?c:u:"none";const h=d.getBoundingClientRect()[l],m=p.getBoundingClientRect()[l];return m<h?u:m>h?c:"none"}const Pp=v.createContext(void 0);Pp.displayName="TabsListContext";function xx(){const e=v.useContext(Pp);if(e===void 0)throw new Error("Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");return e}const wx=v.forwardRef(function(r,o){const{className:i,disabled:l=!1,render:u,value:c,id:d,nativeButton:p=!0,style:h,...m}=r,{value:y,getTabPanelIdByValue:x,onValueChange:k,orientation:w,tabActivationDirection:S}=Ap(),{activateOnFocus:b,registerTabResizeObserverElement:C,tabsListElement:E}=xx(),{highlightedIndex:A,onHighlightedIndexChange:I}=dp(),P=Kr(d),_=v.useMemo(()=>({disabled:l,id:P,value:c}),[l,P,c]),{compositeProps:N,compositeRef:j,index:F}=fT({metadata:_}),M=c===y,G=v.useRef(!1),q=v.useRef(null),W=Ie(Z=>{var X;(X=q.current)==null||X.call(q),q.current=Z?C(Z):null});Ae(()=>{if(G.current){G.current=!1;return}if(!(M&&F>-1&&A!==F))return;const Z=E;if(Z!=null){const X=qn(_t(Z));if(X&&et(Z,X))return}l||I(F)},[M,F,A,I,l,E]);const{getButtonProps:K,buttonRef:H}=Ml({disabled:l,native:p,focusableWhenDisabled:!0}),ne=x(c),le=v.useRef(!1),B=v.useRef(!1);function V(Z){k(c,xt(us,Z.nativeEvent,void 0,{activationDirection:"none"}))}function U(Z){M||l||V(Z)}function T(Z){M||l||b&&(!le.current||B.current)&&V(Z)}function D(Z){if(M||l)return;le.current=!0,B.current=Z.button===0;const X=_t(Z.currentTarget);function oe(){le.current=!1,B.current=!1,X.removeEventListener("pointerup",oe),X.removeEventListener("pointercancel",oe)}X.addEventListener("pointerup",oe),X.addEventListener("pointercancel",oe)}return Mt("button",r,{state:{disabled:l,active:M,orientation:w,tabActivationDirection:S},ref:[o,H,j,W],props:[N,{role:"tab","aria-controls":ne,"aria-selected":M,id:P,onClick:U,onFocus:T,onPointerDown:D,[iT]:M?"":void 0,onKeyDownCapture(){G.current=!0}},m,K],stateAttributesMapping:Uu})});wx.displayName="TabsTab";const sI="--active-tab-left",iI="--active-tab-right",lI="--active-tab-top",aI="--active-tab-bottom",uI="--active-tab-width",cI="--active-tab-height";var A0;const fI={...Uu,activeTabPosition:()=>null,activeTabSize:()=>null},P0=2,bx=v.forwardRef(function(r,o){const{className:i,render:l,renderBeforeHydration:u=!1,style:c,...d}=r,{getTabElementBySelectedValue:p,orientation:h,tabActivationDirection:m,value:y}=Ap(),{tabsListElement:x,registerIndicatorUpdateListener:k}=xx(),w=Hd();v.useEffect(()=>k(w),[k,w]);let S=0,b=0,C=0,E=0,A=0,I=0,P=!1;if(y!=null&&x!=null){const M=p(y);if(M!=null){P=!0;const{width:G,height:q}=T0(M),{width:W,height:K}=T0(x),H=M.getBoundingClientRect(),ne=x.getBoundingClientRect(),le=W>0?ne.width/W:1,B=K>0?ne.height/K:1,V=dI(M,x);S=V.left,C=V.top;const U=(H.left-ne.left)/le+x.scrollLeft-x.clientLeft,T=(H.top-ne.top)/B+x.scrollTop-x.clientTop,D=pI(M);Math.abs(U-D.x-S)<=P0&&Math.abs(T-D.y-C)<=P0&&(S=U,C=T),A=G,I=q,b=x.scrollWidth-S-A,E=x.scrollHeight-C-I}}const _=P?{left:S,right:b,top:C,bottom:E}:null,N=P?{width:A,height:I}:null,j=P?{[sI]:`${S}px`,[iI]:`${b}px`,[lI]:`${C}px`,[aI]:`${E}px`,[uI]:`${A}px`,[cI]:`${I}px`}:void 0,F=Mt("span",r,{state:{orientation:h,activeTabPosition:_,activeTabSize:N,tabActivationDirection:m},ref:o,props:[{role:"presentation",style:j,hidden:!(P&&A>0&&I>0)},d,{suppressHydrationWarning:!0}],stateAttributesMapping:fI});return y==null?null:O.jsxs(v.Fragment,{children:[F,u&&(A0||(A0=O.jsx(rI,{script:""})))]})});bx.displayName="TabsIndicator";function dI(e,r){const o=_0(e),i=_0(r);let l=o.left-i.left-r.clientLeft,u=o.top-i.top-r.clientTop,c=oo(e);for(;$t(c)&&c!==r&&!To(c);)l-=c.scrollLeft,u-=c.scrollTop,c=oo(c);return{left:l,top:u}}function _0(e){let r=0,o=0,i=e;for(;i!=null;){r+=i.offsetLeft,o+=i.offsetTop;const l=i.offsetParent;l!=null&&(r+=l.clientLeft,o+=l.clientTop),i=l}return{left:r,top:o}}function pI(e){const r=Yt(e).getComputedStyle(e),{x:o,y:i}=cC(e,r);let l=o,u=i;const{translate:c}=r;if(c&&c!=="none"){const d=c.split(" ");l+=O0(d[0],e.offsetWidth),u+=O0(d[1],e.offsetHeight)}return{x:l,y:u}}function O0(e,r){if(!e)return 0;const o=parseFloat(e);return Number.isFinite(o)?e.endsWith("%")?o/100*r:o:0}const kx=v.forwardRef(function(r,o){const{activateOnFocus:i=!1,className:l,loopFocus:u=!0,render:c,style:d,...p}=r,{orientation:h,setTabMap:m,tabActivationDirection:y}=Ap(),[x,k]=v.useState(0),[w,S]=v.useState(null),b=v.useRef(new Set),C=v.useRef(new Set),E=v.useRef(null);Ae(()=>{if(typeof ResizeObserver>"u")return;const j=new ResizeObserver(()=>{b.current.forEach(F=>{F()})});return E.current=j,w&&j.observe(w),C.current.forEach(F=>{j.observe(F)}),()=>{j.disconnect(),E.current=null}},[w]);const A=Ie(j=>(b.current.add(j),()=>{b.current.delete(j)})),I=Ie(j=>{var F;return C.current.add(j),(F=E.current)==null||F.observe(j),()=>{var M;C.current.delete(j),(M=E.current)==null||M.unobserve(j)}}),P={orientation:h,tabActivationDirection:y},_={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},N=v.useMemo(()=>({activateOnFocus:i,registerIndicatorUpdateListener:A,registerTabResizeObserverElement:I,tabsListElement:w}),[i,A,I,w]);return O.jsx(Pp.Provider,{value:N,children:O.jsx(cT,{render:c,className:l,style:d,state:P,refs:[o,S],props:[_,p],stateAttributesMapping:Uu,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:u,orientation:h,onHighlightedIndexChange:k,onMapChange:m,disabledIndices:is})})});kx.displayName="TabsList";const N0={variant:"segmented",size:"base"},hI={scrollStart:"Scroll tabs left",scrollEnd:"Scroll tabs right"};function gI({tabs:e,value:r,selectedValue:o,onValueChange:i,activateOnFocus:l,className:u,listClassName:c,indicatorClassName:d,labels:p,variant:h=N0.variant,size:m=N0.size}){var j;const y=e??[];if(y.length===0)return null;const x=(j=y[0])==null?void 0:j.value,k=r!==void 0,w={value:k?r:void 0,defaultValue:k?void 0:o??x},S=h==="segmented",b=h==="underline",C=m==="sm",E={...hI,...p},{ref:A,isOverflowing:I,canScrollStart:P,canScrollEnd:_}=vI(!0,y.map(F=>F.value).join("|")),N=yI(A,I);return O.jsxs(vx,{...w,className:Xe("relative isolate min-w-0 font-medium",S&&(C?"rounded-md":"rounded-lg")+" ring ring-kumo-hairline/70",u),onValueChange:F=>{i==null||i(String(F))},children:[S&&O.jsx("div",{className:Xe("absolute inset-x-0 top-1/2 z-0 -translate-y-1/2 rounded-lg bg-kumo-recessed",C?"h-6.5":"h-9")}),O.jsxs(kx,{ref:A,activateOnFocus:l,"data-overflowing":I?"":void 0,"data-overflow-start":P?"":void 0,"data-overflow-end":_?"":void 0,...N(),className:Xe("kumo-tabs-list relative flex min-w-0 shrink scroll-px-(--scroll-fade-width) items-stretch overflow-x-auto overflow-y-hidden [--scroll-fade-width:3rem]",S&&"rounded-lg bg-kumo-recessed px-0.5",S&&(C?"h-6.5 rounded-md":"h-9"),I&&"cursor-grab active:cursor-grabbing",b&&"gap-4 border-b border-kumo-hairline pb-2",b&&(C?"h-6.5":"h-7.5"),c),children:[y.map(F=>O.jsx(wx,{"data-kumo-component":"Tabs","data-kumo-part":"tab",value:F.value,render:F.render,nativeButton:F.nativeButton,onClick:M=>{M.currentTarget.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},className:Xe("relative z-2 flex items-center rounded bg-transparent whitespace-nowrap focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand","forced-colors:focus-visible:-outline-offset-2",I?"cursor-grab active:cursor-grabbing":"cursor-pointer",C?"text-xs":"text-base",S&&"my-0.5 text-kumo-subtle hover:text-kumo-default focus-visible:ring-inset aria-selected:text-kumo-default",S&&(C?"rounded-sm px-2":"rounded-md px-2.5"),b&&"text-kumo-subtle hover:bg-kumo-tint hover:text-kumo-default aria-selected:font-medium aria-selected:text-kumo-default aria-selected:hover:bg-kumo-tint",b&&(C?"px-1.5 py-2.5":"px-2 py-3"),F.className),children:F.label},F.value)),O.jsx(bx,{render:F=>O.jsx("div",{...F,className:Xe("absolute left-0 z-1","w-(--active-tab-width) translate-x-(--active-tab-left) transition-all duration-200",S&&Xe("top-(--active-tab-top) h-(--active-tab-height) bg-kumo-base shadow-sm ring ring-kumo-line",C?"rounded":"rounded-md"),b&&"bottom-0 h-0.5 bg-kumo-brand",d)})})]}),S&&O.jsxs(O.Fragment,{children:[O.jsx(M0,{side:"start",visible:P,variant:h,size:m,label:E.scrollStart,onClick:()=>L0(A,"start")}),O.jsx(M0,{side:"end",visible:_,variant:h,size:m,label:E.scrollEnd,onClick:()=>L0(A,"end")})]})]})}function M0({side:e,visible:r,variant:o,size:i,label:l,onClick:u}){const c=e==="start",d=o==="segmented";return O.jsx("button",{type:"button","data-kumo-component":"Tabs","data-kumo-part":"overflow-control","data-side":e,"aria-label":l,"aria-hidden":!r,tabIndex:r?0:-1,onClick:u,className:Xe("absolute inset-y-0 z-3 flex items-center border-0 bg-transparent p-0 transition-opacity duration-150 focus:outline-hidden focus-visible:[&>span]:ring-2 focus-visible:[&>span]:ring-kumo-brand",c?"left-0 justify-start bg-linear-to-r":"right-0 justify-end bg-linear-to-l",r?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",d?"from-kumo-recessed via-kumo-recessed/95 to-transparent":"from-kumo-base via-kumo-base/95 to-transparent",d&&(i==="sm"?"w-8 rounded-md":"w-10 rounded-lg"),!d&&"w-8"),children:O.jsx("span",{className:Xe("flex items-center justify-center text-kumo-subtle transition-colors hover:text-kumo-default",i==="sm"?"size-5":"size-6",d?i==="sm"?"rounded-sm":"rounded-md":"rounded",c?"ml-1":"mr-1"),children:O.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:"size-3.5","aria-hidden":"true",children:O.jsx("path",{d:c?"M9.25 4.25L5.75 8L9.25 11.75":"M6.75 4.25L10.25 8L6.75 11.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})})})}function L0(e,r){const o=e.current;if(!o)return;const i=Array.from(o.querySelectorAll('[data-kumo-part="tab"]')),l=mI(o.clientWidth,i);o.scrollBy({left:r==="start"?-l:l,behavior:"smooth"})}function mI(e,r){let o=0;for(const i of r){const l=i.offsetWidth;if(o+l>e)return o||e;o+=l}return Math.max(80,Math.floor(e*.8))}function yI(e,r){const o=v.useRef(null),i=v.useRef(!1);return()=>({onPointerDownCapture:l=>{const u=e.current;!u||!r||l.pointerType!=="mouse"||l.button!==0||(o.current={pointerId:l.pointerId,startX:l.clientX,scrollLeft:u.scrollLeft,dragging:!1},i.current=!1)},onPointerMoveCapture:l=>{const u=e.current,c=o.current;if(!u||!r||!c||c.pointerId!==l.pointerId)return;const d=l.clientX-c.startX;if(!c.dragging){if(Math.abs(d)<=3)return;c.dragging=!0,i.current=!0,u.setPointerCapture(l.pointerId)}l.preventDefault(),u.scrollLeft=c.scrollLeft-d},onPointerUpCapture:l=>{const u=e.current,c=o.current;!u||!c||c.pointerId!==l.pointerId||(o.current=null,u.hasPointerCapture(l.pointerId)&&u.releasePointerCapture(l.pointerId),i.current&&window.setTimeout(()=>{i.current=!1},0))},onPointerCancelCapture:l=>{const u=e.current,c=o.current;!u||!c||c.pointerId!==l.pointerId||(o.current=null,u.hasPointerCapture(l.pointerId)&&u.releasePointerCapture(l.pointerId))},onClickCapture:l=>{i.current&&(l.preventDefault(),l.stopPropagation(),i.current=!1)}})}function vI(e,r){const o=v.useRef(null),[i,l]=v.useState({isOverflowing:!1,canScrollStart:!1,canScrollEnd:!1});return v.useLayoutEffect(()=>{const u=o.current;u&&l(c=>D0(u,c))},[e,r]),v.useEffect(()=>{const u=o.current;if(!u)return;const c=()=>{l(h=>D0(u,h))},d=new ResizeObserver(c);d.observe(u);const p=new MutationObserver(c);return p.observe(u,{childList:!0,characterData:!0,subtree:!0}),u.addEventListener("scroll",c,{passive:!0}),c(),()=>{d.disconnect(),p.disconnect(),u.removeEventListener("scroll",c)}},[e]),{ref:o,...i}}function D0(e,r){const o=Math.max(0,e.scrollWidth-e.clientWidth),i=Math.min(Math.max(0,e.scrollLeft),o),l={isOverflowing:o>1,canScrollStart:i>1,canScrollEnd:o-i>1};return r.isOverflowing===l.isOverflowing&&r.canScrollStart===l.canScrollStart&&r.canScrollEnd===l.canScrollEnd?r:l}Il.registerLanguage("go",xb);Il.registerLanguage("python",wb);Il.registerLanguage("cpp",bb);Il.registerLanguage("java",kb);const xI={go:"go",python:"python",cpp:"cpp",java:"java",py:"python","c++":"cpp"},F0=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Sx=(e,r)=>{const o=xI[r];try{return o?Il.highlight(e,{language:o,ignoreIllegals:!0}).value:F0(e)}catch{return F0(e)}};Wt.use({renderer:{code({text:e,lang:r}){const o=(r||"").split(/\s/)[0];return`<pre><code class="hljs">${Sx(e,o)}</code></pre>`}}});function wI({value:e,onChange:r,onKeyDown:o,lang:i}){const l=v.useRef(null),u=v.useMemo(()=>Sx(e,i)+`
|
|
146
|
+
`,[e,i]),c=d=>{l.current&&(l.current.scrollTop=d.target.scrollTop,l.current.scrollLeft=d.target.scrollLeft)};return O.jsxs("div",{className:"relative h-full w-full",children:[O.jsx("pre",{ref:l,"aria-hidden":"true",className:"code hljs-wrap pointer-events-none absolute inset-0 m-0 overflow-hidden p-3 whitespace-pre",dangerouslySetInnerHTML:{__html:u}}),O.jsx("textarea",{className:"code hl-input absolute inset-0 h-full w-full overflow-auto whitespace-pre bg-transparent p-3 outline-none",spellCheck:!1,wrap:"off",value:e,onChange:r,onKeyDown:o,onScroll:c})]})}const z0={Easy:"success",Medium:"warning",Hard:"error"},bI=[["go","Go"],["python","Python"],["cpp","C++"]],di=(e,r)=>fetch(e,r?{method:"POST",body:JSON.stringify(r)}:void 0).then(o=>o.json());function kI({text:e}){const r=v.useMemo(()=>Wt.parse(e||"",{gfm:!0,breaks:!1}),[e]);return O.jsx("div",{className:"md text-kumo-default",dangerouslySetInnerHTML:{__html:r}})}function SI({r:e}){if(!e)return null;if(e.verdict==="AC")return O.jsx(Zm,{variant:"default",title:"Accepted",description:`${e.passed}/${e.total} tests passed in ${e.ms} ms`});const r=e.fail;return O.jsx(Zm,{variant:"error",title:`${e.verdict}${e.total?` ${e.passed}/${e.total}`:""}`,description:O.jsxs("div",{className:"font-mono text-xs whitespace-pre-wrap break-all",children:[e.message,r&&O.jsxs(O.Fragment,{children:[`test ${r.i+1}
|
|
147
|
+
input: ${r.input}
|
|
148
|
+
`,r.expected!==void 0&&`expected: ${JSON.stringify(r.expected).slice(0,400)}
|
|
149
|
+
`,r.got!==void 0&&r.got!==null&&`got: ${JSON.stringify(r.got).slice(0,400)}
|
|
150
|
+
`,r.error]})]})})}function EI(){const[e,r]=v.useState(""),[o,i]=v.useState("All"),[l,u]=v.useState(""),[c,d]=v.useState({total:0,items:[]}),[p,h]=v.useState({categories:[],progress:{}}),[m,y]=v.useState(null),[x,k]=v.useState("description"),[w,S]=v.useState("go"),[b,C]=v.useState(""),[E,A]=v.useState(null),[I,P]=v.useState(!1),[_,N]=v.useState(""),j=v.useRef({}),[F,M]=v.useState({}),[G,q]=v.useState(!1),W=T=>{if(T==="solution"&&m&&!F[m.slug]){q(!0);return}k(T)},K=()=>{M(T=>({...T,[m.slug]:!0})),q(!1),k("solution")};v.useEffect(()=>{di("/api/meta").then(h)},[]),v.useEffect(()=>{const T=setTimeout(()=>{const D=new URLSearchParams({q:e,difficulty:o,category:l});di("/api/problems?"+D).then(d)},150);return()=>clearTimeout(T)},[e,o,l]);const H=v.useCallback(T=>{di("/api/problem/"+T).then(D=>{y(D),k("description"),A(null),N("")})},[]);v.useEffect(()=>{if(!m)return;const T=`${m.slug}:${w}`;C(j.current[T]??m.starter[w]??""),A(null)},[m,w]);const ne=T=>{C(T),m&&(j.current[`${m.slug}:${w}`]=T)},le=T=>{if(T.key==="Tab"){T.preventDefault();const D=T.target,Z=D.selectionStart;ne(b.slice(0,Z)+" "+b.slice(D.selectionEnd)),requestAnimationFrame(()=>{D.selectionStart=D.selectionEnd=Z+1})}(T.ctrlKey||T.metaKey)&&T.key==="Enter"&&B()};async function B(){if(m){P(!0),A(null);try{const T=await di("/api/judge",{slug:m.slug,lang:w,code:b});A(T),T.verdict==="AC"&&di("/api/meta").then(h)}finally{P(!1)}}}async function V(){const T=await di("/api/scaffold",{slug:m.slug,lang:w});N(T.error||`${T.created?"created":"exists"}: ${T.file}`)}const U=Object.keys(p.progress).length;return O.jsxs("div",{className:"flex h-full flex-col bg-kumo-canvas text-kumo-default",children:[O.jsxs("header",{className:"flex items-center justify-between border-b border-kumo-line px-4 py-2",children:[O.jsxs("div",{className:"flex items-baseline gap-2",children:[O.jsx(Ro,{variant:"heading3",children:"offcode"}),O.jsx(Ro,{variant:"secondary",size:"sm",children:"by Limon Das"})]}),O.jsxs(Ro,{variant:"secondary",size:"sm",children:[c.total," problems · ",U," solved"]})]}),O.jsxs("div",{className:"grid min-h-0 flex-1 grid-cols-[360px_1fr] max-md:grid-cols-1",children:[O.jsxs("aside",{className:"flex min-h-0 flex-col border-r border-kumo-line",children:[O.jsxs("div",{className:"flex flex-col gap-2 border-b border-kumo-line p-3",children:[O.jsx(p1,{"aria-label":"Search",placeholder:"Search title, number, category",value:e,onChange:T=>r(T.target.value)}),O.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[O.jsx(Lr,{label:"Difficulty",value:o,onValueChange:i,children:["All","Easy","Medium","Hard"].map(T=>O.jsx(Lr.Option,{value:T,children:T},T))}),O.jsxs(Lr,{label:"Category",value:l,onValueChange:u,children:[O.jsx(Lr.Option,{value:"",children:"All topics"}),p.categories.map(T=>O.jsx(Lr.Option,{value:T,children:T},T))]})]})]}),O.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:c.items.map(T=>O.jsxs("button",{onClick:()=>H(T.slug),className:`flex w-full items-center gap-3 border-b border-kumo-line px-3 py-2 text-left hover:bg-kumo-tint ${(m==null?void 0:m.slug)===T.slug?"bg-kumo-tint":""}`,children:[O.jsx("span",{className:"w-9 shrink-0 text-kumo-subtle text-sm",children:T.label}),O.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:T.title}),p.progress[T.slug]&&O.jsx("span",{className:"text-kumo-success text-sm",children:"✓"}),O.jsx(Sf,{variant:z0[T.difficulty],children:T.difficulty})]},T.slug))})]}),O.jsx("main",{className:"min-h-0 overflow-hidden",children:m?O.jsxs("div",{className:"grid h-full grid-cols-2 max-xl:grid-cols-1 max-xl:grid-rows-2",children:[O.jsxs("section",{className:"flex min-h-0 flex-col border-r border-kumo-line",children:[O.jsxs("div",{className:"flex flex-col gap-2 p-4 pb-2",children:[O.jsxs(Ro,{variant:"heading2",children:[m.id,". ",m.title]}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Sf,{variant:z0[m.difficulty],children:m.difficulty}),O.jsx(Sf,{variant:"outline",children:m.category})]}),O.jsx(gI,{variant:"underline",value:x,onValueChange:W,tabs:[{value:"description",label:"Description"},{value:"hints",label:"Hints"},{value:"solution",label:"Solution"}]})]}),O.jsx("div",{className:"min-h-0 flex-1 overflow-auto px-4 pb-6",children:O.jsx(kI,{text:m.md[x]})})]}),O.jsxs("section",{className:"flex min-h-0 flex-col gap-2 p-4",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("div",{className:"w-32",children:O.jsx(Lr,{label:"Language",value:w,onValueChange:S,children:bI.map(([T,D])=>O.jsx(Lr.Option,{value:T,children:D},T))})}),O.jsx("div",{className:"flex-1"}),O.jsx(ns,{variant:"secondary",onClick:V,children:"Save to ./offcode"}),O.jsx(ns,{variant:"primary",onClick:B,disabled:I||!m.judge,children:I?"Running":"Run"})]}),O.jsx(yx,{className:"min-h-0 flex-1 overflow-hidden rounded-lg",children:O.jsx(wI,{value:b,onChange:T=>ne(T.target.value),onKeyDown:le,lang:w})}),_&&O.jsx(Ro,{variant:"secondary",size:"xs",children:_}),!m.judge&&O.jsx(Ro,{variant:"secondary",size:"xs",children:"No judge for this problem (design, interactive or graph)."}),w==="cpp"&&O.jsx(Ro,{variant:"secondary",size:"xs",children:"C++ judge not built yet. Use Go or Python."}),I&&O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(by,{}),O.jsx(Ro,{variant:"secondary",size:"sm",children:"Judging"})]}),O.jsx("div",{className:"max-h-56 overflow-auto",children:O.jsx(SI,{r:E})})]})]}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx(Ro,{variant:"secondary",children:"Pick a problem"})})})]}),O.jsx(dl.Root,{role:"alertdialog",open:G,onOpenChange:q,children:O.jsxs(dl,{size:"sm",className:"p-6",children:[O.jsx(dl.Title,{className:"text-lg font-semibold",children:"Show solution?"}),O.jsx(dl.Description,{className:"mt-2 text-kumo-subtle",children:"Try the problem and the hints first. Looking at the solution now can spoil the practice."}),O.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[O.jsx(dl.Close,{render:T=>O.jsx(ns,{variant:"secondary",...T,children:"Cancel"})}),O.jsx(ns,{variant:"primary",onClick:K,children:"Show solution"})]})]})})]})}const Ex=window.matchMedia("(prefers-color-scheme: dark)"),Rx=()=>document.documentElement.setAttribute("data-mode",Ex.matches?"dark":"light");Rx();Ex.addEventListener("change",Rx);fw.createRoot(document.getElementById("root")).render(O.jsx(EI,{}));
|