@k3-tech/react-kit 0.0.52 → 0.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
5
5
  import * as React from "react";
6
- import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$7, isValidElement, PureComponent } from "react";
6
+ import React__default, { createContext, useSyncExternalStore, useEffect, useMemo, useContext, forwardRef, createElement, Fragment as Fragment$1, memo as memo$1, useRef, useCallback, useLayoutEffect, useReducer, cloneElement, Component, useState, useImperativeHandle, use as use$1, isValidElement, PureComponent } from "react";
7
7
  import * as ReactDOM from "react-dom";
8
8
  import ReactDOM__default from "react-dom";
9
9
  import { useRouter, useLocation, Link as Link$1 } from "@tanstack/react-router";
@@ -4609,28 +4609,7 @@ function clsx() {
4609
4609
  for (var e2, t2, f = 0, n2 = "", o2 = arguments.length; f < o2; f++) (e2 = arguments[f]) && (t2 = r$2(e2)) && (n2 && (n2 += " "), n2 += t2);
4610
4610
  return n2;
4611
4611
  }
4612
- const concatArrays = (array1, array2) => {
4613
- const combinedArray = new Array(array1.length + array2.length);
4614
- for (let i2 = 0; i2 < array1.length; i2++) {
4615
- combinedArray[i2] = array1[i2];
4616
- }
4617
- for (let i2 = 0; i2 < array2.length; i2++) {
4618
- combinedArray[array1.length + i2] = array2[i2];
4619
- }
4620
- return combinedArray;
4621
- };
4622
- const createClassValidatorObject = (classGroupId, validator) => ({
4623
- classGroupId,
4624
- validator
4625
- });
4626
- const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators2 = null, classGroupId) => ({
4627
- nextPart,
4628
- validators: validators2,
4629
- classGroupId
4630
- });
4631
4612
  const CLASS_PART_SEPARATOR = "-";
4632
- const EMPTY_CONFLICTS = [];
4633
- const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
4634
4613
  const createClassGroupUtils = (config2) => {
4635
4614
  const classMap = createClassMap(config2);
4636
4615
  const {
@@ -4638,134 +4617,104 @@ const createClassGroupUtils = (config2) => {
4638
4617
  conflictingClassGroupModifiers
4639
4618
  } = config2;
4640
4619
  const getClassGroupId = (className) => {
4641
- if (className.startsWith("[") && className.endsWith("]")) {
4642
- return getGroupIdForArbitraryProperty(className);
4643
- }
4644
4620
  const classParts = className.split(CLASS_PART_SEPARATOR);
4645
- const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
4646
- return getGroupRecursive(classParts, startIndex, classMap);
4621
+ if (classParts[0] === "" && classParts.length !== 1) {
4622
+ classParts.shift();
4623
+ }
4624
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
4647
4625
  };
4648
4626
  const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
4649
- if (hasPostfixModifier) {
4650
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
4651
- const baseConflicts = conflictingClassGroups[classGroupId];
4652
- if (modifierConflicts) {
4653
- if (baseConflicts) {
4654
- return concatArrays(baseConflicts, modifierConflicts);
4655
- }
4656
- return modifierConflicts;
4657
- }
4658
- return baseConflicts || EMPTY_CONFLICTS;
4627
+ const conflicts = conflictingClassGroups[classGroupId] || [];
4628
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
4629
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
4659
4630
  }
4660
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
4631
+ return conflicts;
4661
4632
  };
4662
4633
  return {
4663
4634
  getClassGroupId,
4664
4635
  getConflictingClassGroupIds
4665
4636
  };
4666
4637
  };
4667
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
4668
- const classPathsLength = classParts.length - startIndex;
4669
- if (classPathsLength === 0) {
4638
+ const getGroupRecursive = (classParts, classPartObject) => {
4639
+ var _a2;
4640
+ if (classParts.length === 0) {
4670
4641
  return classPartObject.classGroupId;
4671
4642
  }
4672
- const currentClassPart = classParts[startIndex];
4643
+ const currentClassPart = classParts[0];
4673
4644
  const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
4674
- if (nextClassPartObject) {
4675
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
4676
- if (result) return result;
4645
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
4646
+ if (classGroupFromNextClassPart) {
4647
+ return classGroupFromNextClassPart;
4677
4648
  }
4678
- const validators2 = classPartObject.validators;
4679
- if (validators2 === null) {
4649
+ if (classPartObject.validators.length === 0) {
4680
4650
  return void 0;
4681
4651
  }
4682
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
4683
- const validatorsLength = validators2.length;
4684
- for (let i2 = 0; i2 < validatorsLength; i2++) {
4685
- const validatorObj = validators2[i2];
4686
- if (validatorObj.validator(classRest)) {
4687
- return validatorObj.classGroupId;
4652
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
4653
+ return (_a2 = classPartObject.validators.find(({
4654
+ validator
4655
+ }) => validator(classRest))) == null ? void 0 : _a2.classGroupId;
4656
+ };
4657
+ const arbitraryPropertyRegex = /^\[(.+)\]$/;
4658
+ const getGroupIdForArbitraryProperty = (className) => {
4659
+ if (arbitraryPropertyRegex.test(className)) {
4660
+ const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
4661
+ const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
4662
+ if (property) {
4663
+ return "arbitrary.." + property;
4688
4664
  }
4689
4665
  }
4690
- return void 0;
4691
4666
  };
4692
- const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
4693
- const content = className.slice(1, -1);
4694
- const colonIndex = content.indexOf(":");
4695
- const property = content.slice(0, colonIndex);
4696
- return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
4697
- })();
4698
4667
  const createClassMap = (config2) => {
4699
4668
  const {
4700
4669
  theme,
4701
4670
  classGroups
4702
4671
  } = config2;
4703
- return processClassGroups(classGroups, theme);
4704
- };
4705
- const processClassGroups = (classGroups, theme) => {
4706
- const classMap = createClassPartObject();
4672
+ const classMap = {
4673
+ nextPart: /* @__PURE__ */ new Map(),
4674
+ validators: []
4675
+ };
4707
4676
  for (const classGroupId in classGroups) {
4708
- const group = classGroups[classGroupId];
4709
- processClassesRecursively(group, classMap, classGroupId, theme);
4677
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
4710
4678
  }
4711
4679
  return classMap;
4712
4680
  };
4713
4681
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
4714
- const len = classGroup.length;
4715
- for (let i2 = 0; i2 < len; i2++) {
4716
- const classDefinition = classGroup[i2];
4717
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
4718
- }
4719
- };
4720
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4721
- if (typeof classDefinition === "string") {
4722
- processStringDefinition(classDefinition, classPartObject, classGroupId);
4723
- return;
4724
- }
4725
- if (typeof classDefinition === "function") {
4726
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
4727
- return;
4728
- }
4729
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
4730
- };
4731
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
4732
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4733
- classPartObjectToEdit.classGroupId = classGroupId;
4734
- };
4735
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4736
- if (isThemeGetter(classDefinition)) {
4737
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4738
- return;
4739
- }
4740
- if (classPartObject.validators === null) {
4741
- classPartObject.validators = [];
4742
- }
4743
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
4744
- };
4745
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
4746
- const entries = Object.entries(classDefinition);
4747
- const len = entries.length;
4748
- for (let i2 = 0; i2 < len; i2++) {
4749
- const [key, value] = entries[i2];
4750
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
4751
- }
4682
+ classGroup.forEach((classDefinition) => {
4683
+ if (typeof classDefinition === "string") {
4684
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
4685
+ classPartObjectToEdit.classGroupId = classGroupId;
4686
+ return;
4687
+ }
4688
+ if (typeof classDefinition === "function") {
4689
+ if (isThemeGetter(classDefinition)) {
4690
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
4691
+ return;
4692
+ }
4693
+ classPartObject.validators.push({
4694
+ validator: classDefinition,
4695
+ classGroupId
4696
+ });
4697
+ return;
4698
+ }
4699
+ Object.entries(classDefinition).forEach(([key, classGroup2]) => {
4700
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
4701
+ });
4702
+ });
4752
4703
  };
4753
4704
  const getPart = (classPartObject, path) => {
4754
- let current = classPartObject;
4755
- const parts = path.split(CLASS_PART_SEPARATOR);
4756
- const len = parts.length;
4757
- for (let i2 = 0; i2 < len; i2++) {
4758
- const part = parts[i2];
4759
- let next = current.nextPart.get(part);
4760
- if (!next) {
4761
- next = createClassPartObject();
4762
- current.nextPart.set(part, next);
4763
- }
4764
- current = next;
4765
- }
4766
- return current;
4705
+ let currentClassPartObject = classPartObject;
4706
+ path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
4707
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
4708
+ currentClassPartObject.nextPart.set(pathPart, {
4709
+ nextPart: /* @__PURE__ */ new Map(),
4710
+ validators: []
4711
+ });
4712
+ }
4713
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
4714
+ });
4715
+ return currentClassPartObject;
4767
4716
  };
4768
- const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
4717
+ const isThemeGetter = (func) => func.isThemeGetter;
4769
4718
  const createLruCache = (maxCacheSize) => {
4770
4719
  if (maxCacheSize < 1) {
4771
4720
  return {
@@ -4775,31 +4724,31 @@ const createLruCache = (maxCacheSize) => {
4775
4724
  };
4776
4725
  }
4777
4726
  let cacheSize = 0;
4778
- let cache2 = /* @__PURE__ */ Object.create(null);
4779
- let previousCache = /* @__PURE__ */ Object.create(null);
4727
+ let cache2 = /* @__PURE__ */ new Map();
4728
+ let previousCache = /* @__PURE__ */ new Map();
4780
4729
  const update = (key, value) => {
4781
- cache2[key] = value;
4730
+ cache2.set(key, value);
4782
4731
  cacheSize++;
4783
4732
  if (cacheSize > maxCacheSize) {
4784
4733
  cacheSize = 0;
4785
4734
  previousCache = cache2;
4786
- cache2 = /* @__PURE__ */ Object.create(null);
4735
+ cache2 = /* @__PURE__ */ new Map();
4787
4736
  }
4788
4737
  };
4789
4738
  return {
4790
4739
  get(key) {
4791
- let value = cache2[key];
4740
+ let value = cache2.get(key);
4792
4741
  if (value !== void 0) {
4793
4742
  return value;
4794
4743
  }
4795
- if ((value = previousCache[key]) !== void 0) {
4744
+ if ((value = previousCache.get(key)) !== void 0) {
4796
4745
  update(key, value);
4797
4746
  return value;
4798
4747
  }
4799
4748
  },
4800
4749
  set(key, value) {
4801
- if (key in cache2) {
4802
- cache2[key] = value;
4750
+ if (cache2.has(key)) {
4751
+ cache2.set(key, value);
4803
4752
  } else {
4804
4753
  update(key, value);
4805
4754
  }
@@ -4808,14 +4757,7 @@ const createLruCache = (maxCacheSize) => {
4808
4757
  };
4809
4758
  const IMPORTANT_MODIFIER = "!";
4810
4759
  const MODIFIER_SEPARATOR = ":";
4811
- const EMPTY_MODIFIERS = [];
4812
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
4813
- modifiers,
4814
- hasImportantModifier,
4815
- baseClassName,
4816
- maybePostfixModifierPosition,
4817
- isExternal
4818
- });
4760
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
4819
4761
  const createParseClassName = (config2) => {
4820
4762
  const {
4821
4763
  prefix,
@@ -4827,13 +4769,12 @@ const createParseClassName = (config2) => {
4827
4769
  let parenDepth = 0;
4828
4770
  let modifierStart = 0;
4829
4771
  let postfixModifierPosition;
4830
- const len = className.length;
4831
- for (let index2 = 0; index2 < len; index2++) {
4832
- const currentCharacter = className[index2];
4772
+ for (let index2 = 0; index2 < className.length; index2++) {
4773
+ let currentCharacter = className[index2];
4833
4774
  if (bracketDepth === 0 && parenDepth === 0) {
4834
4775
  if (currentCharacter === MODIFIER_SEPARATOR) {
4835
4776
  modifiers.push(className.slice(modifierStart, index2));
4836
- modifierStart = index2 + 1;
4777
+ modifierStart = index2 + MODIFIER_SEPARATOR_LENGTH;
4837
4778
  continue;
4838
4779
  }
4839
4780
  if (currentCharacter === "/") {
@@ -4841,34 +4782,37 @@ const createParseClassName = (config2) => {
4841
4782
  continue;
4842
4783
  }
4843
4784
  }
4844
- if (currentCharacter === "[") bracketDepth++;
4845
- else if (currentCharacter === "]") bracketDepth--;
4846
- else if (currentCharacter === "(") parenDepth++;
4847
- else if (currentCharacter === ")") parenDepth--;
4848
- }
4849
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
4850
- let baseClassName = baseClassNameWithImportantModifier;
4851
- let hasImportantModifier = false;
4852
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
4853
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
4854
- hasImportantModifier = true;
4855
- } else if (
4856
- /**
4857
- * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
4858
- * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
4859
- */
4860
- baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
4861
- ) {
4862
- baseClassName = baseClassNameWithImportantModifier.slice(1);
4863
- hasImportantModifier = true;
4785
+ if (currentCharacter === "[") {
4786
+ bracketDepth++;
4787
+ } else if (currentCharacter === "]") {
4788
+ bracketDepth--;
4789
+ } else if (currentCharacter === "(") {
4790
+ parenDepth++;
4791
+ } else if (currentCharacter === ")") {
4792
+ parenDepth--;
4793
+ }
4864
4794
  }
4795
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
4796
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
4797
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
4865
4798
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
4866
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
4799
+ return {
4800
+ modifiers,
4801
+ hasImportantModifier,
4802
+ baseClassName,
4803
+ maybePostfixModifierPosition
4804
+ };
4867
4805
  };
4868
4806
  if (prefix) {
4869
4807
  const fullPrefix = prefix + MODIFIER_SEPARATOR;
4870
4808
  const parseClassNameOriginal = parseClassName;
4871
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
4809
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
4810
+ isExternal: true,
4811
+ modifiers: [],
4812
+ hasImportantModifier: false,
4813
+ baseClassName: className,
4814
+ maybePostfixModifierPosition: void 0
4815
+ };
4872
4816
  }
4873
4817
  if (experimentalParseClassName) {
4874
4818
  const parseClassNameOriginal = parseClassName;
@@ -4879,35 +4823,36 @@ const createParseClassName = (config2) => {
4879
4823
  }
4880
4824
  return parseClassName;
4881
4825
  };
4826
+ const stripImportantModifier = (baseClassName) => {
4827
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
4828
+ return baseClassName.substring(0, baseClassName.length - 1);
4829
+ }
4830
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
4831
+ return baseClassName.substring(1);
4832
+ }
4833
+ return baseClassName;
4834
+ };
4882
4835
  const createSortModifiers = (config2) => {
4883
- const modifierWeights = /* @__PURE__ */ new Map();
4884
- config2.orderSensitiveModifiers.forEach((mod, index2) => {
4885
- modifierWeights.set(mod, 1e6 + index2);
4886
- });
4887
- return (modifiers) => {
4888
- const result = [];
4889
- let currentSegment = [];
4890
- for (let i2 = 0; i2 < modifiers.length; i2++) {
4891
- const modifier = modifiers[i2];
4892
- const isArbitrary = modifier[0] === "[";
4893
- const isOrderSensitive = modifierWeights.has(modifier);
4894
- if (isArbitrary || isOrderSensitive) {
4895
- if (currentSegment.length > 0) {
4896
- currentSegment.sort();
4897
- result.push(...currentSegment);
4898
- currentSegment = [];
4899
- }
4900
- result.push(modifier);
4836
+ const orderSensitiveModifiers = Object.fromEntries(config2.orderSensitiveModifiers.map((modifier) => [modifier, true]));
4837
+ const sortModifiers = (modifiers) => {
4838
+ if (modifiers.length <= 1) {
4839
+ return modifiers;
4840
+ }
4841
+ const sortedModifiers = [];
4842
+ let unsortedModifiers = [];
4843
+ modifiers.forEach((modifier) => {
4844
+ const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
4845
+ if (isPositionSensitive) {
4846
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
4847
+ unsortedModifiers = [];
4901
4848
  } else {
4902
- currentSegment.push(modifier);
4849
+ unsortedModifiers.push(modifier);
4903
4850
  }
4904
- }
4905
- if (currentSegment.length > 0) {
4906
- currentSegment.sort();
4907
- result.push(...currentSegment);
4908
- }
4909
- return result;
4851
+ });
4852
+ sortedModifiers.push(...unsortedModifiers.sort());
4853
+ return sortedModifiers;
4910
4854
  };
4855
+ return sortModifiers;
4911
4856
  };
4912
4857
  const createConfigUtils = (config2) => ({
4913
4858
  cache: createLruCache(config2.cacheSize),
@@ -4953,10 +4898,10 @@ const mergeClassList = (classList, configUtils) => {
4953
4898
  }
4954
4899
  hasPostfixModifier = false;
4955
4900
  }
4956
- const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
4901
+ const variantModifier = sortModifiers(modifiers).join(":");
4957
4902
  const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
4958
4903
  const classId = modifierId + classGroupId;
4959
- if (classGroupsInConflict.indexOf(classId) > -1) {
4904
+ if (classGroupsInConflict.includes(classId)) {
4960
4905
  continue;
4961
4906
  }
4962
4907
  classGroupsInConflict.push(classId);
@@ -4969,13 +4914,13 @@ const mergeClassList = (classList, configUtils) => {
4969
4914
  }
4970
4915
  return result;
4971
4916
  };
4972
- const twJoin = (...classLists) => {
4917
+ function twJoin() {
4973
4918
  let index2 = 0;
4974
4919
  let argument;
4975
4920
  let resolvedValue;
4976
4921
  let string2 = "";
4977
- while (index2 < classLists.length) {
4978
- if (argument = classLists[index2++]) {
4922
+ while (index2 < arguments.length) {
4923
+ if (argument = arguments[index2++]) {
4979
4924
  if (resolvedValue = toValue(argument)) {
4980
4925
  string2 && (string2 += " ");
4981
4926
  string2 += resolvedValue;
@@ -4983,7 +4928,7 @@ const twJoin = (...classLists) => {
4983
4928
  }
4984
4929
  }
4985
4930
  return string2;
4986
- };
4931
+ }
4987
4932
  const toValue = (mix) => {
4988
4933
  if (typeof mix === "string") {
4989
4934
  return mix;
@@ -5000,20 +4945,20 @@ const toValue = (mix) => {
5000
4945
  }
5001
4946
  return string2;
5002
4947
  };
5003
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
4948
+ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
5004
4949
  let configUtils;
5005
4950
  let cacheGet;
5006
4951
  let cacheSet;
5007
- let functionToCall;
5008
- const initTailwindMerge = (classList) => {
4952
+ let functionToCall = initTailwindMerge;
4953
+ function initTailwindMerge(classList) {
5009
4954
  const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
5010
4955
  configUtils = createConfigUtils(config2);
5011
4956
  cacheGet = configUtils.cache.get;
5012
4957
  cacheSet = configUtils.cache.set;
5013
4958
  functionToCall = tailwindMerge;
5014
4959
  return tailwindMerge(classList);
5015
- };
5016
- const tailwindMerge = (classList) => {
4960
+ }
4961
+ function tailwindMerge(classList) {
5017
4962
  const cachedResult = cacheGet(classList);
5018
4963
  if (cachedResult) {
5019
4964
  return cachedResult;
@@ -5021,13 +4966,13 @@ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
5021
4966
  const result = mergeClassList(classList, configUtils);
5022
4967
  cacheSet(classList, result);
5023
4968
  return result;
4969
+ }
4970
+ return function callTailwindMerge() {
4971
+ return functionToCall(twJoin.apply(null, arguments));
5024
4972
  };
5025
- functionToCall = initTailwindMerge;
5026
- return (...args) => functionToCall(twJoin(...args));
5027
- };
5028
- const fallbackThemeArr = [];
4973
+ }
5029
4974
  const fromTheme = (key) => {
5030
- const themeGetter = (theme) => theme[key] || fallbackThemeArr;
4975
+ const themeGetter = (theme) => theme[key] || [];
5031
4976
  themeGetter.isThemeGetter = true;
5032
4977
  return themeGetter;
5033
4978
  };
@@ -7635,7 +7580,7 @@ function createContext2(rootComponentName, defaultContext) {
7635
7580
  }
7636
7581
  return [Provider2, useContext2];
7637
7582
  }
7638
- function createContextScope$2(scopeName, createContextScopeDeps = []) {
7583
+ function createContextScope(scopeName, createContextScopeDeps = []) {
7639
7584
  let defaultContexts = [];
7640
7585
  function createContext3(rootComponentName, defaultContext) {
7641
7586
  const BaseContext = React.createContext(defaultContext);
@@ -7672,9 +7617,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
7672
7617
  };
7673
7618
  };
7674
7619
  createScope.scopeName = scopeName;
7675
- return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
7620
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
7676
7621
  }
7677
- function composeContextScopes$2(...scopes) {
7622
+ function composeContextScopes(...scopes) {
7678
7623
  const baseScope = scopes[0];
7679
7624
  if (scopes.length === 1) return baseScope;
7680
7625
  const createScope = () => {
@@ -7694,18 +7639,18 @@ function composeContextScopes$2(...scopes) {
7694
7639
  createScope.scopeName = baseScope.scopeName;
7695
7640
  return createScope;
7696
7641
  }
7697
- function setRef$1(ref, value) {
7642
+ function setRef$2(ref, value) {
7698
7643
  if (typeof ref === "function") {
7699
7644
  return ref(value);
7700
7645
  } else if (ref !== null && ref !== void 0) {
7701
7646
  ref.current = value;
7702
7647
  }
7703
7648
  }
7704
- function composeRefs$1(...refs) {
7649
+ function composeRefs$2(...refs) {
7705
7650
  return (node) => {
7706
7651
  let hasCleanup = false;
7707
7652
  const cleanups = refs.map((ref) => {
7708
- const cleanup = setRef$1(ref, node);
7653
+ const cleanup = setRef$2(ref, node);
7709
7654
  if (!hasCleanup && typeof cleanup == "function") {
7710
7655
  hasCleanup = true;
7711
7656
  }
@@ -7718,7 +7663,7 @@ function composeRefs$1(...refs) {
7718
7663
  if (typeof cleanup == "function") {
7719
7664
  cleanup();
7720
7665
  } else {
7721
- setRef$1(refs[i2], null);
7666
+ setRef$2(refs[i2], null);
7722
7667
  }
7723
7668
  }
7724
7669
  };
@@ -7726,15 +7671,15 @@ function composeRefs$1(...refs) {
7726
7671
  };
7727
7672
  }
7728
7673
  function useComposedRefs$1(...refs) {
7729
- return React.useCallback(composeRefs$1(...refs), refs);
7674
+ return React.useCallback(composeRefs$2(...refs), refs);
7730
7675
  }
7731
7676
  // @__NO_SIDE_EFFECTS__
7732
- function createSlot$7(ownerName) {
7733
- const SlotClone = /* @__PURE__ */ createSlotClone$7(ownerName);
7677
+ function createSlot$1(ownerName) {
7678
+ const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
7734
7679
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
7735
7680
  const { children, ...slotProps } = props2;
7736
7681
  const childrenArray = React.Children.toArray(children);
7737
- const slottable = childrenArray.find(isSlottable$7);
7682
+ const slottable = childrenArray.find(isSlottable$1);
7738
7683
  if (slottable) {
7739
7684
  const newElement = slottable.props.children;
7740
7685
  const newChildren = childrenArray.map((child) => {
@@ -7753,14 +7698,14 @@ function createSlot$7(ownerName) {
7753
7698
  return Slot2;
7754
7699
  }
7755
7700
  // @__NO_SIDE_EFFECTS__
7756
- function createSlotClone$7(ownerName) {
7701
+ function createSlotClone$1(ownerName) {
7757
7702
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
7758
7703
  const { children, ...slotProps } = props2;
7759
7704
  if (React.isValidElement(children)) {
7760
- const childrenRef = getElementRef$8(children);
7761
- const props22 = mergeProps$7(slotProps, children.props);
7705
+ const childrenRef = getElementRef$2(children);
7706
+ const props22 = mergeProps$1(slotProps, children.props);
7762
7707
  if (children.type !== React.Fragment) {
7763
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
7708
+ props22.ref = forwardedRef ? composeRefs$2(forwardedRef, childrenRef) : childrenRef;
7764
7709
  }
7765
7710
  return React.cloneElement(children, props22);
7766
7711
  }
@@ -7769,20 +7714,20 @@ function createSlotClone$7(ownerName) {
7769
7714
  SlotClone.displayName = `${ownerName}.SlotClone`;
7770
7715
  return SlotClone;
7771
7716
  }
7772
- var SLOTTABLE_IDENTIFIER$7 = Symbol("radix.slottable");
7717
+ var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
7773
7718
  // @__NO_SIDE_EFFECTS__
7774
7719
  function createSlottable(ownerName) {
7775
7720
  const Slottable2 = ({ children }) => {
7776
7721
  return /* @__PURE__ */ jsx(Fragment, { children });
7777
7722
  };
7778
7723
  Slottable2.displayName = `${ownerName}.Slottable`;
7779
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER$7;
7724
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER$1;
7780
7725
  return Slottable2;
7781
7726
  }
7782
- function isSlottable$7(child) {
7783
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$7;
7727
+ function isSlottable$1(child) {
7728
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
7784
7729
  }
7785
- function mergeProps$7(slotProps, childProps) {
7730
+ function mergeProps$1(slotProps, childProps) {
7786
7731
  const overrideProps = { ...childProps };
7787
7732
  for (const propName in childProps) {
7788
7733
  const slotPropValue = slotProps[propName];
@@ -7806,7 +7751,7 @@ function mergeProps$7(slotProps, childProps) {
7806
7751
  }
7807
7752
  return { ...slotProps, ...overrideProps };
7808
7753
  }
7809
- function getElementRef$8(element) {
7754
+ function getElementRef$2(element) {
7810
7755
  var _a2, _b;
7811
7756
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
7812
7757
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -7822,7 +7767,7 @@ function getElementRef$8(element) {
7822
7767
  }
7823
7768
  function createCollection(name) {
7824
7769
  const PROVIDER_NAME2 = name + "CollectionProvider";
7825
- const [createCollectionContext, createCollectionScope2] = createContextScope$2(PROVIDER_NAME2);
7770
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
7826
7771
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
7827
7772
  PROVIDER_NAME2,
7828
7773
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
@@ -7835,7 +7780,7 @@ function createCollection(name) {
7835
7780
  };
7836
7781
  CollectionProvider.displayName = PROVIDER_NAME2;
7837
7782
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
7838
- const CollectionSlotImpl = /* @__PURE__ */ createSlot$7(COLLECTION_SLOT_NAME);
7783
+ const CollectionSlotImpl = /* @__PURE__ */ createSlot$1(COLLECTION_SLOT_NAME);
7839
7784
  const CollectionSlot = React__default.forwardRef(
7840
7785
  (props2, forwardedRef) => {
7841
7786
  const { scope, children } = props2;
@@ -7847,7 +7792,7 @@ function createCollection(name) {
7847
7792
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
7848
7793
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
7849
7794
  const ITEM_DATA_ATTR = "data-radix-collection-item";
7850
- const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$7(ITEM_SLOT_NAME);
7795
+ const CollectionItemSlotImpl = /* @__PURE__ */ createSlot$1(ITEM_SLOT_NAME);
7851
7796
  const CollectionItemSlot = React__default.forwardRef(
7852
7797
  (props2, forwardedRef) => {
7853
7798
  const { scope, children, ...itemData } = props2;
@@ -7958,7 +7903,7 @@ function useUncontrolledState$1({
7958
7903
  function isFunction$3(value) {
7959
7904
  return typeof value === "function";
7960
7905
  }
7961
- var NODES$6 = [
7906
+ var NODES = [
7962
7907
  "a",
7963
7908
  "button",
7964
7909
  "div",
@@ -7977,8 +7922,8 @@ var NODES$6 = [
7977
7922
  "svg",
7978
7923
  "ul"
7979
7924
  ];
7980
- var Primitive$6 = NODES$6.reduce((primitive, node) => {
7981
- const Slot2 = /* @__PURE__ */ createSlot$7(`Primitive.${node}`);
7925
+ var Primitive = NODES.reduce((primitive, node) => {
7926
+ const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
7982
7927
  const Node2 = React.forwardRef((props2, forwardedRef) => {
7983
7928
  const { asChild, ...primitiveProps } = props2;
7984
7929
  const Comp = asChild ? Slot2 : node;
@@ -8003,7 +7948,7 @@ var Presence = (props2) => {
8003
7948
  const { present, children } = props2;
8004
7949
  const presence = usePresence(present);
8005
7950
  const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
8006
- const ref = useComposedRefs$1(presence.ref, getElementRef$7(child));
7951
+ const ref = useComposedRefs$1(presence.ref, getElementRef$1(child));
8007
7952
  const forceMount = typeof children === "function";
8008
7953
  return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
8009
7954
  };
@@ -8102,7 +8047,7 @@ function usePresence(present) {
8102
8047
  function getAnimationName(styles) {
8103
8048
  return (styles == null ? void 0 : styles.animationName) || "none";
8104
8049
  }
8105
- function getElementRef$7(element) {
8050
+ function getElementRef$1(element) {
8106
8051
  var _a2, _b;
8107
8052
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8108
8053
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8126,7 +8071,7 @@ function useId$1(deterministicId) {
8126
8071
  return deterministicId || (id ? `radix-${id}` : "");
8127
8072
  }
8128
8073
  var COLLAPSIBLE_NAME = "Collapsible";
8129
- var [createCollapsibleContext, createCollapsibleScope] = createContextScope$2(COLLAPSIBLE_NAME);
8074
+ var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
8130
8075
  var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
8131
8076
  var Collapsible$1 = React.forwardRef(
8132
8077
  (props2, forwardedRef) => {
@@ -8153,7 +8098,7 @@ var Collapsible$1 = React.forwardRef(
8153
8098
  open,
8154
8099
  onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
8155
8100
  children: /* @__PURE__ */ jsx(
8156
- Primitive$6.div,
8101
+ Primitive.div,
8157
8102
  {
8158
8103
  "data-state": getState$7(open),
8159
8104
  "data-disabled": disabled ? "" : void 0,
@@ -8172,7 +8117,7 @@ var CollapsibleTrigger$1 = React.forwardRef(
8172
8117
  const { __scopeCollapsible, ...triggerProps } = props2;
8173
8118
  const context = useCollapsibleContext(TRIGGER_NAME$d, __scopeCollapsible);
8174
8119
  return /* @__PURE__ */ jsx(
8175
- Primitive$6.button,
8120
+ Primitive.button,
8176
8121
  {
8177
8122
  type: "button",
8178
8123
  "aria-controls": context.contentId,
@@ -8234,7 +8179,7 @@ var CollapsibleContentImpl = React.forwardRef((props2, forwardedRef) => {
8234
8179
  }
8235
8180
  }, [context.open, present]);
8236
8181
  return /* @__PURE__ */ jsx(
8237
- Primitive$6.div,
8182
+ Primitive.div,
8238
8183
  {
8239
8184
  "data-state": getState$7(context.open),
8240
8185
  "data-disabled": context.disabled ? "" : void 0,
@@ -8265,7 +8210,7 @@ function useDirection(localDir) {
8265
8210
  var ACCORDION_NAME = "Accordion";
8266
8211
  var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
8267
8212
  var [Collection$6, useCollection$6, createCollectionScope$6] = createCollection(ACCORDION_NAME);
8268
- var [createAccordionContext] = createContextScope$2(ACCORDION_NAME, [
8213
+ var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
8269
8214
  createCollectionScope$6,
8270
8215
  createCollapsibleScope
8271
8216
  ]);
@@ -8428,7 +8373,7 @@ var AccordionImpl = React__default.forwardRef(
8428
8373
  direction: dir,
8429
8374
  orientation,
8430
8375
  children: /* @__PURE__ */ jsx(Collection$6.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
8431
- Primitive$6.div,
8376
+ Primitive.div,
8432
8377
  {
8433
8378
  ...accordionProps,
8434
8379
  "data-orientation": orientation,
@@ -8489,7 +8434,7 @@ var AccordionHeader = React__default.forwardRef(
8489
8434
  const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
8490
8435
  const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
8491
8436
  return /* @__PURE__ */ jsx(
8492
- Primitive$6.h3,
8437
+ Primitive.h3,
8493
8438
  {
8494
8439
  "data-orientation": accordionContext.orientation,
8495
8440
  "data-state": getState$6(itemContext.open),
@@ -8611,24 +8556,55 @@ function AccordionContent({
8611
8556
  }
8612
8557
  );
8613
8558
  }
8614
- var REACT_LAZY_TYPE$6 = Symbol.for("react.lazy");
8615
- var use$6 = React[" use ".trim().toString()];
8616
- function isPromiseLike$6(value) {
8559
+ function setRef$1(ref, value) {
8560
+ if (typeof ref === "function") {
8561
+ return ref(value);
8562
+ } else if (ref !== null && ref !== void 0) {
8563
+ ref.current = value;
8564
+ }
8565
+ }
8566
+ function composeRefs$1(...refs) {
8567
+ return (node) => {
8568
+ let hasCleanup = false;
8569
+ const cleanups = refs.map((ref) => {
8570
+ const cleanup = setRef$1(ref, node);
8571
+ if (!hasCleanup && typeof cleanup == "function") {
8572
+ hasCleanup = true;
8573
+ }
8574
+ return cleanup;
8575
+ });
8576
+ if (hasCleanup) {
8577
+ return () => {
8578
+ for (let i2 = 0; i2 < cleanups.length; i2++) {
8579
+ const cleanup = cleanups[i2];
8580
+ if (typeof cleanup == "function") {
8581
+ cleanup();
8582
+ } else {
8583
+ setRef$1(refs[i2], null);
8584
+ }
8585
+ }
8586
+ };
8587
+ }
8588
+ };
8589
+ }
8590
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
8591
+ var use = React[" use ".trim().toString()];
8592
+ function isPromiseLike(value) {
8617
8593
  return typeof value === "object" && value !== null && "then" in value;
8618
8594
  }
8619
- function isLazyComponent$6(element) {
8620
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$6 && "_payload" in element && isPromiseLike$6(element._payload);
8595
+ function isLazyComponent(element) {
8596
+ return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
8621
8597
  }
8622
8598
  // @__NO_SIDE_EFFECTS__
8623
- function createSlot$6(ownerName) {
8624
- const SlotClone = /* @__PURE__ */ createSlotClone$6(ownerName);
8599
+ function createSlot(ownerName) {
8600
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
8625
8601
  const Slot2 = React.forwardRef((props2, forwardedRef) => {
8626
8602
  let { children, ...slotProps } = props2;
8627
- if (isLazyComponent$6(children) && typeof use$6 === "function") {
8628
- children = use$6(children._payload);
8603
+ if (isLazyComponent(children) && typeof use === "function") {
8604
+ children = use(children._payload);
8629
8605
  }
8630
8606
  const childrenArray = React.Children.toArray(children);
8631
- const slottable = childrenArray.find(isSlottable$6);
8607
+ const slottable = childrenArray.find(isSlottable);
8632
8608
  if (slottable) {
8633
8609
  const newElement = slottable.props.children;
8634
8610
  const newChildren = childrenArray.map((child) => {
@@ -8646,17 +8622,17 @@ function createSlot$6(ownerName) {
8646
8622
  Slot2.displayName = `${ownerName}.Slot`;
8647
8623
  return Slot2;
8648
8624
  }
8649
- var Slot$4 = /* @__PURE__ */ createSlot$6("Slot");
8625
+ var Slot$4 = /* @__PURE__ */ createSlot("Slot");
8650
8626
  // @__NO_SIDE_EFFECTS__
8651
- function createSlotClone$6(ownerName) {
8627
+ function createSlotClone(ownerName) {
8652
8628
  const SlotClone = React.forwardRef((props2, forwardedRef) => {
8653
8629
  let { children, ...slotProps } = props2;
8654
- if (isLazyComponent$6(children) && typeof use$6 === "function") {
8655
- children = use$6(children._payload);
8630
+ if (isLazyComponent(children) && typeof use === "function") {
8631
+ children = use(children._payload);
8656
8632
  }
8657
8633
  if (React.isValidElement(children)) {
8658
- const childrenRef = getElementRef$6(children);
8659
- const props22 = mergeProps$6(slotProps, children.props);
8634
+ const childrenRef = getElementRef(children);
8635
+ const props22 = mergeProps(slotProps, children.props);
8660
8636
  if (children.type !== React.Fragment) {
8661
8637
  props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
8662
8638
  }
@@ -8667,11 +8643,11 @@ function createSlotClone$6(ownerName) {
8667
8643
  SlotClone.displayName = `${ownerName}.SlotClone`;
8668
8644
  return SlotClone;
8669
8645
  }
8670
- var SLOTTABLE_IDENTIFIER$6 = Symbol("radix.slottable");
8671
- function isSlottable$6(child) {
8672
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$6;
8646
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
8647
+ function isSlottable(child) {
8648
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
8673
8649
  }
8674
- function mergeProps$6(slotProps, childProps) {
8650
+ function mergeProps(slotProps, childProps) {
8675
8651
  const overrideProps = { ...childProps };
8676
8652
  for (const propName in childProps) {
8677
8653
  const slotPropValue = slotProps[propName];
@@ -8695,7 +8671,7 @@ function mergeProps$6(slotProps, childProps) {
8695
8671
  }
8696
8672
  return { ...slotProps, ...overrideProps };
8697
8673
  }
8698
- function getElementRef$6(element) {
8674
+ function getElementRef(element) {
8699
8675
  var _a2, _b;
8700
8676
  let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
8701
8677
  let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
@@ -8836,7 +8812,7 @@ function useSize(element) {
8836
8812
  return size2;
8837
8813
  }
8838
8814
  var CHECKBOX_NAME = "Checkbox";
8839
- var [createCheckboxContext] = createContextScope$2(CHECKBOX_NAME);
8815
+ var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
8840
8816
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
8841
8817
  function CheckboxProvider(props2) {
8842
8818
  const {
@@ -8917,7 +8893,7 @@ var CheckboxTrigger = React.forwardRef(
8917
8893
  }
8918
8894
  }, [control, setChecked]);
8919
8895
  return /* @__PURE__ */ jsx(
8920
- Primitive$6.button,
8896
+ Primitive.button,
8921
8897
  {
8922
8898
  type: "button",
8923
8899
  role: "checkbox",
@@ -9001,7 +8977,7 @@ var CheckboxIndicator = React.forwardRef(
9001
8977
  {
9002
8978
  present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
9003
8979
  children: /* @__PURE__ */ jsx(
9004
- Primitive$6.span,
8980
+ Primitive.span,
9005
8981
  {
9006
8982
  "data-state": getState$5(context.checked),
9007
8983
  "data-disabled": context.disabled ? "" : void 0,
@@ -9053,7 +9029,7 @@ var CheckboxBubbleInput = React.forwardRef(
9053
9029
  }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
9054
9030
  const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
9055
9031
  return /* @__PURE__ */ jsx(
9056
- Primitive$6.input,
9032
+ Primitive.input,
9057
9033
  {
9058
9034
  type: "checkbox",
9059
9035
  "aria-hidden": true,
@@ -9438,7 +9414,7 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
9438
9414
  var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
9439
9415
  function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new WeakSet()) {
9440
9416
  if (isPrimitive(object1) || isPrimitive(object2)) {
9441
- return Object.is(object1, object2);
9417
+ return object1 === object2;
9442
9418
  }
9443
9419
  if (isDateObject(object1) && isDateObject(object2)) {
9444
9420
  return object1.getTime() === object2.getTime();
@@ -9460,7 +9436,7 @@ function deepEqual$1(object1, object2, _internal_visited = /* @__PURE__ */ new W
9460
9436
  }
9461
9437
  if (key !== "ref") {
9462
9438
  const val2 = object2[key];
9463
- if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : !Object.is(val1, val2)) {
9439
+ if (isDateObject(val1) && isDateObject(val2) || isObject$5(val1) && isObject$5(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2, _internal_visited) : val1 !== val2) {
9464
9440
  return false;
9465
9441
  }
9466
9442
  }
@@ -9473,76 +9449,48 @@ function useWatch(props2) {
9473
9449
  const _defaultValue = React__default.useRef(defaultValue);
9474
9450
  const _compute = React__default.useRef(compute);
9475
9451
  const _computeFormValues = React__default.useRef(void 0);
9476
- const _prevControl = React__default.useRef(control);
9477
- const _prevName = React__default.useRef(name);
9478
9452
  _compute.current = compute;
9479
- const [value, updateValue] = React__default.useState(() => {
9480
- const defaultValue2 = control._getWatch(name, _defaultValue.current);
9481
- return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
9482
- });
9483
- const getCurrentOutput = React__default.useCallback((values) => {
9484
- const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9485
- return _compute.current ? _compute.current(formValues) : formValues;
9486
- }, [control._formValues, control._names, name]);
9487
- const refreshValue = React__default.useCallback((values) => {
9488
- if (!disabled) {
9489
- const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);
9490
- if (_compute.current) {
9491
- const computedFormValues = _compute.current(formValues);
9492
- if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9493
- updateValue(computedFormValues);
9494
- _computeFormValues.current = computedFormValues;
9453
+ const defaultValueMemo = React__default.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
9454
+ const [value, updateValue] = React__default.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
9455
+ useIsomorphicLayoutEffect$4(() => control._subscribe({
9456
+ name,
9457
+ formState: {
9458
+ values: true
9459
+ },
9460
+ exact,
9461
+ callback: (formState) => {
9462
+ if (!disabled) {
9463
+ const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
9464
+ if (_compute.current) {
9465
+ const computedFormValues = _compute.current(formValues);
9466
+ if (!deepEqual$1(computedFormValues, _computeFormValues.current)) {
9467
+ updateValue(computedFormValues);
9468
+ _computeFormValues.current = computedFormValues;
9469
+ }
9470
+ } else {
9471
+ updateValue(formValues);
9495
9472
  }
9496
- } else {
9497
- updateValue(formValues);
9498
9473
  }
9499
9474
  }
9500
- }, [control._formValues, control._names, disabled, name]);
9501
- useIsomorphicLayoutEffect$4(() => {
9502
- if (_prevControl.current !== control || !deepEqual$1(_prevName.current, name)) {
9503
- _prevControl.current = control;
9504
- _prevName.current = name;
9505
- refreshValue();
9506
- }
9507
- return control._subscribe({
9508
- name,
9509
- formState: {
9510
- values: true
9511
- },
9512
- exact,
9513
- callback: (formState) => {
9514
- refreshValue(formState.values);
9515
- }
9516
- });
9517
- }, [control, exact, name, refreshValue]);
9475
+ }), [control, disabled, name, exact]);
9518
9476
  React__default.useEffect(() => control._removeUnmounted());
9519
- const controlChanged = _prevControl.current !== control;
9520
- const prevName = _prevName.current;
9521
- const computedOutput = React__default.useMemo(() => {
9522
- if (disabled) {
9523
- return null;
9524
- }
9525
- const nameChanged = !controlChanged && !deepEqual$1(prevName, name);
9526
- const shouldReturnImmediate = controlChanged || nameChanged;
9527
- return shouldReturnImmediate ? getCurrentOutput() : null;
9528
- }, [disabled, controlChanged, name, prevName, getCurrentOutput]);
9529
- return computedOutput !== null ? computedOutput : value;
9477
+ return value;
9530
9478
  }
9531
9479
  function useController(props2) {
9532
9480
  const methods = useFormContext();
9533
- const { name, disabled, control = methods.control, shouldUnregister, defaultValue, exact = true } = props2;
9481
+ const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props2;
9534
9482
  const isArrayField = isNameInFieldArray(control._names.array, name);
9535
9483
  const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
9536
9484
  const value = useWatch({
9537
9485
  control,
9538
9486
  name,
9539
9487
  defaultValue: defaultValueMemo,
9540
- exact
9488
+ exact: true
9541
9489
  });
9542
9490
  const formState = useFormState({
9543
9491
  control,
9544
9492
  name,
9545
- exact
9493
+ exact: true
9546
9494
  });
9547
9495
  const _props = React__default.useRef(props2);
9548
9496
  const _previousNameRef = React__default.useRef(void 0);
@@ -9759,11 +9707,10 @@ function isTraversable(value) {
9759
9707
  }
9760
9708
  function markFieldsDirty(data, fields = {}) {
9761
9709
  for (const key in data) {
9762
- const value = data[key];
9763
- if (isTraversable(value)) {
9764
- fields[key] = Array.isArray(value) ? [] : {};
9765
- markFieldsDirty(value, fields[key]);
9766
- } else if (!isUndefined(value)) {
9710
+ if (isTraversable(data[key])) {
9711
+ fields[key] = Array.isArray(data[key]) ? [] : {};
9712
+ markFieldsDirty(data[key], fields[key]);
9713
+ } else if (!isUndefined(data[key])) {
9767
9714
  fields[key] = true;
9768
9715
  }
9769
9716
  }
@@ -9774,16 +9721,14 @@ function getDirtyFields(data, formValues, dirtyFieldsFromValues) {
9774
9721
  dirtyFieldsFromValues = markFieldsDirty(formValues);
9775
9722
  }
9776
9723
  for (const key in data) {
9777
- const value = data[key];
9778
- if (isTraversable(value)) {
9724
+ if (isTraversable(data[key])) {
9779
9725
  if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {
9780
- dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {});
9726
+ dirtyFieldsFromValues[key] = markFieldsDirty(data[key], Array.isArray(data[key]) ? [] : {});
9781
9727
  } else {
9782
- getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9728
+ getDirtyFields(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
9783
9729
  }
9784
9730
  } else {
9785
- const formValue = formValues[key];
9786
- dirtyFieldsFromValues[key] = !deepEqual$1(value, formValue);
9731
+ dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]);
9787
9732
  }
9788
9733
  }
9789
9734
  return dirtyFieldsFromValues;
@@ -10238,7 +10183,7 @@ function createFormControl(props2 = {}) {
10238
10183
  if (field) {
10239
10184
  const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
10240
10185
  isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set$1(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue);
10241
- _state.mount && !_state.action && _setValid();
10186
+ _state.mount && _setValid();
10242
10187
  }
10243
10188
  };
10244
10189
  const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
@@ -10849,12 +10794,8 @@ function createFormControl(props2 = {}) {
10849
10794
  watchAll: false,
10850
10795
  focus: ""
10851
10796
  };
10852
- _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues || !_options.shouldUnregister && !isEmptyObject(values);
10797
+ _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid || !!keepStateOptions.keepDirtyValues;
10853
10798
  _state.watch = !!_options.shouldUnregister;
10854
- _state.action = false;
10855
- if (!keepStateOptions.keepErrors) {
10856
- _formState.errors = {};
10857
- }
10858
10799
  _subjects.state.next({
10859
10800
  submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
10860
10801
  isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)),
@@ -11280,15 +11221,11 @@ function useForm(props2 = {}) {
11280
11221
  }
11281
11222
  }, [control, formState.isDirty]);
11282
11223
  React__default.useEffect(() => {
11283
- var _a2;
11284
11224
  if (props2.values && !deepEqual$1(props2.values, _values.current)) {
11285
11225
  control._reset(props2.values, {
11286
11226
  keepFieldsRef: true,
11287
11227
  ...control._options.resetOptions
11288
11228
  });
11289
- if (!((_a2 = control._options.resetOptions) === null || _a2 === void 0 ? void 0 : _a2.keepIsValid)) {
11290
- control._setValid();
11291
- }
11292
11229
  _values.current = props2.values;
11293
11230
  updateFormState((state) => ({ ...state }));
11294
11231
  } else {
@@ -11323,7 +11260,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
11323
11260
  var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
11324
11261
  var GROUP_NAME$5 = "RovingFocusGroup";
11325
11262
  var [Collection$5, useCollection$5, createCollectionScope$5] = createCollection(GROUP_NAME$5);
11326
- var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$2(
11263
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
11327
11264
  GROUP_NAME$5,
11328
11265
  [createCollectionScope$5]
11329
11266
  );
@@ -11390,7 +11327,7 @@ var RovingFocusGroupImpl = React.forwardRef((props2, forwardedRef) => {
11390
11327
  []
11391
11328
  ),
11392
11329
  children: /* @__PURE__ */ jsx(
11393
- Primitive$6.div,
11330
+ Primitive.div,
11394
11331
  {
11395
11332
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
11396
11333
  "data-orientation": orientation,
@@ -11455,7 +11392,7 @@ var RovingFocusGroupItem = React.forwardRef(
11455
11392
  focusable,
11456
11393
  active,
11457
11394
  children: /* @__PURE__ */ jsx(
11458
- Primitive$6.span,
11395
+ Primitive.span,
11459
11396
  {
11460
11397
  tabIndex: isCurrentTabStop ? 0 : -1,
11461
11398
  "data-orientation": context.orientation,
@@ -11529,7 +11466,7 @@ function wrapArray$3(array2, startIndex) {
11529
11466
  var Root$e = RovingFocusGroup;
11530
11467
  var Item$2 = RovingFocusGroupItem;
11531
11468
  var TABS_NAME = "Tabs";
11532
- var [createTabsContext] = createContextScope$2(TABS_NAME, [
11469
+ var [createTabsContext] = createContextScope(TABS_NAME, [
11533
11470
  createRovingFocusGroupScope
11534
11471
  ]);
11535
11472
  var useRovingFocusGroupScope$4 = createRovingFocusGroupScope();
@@ -11564,7 +11501,7 @@ var Tabs$1 = React.forwardRef(
11564
11501
  dir: direction,
11565
11502
  activationMode,
11566
11503
  children: /* @__PURE__ */ jsx(
11567
- Primitive$6.div,
11504
+ Primitive.div,
11568
11505
  {
11569
11506
  dir: direction,
11570
11507
  "data-orientation": orientation,
@@ -11592,7 +11529,7 @@ var TabsList$1 = React.forwardRef(
11592
11529
  dir: context.dir,
11593
11530
  loop,
11594
11531
  children: /* @__PURE__ */ jsx(
11595
- Primitive$6.div,
11532
+ Primitive.div,
11596
11533
  {
11597
11534
  role: "tablist",
11598
11535
  "aria-orientation": context.orientation,
@@ -11622,7 +11559,7 @@ var TabsTrigger$1 = React.forwardRef(
11622
11559
  focusable: !disabled,
11623
11560
  active: isSelected,
11624
11561
  children: /* @__PURE__ */ jsx(
11625
- Primitive$6.button,
11562
+ Primitive.button,
11626
11563
  {
11627
11564
  type: "button",
11628
11565
  role: "tab",
@@ -11671,7 +11608,7 @@ var TabsContent$1 = React.forwardRef(
11671
11608
  return () => cancelAnimationFrame(rAF);
11672
11609
  }, []);
11673
11610
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(
11674
- Primitive$6.div,
11611
+ Primitive.div,
11675
11612
  {
11676
11613
  "data-state": isSelected ? "active" : "inactive",
11677
11614
  "data-orientation": context.orientation,
@@ -11839,135 +11776,6 @@ function CardFooter({ className, ...props2 }) {
11839
11776
  }
11840
11777
  );
11841
11778
  }
11842
- var REACT_LAZY_TYPE$5 = Symbol.for("react.lazy");
11843
- var use$5 = React[" use ".trim().toString()];
11844
- function isPromiseLike$5(value) {
11845
- return typeof value === "object" && value !== null && "then" in value;
11846
- }
11847
- function isLazyComponent$5(element) {
11848
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$5 && "_payload" in element && isPromiseLike$5(element._payload);
11849
- }
11850
- // @__NO_SIDE_EFFECTS__
11851
- function createSlot$5(ownerName) {
11852
- const SlotClone = /* @__PURE__ */ createSlotClone$5(ownerName);
11853
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
11854
- let { children, ...slotProps } = props2;
11855
- if (isLazyComponent$5(children) && typeof use$5 === "function") {
11856
- children = use$5(children._payload);
11857
- }
11858
- const childrenArray = React.Children.toArray(children);
11859
- const slottable = childrenArray.find(isSlottable$5);
11860
- if (slottable) {
11861
- const newElement = slottable.props.children;
11862
- const newChildren = childrenArray.map((child) => {
11863
- if (child === slottable) {
11864
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
11865
- return React.isValidElement(newElement) ? newElement.props.children : null;
11866
- } else {
11867
- return child;
11868
- }
11869
- });
11870
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
11871
- }
11872
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
11873
- });
11874
- Slot2.displayName = `${ownerName}.Slot`;
11875
- return Slot2;
11876
- }
11877
- // @__NO_SIDE_EFFECTS__
11878
- function createSlotClone$5(ownerName) {
11879
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
11880
- let { children, ...slotProps } = props2;
11881
- if (isLazyComponent$5(children) && typeof use$5 === "function") {
11882
- children = use$5(children._payload);
11883
- }
11884
- if (React.isValidElement(children)) {
11885
- const childrenRef = getElementRef$5(children);
11886
- const props22 = mergeProps$5(slotProps, children.props);
11887
- if (children.type !== React.Fragment) {
11888
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
11889
- }
11890
- return React.cloneElement(children, props22);
11891
- }
11892
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
11893
- });
11894
- SlotClone.displayName = `${ownerName}.SlotClone`;
11895
- return SlotClone;
11896
- }
11897
- var SLOTTABLE_IDENTIFIER$5 = Symbol("radix.slottable");
11898
- function isSlottable$5(child) {
11899
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$5;
11900
- }
11901
- function mergeProps$5(slotProps, childProps) {
11902
- const overrideProps = { ...childProps };
11903
- for (const propName in childProps) {
11904
- const slotPropValue = slotProps[propName];
11905
- const childPropValue = childProps[propName];
11906
- const isHandler = /^on[A-Z]/.test(propName);
11907
- if (isHandler) {
11908
- if (slotPropValue && childPropValue) {
11909
- overrideProps[propName] = (...args) => {
11910
- const result = childPropValue(...args);
11911
- slotPropValue(...args);
11912
- return result;
11913
- };
11914
- } else if (slotPropValue) {
11915
- overrideProps[propName] = slotPropValue;
11916
- }
11917
- } else if (propName === "style") {
11918
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
11919
- } else if (propName === "className") {
11920
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
11921
- }
11922
- }
11923
- return { ...slotProps, ...overrideProps };
11924
- }
11925
- function getElementRef$5(element) {
11926
- var _a2, _b;
11927
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
11928
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11929
- if (mayWarn) {
11930
- return element.ref;
11931
- }
11932
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
11933
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
11934
- if (mayWarn) {
11935
- return element.props.ref;
11936
- }
11937
- return element.props.ref || element.ref;
11938
- }
11939
- var NODES$5 = [
11940
- "a",
11941
- "button",
11942
- "div",
11943
- "form",
11944
- "h2",
11945
- "h3",
11946
- "img",
11947
- "input",
11948
- "label",
11949
- "li",
11950
- "nav",
11951
- "ol",
11952
- "p",
11953
- "select",
11954
- "span",
11955
- "svg",
11956
- "ul"
11957
- ];
11958
- var Primitive$5 = NODES$5.reduce((primitive, node) => {
11959
- const Slot2 = /* @__PURE__ */ createSlot$5(`Primitive.${node}`);
11960
- const Node2 = React.forwardRef((props2, forwardedRef) => {
11961
- const { asChild, ...primitiveProps } = props2;
11962
- const Comp = asChild ? Slot2 : node;
11963
- if (typeof window !== "undefined") {
11964
- window[Symbol.for("radix-ui")] = true;
11965
- }
11966
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
11967
- });
11968
- Node2.displayName = `Primitive.${node}`;
11969
- return { ...primitive, [node]: Node2 };
11970
- }, {});
11971
11779
  var NAME$5 = "Separator";
11972
11780
  var DEFAULT_ORIENTATION = "horizontal";
11973
11781
  var ORIENTATIONS = ["horizontal", "vertical"];
@@ -11977,7 +11785,7 @@ var Separator$3 = React.forwardRef((props2, forwardedRef) => {
11977
11785
  const ariaOrientation = orientation === "vertical" ? orientation : void 0;
11978
11786
  const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
11979
11787
  return /* @__PURE__ */ jsx(
11980
- Primitive$5.div,
11788
+ Primitive.div,
11981
11789
  {
11982
11790
  "data-orientation": orientation,
11983
11791
  ...semanticProps,
@@ -12378,139 +12186,10 @@ function SectionBuilder({
12378
12186
  section.id
12379
12187
  )) });
12380
12188
  }
12381
- var REACT_LAZY_TYPE$4 = Symbol.for("react.lazy");
12382
- var use$4 = React[" use ".trim().toString()];
12383
- function isPromiseLike$4(value) {
12384
- return typeof value === "object" && value !== null && "then" in value;
12385
- }
12386
- function isLazyComponent$4(element) {
12387
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$4 && "_payload" in element && isPromiseLike$4(element._payload);
12388
- }
12389
- // @__NO_SIDE_EFFECTS__
12390
- function createSlot$4(ownerName) {
12391
- const SlotClone = /* @__PURE__ */ createSlotClone$4(ownerName);
12392
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
12393
- let { children, ...slotProps } = props2;
12394
- if (isLazyComponent$4(children) && typeof use$4 === "function") {
12395
- children = use$4(children._payload);
12396
- }
12397
- const childrenArray = React.Children.toArray(children);
12398
- const slottable = childrenArray.find(isSlottable$4);
12399
- if (slottable) {
12400
- const newElement = slottable.props.children;
12401
- const newChildren = childrenArray.map((child) => {
12402
- if (child === slottable) {
12403
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
12404
- return React.isValidElement(newElement) ? newElement.props.children : null;
12405
- } else {
12406
- return child;
12407
- }
12408
- });
12409
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
12410
- }
12411
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
12412
- });
12413
- Slot2.displayName = `${ownerName}.Slot`;
12414
- return Slot2;
12415
- }
12416
- // @__NO_SIDE_EFFECTS__
12417
- function createSlotClone$4(ownerName) {
12418
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
12419
- let { children, ...slotProps } = props2;
12420
- if (isLazyComponent$4(children) && typeof use$4 === "function") {
12421
- children = use$4(children._payload);
12422
- }
12423
- if (React.isValidElement(children)) {
12424
- const childrenRef = getElementRef$4(children);
12425
- const props22 = mergeProps$4(slotProps, children.props);
12426
- if (children.type !== React.Fragment) {
12427
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
12428
- }
12429
- return React.cloneElement(children, props22);
12430
- }
12431
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
12432
- });
12433
- SlotClone.displayName = `${ownerName}.SlotClone`;
12434
- return SlotClone;
12435
- }
12436
- var SLOTTABLE_IDENTIFIER$4 = Symbol("radix.slottable");
12437
- function isSlottable$4(child) {
12438
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$4;
12439
- }
12440
- function mergeProps$4(slotProps, childProps) {
12441
- const overrideProps = { ...childProps };
12442
- for (const propName in childProps) {
12443
- const slotPropValue = slotProps[propName];
12444
- const childPropValue = childProps[propName];
12445
- const isHandler = /^on[A-Z]/.test(propName);
12446
- if (isHandler) {
12447
- if (slotPropValue && childPropValue) {
12448
- overrideProps[propName] = (...args) => {
12449
- const result = childPropValue(...args);
12450
- slotPropValue(...args);
12451
- return result;
12452
- };
12453
- } else if (slotPropValue) {
12454
- overrideProps[propName] = slotPropValue;
12455
- }
12456
- } else if (propName === "style") {
12457
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
12458
- } else if (propName === "className") {
12459
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
12460
- }
12461
- }
12462
- return { ...slotProps, ...overrideProps };
12463
- }
12464
- function getElementRef$4(element) {
12465
- var _a2, _b;
12466
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
12467
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
12468
- if (mayWarn) {
12469
- return element.ref;
12470
- }
12471
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
12472
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
12473
- if (mayWarn) {
12474
- return element.props.ref;
12475
- }
12476
- return element.props.ref || element.ref;
12477
- }
12478
- var NODES$4 = [
12479
- "a",
12480
- "button",
12481
- "div",
12482
- "form",
12483
- "h2",
12484
- "h3",
12485
- "img",
12486
- "input",
12487
- "label",
12488
- "li",
12489
- "nav",
12490
- "ol",
12491
- "p",
12492
- "select",
12493
- "span",
12494
- "svg",
12495
- "ul"
12496
- ];
12497
- var Primitive$4 = NODES$4.reduce((primitive, node) => {
12498
- const Slot2 = /* @__PURE__ */ createSlot$4(`Primitive.${node}`);
12499
- const Node2 = React.forwardRef((props2, forwardedRef) => {
12500
- const { asChild, ...primitiveProps } = props2;
12501
- const Comp = asChild ? Slot2 : node;
12502
- if (typeof window !== "undefined") {
12503
- window[Symbol.for("radix-ui")] = true;
12504
- }
12505
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
12506
- });
12507
- Node2.displayName = `Primitive.${node}`;
12508
- return { ...primitive, [node]: Node2 };
12509
- }, {});
12510
12189
  var NAME$4 = "Label";
12511
12190
  var Label$3 = React.forwardRef((props2, forwardedRef) => {
12512
12191
  return /* @__PURE__ */ jsx(
12513
- Primitive$4.label,
12192
+ Primitive.label,
12514
12193
  {
12515
12194
  ...props2,
12516
12195
  ref: forwardedRef,
@@ -15093,32 +14772,28 @@ var useElementIds = "useId" in React__default ? function useElementIds2(_ref) {
15093
14772
  if (!id) {
15094
14773
  id = reactId;
15095
14774
  }
15096
- var elementIds = useMemo(function() {
15097
- return {
15098
- labelId: labelId || id + "-label",
15099
- menuId: menuId || id + "-menu",
15100
- getItemId: getItemId || function(index2) {
15101
- return id + "-item-" + index2;
15102
- },
15103
- toggleButtonId: toggleButtonId || id + "-toggle-button",
15104
- inputId: inputId || id + "-input"
15105
- };
15106
- }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
15107
- return elementIds;
14775
+ var elementIdsRef = useRef({
14776
+ labelId: labelId || id + "-label",
14777
+ menuId: menuId || id + "-menu",
14778
+ getItemId: getItemId || function(index2) {
14779
+ return id + "-item-" + index2;
14780
+ },
14781
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
14782
+ inputId: inputId || id + "-input"
14783
+ });
14784
+ return elementIdsRef.current;
15108
14785
  } : function useElementIds3(_ref2) {
15109
14786
  var _ref2$id = _ref2.id, id = _ref2$id === void 0 ? "downshift-" + generateId() : _ref2$id, labelId = _ref2.labelId, menuId = _ref2.menuId, getItemId = _ref2.getItemId, toggleButtonId = _ref2.toggleButtonId, inputId = _ref2.inputId;
15110
- var elementIds = useMemo(function() {
15111
- return {
15112
- labelId: labelId || id + "-label",
15113
- menuId: menuId || id + "-menu",
15114
- getItemId: getItemId || function(index2) {
15115
- return id + "-item-" + index2;
15116
- },
15117
- toggleButtonId: toggleButtonId || id + "-toggle-button",
15118
- inputId: inputId || id + "-input"
15119
- };
15120
- }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);
15121
- return elementIds;
14787
+ var elementIdsRef = useRef({
14788
+ labelId: labelId || id + "-label",
14789
+ menuId: menuId || id + "-menu",
14790
+ getItemId: getItemId || function(index2) {
14791
+ return id + "-item-" + index2;
14792
+ },
14793
+ toggleButtonId: toggleButtonId || id + "-toggle-button",
14794
+ inputId: inputId || id + "-input"
14795
+ });
14796
+ return elementIdsRef.current;
15122
14797
  };
15123
14798
  function getItemAndIndex(itemProp, indexProp, items, errorMessage) {
15124
14799
  var item, index2;
@@ -15255,22 +14930,20 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
15255
14930
  isTouchMove: false,
15256
14931
  isTouchEnd: false
15257
14932
  });
15258
- function getDownshiftElements() {
15259
- return downshiftElementsRefs.map(function(ref) {
15260
- return ref.current;
15261
- });
15262
- }
15263
14933
  useEffect(function() {
15264
14934
  if (!environment) {
15265
14935
  return noop$3;
15266
14936
  }
14937
+ var downshiftElements = downshiftElementsRefs.map(function(ref) {
14938
+ return ref.current;
14939
+ });
15267
14940
  function onMouseDown() {
15268
14941
  mouseAndTouchTrackersRef.current.isTouchEnd = false;
15269
14942
  mouseAndTouchTrackersRef.current.isMouseDown = true;
15270
14943
  }
15271
14944
  function onMouseUp(event) {
15272
14945
  mouseAndTouchTrackersRef.current.isMouseDown = false;
15273
- if (!targetWithinDownshift(event.target, getDownshiftElements(), environment)) {
14946
+ if (!targetWithinDownshift(event.target, downshiftElements, environment)) {
15274
14947
  handleBlur();
15275
14948
  }
15276
14949
  }
@@ -15283,7 +14956,7 @@ function useMouseAndTouchTracker(environment, handleBlur, downshiftElementsRefs)
15283
14956
  }
15284
14957
  function onTouchEnd(event) {
15285
14958
  mouseAndTouchTrackersRef.current.isTouchEnd = true;
15286
- if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, getDownshiftElements(), environment, false)) {
14959
+ if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElements, environment, false)) {
15287
14960
  handleBlur();
15288
14961
  }
15289
14962
  }
@@ -15822,13 +15495,9 @@ function useCombobox(userProps) {
15822
15495
  selectItem: false
15823
15496
  });
15824
15497
  }
15825
- }, [dispatch, latest]), useMemo(
15826
- function() {
15827
- return [menuRef, toggleButtonRef, inputRef];
15828
- },
15829
- // dependencies can be left empty because refs are getting mutated
15830
- []
15831
- ));
15498
+ }, [dispatch, latest]), useMemo(function() {
15499
+ return [menuRef, toggleButtonRef, inputRef];
15500
+ }, [menuRef.current, toggleButtonRef.current, inputRef.current]));
15832
15501
  var setGetterPropCallInfo = useGetterPropsCalledChecker("getInputProps", "getMenuProps");
15833
15502
  useEffect(function() {
15834
15503
  if (!isOpen) {
@@ -16327,7 +15996,7 @@ var DismissableLayer = React.forwardRef(
16327
15996
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
16328
15997
  }, []);
16329
15998
  return /* @__PURE__ */ jsx(
16330
- Primitive$6.div,
15999
+ Primitive.div,
16331
16000
  {
16332
16001
  ...layerProps,
16333
16002
  ref: composedRefs,
@@ -16360,7 +16029,7 @@ var DismissableLayerBranch = React.forwardRef((props2, forwardedRef) => {
16360
16029
  };
16361
16030
  }
16362
16031
  }, [context.branches]);
16363
- return /* @__PURE__ */ jsx(Primitive$6.div, { ...props2, ref: composedRefs });
16032
+ return /* @__PURE__ */ jsx(Primitive.div, { ...props2, ref: composedRefs });
16364
16033
  });
16365
16034
  DismissableLayerBranch.displayName = BRANCH_NAME;
16366
16035
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
@@ -16582,7 +16251,7 @@ var FocusScope = React.forwardRef((props2, forwardedRef) => {
16582
16251
  },
16583
16252
  [loop, trapped, focusScope.paused]
16584
16253
  );
16585
- return /* @__PURE__ */ jsx(Primitive$6.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
16254
+ return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
16586
16255
  });
16587
16256
  FocusScope.displayName = FOCUS_SCOPE_NAME;
16588
16257
  function focusFirst$2(candidates, { select = false } = {}) {
@@ -18546,7 +18215,7 @@ var NAME$3 = "Arrow";
18546
18215
  var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
18547
18216
  const { children, width = 10, height = 5, ...arrowProps } = props2;
18548
18217
  return /* @__PURE__ */ jsx(
18549
- Primitive$6.svg,
18218
+ Primitive.svg,
18550
18219
  {
18551
18220
  ...arrowProps,
18552
18221
  ref: forwardedRef,
@@ -18561,7 +18230,7 @@ var Arrow$1 = React.forwardRef((props2, forwardedRef) => {
18561
18230
  Arrow$1.displayName = NAME$3;
18562
18231
  var Root$b = Arrow$1;
18563
18232
  var POPPER_NAME = "Popper";
18564
- var [createPopperContext, createPopperScope] = createContextScope$2(POPPER_NAME);
18233
+ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
18565
18234
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
18566
18235
  var Popper = (props2) => {
18567
18236
  const { __scopePopper, children } = props2;
@@ -18584,7 +18253,7 @@ var PopperAnchor = React.forwardRef(
18584
18253
  context.onAnchorChange(anchorRef.current);
18585
18254
  }
18586
18255
  });
18587
- return virtualRef ? null : /* @__PURE__ */ jsx(Primitive$6.div, { ...anchorProps, ref: composedRefs });
18256
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
18588
18257
  }
18589
18258
  );
18590
18259
  PopperAnchor.displayName = ANCHOR_NAME$2;
@@ -18712,7 +18381,7 @@ var PopperContent = React.forwardRef(
18712
18381
  arrowY,
18713
18382
  shouldHideArrow: cannotCenterArrow,
18714
18383
  children: /* @__PURE__ */ jsx(
18715
- Primitive$6.div,
18384
+ Primitive.div,
18716
18385
  {
18717
18386
  "data-side": placedSide,
18718
18387
  "data-align": placedAlign,
@@ -18838,7 +18507,7 @@ var Portal$7 = React.forwardRef((props2, forwardedRef) => {
18838
18507
  const [mounted, setMounted] = React.useState(false);
18839
18508
  useLayoutEffect2(() => setMounted(true), []);
18840
18509
  const container = containerProp || mounted && ((_a2 = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a2.body);
18841
- return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive$6.div, { ...portalProps, ref: forwardedRef }), container) : null;
18510
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
18842
18511
  });
18843
18512
  Portal$7.displayName = PORTAL_NAME$a;
18844
18513
  var getDefaultParent = function(originalTarget) {
@@ -19469,12 +19138,6 @@ function RemoveScrollSideCar(props2) {
19469
19138
  if ("touches" in event && moveDirection === "h" && target.type === "range") {
19470
19139
  return false;
19471
19140
  }
19472
- var selection = window.getSelection();
19473
- var anchorNode = selection && selection.anchorNode;
19474
- var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
19475
- if (isTouchingSelection) {
19476
- return false;
19477
- }
19478
19141
  var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
19479
19142
  if (!canBeScrolledInMainDirection) {
19480
19143
  return true;
@@ -19587,7 +19250,7 @@ var ReactRemoveScroll = React.forwardRef(function(props2, ref) {
19587
19250
  });
19588
19251
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
19589
19252
  var POPOVER_NAME = "Popover";
19590
- var [createPopoverContext] = createContextScope$2(POPOVER_NAME, [
19253
+ var [createPopoverContext] = createContextScope(POPOVER_NAME, [
19591
19254
  createPopperScope
19592
19255
  ]);
19593
19256
  var usePopperScope$4 = createPopperScope();
@@ -19651,7 +19314,7 @@ var PopoverTrigger$1 = React.forwardRef(
19651
19314
  const popperScope = usePopperScope$4(__scopePopover);
19652
19315
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
19653
19316
  const trigger = /* @__PURE__ */ jsx(
19654
- Primitive$6.button,
19317
+ Primitive.button,
19655
19318
  {
19656
19319
  type: "button",
19657
19320
  "aria-haspopup": "dialog",
@@ -19687,7 +19350,7 @@ var PopoverContent$1 = React.forwardRef(
19687
19350
  }
19688
19351
  );
19689
19352
  PopoverContent$1.displayName = CONTENT_NAME$a;
19690
- var Slot$3 = /* @__PURE__ */ createSlot$7("PopoverContent.RemoveScroll");
19353
+ var Slot$3 = /* @__PURE__ */ createSlot$1("PopoverContent.RemoveScroll");
19691
19354
  var PopoverContentModal = React.forwardRef(
19692
19355
  (props2, forwardedRef) => {
19693
19356
  const context = usePopoverContext(CONTENT_NAME$a, props2.__scopePopover);
@@ -19840,7 +19503,7 @@ var PopoverClose = React.forwardRef(
19840
19503
  const { __scopePopover, ...closeProps } = props2;
19841
19504
  const context = usePopoverContext(CLOSE_NAME$1, __scopePopover);
19842
19505
  return /* @__PURE__ */ jsx(
19843
- Primitive$6.button,
19506
+ Primitive.button,
19844
19507
  {
19845
19508
  type: "button",
19846
19509
  ...closeProps,
@@ -20546,7 +20209,7 @@ var NAME$2 = "VisuallyHidden";
20546
20209
  var VisuallyHidden = React.forwardRef(
20547
20210
  (props2, forwardedRef) => {
20548
20211
  return /* @__PURE__ */ jsx(
20549
- Primitive$6.span,
20212
+ Primitive.span,
20550
20213
  {
20551
20214
  ...props2,
20552
20215
  ref: forwardedRef,
@@ -20561,7 +20224,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
20561
20224
  var SELECTION_KEYS$1 = [" ", "Enter"];
20562
20225
  var SELECT_NAME = "Select";
20563
20226
  var [Collection$4, useCollection$4, createCollectionScope$4] = createCollection(SELECT_NAME);
20564
- var [createSelectContext] = createContextScope$2(SELECT_NAME, [
20227
+ var [createSelectContext] = createContextScope(SELECT_NAME, [
20565
20228
  createCollectionScope$4,
20566
20229
  createPopperScope
20567
20230
  ]);
@@ -20698,7 +20361,7 @@ var SelectTrigger$1 = React.forwardRef(
20698
20361
  }
20699
20362
  };
20700
20363
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
20701
- Primitive$6.button,
20364
+ Primitive.button,
20702
20365
  {
20703
20366
  type: "button",
20704
20367
  role: "combobox",
@@ -20757,7 +20420,7 @@ var SelectValue$1 = React.forwardRef(
20757
20420
  onValueNodeHasChildrenChange(hasChildren);
20758
20421
  }, [onValueNodeHasChildrenChange, hasChildren]);
20759
20422
  return /* @__PURE__ */ jsx(
20760
- Primitive$6.span,
20423
+ Primitive.span,
20761
20424
  {
20762
20425
  ...valueProps,
20763
20426
  ref: composedRefs,
@@ -20772,7 +20435,7 @@ var ICON_NAME = "SelectIcon";
20772
20435
  var SelectIcon = React.forwardRef(
20773
20436
  (props2, forwardedRef) => {
20774
20437
  const { __scopeSelect, children, ...iconProps } = props2;
20775
- return /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
20438
+ return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
20776
20439
  }
20777
20440
  );
20778
20441
  SelectIcon.displayName = ICON_NAME;
@@ -20803,7 +20466,7 @@ SelectContent$1.displayName = CONTENT_NAME$9;
20803
20466
  var CONTENT_MARGIN = 10;
20804
20467
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$9);
20805
20468
  var CONTENT_IMPL_NAME = "SelectContentImpl";
20806
- var Slot$2 = /* @__PURE__ */ createSlot$7("SelectContent.RemoveScroll");
20469
+ var Slot$2 = /* @__PURE__ */ createSlot$1("SelectContent.RemoveScroll");
20807
20470
  var SelectContentImpl = React.forwardRef(
20808
20471
  (props2, forwardedRef) => {
20809
20472
  const {
@@ -21183,7 +20846,7 @@ var SelectItemAlignedPosition = React.forwardRef((props2, forwardedRef) => {
21183
20846
  zIndex: contentZIndex
21184
20847
  },
21185
20848
  children: /* @__PURE__ */ jsx(
21186
- Primitive$6.div,
20849
+ Primitive.div,
21187
20850
  {
21188
20851
  ...popperProps,
21189
20852
  ref: composedRefs,
@@ -21257,7 +20920,7 @@ var SelectViewport = React.forwardRef(
21257
20920
  }
21258
20921
  ),
21259
20922
  /* @__PURE__ */ jsx(Collection$4.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
21260
- Primitive$6.div,
20923
+ Primitive.div,
21261
20924
  {
21262
20925
  "data-radix-select-viewport": "",
21263
20926
  role: "presentation",
@@ -21312,7 +20975,7 @@ var SelectGroup$1 = React.forwardRef(
21312
20975
  (props2, forwardedRef) => {
21313
20976
  const { __scopeSelect, ...groupProps } = props2;
21314
20977
  const groupId = useId$1();
21315
- return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
20978
+ return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
21316
20979
  }
21317
20980
  );
21318
20981
  SelectGroup$1.displayName = GROUP_NAME$4;
@@ -21321,7 +20984,7 @@ var SelectLabel$1 = React.forwardRef(
21321
20984
  (props2, forwardedRef) => {
21322
20985
  const { __scopeSelect, ...labelProps } = props2;
21323
20986
  const groupContext = useSelectGroupContext(LABEL_NAME$4, __scopeSelect);
21324
- return /* @__PURE__ */ jsx(Primitive$6.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
20987
+ return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
21325
20988
  }
21326
20989
  );
21327
20990
  SelectLabel$1.displayName = LABEL_NAME$4;
@@ -21380,7 +21043,7 @@ var SelectItem$1 = React.forwardRef(
21380
21043
  disabled,
21381
21044
  textValue,
21382
21045
  children: /* @__PURE__ */ jsx(
21383
- Primitive$6.div,
21046
+ Primitive.div,
21384
21047
  {
21385
21048
  role: "option",
21386
21049
  "aria-labelledby": textId,
@@ -21463,7 +21126,7 @@ var SelectItemText = React.forwardRef(
21463
21126
  return () => onNativeOptionRemove(nativeOption);
21464
21127
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
21465
21128
  return /* @__PURE__ */ jsxs(Fragment, { children: [
21466
- /* @__PURE__ */ jsx(Primitive$6.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
21129
+ /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
21467
21130
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
21468
21131
  ] });
21469
21132
  }
@@ -21474,7 +21137,7 @@ var SelectItemIndicator = React.forwardRef(
21474
21137
  (props2, forwardedRef) => {
21475
21138
  const { __scopeSelect, ...itemIndicatorProps } = props2;
21476
21139
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME$1, __scopeSelect);
21477
- return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive$6.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
21140
+ return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
21478
21141
  }
21479
21142
  );
21480
21143
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME$1;
@@ -21565,7 +21228,7 @@ var SelectScrollButtonImpl = React.forwardRef((props2, forwardedRef) => {
21565
21228
  (_a2 = activeItem == null ? void 0 : activeItem.ref.current) == null ? void 0 : _a2.scrollIntoView({ block: "nearest" });
21566
21229
  }, [getItems]);
21567
21230
  return /* @__PURE__ */ jsx(
21568
- Primitive$6.div,
21231
+ Primitive.div,
21569
21232
  {
21570
21233
  "aria-hidden": true,
21571
21234
  ...scrollIndicatorProps,
@@ -21593,7 +21256,7 @@ var SEPARATOR_NAME$4 = "SelectSeparator";
21593
21256
  var SelectSeparator$1 = React.forwardRef(
21594
21257
  (props2, forwardedRef) => {
21595
21258
  const { __scopeSelect, ...separatorProps } = props2;
21596
- return /* @__PURE__ */ jsx(Primitive$6.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
21259
+ return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
21597
21260
  }
21598
21261
  );
21599
21262
  SelectSeparator$1.displayName = SEPARATOR_NAME$4;
@@ -21630,7 +21293,7 @@ var SelectBubbleInput = React.forwardRef(
21630
21293
  }
21631
21294
  }, [prevValue, value]);
21632
21295
  return /* @__PURE__ */ jsx(
21633
- Primitive$6.select,
21296
+ Primitive.select,
21634
21297
  {
21635
21298
  ...props2,
21636
21299
  style: { ...VISUALLY_HIDDEN_STYLES, ...props2.style },
@@ -21951,7 +21614,7 @@ function CheckboxField({
21951
21614
  ] });
21952
21615
  }
21953
21616
  var SWITCH_NAME = "Switch";
21954
- var [createSwitchContext] = createContextScope$2(SWITCH_NAME);
21617
+ var [createSwitchContext] = createContextScope(SWITCH_NAME);
21955
21618
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
21956
21619
  var Switch$1 = React.forwardRef(
21957
21620
  (props2, forwardedRef) => {
@@ -21979,7 +21642,7 @@ var Switch$1 = React.forwardRef(
21979
21642
  });
21980
21643
  return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
21981
21644
  /* @__PURE__ */ jsx(
21982
- Primitive$6.button,
21645
+ Primitive.button,
21983
21646
  {
21984
21647
  type: "button",
21985
21648
  role: "switch",
@@ -22024,7 +21687,7 @@ var SwitchThumb = React.forwardRef(
22024
21687
  const { __scopeSwitch, ...thumbProps } = props2;
22025
21688
  const context = useSwitchContext(THUMB_NAME$2, __scopeSwitch);
22026
21689
  return /* @__PURE__ */ jsx(
22027
- Primitive$6.span,
21690
+ Primitive.span,
22028
21691
  {
22029
21692
  "data-state": getState$2(context.checked),
22030
21693
  "data-disabled": context.disabled ? "" : void 0,
@@ -22180,7 +21843,7 @@ function SwitchField({
22180
21843
  ] });
22181
21844
  }
22182
21845
  var RADIO_NAME = "Radio";
22183
- var [createRadioContext, createRadioScope] = createContextScope$2(RADIO_NAME);
21846
+ var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
22184
21847
  var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
22185
21848
  var Radio = React.forwardRef(
22186
21849
  (props2, forwardedRef) => {
@@ -22201,7 +21864,7 @@ var Radio = React.forwardRef(
22201
21864
  const isFormControl = button ? form || !!button.closest("form") : true;
22202
21865
  return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
22203
21866
  /* @__PURE__ */ jsx(
22204
- Primitive$6.button,
21867
+ Primitive.button,
22205
21868
  {
22206
21869
  type: "button",
22207
21870
  role: "radio",
@@ -22245,7 +21908,7 @@ var RadioIndicator = React.forwardRef(
22245
21908
  const { __scopeRadio, forceMount, ...indicatorProps } = props2;
22246
21909
  const context = useRadioContext(INDICATOR_NAME$5, __scopeRadio);
22247
21910
  return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(
22248
- Primitive$6.span,
21911
+ Primitive.span,
22249
21912
  {
22250
21913
  "data-state": getState$1(context.checked),
22251
21914
  "data-disabled": context.disabled ? "" : void 0,
@@ -22285,7 +21948,7 @@ var RadioBubbleInput = React.forwardRef(
22285
21948
  }
22286
21949
  }, [prevChecked, checked, bubbles]);
22287
21950
  return /* @__PURE__ */ jsx(
22288
- Primitive$6.input,
21951
+ Primitive.input,
22289
21952
  {
22290
21953
  type: "radio",
22291
21954
  "aria-hidden": true,
@@ -22311,7 +21974,7 @@ function getState$1(checked) {
22311
21974
  }
22312
21975
  var ARROW_KEYS$2 = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
22313
21976
  var RADIO_GROUP_NAME$4 = "RadioGroup";
22314
- var [createRadioGroupContext] = createContextScope$2(RADIO_GROUP_NAME$4, [
21977
+ var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME$4, [
22315
21978
  createRovingFocusGroupScope,
22316
21979
  createRadioScope
22317
21980
  ]);
@@ -22359,7 +22022,7 @@ var RadioGroup$2 = React.forwardRef(
22359
22022
  dir: direction,
22360
22023
  loop,
22361
22024
  children: /* @__PURE__ */ jsx(
22362
- Primitive$6.div,
22025
+ Primitive.div,
22363
22026
  {
22364
22027
  role: "radiogroup",
22365
22028
  "aria-required": required2,
@@ -23510,7 +23173,7 @@ const match = {
23510
23173
  defaultParseWidth: "any"
23511
23174
  })
23512
23175
  };
23513
- const enUS$1 = {
23176
+ const enUS = {
23514
23177
  code: "en-US",
23515
23178
  formatDistance,
23516
23179
  formatLong,
@@ -24357,7 +24020,7 @@ const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
24357
24020
  function format(date2, formatStr, options) {
24358
24021
  var _a2, _b, _c, _d, _e2, _f, _g, _h;
24359
24022
  const defaultOptions2 = getDefaultOptions();
24360
- const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS$1;
24023
+ const locale = (options == null ? void 0 : options.locale) ?? defaultOptions2.locale ?? enUS;
24361
24024
  const firstWeekContainsDate = (options == null ? void 0 : options.firstWeekContainsDate) ?? ((_b = (_a2 = options == null ? void 0 : options.locale) == null ? void 0 : _a2.options) == null ? void 0 : _b.firstWeekContainsDate) ?? defaultOptions2.firstWeekContainsDate ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.firstWeekContainsDate) ?? 1;
24362
24025
  const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_f = (_e2 = options == null ? void 0 : options.locale) == null ? void 0 : _e2.options) == null ? void 0 : _f.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_h = (_g = defaultOptions2.locale) == null ? void 0 : _g.options) == null ? void 0 : _h.weekStartsOn) ?? 0;
24363
24026
  const originalDate = toDate(date2, options == null ? void 0 : options.in);
@@ -24495,63 +24158,6 @@ function endOfBroadcastWeek(date2, dateLib) {
24495
24158
  const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);
24496
24159
  return endDate;
24497
24160
  }
24498
- const enUS = {
24499
- ...enUS$1,
24500
- labels: {
24501
- labelDayButton: (date2, modifiers, options, dateLib) => {
24502
- let formatDate;
24503
- if (dateLib && typeof dateLib.format === "function") {
24504
- formatDate = dateLib.format.bind(dateLib);
24505
- } else {
24506
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
24507
- }
24508
- let label = formatDate(date2, "PPPP");
24509
- if (modifiers.today)
24510
- label = `Today, ${label}`;
24511
- if (modifiers.selected)
24512
- label = `${label}, selected`;
24513
- return label;
24514
- },
24515
- labelMonthDropdown: "Choose the Month",
24516
- labelNext: "Go to the Next Month",
24517
- labelPrevious: "Go to the Previous Month",
24518
- labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
24519
- labelYearDropdown: "Choose the Year",
24520
- labelGrid: (date2, options, dateLib) => {
24521
- let formatDate;
24522
- if (dateLib && typeof dateLib.format === "function") {
24523
- formatDate = dateLib.format.bind(dateLib);
24524
- } else {
24525
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
24526
- }
24527
- return formatDate(date2, "LLLL yyyy");
24528
- },
24529
- labelGridcell: (date2, modifiers, options, dateLib) => {
24530
- let formatDate;
24531
- if (dateLib && typeof dateLib.format === "function") {
24532
- formatDate = dateLib.format.bind(dateLib);
24533
- } else {
24534
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
24535
- }
24536
- let label = formatDate(date2, "PPPP");
24537
- if (modifiers == null ? void 0 : modifiers.today) {
24538
- label = `Today, ${label}`;
24539
- }
24540
- return label;
24541
- },
24542
- labelNav: "Navigation bar",
24543
- labelWeekNumberHeader: "Week Number",
24544
- labelWeekday: (date2, options, dateLib) => {
24545
- let formatDate;
24546
- if (dateLib && typeof dateLib.format === "function") {
24547
- formatDate = dateLib.format.bind(dateLib);
24548
- } else {
24549
- formatDate = (d, pattern) => format(d, pattern, { locale: enUS$1, ...options });
24550
- }
24551
- return formatDate(date2, "cccc");
24552
- }
24553
- }
24554
- };
24555
24161
  class DateLib {
24556
24162
  /**
24557
24163
  * Creates an instance of `DateLib`.
@@ -24835,9 +24441,6 @@ class CalendarDay {
24835
24441
  this.displayMonth = displayMonth;
24836
24442
  this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date2, displayMonth));
24837
24443
  this.dateLib = dateLib;
24838
- this.isoDate = dateLib.format(date2, "yyyy-MM-dd");
24839
- this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
24840
- this.dateMonthId = dateLib.format(date2, "yyyy-MM");
24841
24444
  }
24842
24445
  /**
24843
24446
  * Checks if this day is equal to another `CalendarDay`, considering both the
@@ -25148,7 +24751,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
25148
24751
  return isSameDay2(date2, matcher);
25149
24752
  }
25150
24753
  if (isDatesArray(matcher, dateLib)) {
25151
- return matcher.some((matcherDate) => isSameDay2(date2, matcherDate));
24754
+ return matcher.includes(date2);
25152
24755
  }
25153
24756
  if (isDateRange(matcher)) {
25154
24757
  return rangeIncludesDate(matcher, date2, false, dateLib);
@@ -25184,7 +24787,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
25184
24787
  });
25185
24788
  }
25186
24789
  function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
25187
- const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props2;
24790
+ const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props2;
25188
24791
  const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
25189
24792
  const computedNavStart = navStart && startOfMonth2(navStart);
25190
24793
  const computedNavEnd = navEnd && endOfMonth2(navEnd);
@@ -25204,7 +24807,7 @@ function createGetModifiers(days, props2, navStart, navEnd, dateLib) {
25204
24807
  const isDisabled = Boolean(disabled && dateMatchModifiers(date2, disabled, dateLib));
25205
24808
  const isHidden2 = Boolean(hidden && dateMatchModifiers(date2, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
25206
24809
  !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
25207
- const isToday = isSameDay2(date2, today);
24810
+ const isToday = isSameDay2(date2, today ?? dateLib.today());
25208
24811
  if (isOutside)
25209
24812
  internalModifiersMap.outside.push(day);
25210
24813
  if (isDisabled)
@@ -25352,6 +24955,60 @@ function getFormatters(customFormatters) {
25352
24955
  ...customFormatters
25353
24956
  };
25354
24957
  }
24958
+ function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
24959
+ const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
24960
+ const months = eachMonthOfInterval2({
24961
+ start: startOfYear2(displayMonth),
24962
+ end: endOfYear2(displayMonth)
24963
+ });
24964
+ const options = months.map((month) => {
24965
+ const label = formatters2.formatMonthDropdown(month, dateLib);
24966
+ const value = getMonth2(month);
24967
+ const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
24968
+ return { value, label, disabled };
24969
+ });
24970
+ return options;
24971
+ }
24972
+ function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
24973
+ let style = { ...styles == null ? void 0 : styles[UI.Day] };
24974
+ Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
24975
+ style = {
24976
+ ...style,
24977
+ ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
24978
+ };
24979
+ });
24980
+ return style;
24981
+ }
24982
+ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
24983
+ const today = dateLib.today();
24984
+ const start = ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
24985
+ const days = [];
24986
+ for (let i2 = 0; i2 < 7; i2++) {
24987
+ const day = dateLib.addDays(start, i2);
24988
+ days.push(day);
24989
+ }
24990
+ return days;
24991
+ }
24992
+ function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
24993
+ if (!navStart)
24994
+ return void 0;
24995
+ if (!navEnd)
24996
+ return void 0;
24997
+ const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
24998
+ const firstNavYear = startOfYear2(navStart);
24999
+ const lastNavYear = endOfYear2(navEnd);
25000
+ const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
25001
+ if (reverse)
25002
+ years.reverse();
25003
+ return years.map((year) => {
25004
+ const label = formatters2.formatYearDropdown(year, dateLib);
25005
+ return {
25006
+ value: getYear2(year),
25007
+ label,
25008
+ disabled: false
25009
+ };
25010
+ });
25011
+ }
25355
25012
  function labelDayButton(date2, modifiers, options, dateLib) {
25356
25013
  let label = (dateLib ?? new DateLib(options)).format(date2, "PPPP");
25357
25014
  if (modifiers.today)
@@ -25379,9 +25036,8 @@ function labelMonthDropdown(_options) {
25379
25036
  function labelNav() {
25380
25037
  return "";
25381
25038
  }
25382
- const defaultLabel = "Go to the Next Month";
25383
- function labelNext(_month, _options) {
25384
- return defaultLabel;
25039
+ function labelNext(_month) {
25040
+ return "Go to the Next Month";
25385
25041
  }
25386
25042
  function labelPrevious(_month) {
25387
25043
  return "Go to the Previous Month";
@@ -25414,87 +25070,6 @@ const defaultLabels = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
25414
25070
  labelWeekday,
25415
25071
  labelYearDropdown
25416
25072
  }, Symbol.toStringTag, { value: "Module" }));
25417
- const resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
25418
- if (customLabel)
25419
- return customLabel;
25420
- if (localeLabel) {
25421
- return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
25422
- }
25423
- return defaultLabel2;
25424
- };
25425
- function getLabels(customLabels, options) {
25426
- var _a2;
25427
- const localeLabels = ((_a2 = options.locale) == null ? void 0 : _a2.labels) ?? {};
25428
- return {
25429
- ...defaultLabels,
25430
- ...customLabels ?? {},
25431
- labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
25432
- labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
25433
- labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
25434
- labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
25435
- labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
25436
- labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
25437
- labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
25438
- labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
25439
- labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
25440
- labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
25441
- labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
25442
- };
25443
- }
25444
- function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
25445
- const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
25446
- const months = eachMonthOfInterval2({
25447
- start: startOfYear2(displayMonth),
25448
- end: endOfYear2(displayMonth)
25449
- });
25450
- const options = months.map((month) => {
25451
- const label = formatters2.formatMonthDropdown(month, dateLib);
25452
- const value = getMonth2(month);
25453
- const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
25454
- return { value, label, disabled };
25455
- });
25456
- return options;
25457
- }
25458
- function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
25459
- let style = { ...styles == null ? void 0 : styles[UI.Day] };
25460
- Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
25461
- style = {
25462
- ...style,
25463
- ...modifiersStyles == null ? void 0 : modifiersStyles[modifier]
25464
- };
25465
- });
25466
- return style;
25467
- }
25468
- function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
25469
- const referenceToday = today ?? dateLib.today();
25470
- const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
25471
- const days = [];
25472
- for (let i2 = 0; i2 < 7; i2++) {
25473
- const day = dateLib.addDays(start, i2);
25474
- days.push(day);
25475
- }
25476
- return days;
25477
- }
25478
- function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
25479
- if (!navStart)
25480
- return void 0;
25481
- if (!navEnd)
25482
- return void 0;
25483
- const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
25484
- const firstNavYear = startOfYear2(navStart);
25485
- const lastNavYear = endOfYear2(navEnd);
25486
- const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
25487
- if (reverse)
25488
- years.reverse();
25489
- return years.map((year) => {
25490
- const label = formatters2.formatYearDropdown(year, dateLib);
25491
- return {
25492
- value: getYear2(year),
25493
- label,
25494
- disabled: false
25495
- };
25496
- });
25497
- }
25498
25073
  const asHtmlElement = (element) => {
25499
25074
  if (element instanceof HTMLElement)
25500
25075
  return element;
@@ -25624,14 +25199,15 @@ function getDates(displayMonths, maxDate, props2, dateLib) {
25624
25199
  const { ISOWeek, fixedWeeks, broadcastCalendar } = props2 ?? {};
25625
25200
  const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
25626
25201
  const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
25627
- const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
25628
- const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
25629
- const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
25630
- const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
25202
+ const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
25203
+ const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
25631
25204
  const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
25632
25205
  const dates = [];
25633
25206
  for (let i2 = 0; i2 <= nOfDays; i2++) {
25634
25207
  const date2 = addDays2(startWeekFirstDate, i2);
25208
+ if (maxDate && isAfter2(date2, maxDate)) {
25209
+ break;
25210
+ }
25635
25211
  dates.push(date2);
25636
25212
  }
25637
25213
  const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
@@ -25798,7 +25374,6 @@ function useControlledValue(defaultValue, controlledValue) {
25798
25374
  return [value, setValue];
25799
25375
  }
25800
25376
  function useCalendar(props2, dateLib) {
25801
- var _a2;
25802
25377
  const [navStart, navEnd] = getNavMonths(props2, dateLib);
25803
25378
  const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
25804
25379
  const initialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
@@ -25811,44 +25386,13 @@ function useCalendar(props2, dateLib) {
25811
25386
  const newInitialMonth = getInitialMonth(props2, navStart, navEnd, dateLib);
25812
25387
  setFirstMonth(newInitialMonth);
25813
25388
  }, [props2.timeZone]);
25814
- const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
25815
- const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props2.numberOfMonths }, dateLib);
25816
- const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, {
25817
- ISOWeek: props2.ISOWeek,
25818
- fixedWeeks: props2.fixedWeeks,
25819
- broadcastCalendar: props2.broadcastCalendar
25820
- }, dateLib);
25821
- const months2 = getMonths(displayMonths, dates, {
25822
- broadcastCalendar: props2.broadcastCalendar,
25823
- fixedWeeks: props2.fixedWeeks,
25824
- ISOWeek: props2.ISOWeek,
25825
- reverseMonths: props2.reverseMonths
25826
- }, dateLib);
25827
- const weeks2 = getWeeks(months2);
25828
- const days2 = getDays(months2);
25829
- const previousMonth2 = getPreviousMonth(firstMonth, navStart, props2, dateLib);
25830
- const nextMonth2 = getNextMonth(firstMonth, navEnd, props2, dateLib);
25831
- return {
25832
- months: months2,
25833
- weeks: weeks2,
25834
- days: days2,
25835
- previousMonth: previousMonth2,
25836
- nextMonth: nextMonth2
25837
- };
25838
- }, [
25839
- dateLib,
25840
- firstMonth.getTime(),
25841
- navEnd == null ? void 0 : navEnd.getTime(),
25842
- navStart == null ? void 0 : navStart.getTime(),
25843
- props2.disableNavigation,
25844
- props2.broadcastCalendar,
25845
- (_a2 = props2.endMonth) == null ? void 0 : _a2.getTime(),
25846
- props2.fixedWeeks,
25847
- props2.ISOWeek,
25848
- props2.numberOfMonths,
25849
- props2.pagedNavigation,
25850
- props2.reverseMonths
25851
- ]);
25389
+ const displayMonths = getDisplayMonths(firstMonth, navEnd, props2, dateLib);
25390
+ const dates = getDates(displayMonths, props2.endMonth ? endOfMonth2(props2.endMonth) : void 0, props2, dateLib);
25391
+ const months = getMonths(displayMonths, dates, props2, dateLib);
25392
+ const weeks = getWeeks(months);
25393
+ const days = getDays(months);
25394
+ const previousMonth = getPreviousMonth(firstMonth, navStart, props2, dateLib);
25395
+ const nextMonth = getNextMonth(firstMonth, navEnd, props2, dateLib);
25852
25396
  const { disableNavigation, onMonthChange } = props2;
25853
25397
  const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
25854
25398
  const goToMonth = (date2) => {
@@ -26216,104 +25760,38 @@ function useSelection(props2, dateLib) {
26216
25760
  return void 0;
26217
25761
  }
26218
25762
  }
26219
- function toTimeZone(date2, timeZone) {
26220
- if (date2 instanceof TZDate && date2.timeZone === timeZone) {
26221
- return date2;
26222
- }
26223
- return new TZDate(date2, timeZone);
26224
- }
26225
- function convertMatcher(matcher, timeZone) {
26226
- if (typeof matcher === "boolean" || typeof matcher === "function") {
26227
- return matcher;
26228
- }
26229
- if (matcher instanceof Date) {
26230
- return toTimeZone(matcher, timeZone);
26231
- }
26232
- if (Array.isArray(matcher)) {
26233
- return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
26234
- }
26235
- if (isDateRange(matcher)) {
26236
- return {
26237
- ...matcher,
26238
- from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
26239
- to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
26240
- };
26241
- }
26242
- if (isDateInterval(matcher)) {
26243
- return {
26244
- before: toTimeZone(matcher.before, timeZone),
26245
- after: toTimeZone(matcher.after, timeZone)
26246
- };
26247
- }
26248
- if (isDateAfterType(matcher)) {
26249
- return {
26250
- after: toTimeZone(matcher.after, timeZone)
26251
- };
26252
- }
26253
- if (isDateBeforeType(matcher)) {
26254
- return {
26255
- before: toTimeZone(matcher.before, timeZone)
26256
- };
26257
- }
26258
- return matcher;
26259
- }
26260
- function convertMatchersToTimeZone(matchers, timeZone) {
26261
- if (!matchers) {
26262
- return matchers;
26263
- }
26264
- if (Array.isArray(matchers)) {
26265
- return matchers.map((matcher) => convertMatcher(matcher, timeZone));
26266
- }
26267
- return convertMatcher(matchers, timeZone);
26268
- }
26269
25763
  function DayPicker(initialProps) {
26270
25764
  var _a2;
26271
25765
  let props2 = initialProps;
26272
- const timeZone = props2.timeZone;
26273
- if (timeZone) {
25766
+ if (props2.timeZone) {
26274
25767
  props2 = {
26275
- ...initialProps,
26276
- timeZone
25768
+ ...initialProps
26277
25769
  };
26278
25770
  if (props2.today) {
26279
- props2.today = toTimeZone(props2.today, timeZone);
25771
+ props2.today = new TZDate(props2.today, props2.timeZone);
26280
25772
  }
26281
25773
  if (props2.month) {
26282
- props2.month = toTimeZone(props2.month, timeZone);
25774
+ props2.month = new TZDate(props2.month, props2.timeZone);
26283
25775
  }
26284
25776
  if (props2.defaultMonth) {
26285
- props2.defaultMonth = toTimeZone(props2.defaultMonth, timeZone);
25777
+ props2.defaultMonth = new TZDate(props2.defaultMonth, props2.timeZone);
26286
25778
  }
26287
25779
  if (props2.startMonth) {
26288
- props2.startMonth = toTimeZone(props2.startMonth, timeZone);
25780
+ props2.startMonth = new TZDate(props2.startMonth, props2.timeZone);
26289
25781
  }
26290
25782
  if (props2.endMonth) {
26291
- props2.endMonth = toTimeZone(props2.endMonth, timeZone);
25783
+ props2.endMonth = new TZDate(props2.endMonth, props2.timeZone);
26292
25784
  }
26293
25785
  if (props2.mode === "single" && props2.selected) {
26294
- props2.selected = toTimeZone(props2.selected, timeZone);
25786
+ props2.selected = new TZDate(props2.selected, props2.timeZone);
26295
25787
  } else if (props2.mode === "multiple" && props2.selected) {
26296
- props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => toTimeZone(date2, timeZone));
25788
+ props2.selected = (_a2 = props2.selected) == null ? void 0 : _a2.map((date2) => new TZDate(date2, props2.timeZone));
26297
25789
  } else if (props2.mode === "range" && props2.selected) {
26298
25790
  props2.selected = {
26299
- from: props2.selected.from ? toTimeZone(props2.selected.from, timeZone) : props2.selected.from,
26300
- to: props2.selected.to ? toTimeZone(props2.selected.to, timeZone) : props2.selected.to
25791
+ from: props2.selected.from ? new TZDate(props2.selected.from, props2.timeZone) : void 0,
25792
+ to: props2.selected.to ? new TZDate(props2.selected.to, props2.timeZone) : void 0
26301
25793
  };
26302
25794
  }
26303
- if (props2.disabled !== void 0) {
26304
- props2.disabled = convertMatchersToTimeZone(props2.disabled, timeZone);
26305
- }
26306
- if (props2.hidden !== void 0) {
26307
- props2.hidden = convertMatchersToTimeZone(props2.hidden, timeZone);
26308
- }
26309
- if (props2.modifiers) {
26310
- const nextModifiers = {};
26311
- Object.keys(props2.modifiers).forEach((key) => {
26312
- var _a3;
26313
- nextModifiers[key] = convertMatchersToTimeZone((_a3 = props2.modifiers) == null ? void 0 : _a3[key], timeZone);
26314
- });
26315
- props2.modifiers = nextModifiers;
26316
- }
26317
25795
  }
26318
25796
  const { components: components2, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
26319
25797
  const locale2 = { ...enUS, ...props2.locale };
@@ -26330,7 +25808,7 @@ function DayPicker(initialProps) {
26330
25808
  dateLib: dateLib2,
26331
25809
  components: getComponents(props2.components),
26332
25810
  formatters: getFormatters(props2.formatters),
26333
- labels: getLabels(props2.labels, dateLib2.options),
25811
+ labels: { ...defaultLabels, ...props2.labels },
26334
25812
  locale: locale2,
26335
25813
  classNames: { ...getDefaultClassNames(), ...props2.classNames }
26336
25814
  };
@@ -26349,9 +25827,6 @@ function DayPicker(initialProps) {
26349
25827
  props2.labels,
26350
25828
  props2.classNames
26351
25829
  ]);
26352
- if (!props2.today) {
26353
- props2 = { ...props2, today: dateLib.today() };
26354
- }
26355
25830
  const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props2;
26356
25831
  const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
26357
25832
  const calendar = useCalendar(props2, dateLib);
@@ -26360,7 +25835,7 @@ function DayPicker(initialProps) {
26360
25835
  const { isSelected, select, selected: selectedValue } = useSelection(props2, dateLib) ?? {};
26361
25836
  const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props2, calendar, getModifiers, isSelected ?? (() => false), dateLib);
26362
25837
  const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
26363
- const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today), [dateLib, props2.ISOWeek, props2.broadcastCalendar, props2.today]);
25838
+ const weekdays = useMemo(() => getWeekdays(dateLib, props2.ISOWeek), [dateLib, props2.ISOWeek]);
26364
25839
  const isInteractive = mode !== void 0 || onDayClick !== void 0;
26365
25840
  const handlePreviousClick = useCallback(() => {
26366
25841
  if (!previousMonth)
@@ -26378,9 +25853,6 @@ function DayPicker(initialProps) {
26378
25853
  e2.preventDefault();
26379
25854
  e2.stopPropagation();
26380
25855
  setFocused(day);
26381
- if (m2.disabled) {
26382
- return;
26383
- }
26384
25856
  select == null ? void 0 : select(day.date, m2, e2);
26385
25857
  onDayClick == null ? void 0 : onDayClick(day.date, m2, e2);
26386
25858
  }, [select, onDayClick, setFocused]);
@@ -26509,7 +25981,10 @@ function DayPicker(initialProps) {
26509
25981
  whiteSpace: "nowrap",
26510
25982
  wordWrap: "normal"
26511
25983
  } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
26512
- ) : React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
25984
+ ) : (
25985
+ // biome-ignore lint/a11y/useSemanticElements: breaking change
25986
+ React__default.createElement(components2.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
25987
+ )),
26513
25988
  navLayout === "around" && !props2.hideNavigation && displayIndex === numberOfMonths - 1 && React__default.createElement(
26514
25989
  components2.NextMonthButton,
26515
25990
  { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props2.animate ? "true" : void 0 },
@@ -26529,7 +26004,8 @@ function DayPicker(initialProps) {
26529
26004
  return React__default.createElement(
26530
26005
  components2.Week,
26531
26006
  { className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
26532
- showWeekNumber && React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
26007
+ showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
26008
+ React__default.createElement(components2.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
26533
26009
  locale
26534
26010
  }), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
26535
26011
  week.days.map((day) => {
@@ -26546,7 +26022,10 @@ function DayPicker(initialProps) {
26546
26022
  const style2 = getStyleForModifiers(modifiers, styles, props2.modifiersStyles);
26547
26023
  const className2 = getClassNamesForModifiers(modifiers, classNames, props2.modifiersClassNames);
26548
26024
  const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date2, modifiers, dateLib.options, dateLib) : void 0;
26549
- return React__default.createElement(components2.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
26025
+ return (
26026
+ // biome-ignore lint/a11y/useSemanticElements: react component
26027
+ React__default.createElement(components2.Day, { key: `${dateLib.format(date2, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date2, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date2, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React__default.createElement(components2.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date2, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib))
26028
+ );
26550
26029
  })
26551
26030
  );
26552
26031
  }))
@@ -26554,7 +26033,8 @@ function DayPicker(initialProps) {
26554
26033
  );
26555
26034
  })
26556
26035
  ),
26557
- props2.footer && React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
26036
+ props2.footer && // biome-ignore lint/a11y/useSemanticElements: react component
26037
+ React__default.createElement(components2.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props2.footer)
26558
26038
  )
26559
26039
  );
26560
26040
  }
@@ -31919,7 +31399,7 @@ function reducer(state, action) {
31919
31399
  function noop$1() {
31920
31400
  }
31921
31401
  var DIALOG_NAME = "Dialog";
31922
- var [createDialogContext, createDialogScope] = createContextScope$2(DIALOG_NAME);
31402
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
31923
31403
  var [DialogProvider$1, useDialogContext] = createDialogContext(DIALOG_NAME);
31924
31404
  var Dialog$1 = (props2) => {
31925
31405
  const {
@@ -31963,7 +31443,7 @@ var DialogTrigger$1 = React.forwardRef(
31963
31443
  const context = useDialogContext(TRIGGER_NAME$7, __scopeDialog);
31964
31444
  const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
31965
31445
  return /* @__PURE__ */ jsx(
31966
- Primitive$6.button,
31446
+ Primitive.button,
31967
31447
  {
31968
31448
  type: "button",
31969
31449
  "aria-haspopup": "dialog",
@@ -31998,7 +31478,7 @@ var DialogOverlay$1 = React.forwardRef(
31998
31478
  }
31999
31479
  );
32000
31480
  DialogOverlay$1.displayName = OVERLAY_NAME$1;
32001
- var Slot$1 = /* @__PURE__ */ createSlot$7("DialogOverlay.RemoveScroll");
31481
+ var Slot$1 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
32002
31482
  var DialogOverlayImpl = React.forwardRef(
32003
31483
  (props2, forwardedRef) => {
32004
31484
  const { __scopeDialog, ...overlayProps } = props2;
@@ -32007,7 +31487,7 @@ var DialogOverlayImpl = React.forwardRef(
32007
31487
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
32008
31488
  // ie. when `Overlay` and `Content` are siblings
32009
31489
  /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$1, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
32010
- Primitive$6.div,
31490
+ Primitive.div,
32011
31491
  {
32012
31492
  "data-state": getState(context.open),
32013
31493
  ...overlayProps,
@@ -32148,7 +31628,7 @@ var DialogTitle$1 = React.forwardRef(
32148
31628
  (props2, forwardedRef) => {
32149
31629
  const { __scopeDialog, ...titleProps } = props2;
32150
31630
  const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
32151
- return /* @__PURE__ */ jsx(Primitive$6.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
31631
+ return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
32152
31632
  }
32153
31633
  );
32154
31634
  DialogTitle$1.displayName = TITLE_NAME$1;
@@ -32157,7 +31637,7 @@ var DialogDescription$1 = React.forwardRef(
32157
31637
  (props2, forwardedRef) => {
32158
31638
  const { __scopeDialog, ...descriptionProps } = props2;
32159
31639
  const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
32160
- return /* @__PURE__ */ jsx(Primitive$6.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
31640
+ return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
32161
31641
  }
32162
31642
  );
32163
31643
  DialogDescription$1.displayName = DESCRIPTION_NAME$1;
@@ -32167,7 +31647,7 @@ var DialogClose$1 = React.forwardRef(
32167
31647
  const { __scopeDialog, ...closeProps } = props2;
32168
31648
  const context = useDialogContext(CLOSE_NAME, __scopeDialog);
32169
31649
  return /* @__PURE__ */ jsx(
32170
- Primitive$6.button,
31650
+ Primitive.button,
32171
31651
  {
32172
31652
  type: "button",
32173
31653
  ...closeProps,
@@ -32344,198 +31824,9 @@ function DialogDescription({
32344
31824
  }
32345
31825
  );
32346
31826
  }
32347
- function createContextScope$1(scopeName, createContextScopeDeps = []) {
32348
- let defaultContexts = [];
32349
- function createContext3(rootComponentName, defaultContext) {
32350
- const BaseContext = React.createContext(defaultContext);
32351
- BaseContext.displayName = rootComponentName + "Context";
32352
- const index2 = defaultContexts.length;
32353
- defaultContexts = [...defaultContexts, defaultContext];
32354
- const Provider2 = (props2) => {
32355
- var _a2;
32356
- const { scope, children, ...context } = props2;
32357
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
32358
- const value = React.useMemo(() => context, Object.values(context));
32359
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
32360
- };
32361
- Provider2.displayName = rootComponentName + "Provider";
32362
- function useContext2(consumerName, scope) {
32363
- var _a2;
32364
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
32365
- const context = React.useContext(Context);
32366
- if (context) return context;
32367
- if (defaultContext !== void 0) return defaultContext;
32368
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
32369
- }
32370
- return [Provider2, useContext2];
32371
- }
32372
- const createScope = () => {
32373
- const scopeContexts = defaultContexts.map((defaultContext) => {
32374
- return React.createContext(defaultContext);
32375
- });
32376
- return function useScope(scope) {
32377
- const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
32378
- return React.useMemo(
32379
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
32380
- [scope, contexts]
32381
- );
32382
- };
32383
- };
32384
- createScope.scopeName = scopeName;
32385
- return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
32386
- }
32387
- function composeContextScopes$1(...scopes) {
32388
- const baseScope = scopes[0];
32389
- if (scopes.length === 1) return baseScope;
32390
- const createScope = () => {
32391
- const scopeHooks = scopes.map((createScope2) => ({
32392
- useScope: createScope2(),
32393
- scopeName: createScope2.scopeName
32394
- }));
32395
- return function useComposedScopes(overrideScopes) {
32396
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
32397
- const scopeProps = useScope(overrideScopes);
32398
- const currentScope = scopeProps[`__scope${scopeName}`];
32399
- return { ...nextScopes2, ...currentScope };
32400
- }, {});
32401
- return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
32402
- };
32403
- };
32404
- createScope.scopeName = baseScope.scopeName;
32405
- return createScope;
32406
- }
32407
- var REACT_LAZY_TYPE$3 = Symbol.for("react.lazy");
32408
- var use$3 = React[" use ".trim().toString()];
32409
- function isPromiseLike$3(value) {
32410
- return typeof value === "object" && value !== null && "then" in value;
32411
- }
32412
- function isLazyComponent$3(element) {
32413
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$3 && "_payload" in element && isPromiseLike$3(element._payload);
32414
- }
32415
- // @__NO_SIDE_EFFECTS__
32416
- function createSlot$3(ownerName) {
32417
- const SlotClone = /* @__PURE__ */ createSlotClone$3(ownerName);
32418
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
32419
- let { children, ...slotProps } = props2;
32420
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
32421
- children = use$3(children._payload);
32422
- }
32423
- const childrenArray = React.Children.toArray(children);
32424
- const slottable = childrenArray.find(isSlottable$3);
32425
- if (slottable) {
32426
- const newElement = slottable.props.children;
32427
- const newChildren = childrenArray.map((child) => {
32428
- if (child === slottable) {
32429
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
32430
- return React.isValidElement(newElement) ? newElement.props.children : null;
32431
- } else {
32432
- return child;
32433
- }
32434
- });
32435
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
32436
- }
32437
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
32438
- });
32439
- Slot2.displayName = `${ownerName}.Slot`;
32440
- return Slot2;
32441
- }
32442
- // @__NO_SIDE_EFFECTS__
32443
- function createSlotClone$3(ownerName) {
32444
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
32445
- let { children, ...slotProps } = props2;
32446
- if (isLazyComponent$3(children) && typeof use$3 === "function") {
32447
- children = use$3(children._payload);
32448
- }
32449
- if (React.isValidElement(children)) {
32450
- const childrenRef = getElementRef$3(children);
32451
- const props22 = mergeProps$3(slotProps, children.props);
32452
- if (children.type !== React.Fragment) {
32453
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
32454
- }
32455
- return React.cloneElement(children, props22);
32456
- }
32457
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
32458
- });
32459
- SlotClone.displayName = `${ownerName}.SlotClone`;
32460
- return SlotClone;
32461
- }
32462
- var SLOTTABLE_IDENTIFIER$3 = Symbol("radix.slottable");
32463
- function isSlottable$3(child) {
32464
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$3;
32465
- }
32466
- function mergeProps$3(slotProps, childProps) {
32467
- const overrideProps = { ...childProps };
32468
- for (const propName in childProps) {
32469
- const slotPropValue = slotProps[propName];
32470
- const childPropValue = childProps[propName];
32471
- const isHandler = /^on[A-Z]/.test(propName);
32472
- if (isHandler) {
32473
- if (slotPropValue && childPropValue) {
32474
- overrideProps[propName] = (...args) => {
32475
- const result = childPropValue(...args);
32476
- slotPropValue(...args);
32477
- return result;
32478
- };
32479
- } else if (slotPropValue) {
32480
- overrideProps[propName] = slotPropValue;
32481
- }
32482
- } else if (propName === "style") {
32483
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
32484
- } else if (propName === "className") {
32485
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
32486
- }
32487
- }
32488
- return { ...slotProps, ...overrideProps };
32489
- }
32490
- function getElementRef$3(element) {
32491
- var _a2, _b;
32492
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
32493
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
32494
- if (mayWarn) {
32495
- return element.ref;
32496
- }
32497
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
32498
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
32499
- if (mayWarn) {
32500
- return element.props.ref;
32501
- }
32502
- return element.props.ref || element.ref;
32503
- }
32504
- var NODES$3 = [
32505
- "a",
32506
- "button",
32507
- "div",
32508
- "form",
32509
- "h2",
32510
- "h3",
32511
- "img",
32512
- "input",
32513
- "label",
32514
- "li",
32515
- "nav",
32516
- "ol",
32517
- "p",
32518
- "select",
32519
- "span",
32520
- "svg",
32521
- "ul"
32522
- ];
32523
- var Primitive$3 = NODES$3.reduce((primitive, node) => {
32524
- const Slot2 = /* @__PURE__ */ createSlot$3(`Primitive.${node}`);
32525
- const Node2 = React.forwardRef((props2, forwardedRef) => {
32526
- const { asChild, ...primitiveProps } = props2;
32527
- const Comp = asChild ? Slot2 : node;
32528
- if (typeof window !== "undefined") {
32529
- window[Symbol.for("radix-ui")] = true;
32530
- }
32531
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
32532
- });
32533
- Node2.displayName = `Primitive.${node}`;
32534
- return { ...primitive, [node]: Node2 };
32535
- }, {});
32536
31827
  var PROGRESS_NAME = "Progress";
32537
31828
  var DEFAULT_MAX = 100;
32538
- var [createProgressContext] = createContextScope$1(PROGRESS_NAME);
31829
+ var [createProgressContext] = createContextScope(PROGRESS_NAME);
32539
31830
  var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
32540
31831
  var Progress$1 = React.forwardRef(
32541
31832
  (props2, forwardedRef) => {
@@ -32556,7 +31847,7 @@ var Progress$1 = React.forwardRef(
32556
31847
  const value = isValidValueNumber(valueProp, max2) ? valueProp : null;
32557
31848
  const valueLabel = isNumber$3(value) ? getValueLabel(value, max2) : void 0;
32558
31849
  return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max: max2, children: /* @__PURE__ */ jsx(
32559
- Primitive$3.div,
31850
+ Primitive.div,
32560
31851
  {
32561
31852
  "aria-valuemax": max2,
32562
31853
  "aria-valuemin": 0,
@@ -32579,7 +31870,7 @@ var ProgressIndicator = React.forwardRef(
32579
31870
  const { __scopeProgress, ...indicatorProps } = props2;
32580
31871
  const context = useProgressContext(INDICATOR_NAME$4, __scopeProgress);
32581
31872
  return /* @__PURE__ */ jsx(
32582
- Primitive$3.div,
31873
+ Primitive.div,
32583
31874
  {
32584
31875
  "data-state": getProgressState(context.value, context.max),
32585
31876
  "data-value": context.value ?? void 0,
@@ -32644,7 +31935,7 @@ function Progress({
32644
31935
  }
32645
31936
  );
32646
31937
  }
32647
- var [createTooltipContext] = createContextScope$2("Tooltip", [
31938
+ var [createTooltipContext] = createContextScope("Tooltip", [
32648
31939
  createPopperScope
32649
31940
  ]);
32650
31941
  var usePopperScope$2 = createPopperScope();
@@ -32803,7 +32094,7 @@ var TooltipTrigger$1 = React.forwardRef(
32803
32094
  return () => document.removeEventListener("pointerup", handlePointerUp2);
32804
32095
  }, [handlePointerUp2]);
32805
32096
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
32806
- Primitive$6.button,
32097
+ Primitive.button,
32807
32098
  {
32808
32099
  "aria-describedby": context.open ? context.contentId : void 0,
32809
32100
  "data-state": context.stateAttribute,
@@ -34312,10 +33603,12 @@ function FormBuilderField({
34312
33603
  });
34313
33604
  const handleChange = useCallback(
34314
33605
  (value, ...extras) => {
33606
+ if (typeof field.onChangeOverride === "function" && field.onChangeOverride(value, ...extras) === false)
33607
+ return;
34315
33608
  controllerField.onChange(value);
34316
33609
  onChange == null ? void 0 : onChange(value, ...extras);
34317
33610
  },
34318
- [controllerField, onChange]
33611
+ [controllerField, field.onChangeOverride, onChange]
34319
33612
  );
34320
33613
  const baseClassName = cn$1(
34321
33614
  error && "border-destructive focus-visible:ring-destructive",
@@ -34888,7 +34181,7 @@ function jsonStringifyReplacer$1(_2, value) {
34888
34181
  return value.toString();
34889
34182
  return value;
34890
34183
  }
34891
- const captureStackTrace$1 = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {
34184
+ const captureStackTrace$1 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
34892
34185
  };
34893
34186
  function unwrapMessage$1(message2) {
34894
34187
  return typeof message2 === "string" ? message2 : message2 == null ? void 0 : message2.message;
@@ -34917,13 +34210,7 @@ const initializer$2 = (inst, def) => {
34917
34210
  value: def,
34918
34211
  enumerable: false
34919
34212
  });
34920
- Object.defineProperty(inst, "message", {
34921
- get() {
34922
- return JSON.stringify(def, jsonStringifyReplacer$1, 2);
34923
- },
34924
- enumerable: true
34925
- // configurable: false,
34926
- });
34213
+ inst.message = JSON.stringify(def, jsonStringifyReplacer$1, 2);
34927
34214
  Object.defineProperty(inst, "toString", {
34928
34215
  value: () => inst.message,
34929
34216
  enumerable: false
@@ -38893,11 +38180,6 @@ function FormBuilder({
38893
38180
  const handleFieldChange = useCallback(
38894
38181
  (field, value, ...extras) => {
38895
38182
  if (field.onChange) {
38896
- if (field.onChangeOverride) {
38897
- if (field.onChangeOverride(value, extras, setValue, getValues))
38898
- field.onChange(value, extras, setValue, getValues);
38899
- return;
38900
- }
38901
38183
  field.onChange(value, extras, setValue, getValues);
38902
38184
  }
38903
38185
  },
@@ -39452,7 +38734,7 @@ var SUB_CLOSE_KEYS = {
39452
38734
  };
39453
38735
  var MENU_NAME$1 = "Menu";
39454
38736
  var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection(MENU_NAME$1);
39455
- var [createMenuContext, createMenuScope] = createContextScope$2(MENU_NAME$1, [
38737
+ var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME$1, [
39456
38738
  createCollectionScope$3,
39457
38739
  createPopperScope,
39458
38740
  createRovingFocusGroupScope
@@ -39576,7 +38858,7 @@ var MenuRootContentNonModal = React.forwardRef((props2, forwardedRef) => {
39576
38858
  }
39577
38859
  );
39578
38860
  });
39579
- var Slot = /* @__PURE__ */ createSlot$7("MenuContent.ScrollLock");
38861
+ var Slot = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
39580
38862
  var MenuContentImpl = React.forwardRef(
39581
38863
  (props2, forwardedRef) => {
39582
38864
  const {
@@ -39768,7 +39050,7 @@ var GROUP_NAME$3 = "MenuGroup";
39768
39050
  var MenuGroup = React.forwardRef(
39769
39051
  (props2, forwardedRef) => {
39770
39052
  const { __scopeMenu, ...groupProps } = props2;
39771
- return /* @__PURE__ */ jsx(Primitive$6.div, { role: "group", ...groupProps, ref: forwardedRef });
39053
+ return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
39772
39054
  }
39773
39055
  );
39774
39056
  MenuGroup.displayName = GROUP_NAME$3;
@@ -39776,7 +39058,7 @@ var LABEL_NAME$3 = "MenuLabel";
39776
39058
  var MenuLabel = React.forwardRef(
39777
39059
  (props2, forwardedRef) => {
39778
39060
  const { __scopeMenu, ...labelProps } = props2;
39779
- return /* @__PURE__ */ jsx(Primitive$6.div, { ...labelProps, ref: forwardedRef });
39061
+ return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
39780
39062
  }
39781
39063
  );
39782
39064
  MenuLabel.displayName = LABEL_NAME$3;
@@ -39854,7 +39136,7 @@ var MenuItemImpl = React.forwardRef(
39854
39136
  disabled,
39855
39137
  textValue: textValue ?? textContent,
39856
39138
  children: /* @__PURE__ */ jsx(Item$2, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
39857
- Primitive$6.div,
39139
+ Primitive.div,
39858
39140
  {
39859
39141
  role: "menuitem",
39860
39142
  "data-highlighted": isFocused ? "" : void 0,
@@ -39965,7 +39247,7 @@ var MenuItemIndicator = React.forwardRef(
39965
39247
  {
39966
39248
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
39967
39249
  children: /* @__PURE__ */ jsx(
39968
- Primitive$6.span,
39250
+ Primitive.span,
39969
39251
  {
39970
39252
  ...itemIndicatorProps,
39971
39253
  ref: forwardedRef,
@@ -39982,7 +39264,7 @@ var MenuSeparator = React.forwardRef(
39982
39264
  (props2, forwardedRef) => {
39983
39265
  const { __scopeMenu, ...separatorProps } = props2;
39984
39266
  return /* @__PURE__ */ jsx(
39985
- Primitive$6.div,
39267
+ Primitive.div,
39986
39268
  {
39987
39269
  role: "separator",
39988
39270
  "aria-orientation": "horizontal",
@@ -40069,7 +39351,7 @@ var MenuSubTrigger = React.forwardRef(
40069
39351
  "aria-controls": subContext.contentId,
40070
39352
  "data-state": getOpenState$1(context.open),
40071
39353
  ...props2,
40072
- ref: composeRefs$1(forwardedRef, subContext.onTriggerChange),
39354
+ ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
40073
39355
  onClick: (event) => {
40074
39356
  var _a2;
40075
39357
  (_a2 = props2.onClick) == null ? void 0 : _a2.call(props2, event);
@@ -40264,7 +39546,7 @@ var Sub = MenuSub;
40264
39546
  var SubTrigger = MenuSubTrigger;
40265
39547
  var SubContent = MenuSubContent;
40266
39548
  var DROPDOWN_MENU_NAME = "DropdownMenu";
40267
- var [createDropdownMenuContext] = createContextScope$2(
39549
+ var [createDropdownMenuContext] = createContextScope(
40268
39550
  DROPDOWN_MENU_NAME,
40269
39551
  [createMenuScope]
40270
39552
  );
@@ -40311,7 +39593,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
40311
39593
  const context = useDropdownMenuContext(TRIGGER_NAME$5, __scopeDropdownMenu);
40312
39594
  const menuScope = useMenuScope$2(__scopeDropdownMenu);
40313
39595
  return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
40314
- Primitive$6.button,
39596
+ Primitive.button,
40315
39597
  {
40316
39598
  type: "button",
40317
39599
  id: context.triggerId,
@@ -40322,7 +39604,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
40322
39604
  "data-disabled": disabled ? "" : void 0,
40323
39605
  disabled,
40324
39606
  ...triggerProps,
40325
- ref: composeRefs$1(forwardedRef, context.triggerRef),
39607
+ ref: composeRefs$2(forwardedRef, context.triggerRef),
40326
39608
  onPointerDown: composeEventHandlers$1(props2.onPointerDown, (event) => {
40327
39609
  if (!disabled && event.button === 0 && event.ctrlKey === false) {
40328
39610
  context.onOpenToggle();
@@ -46641,7 +45923,7 @@ function dotAccessor(path) {
46641
45923
  return (row) => lodashExports.get(row, path);
46642
45924
  }
46643
45925
  var ROOT_NAME = "AlertDialog";
46644
- var [createAlertDialogContext] = createContextScope$2(ROOT_NAME, [
45926
+ var [createAlertDialogContext] = createContextScope(ROOT_NAME, [
46645
45927
  createDialogScope
46646
45928
  ]);
46647
45929
  var useDialogScope = createDialogScope();
@@ -46910,7 +46192,7 @@ function AlertDialogCancel({
46910
46192
  }
46911
46193
  const DialogContext = createContext(null);
46912
46194
  function useDialogController() {
46913
- const ctx = use$7(DialogContext);
46195
+ const ctx = use$1(DialogContext);
46914
46196
  if (!ctx)
46915
46197
  throw new Error("useDialogController must be used within DialogProvider");
46916
46198
  return ctx;
@@ -49252,7 +48534,7 @@ function ThemeBridge({ children, ...props2 }) {
49252
48534
  return /* @__PURE__ */ jsx(ThemeProviderContext, { ...props2, value, children });
49253
48535
  }
49254
48536
  const useTheme = () => {
49255
- const context = use$7(ThemeProviderContext);
48537
+ const context = use$1(ThemeProviderContext);
49256
48538
  if (context === void 0)
49257
48539
  throw new Error("useTheme must be used within a ThemeProvider");
49258
48540
  return context;
@@ -49445,11 +48727,7 @@ function AdminLayoutContent({
49445
48727
  ] })
49446
48728
  }
49447
48729
  ),
49448
- hasChildren && isOpen && // Submenu must be wrapped in a list element so the SidebarMenuItem
49449
- // (rendered as <li>) children don't end up as direct descendants of
49450
- // a <div> inside another <li> — that's invalid HTML and triggers a
49451
- // React hydration warning.
49452
- /* @__PURE__ */ jsx("ul", { className: "mt-1 flex flex-col list-none p-0 m-0", children: (item.children ?? []).map(
48730
+ hasChildren && isOpen && /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-col", children: (item.children ?? []).map(
49453
48731
  (child) => renderItem(child, Math.min(level + 1, 3))
49454
48732
  ) })
49455
48733
  ]
@@ -50620,135 +49898,6 @@ const Toaster$1 = /* @__PURE__ */ React__default.forwardRef(function Toaster(pro
50620
49898
  }))
50621
49899
  );
50622
49900
  });
50623
- var REACT_LAZY_TYPE$2 = Symbol.for("react.lazy");
50624
- var use$2 = React[" use ".trim().toString()];
50625
- function isPromiseLike$2(value) {
50626
- return typeof value === "object" && value !== null && "then" in value;
50627
- }
50628
- function isLazyComponent$2(element) {
50629
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$2 && "_payload" in element && isPromiseLike$2(element._payload);
50630
- }
50631
- // @__NO_SIDE_EFFECTS__
50632
- function createSlot$2(ownerName) {
50633
- const SlotClone = /* @__PURE__ */ createSlotClone$2(ownerName);
50634
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
50635
- let { children, ...slotProps } = props2;
50636
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
50637
- children = use$2(children._payload);
50638
- }
50639
- const childrenArray = React.Children.toArray(children);
50640
- const slottable = childrenArray.find(isSlottable$2);
50641
- if (slottable) {
50642
- const newElement = slottable.props.children;
50643
- const newChildren = childrenArray.map((child) => {
50644
- if (child === slottable) {
50645
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
50646
- return React.isValidElement(newElement) ? newElement.props.children : null;
50647
- } else {
50648
- return child;
50649
- }
50650
- });
50651
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
50652
- }
50653
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
50654
- });
50655
- Slot2.displayName = `${ownerName}.Slot`;
50656
- return Slot2;
50657
- }
50658
- // @__NO_SIDE_EFFECTS__
50659
- function createSlotClone$2(ownerName) {
50660
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
50661
- let { children, ...slotProps } = props2;
50662
- if (isLazyComponent$2(children) && typeof use$2 === "function") {
50663
- children = use$2(children._payload);
50664
- }
50665
- if (React.isValidElement(children)) {
50666
- const childrenRef = getElementRef$2(children);
50667
- const props22 = mergeProps$2(slotProps, children.props);
50668
- if (children.type !== React.Fragment) {
50669
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
50670
- }
50671
- return React.cloneElement(children, props22);
50672
- }
50673
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
50674
- });
50675
- SlotClone.displayName = `${ownerName}.SlotClone`;
50676
- return SlotClone;
50677
- }
50678
- var SLOTTABLE_IDENTIFIER$2 = Symbol("radix.slottable");
50679
- function isSlottable$2(child) {
50680
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$2;
50681
- }
50682
- function mergeProps$2(slotProps, childProps) {
50683
- const overrideProps = { ...childProps };
50684
- for (const propName in childProps) {
50685
- const slotPropValue = slotProps[propName];
50686
- const childPropValue = childProps[propName];
50687
- const isHandler = /^on[A-Z]/.test(propName);
50688
- if (isHandler) {
50689
- if (slotPropValue && childPropValue) {
50690
- overrideProps[propName] = (...args) => {
50691
- const result = childPropValue(...args);
50692
- slotPropValue(...args);
50693
- return result;
50694
- };
50695
- } else if (slotPropValue) {
50696
- overrideProps[propName] = slotPropValue;
50697
- }
50698
- } else if (propName === "style") {
50699
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
50700
- } else if (propName === "className") {
50701
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
50702
- }
50703
- }
50704
- return { ...slotProps, ...overrideProps };
50705
- }
50706
- function getElementRef$2(element) {
50707
- var _a2, _b;
50708
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
50709
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
50710
- if (mayWarn) {
50711
- return element.ref;
50712
- }
50713
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
50714
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
50715
- if (mayWarn) {
50716
- return element.props.ref;
50717
- }
50718
- return element.props.ref || element.ref;
50719
- }
50720
- var NODES$2 = [
50721
- "a",
50722
- "button",
50723
- "div",
50724
- "form",
50725
- "h2",
50726
- "h3",
50727
- "img",
50728
- "input",
50729
- "label",
50730
- "li",
50731
- "nav",
50732
- "ol",
50733
- "p",
50734
- "select",
50735
- "span",
50736
- "svg",
50737
- "ul"
50738
- ];
50739
- var Primitive$2 = NODES$2.reduce((primitive, node) => {
50740
- const Slot2 = /* @__PURE__ */ createSlot$2(`Primitive.${node}`);
50741
- const Node2 = React.forwardRef((props2, forwardedRef) => {
50742
- const { asChild, ...primitiveProps } = props2;
50743
- const Comp = asChild ? Slot2 : node;
50744
- if (typeof window !== "undefined") {
50745
- window[Symbol.for("radix-ui")] = true;
50746
- }
50747
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
50748
- });
50749
- Node2.displayName = `Primitive.${node}`;
50750
- return { ...primitive, [node]: Node2 };
50751
- }, {});
50752
49901
  var NAME$1 = "AspectRatio";
50753
49902
  var AspectRatio$1 = React.forwardRef(
50754
49903
  (props2, forwardedRef) => {
@@ -50765,7 +49914,7 @@ var AspectRatio$1 = React.forwardRef(
50765
49914
  },
50766
49915
  "data-radix-aspect-ratio-wrapper": "",
50767
49916
  children: /* @__PURE__ */ jsx(
50768
- Primitive$2.div,
49917
+ Primitive.div,
50769
49918
  {
50770
49919
  ...aspectRatioProps,
50771
49920
  ref: forwardedRef,
@@ -50791,195 +49940,6 @@ function AspectRatio({
50791
49940
  }) {
50792
49941
  return /* @__PURE__ */ jsx(Root$5, { "data-slot": "aspect-ratio", ...props2 });
50793
49942
  }
50794
- function createContextScope(scopeName, createContextScopeDeps = []) {
50795
- let defaultContexts = [];
50796
- function createContext3(rootComponentName, defaultContext) {
50797
- const BaseContext = React.createContext(defaultContext);
50798
- BaseContext.displayName = rootComponentName + "Context";
50799
- const index2 = defaultContexts.length;
50800
- defaultContexts = [...defaultContexts, defaultContext];
50801
- const Provider2 = (props2) => {
50802
- var _a2;
50803
- const { scope, children, ...context } = props2;
50804
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
50805
- const value = React.useMemo(() => context, Object.values(context));
50806
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
50807
- };
50808
- Provider2.displayName = rootComponentName + "Provider";
50809
- function useContext2(consumerName, scope) {
50810
- var _a2;
50811
- const Context = ((_a2 = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a2[index2]) || BaseContext;
50812
- const context = React.useContext(Context);
50813
- if (context) return context;
50814
- if (defaultContext !== void 0) return defaultContext;
50815
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
50816
- }
50817
- return [Provider2, useContext2];
50818
- }
50819
- const createScope = () => {
50820
- const scopeContexts = defaultContexts.map((defaultContext) => {
50821
- return React.createContext(defaultContext);
50822
- });
50823
- return function useScope(scope) {
50824
- const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
50825
- return React.useMemo(
50826
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
50827
- [scope, contexts]
50828
- );
50829
- };
50830
- };
50831
- createScope.scopeName = scopeName;
50832
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
50833
- }
50834
- function composeContextScopes(...scopes) {
50835
- const baseScope = scopes[0];
50836
- if (scopes.length === 1) return baseScope;
50837
- const createScope = () => {
50838
- const scopeHooks = scopes.map((createScope2) => ({
50839
- useScope: createScope2(),
50840
- scopeName: createScope2.scopeName
50841
- }));
50842
- return function useComposedScopes(overrideScopes) {
50843
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
50844
- const scopeProps = useScope(overrideScopes);
50845
- const currentScope = scopeProps[`__scope${scopeName}`];
50846
- return { ...nextScopes2, ...currentScope };
50847
- }, {});
50848
- return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
50849
- };
50850
- };
50851
- createScope.scopeName = baseScope.scopeName;
50852
- return createScope;
50853
- }
50854
- var REACT_LAZY_TYPE$1 = Symbol.for("react.lazy");
50855
- var use$1 = React[" use ".trim().toString()];
50856
- function isPromiseLike$1(value) {
50857
- return typeof value === "object" && value !== null && "then" in value;
50858
- }
50859
- function isLazyComponent$1(element) {
50860
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE$1 && "_payload" in element && isPromiseLike$1(element._payload);
50861
- }
50862
- // @__NO_SIDE_EFFECTS__
50863
- function createSlot$1(ownerName) {
50864
- const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
50865
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
50866
- let { children, ...slotProps } = props2;
50867
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
50868
- children = use$1(children._payload);
50869
- }
50870
- const childrenArray = React.Children.toArray(children);
50871
- const slottable = childrenArray.find(isSlottable$1);
50872
- if (slottable) {
50873
- const newElement = slottable.props.children;
50874
- const newChildren = childrenArray.map((child) => {
50875
- if (child === slottable) {
50876
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
50877
- return React.isValidElement(newElement) ? newElement.props.children : null;
50878
- } else {
50879
- return child;
50880
- }
50881
- });
50882
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
50883
- }
50884
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
50885
- });
50886
- Slot2.displayName = `${ownerName}.Slot`;
50887
- return Slot2;
50888
- }
50889
- // @__NO_SIDE_EFFECTS__
50890
- function createSlotClone$1(ownerName) {
50891
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
50892
- let { children, ...slotProps } = props2;
50893
- if (isLazyComponent$1(children) && typeof use$1 === "function") {
50894
- children = use$1(children._payload);
50895
- }
50896
- if (React.isValidElement(children)) {
50897
- const childrenRef = getElementRef$1(children);
50898
- const props22 = mergeProps$1(slotProps, children.props);
50899
- if (children.type !== React.Fragment) {
50900
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
50901
- }
50902
- return React.cloneElement(children, props22);
50903
- }
50904
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
50905
- });
50906
- SlotClone.displayName = `${ownerName}.SlotClone`;
50907
- return SlotClone;
50908
- }
50909
- var SLOTTABLE_IDENTIFIER$1 = Symbol("radix.slottable");
50910
- function isSlottable$1(child) {
50911
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
50912
- }
50913
- function mergeProps$1(slotProps, childProps) {
50914
- const overrideProps = { ...childProps };
50915
- for (const propName in childProps) {
50916
- const slotPropValue = slotProps[propName];
50917
- const childPropValue = childProps[propName];
50918
- const isHandler = /^on[A-Z]/.test(propName);
50919
- if (isHandler) {
50920
- if (slotPropValue && childPropValue) {
50921
- overrideProps[propName] = (...args) => {
50922
- const result = childPropValue(...args);
50923
- slotPropValue(...args);
50924
- return result;
50925
- };
50926
- } else if (slotPropValue) {
50927
- overrideProps[propName] = slotPropValue;
50928
- }
50929
- } else if (propName === "style") {
50930
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
50931
- } else if (propName === "className") {
50932
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
50933
- }
50934
- }
50935
- return { ...slotProps, ...overrideProps };
50936
- }
50937
- function getElementRef$1(element) {
50938
- var _a2, _b;
50939
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
50940
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
50941
- if (mayWarn) {
50942
- return element.ref;
50943
- }
50944
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
50945
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
50946
- if (mayWarn) {
50947
- return element.props.ref;
50948
- }
50949
- return element.props.ref || element.ref;
50950
- }
50951
- var NODES$1 = [
50952
- "a",
50953
- "button",
50954
- "div",
50955
- "form",
50956
- "h2",
50957
- "h3",
50958
- "img",
50959
- "input",
50960
- "label",
50961
- "li",
50962
- "nav",
50963
- "ol",
50964
- "p",
50965
- "select",
50966
- "span",
50967
- "svg",
50968
- "ul"
50969
- ];
50970
- var Primitive$1 = NODES$1.reduce((primitive, node) => {
50971
- const Slot2 = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
50972
- const Node2 = React.forwardRef((props2, forwardedRef) => {
50973
- const { asChild, ...primitiveProps } = props2;
50974
- const Comp = asChild ? Slot2 : node;
50975
- if (typeof window !== "undefined") {
50976
- window[Symbol.for("radix-ui")] = true;
50977
- }
50978
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
50979
- });
50980
- Node2.displayName = `Primitive.${node}`;
50981
- return { ...primitive, [node]: Node2 };
50982
- }, {});
50983
49943
  var shim = { exports: {} };
50984
49944
  var useSyncExternalStoreShim_production = {};
50985
49945
  /**
@@ -51148,7 +50108,7 @@ var Avatar$1 = React.forwardRef(
51148
50108
  scope: __scopeAvatar,
51149
50109
  imageLoadingStatus,
51150
50110
  onImageLoadingStatusChange: setImageLoadingStatus,
51151
- children: /* @__PURE__ */ jsx(Primitive$1.span, { ...avatarProps, ref: forwardedRef })
50111
+ children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
51152
50112
  }
51153
50113
  );
51154
50114
  }
@@ -51170,7 +50130,7 @@ var AvatarImage$1 = React.forwardRef(
51170
50130
  handleLoadingStatusChange(imageLoadingStatus);
51171
50131
  }
51172
50132
  }, [imageLoadingStatus, handleLoadingStatusChange]);
51173
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive$1.img, { ...imageProps, ref: forwardedRef, src }) : null;
50133
+ return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
51174
50134
  }
51175
50135
  );
51176
50136
  AvatarImage$1.displayName = IMAGE_NAME;
@@ -51186,7 +50146,7 @@ var AvatarFallback$1 = React.forwardRef(
51186
50146
  return () => window.clearTimeout(timerId);
51187
50147
  }
51188
50148
  }, [delayMs]);
51189
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive$1.span, { ...fallbackProps, ref: forwardedRef }) : null;
50149
+ return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
51190
50150
  }
51191
50151
  );
51192
50152
  AvatarFallback$1.displayName = FALLBACK_NAME;
@@ -59221,135 +58181,6 @@ function D(_2) {
59221
58181
  function W(_2, C, h) {
59222
58182
  return _2 = h && h.length > 0 ? `${_2 + " " + h.join(" ")}` : _2, G(_2, C, D(_2), D(C), 0, 0, {});
59223
58183
  }
59224
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
59225
- var use = React[" use ".trim().toString()];
59226
- function isPromiseLike(value) {
59227
- return typeof value === "object" && value !== null && "then" in value;
59228
- }
59229
- function isLazyComponent(element) {
59230
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
59231
- }
59232
- // @__NO_SIDE_EFFECTS__
59233
- function createSlot(ownerName) {
59234
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
59235
- const Slot2 = React.forwardRef((props2, forwardedRef) => {
59236
- let { children, ...slotProps } = props2;
59237
- if (isLazyComponent(children) && typeof use === "function") {
59238
- children = use(children._payload);
59239
- }
59240
- const childrenArray = React.Children.toArray(children);
59241
- const slottable = childrenArray.find(isSlottable);
59242
- if (slottable) {
59243
- const newElement = slottable.props.children;
59244
- const newChildren = childrenArray.map((child) => {
59245
- if (child === slottable) {
59246
- if (React.Children.count(newElement) > 1) return React.Children.only(null);
59247
- return React.isValidElement(newElement) ? newElement.props.children : null;
59248
- } else {
59249
- return child;
59250
- }
59251
- });
59252
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
59253
- }
59254
- return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
59255
- });
59256
- Slot2.displayName = `${ownerName}.Slot`;
59257
- return Slot2;
59258
- }
59259
- // @__NO_SIDE_EFFECTS__
59260
- function createSlotClone(ownerName) {
59261
- const SlotClone = React.forwardRef((props2, forwardedRef) => {
59262
- let { children, ...slotProps } = props2;
59263
- if (isLazyComponent(children) && typeof use === "function") {
59264
- children = use(children._payload);
59265
- }
59266
- if (React.isValidElement(children)) {
59267
- const childrenRef = getElementRef(children);
59268
- const props22 = mergeProps(slotProps, children.props);
59269
- if (children.type !== React.Fragment) {
59270
- props22.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
59271
- }
59272
- return React.cloneElement(children, props22);
59273
- }
59274
- return React.Children.count(children) > 1 ? React.Children.only(null) : null;
59275
- });
59276
- SlotClone.displayName = `${ownerName}.SlotClone`;
59277
- return SlotClone;
59278
- }
59279
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
59280
- function isSlottable(child) {
59281
- return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
59282
- }
59283
- function mergeProps(slotProps, childProps) {
59284
- const overrideProps = { ...childProps };
59285
- for (const propName in childProps) {
59286
- const slotPropValue = slotProps[propName];
59287
- const childPropValue = childProps[propName];
59288
- const isHandler = /^on[A-Z]/.test(propName);
59289
- if (isHandler) {
59290
- if (slotPropValue && childPropValue) {
59291
- overrideProps[propName] = (...args) => {
59292
- const result = childPropValue(...args);
59293
- slotPropValue(...args);
59294
- return result;
59295
- };
59296
- } else if (slotPropValue) {
59297
- overrideProps[propName] = slotPropValue;
59298
- }
59299
- } else if (propName === "style") {
59300
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
59301
- } else if (propName === "className") {
59302
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
59303
- }
59304
- }
59305
- return { ...slotProps, ...overrideProps };
59306
- }
59307
- function getElementRef(element) {
59308
- var _a2, _b;
59309
- let getter = (_a2 = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a2.get;
59310
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59311
- if (mayWarn) {
59312
- return element.ref;
59313
- }
59314
- getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
59315
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
59316
- if (mayWarn) {
59317
- return element.props.ref;
59318
- }
59319
- return element.props.ref || element.ref;
59320
- }
59321
- var NODES = [
59322
- "a",
59323
- "button",
59324
- "div",
59325
- "form",
59326
- "h2",
59327
- "h3",
59328
- "img",
59329
- "input",
59330
- "label",
59331
- "li",
59332
- "nav",
59333
- "ol",
59334
- "p",
59335
- "select",
59336
- "span",
59337
- "svg",
59338
- "ul"
59339
- ];
59340
- var Primitive = NODES.reduce((primitive, node) => {
59341
- const Slot2 = /* @__PURE__ */ createSlot(`Primitive.${node}`);
59342
- const Node2 = React.forwardRef((props2, forwardedRef) => {
59343
- const { asChild, ...primitiveProps } = props2;
59344
- const Comp = asChild ? Slot2 : node;
59345
- if (typeof window !== "undefined") {
59346
- window[Symbol.for("radix-ui")] = true;
59347
- }
59348
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
59349
- });
59350
- Node2.displayName = `Primitive.${node}`;
59351
- return { ...primitive, [node]: Node2 };
59352
- }, {});
59353
58184
  var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T = "data-value", Re = (r2, o2, n2) => W(r2, o2, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o2) => {
59354
58185
  let n2 = L(() => {
59355
58186
  var e2, a2;
@@ -59545,15 +58376,15 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
59545
58376
  }
59546
58377
  if (!x2) return null;
59547
58378
  let { disabled: A, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q } = r2;
59548
- return React.createElement(Primitive.div, { ref: composeRefs$1(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
58379
+ return React.createElement(Primitive.div, { ref: composeRefs$2(u2, o2), ...q, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
59549
58380
  }), Ee = React.forwardRef((r2, o2) => {
59550
58381
  let { heading: n2, children: u2, forceMount: c2, ...d } = r2, f = useId$1(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId$1(), R = K(), x2 = P((S) => c2 || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
59551
58382
  k(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b2]);
59552
58383
  let C = React.useMemo(() => ({ id: f, forceMount: c2 }), [c2]);
59553
- return React.createElement(Primitive.div, { ref: composeRefs$1(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
58384
+ return React.createElement(Primitive.div, { ref: composeRefs$2(p2, o2), ...d, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B(r2, (S) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C }, S))));
59554
58385
  }), ye = React.forwardRef((r2, o2) => {
59555
58386
  let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d = P((f) => !f.search);
59556
- return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$1(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
58387
+ return !n2 && !d ? null : React.createElement(Primitive.div, { ref: composeRefs$2(c2, o2), ...u2, "cmdk-separator": "", role: "separator" });
59557
58388
  }), Se = React.forwardRef((r2, o2) => {
59558
58389
  let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b2 = K();
59559
58390
  return React.useEffect(() => {
@@ -59575,7 +58406,7 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
59575
58406
  cancelAnimationFrame(x2), C.unobserve(m2);
59576
58407
  };
59577
58408
  }
59578
- }, []), React.createElement(Primitive.div, { ref: composeRefs$1(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$1(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
58409
+ }, []), React.createElement(Primitive.div, { ref: composeRefs$2(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$2(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
59579
58410
  }), xe = React.forwardRef((r2, o2) => {
59580
58411
  let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d, container: f, ...p2 } = r2;
59581
58412
  return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$4, { container: f }, React.createElement(Overlay$1, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$2, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, React.createElement(me, { ref: o2, ...p2 }))));
@@ -59797,7 +58628,7 @@ function CommandShortcut({
59797
58628
  );
59798
58629
  }
59799
58630
  var CONTEXT_MENU_NAME = "ContextMenu";
59800
- var [createContextMenuContext] = createContextScope$2(CONTEXT_MENU_NAME, [
58631
+ var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
59801
58632
  createMenuScope
59802
58633
  ]);
59803
58634
  var useMenuScope$1 = createMenuScope();
@@ -59860,7 +58691,7 @@ var ContextMenuTrigger$1 = React.forwardRef(
59860
58691
  return /* @__PURE__ */ jsxs(Fragment, { children: [
59861
58692
  /* @__PURE__ */ jsx(Anchor2, { ...menuScope, virtualRef }),
59862
58693
  /* @__PURE__ */ jsx(
59863
- Primitive$6.span,
58694
+ Primitive.span,
59864
58695
  {
59865
58696
  "data-state": context.open ? "open" : "closed",
59866
58697
  "data-disabled": disabled ? "" : void 0,
@@ -61958,7 +60789,7 @@ function FormMessage({ className, ...props2 }) {
61958
60789
  }
61959
60790
  var originalBodyUserSelect;
61960
60791
  var HOVERCARD_NAME = "HoverCard";
61961
- var [createHoverCardContext] = createContextScope$2(HOVERCARD_NAME, [
60792
+ var [createHoverCardContext] = createContextScope(HOVERCARD_NAME, [
61962
60793
  createPopperScope
61963
60794
  ]);
61964
60795
  var usePopperScope = createPopperScope();
@@ -62024,7 +60855,7 @@ var HoverCardTrigger$1 = React.forwardRef(
62024
60855
  const context = useHoverCardContext(TRIGGER_NAME$2, __scopeHoverCard);
62025
60856
  const popperScope = usePopperScope(__scopeHoverCard);
62026
60857
  return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
62027
- Primitive$6.a,
60858
+ Primitive.a,
62028
60859
  {
62029
60860
  "data-state": context.open ? "open" : "closed",
62030
60861
  ...triggerProps,
@@ -62471,7 +61302,7 @@ function InputOTPSeparator({ ...props2 }) {
62471
61302
  }
62472
61303
  var MENUBAR_NAME = "Menubar";
62473
61304
  var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection(MENUBAR_NAME);
62474
- var [createMenubarContext] = createContextScope$2(MENUBAR_NAME, [
61305
+ var [createMenubarContext] = createContextScope(MENUBAR_NAME, [
62475
61306
  createCollectionScope$2,
62476
61307
  createRovingFocusGroupScope
62477
61308
  ]);
@@ -62530,7 +61361,7 @@ var Menubar$1 = React.forwardRef(
62530
61361
  dir: direction,
62531
61362
  currentTabStopId,
62532
61363
  onCurrentTabStopIdChange: setCurrentTabStopId,
62533
- children: /* @__PURE__ */ jsx(Primitive$6.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
61364
+ children: /* @__PURE__ */ jsx(Primitive.div, { role: "menubar", ...menubarProps, ref: forwardedRef })
62534
61365
  }
62535
61366
  ) }) })
62536
61367
  }
@@ -62598,7 +61429,7 @@ var MenubarTrigger$1 = React.forwardRef(
62598
61429
  focusable: !disabled,
62599
61430
  tabStopId: menuContext.value,
62600
61431
  children: /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
62601
- Primitive$6.button,
61432
+ Primitive.button,
62602
61433
  {
62603
61434
  type: "button",
62604
61435
  role: "menuitem",
@@ -63120,7 +61951,7 @@ function MenubarSubContent({
63120
61951
  var NAVIGATION_MENU_NAME = "NavigationMenu";
63121
61952
  var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(NAVIGATION_MENU_NAME);
63122
61953
  var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
63123
- var [createNavigationMenuContext] = createContextScope$2(
61954
+ var [createNavigationMenuContext] = createContextScope(
63124
61955
  NAVIGATION_MENU_NAME,
63125
61956
  [createCollectionScope$1, createFocusGroupCollectionScope]
63126
61957
  );
@@ -63223,7 +62054,7 @@ var NavigationMenu$1 = React.forwardRef(
63223
62054
  },
63224
62055
  onItemDismiss: () => setValue(""),
63225
62056
  children: /* @__PURE__ */ jsx(
63226
- Primitive$6.nav,
62057
+ Primitive.nav,
63227
62058
  {
63228
62059
  "aria-label": "Main",
63229
62060
  "data-orientation": orientation,
@@ -63267,7 +62098,7 @@ var NavigationMenuSub = React.forwardRef(
63267
62098
  onTriggerEnter: (itemValue) => setValue(itemValue),
63268
62099
  onItemSelect: (itemValue) => setValue(itemValue),
63269
62100
  onItemDismiss: () => setValue(""),
63270
- children: /* @__PURE__ */ jsx(Primitive$6.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
62101
+ children: /* @__PURE__ */ jsx(Primitive.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
63271
62102
  }
63272
62103
  );
63273
62104
  }
@@ -63335,8 +62166,8 @@ var NavigationMenuList$1 = React.forwardRef(
63335
62166
  (props2, forwardedRef) => {
63336
62167
  const { __scopeNavigationMenu, ...listProps } = props2;
63337
62168
  const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
63338
- const list = /* @__PURE__ */ jsx(Primitive$6.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
63339
- return /* @__PURE__ */ jsx(Primitive$6.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
62169
+ const list = /* @__PURE__ */ jsx(Primitive.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
62170
+ return /* @__PURE__ */ jsx(Primitive.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
63340
62171
  }
63341
62172
  );
63342
62173
  NavigationMenuList$1.displayName = LIST_NAME;
@@ -63379,7 +62210,7 @@ var NavigationMenuItem$1 = React.forwardRef(
63379
62210
  onFocusProxyEnter: handleContentEntry,
63380
62211
  onRootContentClose: handleContentExit,
63381
62212
  onContentFocusOutside: handleContentExit,
63382
- children: /* @__PURE__ */ jsx(Primitive$6.li, { ...itemProps, ref: forwardedRef })
62213
+ children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })
63383
62214
  }
63384
62215
  );
63385
62216
  }
@@ -63399,7 +62230,7 @@ var NavigationMenuTrigger$1 = React.forwardRef((props2, forwardedRef) => {
63399
62230
  const open = itemContext.value === context.value;
63400
62231
  return /* @__PURE__ */ jsxs(Fragment, { children: [
63401
62232
  /* @__PURE__ */ jsx(Collection$1.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
63402
- Primitive$6.button,
62233
+ Primitive.button,
63403
62234
  {
63404
62235
  id: triggerId,
63405
62236
  disabled,
@@ -63473,7 +62304,7 @@ var NavigationMenuLink$1 = React.forwardRef(
63473
62304
  (props2, forwardedRef) => {
63474
62305
  const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props2;
63475
62306
  return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
63476
- Primitive$6.a,
62307
+ Primitive.a,
63477
62308
  {
63478
62309
  "data-active": active ? "" : void 0,
63479
62310
  "aria-current": active ? "page" : void 0,
@@ -63542,7 +62373,7 @@ var NavigationMenuIndicatorImpl = React.forwardRef((props2, forwardedRef) => {
63542
62373
  useResizeObserver$1(activeTrigger, handlePositionChange);
63543
62374
  useResizeObserver$1(context.indicatorTrack, handlePositionChange);
63544
62375
  return position ? /* @__PURE__ */ jsx(
63545
- Primitive$6.div,
62376
+ Primitive.div,
63546
62377
  {
63547
62378
  "aria-hidden": true,
63548
62379
  "data-state": isVisible ? "visible" : "hidden",
@@ -63751,7 +62582,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
63751
62582
  };
63752
62583
  useResizeObserver$1(content, handleSizeChange);
63753
62584
  return /* @__PURE__ */ jsx(
63754
- Primitive$6.div,
62585
+ Primitive.div,
63755
62586
  {
63756
62587
  "data-state": getOpenState(open),
63757
62588
  "data-orientation": context.orientation,
@@ -63772,7 +62603,7 @@ var NavigationMenuViewportImpl = React.forwardRef((props2, forwardedRef) => {
63772
62603
  NavigationMenuContentImpl,
63773
62604
  {
63774
62605
  ...props22,
63775
- ref: composeRefs$1(ref, (node) => {
62606
+ ref: composeRefs$2(ref, (node) => {
63776
62607
  if (isActive && node) setContent(node);
63777
62608
  })
63778
62609
  }
@@ -63786,7 +62617,7 @@ var FocusGroup = React.forwardRef(
63786
62617
  (props2, forwardedRef) => {
63787
62618
  const { __scopeNavigationMenu, ...groupProps } = props2;
63788
62619
  const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
63789
- return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive$6.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
62620
+ return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
63790
62621
  }
63791
62622
  );
63792
62623
  var ARROW_KEYS$1 = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
@@ -63797,7 +62628,7 @@ var FocusGroupItem = React.forwardRef(
63797
62628
  const getItems = useFocusGroupCollection(__scopeNavigationMenu);
63798
62629
  const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
63799
62630
  return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
63800
- Primitive$6.button,
62631
+ Primitive.button,
63801
62632
  {
63802
62633
  ...groupProps,
63803
62634
  ref: forwardedRef,
@@ -66302,7 +65133,7 @@ function useStateMachine(initialState2, machine) {
66302
65133
  }, initialState2);
66303
65134
  }
66304
65135
  var SCROLL_AREA_NAME = "ScrollArea";
66305
- var [createScrollAreaContext] = createContextScope$2(SCROLL_AREA_NAME);
65136
+ var [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
66306
65137
  var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
66307
65138
  var ScrollArea$1 = React.forwardRef(
66308
65139
  (props2, forwardedRef) => {
@@ -66347,7 +65178,7 @@ var ScrollArea$1 = React.forwardRef(
66347
65178
  onCornerWidthChange: setCornerWidth,
66348
65179
  onCornerHeightChange: setCornerHeight,
66349
65180
  children: /* @__PURE__ */ jsx(
66350
- Primitive$6.div,
65181
+ Primitive.div,
66351
65182
  {
66352
65183
  dir: direction,
66353
65184
  ...scrollAreaProps,
@@ -66384,7 +65215,7 @@ var ScrollAreaViewport = React.forwardRef(
66384
65215
  }
66385
65216
  ),
66386
65217
  /* @__PURE__ */ jsx(
66387
- Primitive$6.div,
65218
+ Primitive.div,
66388
65219
  {
66389
65220
  "data-radix-scroll-area-viewport": "",
66390
65221
  ...viewportProps,
@@ -66770,7 +65601,7 @@ var ScrollAreaScrollbarImpl = React.forwardRef((props2, forwardedRef) => {
66770
65601
  onThumbPositionChange: handleThumbPositionChange,
66771
65602
  onThumbPointerDown: useCallbackRef$2(onThumbPointerDown),
66772
65603
  children: /* @__PURE__ */ jsx(
66773
- Primitive$6.div,
65604
+ Primitive.div,
66774
65605
  {
66775
65606
  ...scrollbarProps,
66776
65607
  ref: composeRefs2,
@@ -66844,7 +65675,7 @@ var ScrollAreaThumbImpl = React.forwardRef(
66844
65675
  }
66845
65676
  }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
66846
65677
  return /* @__PURE__ */ jsx(
66847
- Primitive$6.div,
65678
+ Primitive.div,
66848
65679
  {
66849
65680
  "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
66850
65681
  ...thumbProps,
@@ -66896,7 +65727,7 @@ var ScrollAreaCornerImpl = React.forwardRef((props2, forwardedRef) => {
66896
65727
  setWidth(width2);
66897
65728
  });
66898
65729
  return hasSize ? /* @__PURE__ */ jsx(
66899
- Primitive$6.div,
65730
+ Primitive.div,
66900
65731
  {
66901
65732
  ...cornerProps,
66902
65733
  ref: forwardedRef,
@@ -67064,7 +65895,7 @@ var BACK_KEYS = {
67064
65895
  };
67065
65896
  var SLIDER_NAME = "Slider";
67066
65897
  var [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);
67067
- var [createSliderContext] = createContextScope$2(SLIDER_NAME, [
65898
+ var [createSliderContext] = createContextScope(SLIDER_NAME, [
67068
65899
  createCollectionScope
67069
65900
  ]);
67070
65901
  var [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);
@@ -67335,7 +66166,7 @@ var SliderImpl = React.forwardRef(
67335
66166
  } = props2;
67336
66167
  const context = useSliderContext(SLIDER_NAME, __scopeSlider);
67337
66168
  return /* @__PURE__ */ jsx(
67338
- Primitive$6.span,
66169
+ Primitive.span,
67339
66170
  {
67340
66171
  ...sliderProps,
67341
66172
  ref: forwardedRef,
@@ -67382,7 +66213,7 @@ var SliderTrack = React.forwardRef(
67382
66213
  const { __scopeSlider, ...trackProps } = props2;
67383
66214
  const context = useSliderContext(TRACK_NAME, __scopeSlider);
67384
66215
  return /* @__PURE__ */ jsx(
67385
- Primitive$6.span,
66216
+ Primitive.span,
67386
66217
  {
67387
66218
  "data-disabled": context.disabled ? "" : void 0,
67388
66219
  "data-orientation": context.orientation,
@@ -67408,7 +66239,7 @@ var SliderRange = React.forwardRef(
67408
66239
  const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
67409
66240
  const offsetEnd = 100 - Math.max(...percentages);
67410
66241
  return /* @__PURE__ */ jsx(
67411
- Primitive$6.span,
66242
+ Primitive.span,
67412
66243
  {
67413
66244
  "data-orientation": context.orientation,
67414
66245
  "data-disabled": context.disabled ? "" : void 0,
@@ -67469,7 +66300,7 @@ var SliderThumbImpl = React.forwardRef(
67469
66300
  },
67470
66301
  children: [
67471
66302
  /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props2.__scopeSlider, children: /* @__PURE__ */ jsx(
67472
- Primitive$6.span,
66303
+ Primitive.span,
67473
66304
  {
67474
66305
  role: "slider",
67475
66306
  "aria-label": props2["aria-label"] || label,
@@ -67522,7 +66353,7 @@ var SliderBubbleInput = React.forwardRef(
67522
66353
  }
67523
66354
  }, [prevValue, value]);
67524
66355
  return /* @__PURE__ */ jsx(
67525
- Primitive$6.input,
66356
+ Primitive.input,
67526
66357
  {
67527
66358
  style: { display: "none" },
67528
66359
  ...props2,
@@ -67676,7 +66507,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
67676
66507
  caller: NAME
67677
66508
  });
67678
66509
  return /* @__PURE__ */ jsx(
67679
- Primitive$6.button,
66510
+ Primitive.button,
67680
66511
  {
67681
66512
  type: "button",
67682
66513
  "aria-pressed": pressed,
@@ -67695,7 +66526,7 @@ var Toggle$1 = React.forwardRef((props2, forwardedRef) => {
67695
66526
  Toggle$1.displayName = NAME;
67696
66527
  var Root = Toggle$1;
67697
66528
  var TOGGLE_GROUP_NAME = "ToggleGroup";
67698
- var [createToggleGroupContext] = createContextScope$2(TOGGLE_GROUP_NAME, [
66529
+ var [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
67699
66530
  createRovingFocusGroupScope
67700
66531
  ]);
67701
66532
  var useRovingFocusGroupScope = createRovingFocusGroupScope();
@@ -67797,9 +66628,9 @@ var ToggleGroupImpl = React__default.forwardRef(
67797
66628
  orientation,
67798
66629
  dir: direction,
67799
66630
  loop,
67800
- children: /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef })
66631
+ children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef })
67801
66632
  }
67802
- ) : /* @__PURE__ */ jsx(Primitive$6.div, { ...commonProps, ref: forwardedRef }) });
66633
+ ) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) });
67803
66634
  }
67804
66635
  );
67805
66636
  var ITEM_NAME = "ToggleGroupItem";