dsh-chatgpt-rs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dsh-codex-provider.darwin-arm64.node +0 -0
- package/dsh-codex-provider.darwin-x64.node +0 -0
- package/dsh-codex-provider.linux-x64-gnu.node +0 -0
- package/dsh-codex-provider.win32-x64-msvc.node +0 -0
- package/index.cjs +57 -56
- package/index.d.cts +3 -1
- package/lib/client.js +2157 -1901
- package/lib/index.mjs +127 -112
- package/package.json +18 -18
package/lib/client.js
CHANGED
|
@@ -5217,1112 +5217,459 @@ window.__ModuleLoader__.load({
|
|
|
5217
5217
|
});
|
|
5218
5218
|
}
|
|
5219
5219
|
// client/preferences.ts
|
|
5220
|
+
var PreferenceError = class extends Error {
|
|
5221
|
+
code;
|
|
5222
|
+
constructor(code, message) {
|
|
5223
|
+
super(message);
|
|
5224
|
+
this.code = code;
|
|
5225
|
+
}
|
|
5226
|
+
};
|
|
5220
5227
|
async function setPreference(rpc, key, value) {
|
|
5221
5228
|
const result = await rpc.call("/api", "codex-provider/preference", {
|
|
5222
5229
|
key,
|
|
5223
5230
|
value
|
|
5224
5231
|
});
|
|
5225
|
-
if (!result.ok) throw new
|
|
5232
|
+
if (!result.ok) throw new PreferenceError(result.error.code, result.error.message);
|
|
5226
5233
|
}
|
|
5227
|
-
// node_modules/@base-ui/
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5234
|
+
// node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
|
|
5235
|
+
/**
|
|
5236
|
+
* Present when the field is in a valid state.
|
|
5237
|
+
*/
|
|
5238
|
+
const valid = "data-valid";
|
|
5239
|
+
/**
|
|
5240
|
+
* Present when the field is in an invalid state.
|
|
5241
|
+
*/
|
|
5242
|
+
const invalid = "data-invalid";
|
|
5243
|
+
// node_modules/@base-ui/react/internals/field-constants/constants.mjs
|
|
5244
|
+
const DEFAULT_VALIDITY_STATE = {
|
|
5245
|
+
badInput: false,
|
|
5246
|
+
customError: false,
|
|
5247
|
+
patternMismatch: false,
|
|
5248
|
+
rangeOverflow: false,
|
|
5249
|
+
rangeUnderflow: false,
|
|
5250
|
+
stepMismatch: false,
|
|
5251
|
+
tooLong: false,
|
|
5252
|
+
tooShort: false,
|
|
5253
|
+
typeMismatch: false,
|
|
5254
|
+
valid: null,
|
|
5255
|
+
valueMissing: false
|
|
5244
5256
|
};
|
|
5245
|
-
const
|
|
5246
|
-
|
|
5247
|
-
|
|
5257
|
+
const DEFAULT_FIELD_ROOT_STATE = {
|
|
5258
|
+
disabled: false,
|
|
5259
|
+
valid: null,
|
|
5260
|
+
touched: false,
|
|
5261
|
+
dirty: false,
|
|
5262
|
+
filled: false,
|
|
5263
|
+
focused: false
|
|
5248
5264
|
};
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5265
|
+
const fieldValidityMapping = { valid(value) {
|
|
5266
|
+
if (value === null) return null;
|
|
5267
|
+
if (value) return { [valid]: "" };
|
|
5268
|
+
return { [invalid]: "" };
|
|
5269
|
+
} };
|
|
5270
|
+
// node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
|
|
5271
|
+
const DEFAULT_FIELD_ROOT_CONTEXT = {
|
|
5272
|
+
invalid: void 0,
|
|
5273
|
+
name: void 0,
|
|
5274
|
+
validityData: {
|
|
5275
|
+
state: DEFAULT_VALIDITY_STATE,
|
|
5276
|
+
errors: [],
|
|
5277
|
+
error: "",
|
|
5278
|
+
value: "",
|
|
5279
|
+
initialValue: null
|
|
5280
|
+
},
|
|
5281
|
+
setValidityData: NOOP,
|
|
5282
|
+
disabled: void 0,
|
|
5283
|
+
setTouched: NOOP,
|
|
5284
|
+
setDirty: NOOP,
|
|
5285
|
+
setFilled: NOOP,
|
|
5286
|
+
setFocused: NOOP,
|
|
5287
|
+
focusOwnerRef: { current: void 0 },
|
|
5288
|
+
validationMode: "onSubmit",
|
|
5289
|
+
shouldValidateOnChange: () => false,
|
|
5290
|
+
state: DEFAULT_FIELD_ROOT_STATE,
|
|
5291
|
+
registerFieldControl: NOOP,
|
|
5292
|
+
validation: {
|
|
5293
|
+
getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,
|
|
5294
|
+
inputRef: { current: null },
|
|
5295
|
+
registeredInputs: /* @__PURE__ */ new Map(),
|
|
5296
|
+
registerInput: NOOP,
|
|
5297
|
+
getInputControl: () => null,
|
|
5298
|
+
commit: async () => {},
|
|
5299
|
+
change: NOOP
|
|
5255
5300
|
}
|
|
5301
|
+
};
|
|
5302
|
+
const FieldRootContext = /*#__PURE__*/ react.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
|
|
5303
|
+
FieldRootContext.displayName = "FieldRootContext";
|
|
5304
|
+
function useFieldRootContext(optional = true) {
|
|
5305
|
+
const context = react.useContext(FieldRootContext);
|
|
5306
|
+
if (context.setValidityData === NOOP && !optional) throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
5307
|
+
return context;
|
|
5256
5308
|
}
|
|
5257
|
-
// node_modules/@base-ui/
|
|
5309
|
+
// node_modules/@base-ui/react/internals/form-context/FormContext.mjs
|
|
5310
|
+
const FormContext = /*#__PURE__*/ react.createContext({
|
|
5311
|
+
elementRef: { current: null },
|
|
5312
|
+
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
5313
|
+
errors: {},
|
|
5314
|
+
clearErrors: NOOP,
|
|
5315
|
+
validationMode: "onSubmit",
|
|
5316
|
+
submitCountRef: { current: 0 }
|
|
5317
|
+
});
|
|
5318
|
+
FormContext.displayName = "FormContext";
|
|
5319
|
+
function useFormContext() {
|
|
5320
|
+
return react.useContext(FormContext);
|
|
5321
|
+
}
|
|
5322
|
+
// node_modules/@base-ui/utils/useForcedRerendering.mjs
|
|
5258
5323
|
/**
|
|
5259
|
-
* Returns a
|
|
5260
|
-
* @param value Current value.
|
|
5261
|
-
* @returns Previous value, or null if there is no previous value.
|
|
5324
|
+
* Returns a function that forces a rerender.
|
|
5262
5325
|
*/
|
|
5263
|
-
function
|
|
5264
|
-
const [
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
});
|
|
5268
|
-
if (!Object.is(value, state.current)) setState({
|
|
5269
|
-
current: value,
|
|
5270
|
-
previous: state.current
|
|
5271
|
-
});
|
|
5272
|
-
return state.previous;
|
|
5273
|
-
}
|
|
5274
|
-
// node_modules/@base-ui/utils/isElementDisabled.mjs
|
|
5275
|
-
function isElementDisabled(element) {
|
|
5276
|
-
return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
|
|
5277
|
-
}
|
|
5278
|
-
// node_modules/@base-ui/utils/useControlled.mjs
|
|
5279
|
-
function useControlled({ controlled, default: defaultProp, name, state = "value" }) {
|
|
5280
|
-
const { current: isControlled } = react.useRef(controlled !== void 0);
|
|
5281
|
-
const [valueState, setValue] = react.useState(() => defaultProp);
|
|
5282
|
-
const value = isControlled && controlled !== void 0 ? controlled : valueState;
|
|
5283
|
-
{
|
|
5284
|
-
react.useEffect(() => {
|
|
5285
|
-
if (isControlled !== (controlled !== void 0)) error([
|
|
5286
|
-
`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`,
|
|
5287
|
-
"Elements should not switch from uncontrolled to controlled (or vice versa).",
|
|
5288
|
-
`Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`,
|
|
5289
|
-
"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",
|
|
5290
|
-
"More info: https://fb.me/react-controlled-components"
|
|
5291
|
-
].join("\n"));
|
|
5292
|
-
}, [
|
|
5293
|
-
state,
|
|
5294
|
-
name,
|
|
5295
|
-
controlled
|
|
5296
|
-
]);
|
|
5297
|
-
const { current: defaultValue } = react.useRef(defaultProp);
|
|
5298
|
-
react.useEffect(() => {
|
|
5299
|
-
if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
|
|
5300
|
-
}, [defaultProp]);
|
|
5301
|
-
}
|
|
5302
|
-
return [value, react.useCallback((newValue) => {
|
|
5303
|
-
if (!isControlled) setValue(newValue);
|
|
5304
|
-
}, [])];
|
|
5326
|
+
function useForcedRerendering() {
|
|
5327
|
+
const [, setState] = react.useState({});
|
|
5328
|
+
return react.useCallback(() => {
|
|
5329
|
+
setState({});
|
|
5330
|
+
}, []);
|
|
5305
5331
|
}
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5332
|
+
// node_modules/@base-ui/utils/useId.mjs
|
|
5333
|
+
let globalId = 0;
|
|
5334
|
+
function useGlobalId(idOverride, prefix = "mui") {
|
|
5335
|
+
const defaultId = react.useRef(void 0);
|
|
5336
|
+
const forceRerender = useForcedRerendering();
|
|
5337
|
+
const id = idOverride ?? defaultId.current;
|
|
5338
|
+
react.useEffect(() => {
|
|
5339
|
+
if (defaultId.current == null) {
|
|
5340
|
+
globalId += 1;
|
|
5341
|
+
defaultId.current = `${prefix}-${globalId}`;
|
|
5342
|
+
if (idOverride == null) forceRerender();
|
|
5343
|
+
}
|
|
5344
|
+
}, [
|
|
5345
|
+
idOverride,
|
|
5346
|
+
prefix,
|
|
5347
|
+
forceRerender
|
|
5348
|
+
]);
|
|
5349
|
+
return id;
|
|
5324
5350
|
}
|
|
5325
|
-
|
|
5351
|
+
const maybeReactUseId = SafeReact.useId;
|
|
5326
5352
|
/**
|
|
5327
|
-
* Untracks the provided value by turning it into a ref to remove its reactivity.
|
|
5328
5353
|
*
|
|
5329
|
-
*
|
|
5354
|
+
* @example <div id={useId()} />
|
|
5355
|
+
* @param {string | undefined} idOverride overrides the generated id when provided
|
|
5356
|
+
* @param {string | undefined} prefix prefixes the generated id when provided
|
|
5357
|
+
* @returns {string | undefined}
|
|
5330
5358
|
*/
|
|
5331
|
-
function
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5359
|
+
function useId$2(idOverride, prefix) {
|
|
5360
|
+
if (maybeReactUseId !== void 0) {
|
|
5361
|
+
const reactId = maybeReactUseId();
|
|
5362
|
+
return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
|
|
5363
|
+
}
|
|
5364
|
+
return useGlobalId(idOverride, prefix);
|
|
5336
5365
|
}
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
return latest;
|
|
5366
|
+
// node_modules/@base-ui/react/internals/useBaseUiId.mjs
|
|
5367
|
+
/**
|
|
5368
|
+
* Wraps `useId` and prefixes generated `id`s with `base-ui-`
|
|
5369
|
+
* @param {string | undefined} idOverride overrides the generated id when provided
|
|
5370
|
+
* @returns {string | undefined}
|
|
5371
|
+
*/
|
|
5372
|
+
function useBaseUiId(idOverride) {
|
|
5373
|
+
return useId$2(idOverride, "base-ui");
|
|
5346
5374
|
}
|
|
5347
|
-
// node_modules
|
|
5375
|
+
// node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
|
|
5348
5376
|
/**
|
|
5349
|
-
*
|
|
5350
|
-
*
|
|
5351
|
-
*
|
|
5352
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5353
|
-
*
|
|
5354
|
-
* This source code is licensed under the MIT license found in the
|
|
5355
|
-
* LICENSE file in the root directory of this source tree.
|
|
5377
|
+
* A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\
|
|
5378
|
+
* with an accessible name (label) and description.
|
|
5356
5379
|
*/
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5380
|
+
const LabelableContext = /*#__PURE__*/ react.createContext({
|
|
5381
|
+
controlId: void 0,
|
|
5382
|
+
registerControlId: NOOP,
|
|
5383
|
+
resetControlId: NOOP,
|
|
5384
|
+
labelId: void 0,
|
|
5385
|
+
setLabelId: NOOP,
|
|
5386
|
+
messageIds: [],
|
|
5387
|
+
setMessageIds: NOOP,
|
|
5388
|
+
getDescriptionProps: (externalProps) => externalProps
|
|
5389
|
+
});
|
|
5390
|
+
LabelableContext.displayName = "LabelableContext";
|
|
5391
|
+
function useLabelableContext() {
|
|
5392
|
+
return react.useContext(LabelableContext);
|
|
5393
|
+
}
|
|
5394
|
+
// node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs
|
|
5395
|
+
function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {
|
|
5396
|
+
const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = react.useState();
|
|
5397
|
+
const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : void 0);
|
|
5398
|
+
const hasAriaLabel = Boolean(ariaLabel?.trim());
|
|
5399
|
+
const ariaLabelledBy = explicitAriaLabelledBy ?? (hasAriaLabel ? void 0 : labelId) ?? fallbackAriaLabelledBy;
|
|
5400
|
+
useIsoLayoutEffect(() => {
|
|
5401
|
+
const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? void 0 : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);
|
|
5402
|
+
if (fallbackAriaLabelledBy !== nextAriaLabelledBy) setFallbackAriaLabelledBy(nextAriaLabelledBy);
|
|
5403
|
+
});
|
|
5404
|
+
return ariaLabelledBy;
|
|
5405
|
+
}
|
|
5406
|
+
function getAriaLabelledBy(labelSource, generatedLabelId) {
|
|
5407
|
+
const label = findAssociatedLabel(labelSource);
|
|
5408
|
+
if (!label) return;
|
|
5409
|
+
if (!label.id && generatedLabelId) label.id = generatedLabelId;
|
|
5410
|
+
return label.id || void 0;
|
|
5411
|
+
}
|
|
5412
|
+
function findAssociatedLabel(labelSource) {
|
|
5413
|
+
if (!labelSource) return;
|
|
5414
|
+
const parent = labelSource.parentElement;
|
|
5415
|
+
if (parent && parent.tagName === "LABEL") return parent;
|
|
5416
|
+
const controlId = labelSource.id;
|
|
5417
|
+
if (controlId) {
|
|
5418
|
+
const nextSibling = labelSource.nextElementSibling;
|
|
5419
|
+
if (nextSibling && nextSibling.htmlFor === controlId) return nextSibling;
|
|
5420
|
+
}
|
|
5421
|
+
const labels = labelSource.labels;
|
|
5422
|
+
return labels && labels[0];
|
|
5423
|
+
}
|
|
5424
|
+
// node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
|
|
5425
|
+
function useLabelableId(params = {}) {
|
|
5426
|
+
const { id, enabled = true } = params;
|
|
5427
|
+
const { controlId, registerControlId, resetControlId } = useLabelableContext();
|
|
5428
|
+
const defaultId = useBaseUiId();
|
|
5429
|
+
const controlSourceRef = useRefWithInit(() => Symbol());
|
|
5430
|
+
const hasRegisteredRef = react.useRef(false);
|
|
5431
|
+
const hadExplicitIdRef = react.useRef(false);
|
|
5432
|
+
const unregisterControlId = useStableCallback(() => {
|
|
5433
|
+
if (!hasRegisteredRef.current || registerControlId === NOOP) return;
|
|
5434
|
+
hasRegisteredRef.current = false;
|
|
5435
|
+
registerControlId(controlSourceRef.current, void 0);
|
|
5436
|
+
});
|
|
5437
|
+
useIsoLayoutEffect(() => {
|
|
5438
|
+
if (!enabled || registerControlId === NOOP) {
|
|
5439
|
+
unregisterControlId();
|
|
5440
|
+
return;
|
|
5391
5441
|
}
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
}
|
|
5442
|
+
let nextId;
|
|
5443
|
+
if (id !== void 0) {
|
|
5444
|
+
hadExplicitIdRef.current = true;
|
|
5445
|
+
nextId = id;
|
|
5446
|
+
} else if (hadExplicitIdRef.current) nextId = defaultId;
|
|
5447
|
+
else {
|
|
5448
|
+
resetControlId();
|
|
5449
|
+
return;
|
|
5401
5450
|
}
|
|
5402
|
-
|
|
5403
|
-
|
|
5451
|
+
if (nextId === void 0) {
|
|
5452
|
+
unregisterControlId();
|
|
5453
|
+
return;
|
|
5404
5454
|
}
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5455
|
+
hasRegisteredRef.current = true;
|
|
5456
|
+
registerControlId(controlSourceRef.current, nextId);
|
|
5457
|
+
}, [
|
|
5458
|
+
id,
|
|
5459
|
+
enabled,
|
|
5460
|
+
registerControlId,
|
|
5461
|
+
resetControlId,
|
|
5462
|
+
defaultId,
|
|
5463
|
+
controlSourceRef,
|
|
5464
|
+
unregisterControlId
|
|
5465
|
+
]);
|
|
5466
|
+
useIsoLayoutEffect(() => {
|
|
5467
|
+
return unregisterControlId;
|
|
5468
|
+
}, [unregisterControlId]);
|
|
5469
|
+
return (enabled ? controlId : void 0) ?? id ?? defaultId;
|
|
5470
|
+
}
|
|
5471
|
+
// node_modules/@base-ui/utils/platform/shared.mjs
|
|
5416
5472
|
/**
|
|
5417
|
-
*
|
|
5418
|
-
*
|
|
5419
|
-
*
|
|
5420
|
-
*
|
|
5473
|
+
* Reads `navigator.userAgent` / `navigator.platform` (legacy but universally
|
|
5474
|
+
* supported) into a normalized shape. In development, prefers the modern
|
|
5475
|
+
* `navigator.userAgentData` API on Chromium to avoid DevTools warnings about
|
|
5476
|
+
* the deprecated reads; that branch is dead-code-eliminated in production
|
|
5477
|
+
* builds to keep the bundle small.
|
|
5421
5478
|
*
|
|
5422
|
-
*
|
|
5423
|
-
*
|
|
5479
|
+
* Returns empty/zero values when `navigator` is undefined (SSR), so every
|
|
5480
|
+
* derived flag safely evaluates to `false`.
|
|
5424
5481
|
*/
|
|
5425
|
-
|
|
5426
|
-
(
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
value: null
|
|
5438
|
-
};
|
|
5439
|
-
instRef.current = inst;
|
|
5440
|
-
} else inst = instRef.current;
|
|
5441
|
-
instRef = useMemo(function() {
|
|
5442
|
-
function memoizedSelector(nextSnapshot) {
|
|
5443
|
-
if (!hasMemo) {
|
|
5444
|
-
hasMemo = !0;
|
|
5445
|
-
memoizedSnapshot = nextSnapshot;
|
|
5446
|
-
nextSnapshot = selector(nextSnapshot);
|
|
5447
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
5448
|
-
var currentSelection = inst.value;
|
|
5449
|
-
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
5450
|
-
}
|
|
5451
|
-
return memoizedSelection = nextSnapshot;
|
|
5452
|
-
}
|
|
5453
|
-
currentSelection = memoizedSelection;
|
|
5454
|
-
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
5455
|
-
var nextSelection = selector(nextSnapshot);
|
|
5456
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
5457
|
-
memoizedSnapshot = nextSnapshot;
|
|
5458
|
-
return memoizedSelection = nextSelection;
|
|
5459
|
-
}
|
|
5460
|
-
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
5461
|
-
return [function() {
|
|
5462
|
-
return memoizedSelector(getSnapshot());
|
|
5463
|
-
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
5464
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
5465
|
-
}];
|
|
5466
|
-
}, [
|
|
5467
|
-
getSnapshot,
|
|
5468
|
-
getServerSnapshot,
|
|
5469
|
-
selector,
|
|
5470
|
-
isEqual
|
|
5471
|
-
]);
|
|
5472
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
5473
|
-
useEffect(function() {
|
|
5474
|
-
inst.hasValue = !0;
|
|
5475
|
-
inst.value = value;
|
|
5476
|
-
}, [value]);
|
|
5477
|
-
useDebugValue(value);
|
|
5478
|
-
return value;
|
|
5482
|
+
function readRawData() {
|
|
5483
|
+
if (typeof navigator === "undefined") return {
|
|
5484
|
+
userAgent: "",
|
|
5485
|
+
platform: "",
|
|
5486
|
+
maxTouchPoints: 0
|
|
5487
|
+
};
|
|
5488
|
+
{
|
|
5489
|
+
const uaData = navigator.userAgentData;
|
|
5490
|
+
if (uaData && Array.isArray(uaData.brands)) return {
|
|
5491
|
+
userAgent: uaData.brands.map(({ brand, version }) => `${brand}/${version}`).join(" "),
|
|
5492
|
+
platform: uaData.platform ?? navigator.platform ?? "",
|
|
5493
|
+
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
5479
5494
|
};
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
}));
|
|
5487
|
-
// node_modules/@base-ui/utils/fastHooks.mjs
|
|
5488
|
-
const hooks = [];
|
|
5489
|
-
let currentInstance = void 0;
|
|
5490
|
-
function getInstance() {
|
|
5491
|
-
return currentInstance;
|
|
5492
|
-
}
|
|
5493
|
-
function register(hook) {
|
|
5494
|
-
hooks.push(hook);
|
|
5495
|
+
}
|
|
5496
|
+
return {
|
|
5497
|
+
userAgent: navigator.userAgent,
|
|
5498
|
+
platform: navigator.platform ?? "",
|
|
5499
|
+
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
5500
|
+
};
|
|
5495
5501
|
}
|
|
5502
|
+
const { userAgent, platform: platform$1, maxTouchPoints } = readRawData();
|
|
5503
|
+
const lowerUserAgent = userAgent.toLowerCase();
|
|
5504
|
+
const lowerPlatform = platform$1.toLowerCase();
|
|
5505
|
+
// node_modules/@base-ui/utils/platform/os.mjs
|
|
5506
|
+
/** iPhone, iPad (including iPadOS 13+ reporting as macOS), iPod. */
|
|
5507
|
+
const ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
|
|
5508
|
+
/** Android phones, tablets, and embedded Android browsers. */
|
|
5509
|
+
const ANDROID_STRING = "android";
|
|
5510
|
+
const android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
|
|
5511
|
+
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
|
|
5512
|
+
const mac = !ios && lowerPlatform.startsWith("mac");
|
|
5513
|
+
lowerPlatform.startsWith("win");
|
|
5514
|
+
!android && /^(linux|chrome os)/.test(lowerPlatform);
|
|
5515
|
+
/** Any Apple OS (`mac || ios`). */
|
|
5516
|
+
const apple = mac || ios;
|
|
5517
|
+
// node_modules/@base-ui/utils/platform/engine.mjs
|
|
5518
|
+
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
|
|
5519
|
+
const webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
|
|
5520
|
+
!webkit && lowerUserAgent.includes("firefox");
|
|
5521
|
+
!webkit && lowerUserAgent.includes("chrom");
|
|
5522
|
+
// node_modules/@base-ui/utils/platform/screen-reader.mjs
|
|
5496
5523
|
/**
|
|
5497
|
-
*
|
|
5498
|
-
*
|
|
5499
|
-
* **Performance Optimization:**
|
|
5500
|
-
* Components wrapped with `fastComponent` have access to a shared "instance" context that enables
|
|
5501
|
-
* specialized hook implementations to batch operations and reduce overhead. The wrapper creates a
|
|
5502
|
-
* stable instance object that persists across renders, sets it as the current context, calls
|
|
5503
|
-
* registered hooks before and after rendering, then clears the context. The primary benefit is
|
|
5504
|
-
* with `useStore`, where multiple store subscriptions within the same component are collapsed into
|
|
5505
|
-
* a single `useSyncExternalStore` subscription per store, significantly reducing re-render overhead.
|
|
5506
|
-
* This optimization is only active on React 19+; on earlier versions `useStore` falls back to a
|
|
5507
|
-
* separate subscription per call.
|
|
5508
|
-
*
|
|
5509
|
-
* **Requirements:**
|
|
5510
|
-
* - The component function should follow standard React component patterns
|
|
5511
|
-
* - `useStore` calls must keep a stable order and count across renders, as batched hooks are
|
|
5512
|
-
* matched by call index
|
|
5513
|
-
* - Do not rely on the instance context outside of specialized hooks
|
|
5514
|
-
*
|
|
5515
|
-
* @param fn - The component function to wrap
|
|
5516
|
-
* @returns A wrapped component with the same signature as the input function
|
|
5517
|
-
*
|
|
5518
|
-
* @example
|
|
5519
|
-
* ```tsx
|
|
5520
|
-
* // Wrapping a component to enable optimized useStore batching
|
|
5521
|
-
* export const TooltipRoot = fastComponent(function TooltipRoot(props) {
|
|
5522
|
-
* // These useStore calls share a single subscription
|
|
5523
|
-
* const open = useStore(store, (state) => state.open);
|
|
5524
|
-
* const disabled = useStore(store, (state) => state.disabled);
|
|
5525
|
-
* const value = useStore(store, (state) => state.value);
|
|
5526
|
-
* // ...
|
|
5527
|
-
* });
|
|
5528
|
-
* ```
|
|
5524
|
+
* The user *may* be using VoiceOver — actual activation is not detectable.
|
|
5525
|
+
* True on any Apple platform (macOS, iOS, iPadOS).
|
|
5529
5526
|
*/
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5527
|
+
const voiceOver = apple;
|
|
5528
|
+
// node_modules/@base-ui/utils/platform/env.mjs
|
|
5529
|
+
/** Running in jsdom or HappyDOM (used by unit tests). */
|
|
5530
|
+
const jsdom = /jsdom|happydom/.test(lowerUserAgent);
|
|
5531
|
+
// node_modules/@base-ui/utils/shadowDom.mjs
|
|
5532
|
+
function activeElement(doc) {
|
|
5533
|
+
let element = doc.activeElement;
|
|
5534
|
+
while (element?.shadowRoot?.activeElement != null) element = element.shadowRoot.activeElement;
|
|
5535
|
+
return element;
|
|
5536
|
+
}
|
|
5537
|
+
function contains(parent, child) {
|
|
5538
|
+
if (!parent || !child) return false;
|
|
5539
|
+
const rootNode = child.getRootNode?.();
|
|
5540
|
+
if (parent.contains(child)) return true;
|
|
5541
|
+
if (rootNode && isShadowRoot(rootNode)) {
|
|
5542
|
+
let next = child;
|
|
5543
|
+
while (next) {
|
|
5544
|
+
if (parent === next) return true;
|
|
5545
|
+
next = next.parentNode || next.host;
|
|
5542
5546
|
}
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
FastComponent.displayName = fn.displayName || fn.name;
|
|
5546
|
-
return FastComponent;
|
|
5547
|
+
}
|
|
5548
|
+
return false;
|
|
5547
5549
|
}
|
|
5548
5550
|
/**
|
|
5549
|
-
*
|
|
5550
|
-
*
|
|
5551
|
-
* This is a convenience wrapper that combines `fastComponent` with `React.forwardRef`, enabling
|
|
5552
|
-
* both performance optimizations and proper ref forwarding. See `fastComponent` for details on
|
|
5553
|
-
* the performance benefits.
|
|
5554
|
-
*
|
|
5555
|
-
* @param fn - The component function that accepts props and a forwarded ref
|
|
5556
|
-
* @returns A wrapped component with ref forwarding enabled
|
|
5557
|
-
*
|
|
5558
|
-
* @example
|
|
5559
|
-
* ```tsx
|
|
5560
|
-
* // Wrapping a component with ref forwarding and optimized hooks
|
|
5561
|
-
* export const TooltipTrigger = fastComponentRef(function TooltipTrigger(
|
|
5562
|
-
* props,
|
|
5563
|
-
* forwardedRef
|
|
5564
|
-
* ) {
|
|
5565
|
-
* const store = useContext(TooltipContext);
|
|
5566
|
-
* const open = useStore(store, (state) => state.open);
|
|
5567
|
-
* // ... component logic with ref
|
|
5568
|
-
* return <button ref={forwardedRef} {...props} />;
|
|
5569
|
-
* });
|
|
5570
|
-
* ```
|
|
5551
|
+
* Finds the closest matching element in the composed tree, crossing slots and shadow roots.
|
|
5552
|
+
* `:scope` is not supported.
|
|
5571
5553
|
*/
|
|
5572
|
-
function
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
}
|
|
5578
|
-
// node_modules/@base-ui/utils/store/useStore.mjs
|
|
5579
|
-
var import_shim = require_shim();
|
|
5580
|
-
var import_with_selector = require_with_selector();
|
|
5581
|
-
const useStoreImplementation = isReactVersionAtLeast(19) ? useStoreFast : useStoreLegacy;
|
|
5582
|
-
function useStore(store, selector, a1, a2, a3) {
|
|
5583
|
-
return useStoreImplementation(store, selector, a1, a2, a3);
|
|
5584
|
-
}
|
|
5585
|
-
function useStoreR19(store, selector, a1, a2, a3) {
|
|
5586
|
-
const getSelection = react.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [
|
|
5587
|
-
store,
|
|
5588
|
-
selector,
|
|
5589
|
-
a1,
|
|
5590
|
-
a2,
|
|
5591
|
-
a3
|
|
5592
|
-
]);
|
|
5593
|
-
return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
|
|
5594
|
-
}
|
|
5595
|
-
register({
|
|
5596
|
-
before(instance) {
|
|
5597
|
-
instance.syncIndex = 0;
|
|
5598
|
-
if (!instance.didInitialize) {
|
|
5599
|
-
instance.syncTick = 1;
|
|
5600
|
-
instance.syncHooks = [];
|
|
5601
|
-
instance.didChangeStore = true;
|
|
5602
|
-
instance.getSnapshot = () => {
|
|
5603
|
-
let didChange = false;
|
|
5604
|
-
for (let i = 0; i < instance.syncHooks.length; i += 1) {
|
|
5605
|
-
const hook = instance.syncHooks[i];
|
|
5606
|
-
const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
|
|
5607
|
-
if (!Object.is(hook.value, value)) {
|
|
5608
|
-
didChange = true;
|
|
5609
|
-
hook.value = value;
|
|
5610
|
-
}
|
|
5611
|
-
}
|
|
5612
|
-
if (didChange) instance.syncTick += 1;
|
|
5613
|
-
return instance.syncTick;
|
|
5614
|
-
};
|
|
5615
|
-
}
|
|
5616
|
-
},
|
|
5617
|
-
after(instance) {
|
|
5618
|
-
if (instance.syncHooks.length > 0) {
|
|
5619
|
-
if (instance.didChangeStore) {
|
|
5620
|
-
instance.didChangeStore = false;
|
|
5621
|
-
instance.subscribe = (onStoreChange) => {
|
|
5622
|
-
const stores = /* @__PURE__ */ new Set();
|
|
5623
|
-
for (const hook of instance.syncHooks) stores.add(hook.store);
|
|
5624
|
-
const unsubscribes = [];
|
|
5625
|
-
for (const store of stores) unsubscribes.push(store.subscribe(onStoreChange));
|
|
5626
|
-
return () => {
|
|
5627
|
-
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
5628
|
-
};
|
|
5629
|
-
};
|
|
5630
|
-
}
|
|
5631
|
-
(0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
|
|
5632
|
-
}
|
|
5633
|
-
}
|
|
5634
|
-
});
|
|
5635
|
-
function useStoreFast(store, selector, a1, a2, a3) {
|
|
5636
|
-
const instance = getInstance();
|
|
5637
|
-
if (!instance) return useStoreR19(store, selector, a1, a2, a3);
|
|
5638
|
-
const index = instance.syncIndex;
|
|
5639
|
-
instance.syncIndex += 1;
|
|
5640
|
-
let hook;
|
|
5641
|
-
if (!instance.didInitialize) {
|
|
5642
|
-
hook = {
|
|
5643
|
-
store,
|
|
5644
|
-
selector,
|
|
5645
|
-
a1,
|
|
5646
|
-
a2,
|
|
5647
|
-
a3,
|
|
5648
|
-
value: selector(store.getSnapshot(), a1, a2, a3)
|
|
5649
|
-
};
|
|
5650
|
-
instance.syncHooks.push(hook);
|
|
5651
|
-
} else {
|
|
5652
|
-
hook = instance.syncHooks[index];
|
|
5653
|
-
if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
|
|
5654
|
-
if (hook.store !== store) instance.didChangeStore = true;
|
|
5655
|
-
hook.store = store;
|
|
5656
|
-
hook.selector = selector;
|
|
5657
|
-
hook.a1 = a1;
|
|
5658
|
-
hook.a2 = a2;
|
|
5659
|
-
hook.a3 = a3;
|
|
5660
|
-
hook.value = selector(store.getSnapshot(), a1, a2, a3);
|
|
5661
|
-
}
|
|
5554
|
+
function closest(node, selector) {
|
|
5555
|
+
let current = node;
|
|
5556
|
+
while (current) {
|
|
5557
|
+
if (isElement(current) && current.matches(selector)) return current;
|
|
5558
|
+
current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null);
|
|
5662
5559
|
}
|
|
5663
|
-
return
|
|
5560
|
+
return null;
|
|
5664
5561
|
}
|
|
5665
|
-
function
|
|
5666
|
-
|
|
5562
|
+
function getTarget(event) {
|
|
5563
|
+
if ("composedPath" in event) return event.composedPath()[0] ?? event.target;
|
|
5564
|
+
return event.target;
|
|
5667
5565
|
}
|
|
5668
|
-
// node_modules/@base-ui/utils/
|
|
5566
|
+
// node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
|
|
5567
|
+
const FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
|
|
5568
|
+
const TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
5569
|
+
const ARROW_LEFT$1 = "ArrowLeft";
|
|
5570
|
+
const ARROW_RIGHT$1 = "ArrowRight";
|
|
5571
|
+
const ARROW_UP$1 = "ArrowUp";
|
|
5572
|
+
const ARROW_DOWN$1 = "ArrowDown";
|
|
5573
|
+
// node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
|
|
5669
5574
|
/**
|
|
5670
|
-
*
|
|
5671
|
-
* It uses an observer pattern to notify subscribers when the state changes.
|
|
5575
|
+
* Present when the component begins animating in.
|
|
5672
5576
|
*/
|
|
5673
|
-
|
|
5674
|
-
/**
|
|
5675
|
-
* Creates a store with the given initial state, constructing the class it is called on.
|
|
5676
|
-
* Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
|
|
5677
|
-
* class but degrades the inferred instance type to `Store`; use `new` there instead.
|
|
5678
|
-
*/
|
|
5679
|
-
static create(state) {
|
|
5680
|
-
return new this(state);
|
|
5681
|
-
}
|
|
5682
|
-
/**
|
|
5683
|
-
* The current state of the store.
|
|
5684
|
-
* This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
|
|
5685
|
-
* To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
|
|
5686
|
-
* The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
|
|
5687
|
-
*
|
|
5688
|
-
* Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
|
|
5689
|
-
*/
|
|
5690
|
-
constructor(state) {
|
|
5691
|
-
this.state = state;
|
|
5692
|
-
this.listeners = /* @__PURE__ */ new Set();
|
|
5693
|
-
this.updateTick = 0;
|
|
5694
|
-
}
|
|
5695
|
-
/**
|
|
5696
|
-
* Registers a listener that will be called whenever the store's state changes.
|
|
5697
|
-
*
|
|
5698
|
-
* @param fn The listener function to be called on state changes.
|
|
5699
|
-
* @returns A function to unsubscribe the listener.
|
|
5700
|
-
*/
|
|
5701
|
-
subscribe = (fn) => {
|
|
5702
|
-
this.listeners.add(fn);
|
|
5703
|
-
return () => {
|
|
5704
|
-
this.listeners.delete(fn);
|
|
5705
|
-
};
|
|
5706
|
-
};
|
|
5707
|
-
/**
|
|
5708
|
-
* Returns the current state of the store.
|
|
5709
|
-
*/
|
|
5710
|
-
getSnapshot = () => {
|
|
5711
|
-
return this.state;
|
|
5712
|
-
};
|
|
5713
|
-
/**
|
|
5714
|
-
* Updates the entire store's state and notifies all registered listeners.
|
|
5715
|
-
*
|
|
5716
|
-
* @param newState The new state to set for the store.
|
|
5717
|
-
*/
|
|
5718
|
-
setState(newState) {
|
|
5719
|
-
if (this.state === newState) return;
|
|
5720
|
-
this.state = newState;
|
|
5721
|
-
this.updateTick += 1;
|
|
5722
|
-
const currentTick = this.updateTick;
|
|
5723
|
-
for (const listener of this.listeners) {
|
|
5724
|
-
if (currentTick !== this.updateTick) return;
|
|
5725
|
-
listener(newState);
|
|
5726
|
-
}
|
|
5727
|
-
}
|
|
5728
|
-
/**
|
|
5729
|
-
* Merges the provided changes into the current state and notifies listeners if there are changes.
|
|
5730
|
-
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
5731
|
-
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
5732
|
-
*
|
|
5733
|
-
* @param changes An object containing the changes to apply to the current state.
|
|
5734
|
-
*/
|
|
5735
|
-
update(changes) {
|
|
5736
|
-
for (const key in changes) if (!Object.is(this.state[key], changes[key])) {
|
|
5737
|
-
this.setState({
|
|
5738
|
-
...this.state,
|
|
5739
|
-
...changes
|
|
5740
|
-
});
|
|
5741
|
-
return;
|
|
5742
|
-
}
|
|
5743
|
-
}
|
|
5744
|
-
/**
|
|
5745
|
-
* Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
|
|
5746
|
-
*
|
|
5747
|
-
* @param key The key in the store's state to update.
|
|
5748
|
-
* @param value The new value to set for the specified key.
|
|
5749
|
-
*/
|
|
5750
|
-
set(key, value) {
|
|
5751
|
-
if (!Object.is(this.state[key], value)) this.setState({
|
|
5752
|
-
...this.state,
|
|
5753
|
-
[key]: value
|
|
5754
|
-
});
|
|
5755
|
-
}
|
|
5756
|
-
/**
|
|
5757
|
-
* Gives the state a new reference and updates all registered listeners.
|
|
5758
|
-
*/
|
|
5759
|
-
notifyAll() {
|
|
5760
|
-
const newState = { ...this.state };
|
|
5761
|
-
this.setState(newState);
|
|
5762
|
-
}
|
|
5763
|
-
use(selector, a1, a2, a3) {
|
|
5764
|
-
return useStore(this, selector, a1, a2, a3);
|
|
5765
|
-
}
|
|
5766
|
-
};
|
|
5767
|
-
// node_modules/@base-ui/utils/store/ReactStore.mjs
|
|
5577
|
+
const startingStyle = "data-starting-style";
|
|
5768
5578
|
/**
|
|
5769
|
-
*
|
|
5579
|
+
* Present when the component is animating out.
|
|
5770
5580
|
*/
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
this.context = context;
|
|
5782
|
-
this.selectors = selectors;
|
|
5783
|
-
}
|
|
5784
|
-
/**
|
|
5785
|
-
* Non-reactive values such as refs, callbacks, etc.
|
|
5786
|
-
*/
|
|
5787
|
-
/**
|
|
5788
|
-
* Synchronizes a single external value into the store.
|
|
5789
|
-
*
|
|
5790
|
-
* Note that the while the value in `state` is updated immediately, the value returned
|
|
5791
|
-
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
5792
|
-
*/
|
|
5793
|
-
useSyncedValue(key, value) {
|
|
5794
|
-
react.useDebugValue(key);
|
|
5795
|
-
const store = this;
|
|
5796
|
-
useIsoLayoutEffect(() => {
|
|
5797
|
-
if (store.state[key] !== value) store.set(key, value);
|
|
5798
|
-
}, [
|
|
5799
|
-
store,
|
|
5800
|
-
key,
|
|
5801
|
-
value
|
|
5802
|
-
]);
|
|
5803
|
-
}
|
|
5804
|
-
/**
|
|
5805
|
-
* Synchronizes a single external value into the store and
|
|
5806
|
-
* cleans it up (sets to `undefined`) on unmount.
|
|
5807
|
-
*
|
|
5808
|
-
* Note that the while the value in `state` is updated immediately, the value returned
|
|
5809
|
-
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
5810
|
-
*/
|
|
5811
|
-
useSyncedValueWithCleanup(key, value) {
|
|
5812
|
-
const store = this;
|
|
5813
|
-
useIsoLayoutEffect(() => {
|
|
5814
|
-
if (store.state[key] !== value) store.set(key, value);
|
|
5815
|
-
return () => {
|
|
5816
|
-
store.set(key, void 0);
|
|
5817
|
-
};
|
|
5818
|
-
}, [
|
|
5819
|
-
store,
|
|
5820
|
-
key,
|
|
5821
|
-
value
|
|
5822
|
-
]);
|
|
5823
|
-
}
|
|
5824
|
-
/**
|
|
5825
|
-
* Synchronizes multiple external values into the store.
|
|
5826
|
-
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
5827
|
-
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
5828
|
-
*
|
|
5829
|
-
* Note that the while the values in `state` are updated immediately, the values returned
|
|
5830
|
-
* by `useState` are updated before the next render (similarly to React's `useState`).
|
|
5831
|
-
*
|
|
5832
|
-
* @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
|
|
5833
|
-
*/
|
|
5834
|
-
useSyncedValues(statePart) {
|
|
5835
|
-
const store = this;
|
|
5836
|
-
{
|
|
5837
|
-
react.useDebugValue(statePart, (p) => Object.keys(p));
|
|
5838
|
-
const keys = react.useRef(Object.keys(statePart)).current;
|
|
5839
|
-
const nextKeys = Object.keys(statePart);
|
|
5840
|
-
if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
5841
|
-
}
|
|
5842
|
-
const dependencies = Object.values(statePart);
|
|
5843
|
-
useIsoLayoutEffect(() => {
|
|
5844
|
-
store.update(statePart);
|
|
5845
|
-
}, [store, ...dependencies]);
|
|
5846
|
-
}
|
|
5847
|
-
/**
|
|
5848
|
-
* Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
|
|
5849
|
-
* is non-undefined, the store's state at `key` is updated to match `controlled`.
|
|
5850
|
-
*/
|
|
5851
|
-
useControlledProp(key, controlled) {
|
|
5852
|
-
react.useDebugValue(key);
|
|
5853
|
-
const store = this;
|
|
5854
|
-
const isControlled = controlled !== void 0;
|
|
5855
|
-
useIsoLayoutEffect(() => {
|
|
5856
|
-
if (isControlled && !Object.is(store.state[key], controlled)) store.setState({
|
|
5857
|
-
...store.state,
|
|
5858
|
-
[key]: controlled
|
|
5859
|
-
});
|
|
5860
|
-
}, [
|
|
5861
|
-
store,
|
|
5862
|
-
key,
|
|
5863
|
-
controlled,
|
|
5864
|
-
isControlled
|
|
5865
|
-
]);
|
|
5866
|
-
{
|
|
5867
|
-
const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
5868
|
-
if (!cache.has(key)) cache.set(key, isControlled);
|
|
5869
|
-
const previouslyControlled = cache.get(key);
|
|
5870
|
-
if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) console.error(`A component is changing the ${previouslyControlled ? "" : "un"}controlled state of ${key.toString()} to be ${previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
5871
|
-
}
|
|
5872
|
-
}
|
|
5873
|
-
/** Gets the current value from the store using a selector with the provided key.
|
|
5874
|
-
*
|
|
5875
|
-
* @param key Key of the selector to use.
|
|
5876
|
-
*/
|
|
5877
|
-
select(key, a1, a2, a3) {
|
|
5878
|
-
const selector = this.selectors[key];
|
|
5879
|
-
return selector(this.state, a1, a2, a3);
|
|
5880
|
-
}
|
|
5881
|
-
/**
|
|
5882
|
-
* Returns a value from the store's state using a selector function.
|
|
5883
|
-
* Used to subscribe to specific parts of the state.
|
|
5884
|
-
* This methods causes a rerender whenever the selected state changes.
|
|
5885
|
-
*
|
|
5886
|
-
* @param key Key of the selector to use.
|
|
5887
|
-
*/
|
|
5888
|
-
useState(key, a1, a2, a3) {
|
|
5889
|
-
react.useDebugValue(key);
|
|
5890
|
-
return useStore(this, this.selectors[key], a1, a2, a3);
|
|
5891
|
-
}
|
|
5892
|
-
/**
|
|
5893
|
-
* Wraps a function with `useStableCallback` to ensure it has a stable reference
|
|
5894
|
-
* and assigns it to the context.
|
|
5895
|
-
*
|
|
5896
|
-
* @param key Key of the event callback. Must be a function in the context.
|
|
5897
|
-
* @param fn Function to assign.
|
|
5898
|
-
*/
|
|
5899
|
-
useContextCallback(key, fn) {
|
|
5900
|
-
react.useDebugValue(key);
|
|
5901
|
-
const stableFunction = useStableCallback(fn ?? NOOP);
|
|
5902
|
-
this.context[key] = stableFunction;
|
|
5903
|
-
}
|
|
5904
|
-
/**
|
|
5905
|
-
* Returns a stable setter function for a specific key in the store's state.
|
|
5906
|
-
* It's commonly used to pass as a ref callback to React elements.
|
|
5907
|
-
*
|
|
5908
|
-
* @param key Key of the state to set.
|
|
5909
|
-
*/
|
|
5910
|
-
useStateSetter(key) {
|
|
5911
|
-
const ref = react.useRef(void 0);
|
|
5912
|
-
if (ref.current === void 0) ref.current = (value) => {
|
|
5913
|
-
this.set(key, value);
|
|
5914
|
-
};
|
|
5915
|
-
return ref.current;
|
|
5916
|
-
}
|
|
5917
|
-
/**
|
|
5918
|
-
* Observes changes derived from the store's selectors and calls the listener when the selected value changes.
|
|
5919
|
-
*
|
|
5920
|
-
* @param key Key of the selector to observe.
|
|
5921
|
-
* @param listener Listener function called when the selector result changes.
|
|
5922
|
-
*/
|
|
5923
|
-
observe(selector, listener) {
|
|
5924
|
-
let selectFn;
|
|
5925
|
-
if (typeof selector === "function") selectFn = selector;
|
|
5926
|
-
else selectFn = this.selectors[selector];
|
|
5927
|
-
let prevValue = selectFn(this.state);
|
|
5928
|
-
listener(prevValue, prevValue, this);
|
|
5929
|
-
return this.subscribe((nextState) => {
|
|
5930
|
-
const nextValue = selectFn(nextState);
|
|
5931
|
-
if (!Object.is(prevValue, nextValue)) {
|
|
5932
|
-
const oldValue = prevValue;
|
|
5933
|
-
prevValue = nextValue;
|
|
5934
|
-
listener(nextValue, oldValue, this);
|
|
5935
|
-
}
|
|
5936
|
-
});
|
|
5937
|
-
}
|
|
5938
|
-
};
|
|
5939
|
-
// node_modules/@base-ui/utils/mergeCleanups.mjs
|
|
5581
|
+
const endingStyle = "data-ending-style";
|
|
5582
|
+
// node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
|
|
5583
|
+
const STARTING_HOOK = { [startingStyle]: "" };
|
|
5584
|
+
const ENDING_HOOK = { [endingStyle]: "" };
|
|
5585
|
+
const transitionStatusMapping = { transitionStatus(value) {
|
|
5586
|
+
if (value === "starting") return STARTING_HOOK;
|
|
5587
|
+
if (value === "ending") return ENDING_HOOK;
|
|
5588
|
+
return null;
|
|
5589
|
+
} };
|
|
5590
|
+
// node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
|
|
5940
5591
|
/**
|
|
5941
|
-
*
|
|
5592
|
+
* Present when the popup is open.
|
|
5942
5593
|
*/
|
|
5943
|
-
|
|
5944
|
-
return () => {
|
|
5945
|
-
for (let i = 0; i < cleanups.length; i += 1) {
|
|
5946
|
-
const cleanup = cleanups[i];
|
|
5947
|
-
if (cleanup) cleanup();
|
|
5948
|
-
}
|
|
5949
|
-
};
|
|
5950
|
-
}
|
|
5951
|
-
// node_modules/@base-ui/utils/addEventListener.mjs
|
|
5594
|
+
const open = "data-open";
|
|
5952
5595
|
/**
|
|
5953
|
-
*
|
|
5596
|
+
* Present when the popup is closed.
|
|
5954
5597
|
*/
|
|
5955
|
-
|
|
5956
|
-
target.addEventListener(type, listener, options);
|
|
5957
|
-
return () => {
|
|
5958
|
-
target.removeEventListener(type, listener, options);
|
|
5959
|
-
};
|
|
5960
|
-
}
|
|
5961
|
-
// node_modules/@base-ui/utils/useForcedRerendering.mjs
|
|
5598
|
+
const closed = "data-closed";
|
|
5962
5599
|
/**
|
|
5963
|
-
*
|
|
5600
|
+
* Present when the anchor is hidden.
|
|
5964
5601
|
*/
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
return react.useCallback(() => {
|
|
5968
|
-
setState({});
|
|
5969
|
-
}, []);
|
|
5970
|
-
}
|
|
5971
|
-
// node_modules/@base-ui/utils/useOnMount.mjs
|
|
5602
|
+
const anchorHidden = "data-anchor-hidden";
|
|
5603
|
+
// node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
|
|
5972
5604
|
/**
|
|
5973
|
-
*
|
|
5605
|
+
* Present when the popup is open.
|
|
5974
5606
|
*/
|
|
5975
|
-
|
|
5976
|
-
react.useEffect(fn, EMPTY_ARRAY);
|
|
5977
|
-
}
|
|
5978
|
-
// node_modules/@base-ui/utils/useAnimationFrame.mjs
|
|
5979
|
-
/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have
|
|
5980
|
-
* a monomorphic `uint` type with `0` meaning empty.
|
|
5981
|
-
* See warning note at:
|
|
5982
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */
|
|
5983
|
-
const EMPTY$1 = null;
|
|
5984
|
-
let LAST_RAF = globalThis.requestAnimationFrame;
|
|
5985
|
-
var Scheduler = class {
|
|
5986
|
-
callbacks = [];
|
|
5987
|
-
callbacksCount = 0;
|
|
5988
|
-
nextId = 1;
|
|
5989
|
-
startId = 1;
|
|
5990
|
-
isScheduled = false;
|
|
5991
|
-
tick = (timestamp) => {
|
|
5992
|
-
this.isScheduled = false;
|
|
5993
|
-
const currentCallbacks = this.callbacks;
|
|
5994
|
-
const currentCallbacksCount = this.callbacksCount;
|
|
5995
|
-
this.callbacks = [];
|
|
5996
|
-
this.callbacksCount = 0;
|
|
5997
|
-
this.startId = this.nextId;
|
|
5998
|
-
if (currentCallbacksCount > 0) for (let i = 0; i < currentCallbacks.length; i += 1) currentCallbacks[i]?.(timestamp);
|
|
5999
|
-
};
|
|
6000
|
-
request(fn) {
|
|
6001
|
-
const id = this.nextId;
|
|
6002
|
-
this.nextId += 1;
|
|
6003
|
-
this.callbacks.push(fn);
|
|
6004
|
-
this.callbacksCount += 1;
|
|
6005
|
-
const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
|
|
6006
|
-
if (!this.isScheduled || didRAFChange) {
|
|
6007
|
-
requestAnimationFrame(this.tick);
|
|
6008
|
-
this.isScheduled = true;
|
|
6009
|
-
}
|
|
6010
|
-
return id;
|
|
6011
|
-
}
|
|
6012
|
-
cancel(id) {
|
|
6013
|
-
const index = id - this.startId;
|
|
6014
|
-
if (index < 0 || index >= this.callbacks.length) return;
|
|
6015
|
-
if (this.callbacks[index] === null) return;
|
|
6016
|
-
this.callbacks[index] = null;
|
|
6017
|
-
this.callbacksCount -= 1;
|
|
6018
|
-
}
|
|
6019
|
-
};
|
|
6020
|
-
let scheduler = new Scheduler();
|
|
6021
|
-
var AnimationFrame = class AnimationFrame {
|
|
6022
|
-
static create() {
|
|
6023
|
-
return new AnimationFrame();
|
|
6024
|
-
}
|
|
6025
|
-
static request(fn) {
|
|
6026
|
-
return scheduler.request(fn);
|
|
6027
|
-
}
|
|
6028
|
-
static cancel(id) {
|
|
6029
|
-
return scheduler.cancel(id);
|
|
6030
|
-
}
|
|
6031
|
-
currentId = EMPTY$1;
|
|
6032
|
-
/**
|
|
6033
|
-
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
6034
|
-
*/
|
|
6035
|
-
request(fn) {
|
|
6036
|
-
this.cancel();
|
|
6037
|
-
this.currentId = scheduler.request(() => {
|
|
6038
|
-
this.currentId = EMPTY$1;
|
|
6039
|
-
fn();
|
|
6040
|
-
});
|
|
6041
|
-
}
|
|
6042
|
-
cancel = () => {
|
|
6043
|
-
if (this.currentId !== EMPTY$1) {
|
|
6044
|
-
scheduler.cancel(this.currentId);
|
|
6045
|
-
this.currentId = EMPTY$1;
|
|
6046
|
-
}
|
|
6047
|
-
};
|
|
6048
|
-
disposeEffect = () => {
|
|
6049
|
-
return this.cancel;
|
|
6050
|
-
};
|
|
6051
|
-
};
|
|
5607
|
+
const popupOpen$2 = "data-popup-open";
|
|
6052
5608
|
/**
|
|
6053
|
-
*
|
|
5609
|
+
* Present when a pressable trigger is pressed.
|
|
6054
5610
|
*/
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
5611
|
+
const pressed$1 = "data-pressed";
|
|
5612
|
+
// node_modules/@base-ui/react/utils/popupStateMapping.mjs
|
|
5613
|
+
const TRIGGER_HOOK = { [popupOpen$2]: "" };
|
|
5614
|
+
const PRESSABLE_TRIGGER_HOOK = {
|
|
5615
|
+
[popupOpen$2]: "",
|
|
5616
|
+
[pressed$1]: ""
|
|
5617
|
+
};
|
|
5618
|
+
const POPUP_OPEN_HOOK = { [open]: "" };
|
|
5619
|
+
const POPUP_CLOSED_HOOK = { [closed]: "" };
|
|
5620
|
+
const ANCHOR_HIDDEN_HOOK = { [anchorHidden]: "" };
|
|
5621
|
+
const triggerOpenStateMapping = { open(value) {
|
|
5622
|
+
if (value) return TRIGGER_HOOK;
|
|
5623
|
+
return null;
|
|
5624
|
+
} };
|
|
5625
|
+
const pressableTriggerOpenStateMapping = { open(value) {
|
|
5626
|
+
if (value) return PRESSABLE_TRIGGER_HOOK;
|
|
5627
|
+
return null;
|
|
5628
|
+
} };
|
|
5629
|
+
const popupStateMapping = {
|
|
5630
|
+
open(value) {
|
|
5631
|
+
if (value) return POPUP_OPEN_HOOK;
|
|
5632
|
+
return POPUP_CLOSED_HOOK;
|
|
5633
|
+
},
|
|
5634
|
+
anchorHidden(value) {
|
|
5635
|
+
if (value) return ANCHOR_HIDDEN_HOOK;
|
|
5636
|
+
return null;
|
|
6079
5637
|
}
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
}
|
|
6085
|
-
};
|
|
6086
|
-
disposeEffect = () => {
|
|
6087
|
-
return this.clear;
|
|
6088
|
-
};
|
|
5638
|
+
};
|
|
5639
|
+
const popupTransitionStateMapping = {
|
|
5640
|
+
...popupStateMapping,
|
|
5641
|
+
...transitionStatusMapping
|
|
6089
5642
|
};
|
|
6090
5643
|
/**
|
|
6091
|
-
*
|
|
6092
|
-
*/
|
|
6093
|
-
function useTimeout() {
|
|
6094
|
-
const timeout = useRefWithInit(Timeout.create).current;
|
|
6095
|
-
useOnMount(timeout.disposeEffect);
|
|
6096
|
-
return timeout;
|
|
6097
|
-
}
|
|
6098
|
-
// node_modules/@base-ui/utils/platform/shared.mjs
|
|
6099
|
-
/**
|
|
6100
|
-
* Reads `navigator.userAgent` / `navigator.platform` (legacy but universally
|
|
6101
|
-
* supported) into a normalized shape. In development, prefers the modern
|
|
6102
|
-
* `navigator.userAgentData` API on Chromium to avoid DevTools warnings about
|
|
6103
|
-
* the deprecated reads; that branch is dead-code-eliminated in production
|
|
6104
|
-
* builds to keep the bundle small.
|
|
6105
|
-
*
|
|
6106
|
-
* Returns empty/zero values when `navigator` is undefined (SSR), so every
|
|
6107
|
-
* derived flag safely evaluates to `false`.
|
|
5644
|
+
* Present when the trigger is disabled, either by the `disabled` prop or by a parent `<Tooltip.Root>` component.
|
|
6108
5645
|
*/
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
if (uaData && Array.isArray(uaData.brands)) return {
|
|
6118
|
-
userAgent: uaData.brands.map(({ brand, version }) => `${brand}/${version}`).join(" "),
|
|
6119
|
-
platform: uaData.platform ?? navigator.platform ?? "",
|
|
6120
|
-
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
6121
|
-
};
|
|
6122
|
-
}
|
|
6123
|
-
return {
|
|
6124
|
-
userAgent: navigator.userAgent,
|
|
6125
|
-
platform: navigator.platform ?? "",
|
|
6126
|
-
maxTouchPoints: navigator.maxTouchPoints ?? 0
|
|
6127
|
-
};
|
|
5646
|
+
const triggerDisabled = "data-trigger-disabled";
|
|
5647
|
+
// node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
|
|
5648
|
+
function isTargetInsideEnabledTrigger(target, triggerElements) {
|
|
5649
|
+
if (!isElement(target)) return false;
|
|
5650
|
+
const targetElement = target;
|
|
5651
|
+
if (triggerElements.hasElement(targetElement)) return !targetElement.hasAttribute(triggerDisabled);
|
|
5652
|
+
for (const [, trigger] of triggerElements.entries()) if (contains(trigger, targetElement)) return !trigger.hasAttribute(triggerDisabled);
|
|
5653
|
+
return false;
|
|
6128
5654
|
}
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
const ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1;
|
|
6135
|
-
/** Android phones, tablets, and embedded Android browsers. */
|
|
6136
|
-
const ANDROID_STRING = "android";
|
|
6137
|
-
const android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING);
|
|
6138
|
-
/** macOS desktop. Excludes iPadOS, which reports as `MacIntel`. */
|
|
6139
|
-
const mac = !ios && lowerPlatform.startsWith("mac");
|
|
6140
|
-
lowerPlatform.startsWith("win");
|
|
6141
|
-
!android && /^(linux|chrome os)/.test(lowerPlatform);
|
|
6142
|
-
/** Any Apple OS (`mac || ios`). */
|
|
6143
|
-
const apple = mac || ios;
|
|
6144
|
-
// node_modules/@base-ui/utils/platform/engine.mjs
|
|
6145
|
-
/** WebKit: Safari, all iOS browsers, GNOME Web. Excludes Blink. */
|
|
6146
|
-
const webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none");
|
|
6147
|
-
!webkit && lowerUserAgent.includes("firefox");
|
|
6148
|
-
!webkit && lowerUserAgent.includes("chrom");
|
|
6149
|
-
// node_modules/@base-ui/utils/platform/screen-reader.mjs
|
|
6150
|
-
/**
|
|
6151
|
-
* The user *may* be using VoiceOver — actual activation is not detectable.
|
|
6152
|
-
* True on any Apple platform (macOS, iOS, iPadOS).
|
|
6153
|
-
*/
|
|
6154
|
-
const voiceOver = apple;
|
|
6155
|
-
// node_modules/@base-ui/utils/platform/env.mjs
|
|
6156
|
-
/** Running in jsdom or HappyDOM (used by unit tests). */
|
|
6157
|
-
const jsdom = /jsdom|happydom/.test(lowerUserAgent);
|
|
6158
|
-
// node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
|
|
6159
|
-
function stopEvent(event) {
|
|
6160
|
-
event.preventDefault();
|
|
6161
|
-
event.stopPropagation();
|
|
5655
|
+
function isEventTargetWithin(event, node) {
|
|
5656
|
+
if (node == null) return false;
|
|
5657
|
+
if ("composedPath" in event) return event.composedPath().includes(node);
|
|
5658
|
+
const eventAgain = event;
|
|
5659
|
+
return eventAgain.target != null && node.contains(eventAgain.target);
|
|
6162
5660
|
}
|
|
6163
|
-
function
|
|
6164
|
-
return "
|
|
5661
|
+
function isRootElement(element) {
|
|
5662
|
+
return element.matches("html,body");
|
|
6165
5663
|
}
|
|
6166
|
-
function
|
|
6167
|
-
|
|
6168
|
-
if (android && event.pointerType) return event.type === "click" && event.buttons === 1;
|
|
6169
|
-
return event.detail === 0 && !event.pointerType;
|
|
5664
|
+
function isTypeableElement(element) {
|
|
5665
|
+
return isHTMLElement(element) && element.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
6170
5666
|
}
|
|
6171
|
-
function
|
|
6172
|
-
|
|
6173
|
-
return !android && event.width === 0 && event.height === 0 || event.type === "pointerdown" && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse" && (android || event.buttons === 0) || event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "touch";
|
|
5667
|
+
function isInteractiveElement(element) {
|
|
5668
|
+
return closest(element, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${TYPEABLE_SELECTOR}`) != null;
|
|
6174
5669
|
}
|
|
6175
|
-
function
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
return values.includes(pointerType);
|
|
6179
|
-
}
|
|
6180
|
-
function isClickLikeEvent(event) {
|
|
6181
|
-
const type = event.type;
|
|
6182
|
-
return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
|
|
6183
|
-
}
|
|
6184
|
-
// node_modules/@base-ui/utils/shadowDom.mjs
|
|
6185
|
-
function activeElement(doc) {
|
|
6186
|
-
let element = doc.activeElement;
|
|
6187
|
-
while (element?.shadowRoot?.activeElement != null) element = element.shadowRoot.activeElement;
|
|
6188
|
-
return element;
|
|
6189
|
-
}
|
|
6190
|
-
function contains(parent, child) {
|
|
6191
|
-
if (!parent || !child) return false;
|
|
6192
|
-
const rootNode = child.getRootNode?.();
|
|
6193
|
-
if (parent.contains(child)) return true;
|
|
6194
|
-
if (rootNode && isShadowRoot(rootNode)) {
|
|
6195
|
-
let next = child;
|
|
6196
|
-
while (next) {
|
|
6197
|
-
if (parent === next) return true;
|
|
6198
|
-
next = next.parentNode || next.host;
|
|
6199
|
-
}
|
|
6200
|
-
}
|
|
6201
|
-
return false;
|
|
6202
|
-
}
|
|
6203
|
-
/**
|
|
6204
|
-
* Finds the closest matching element in the composed tree, crossing slots and shadow roots.
|
|
6205
|
-
* `:scope` is not supported.
|
|
6206
|
-
*/
|
|
6207
|
-
function closest(node, selector) {
|
|
6208
|
-
let current = node;
|
|
6209
|
-
while (current) {
|
|
6210
|
-
if (isElement(current) && current.matches(selector)) return current;
|
|
6211
|
-
current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null);
|
|
6212
|
-
}
|
|
6213
|
-
return null;
|
|
6214
|
-
}
|
|
6215
|
-
function getTarget(event) {
|
|
6216
|
-
if ("composedPath" in event) return event.composedPath()[0] ?? event.target;
|
|
6217
|
-
return event.target;
|
|
6218
|
-
}
|
|
6219
|
-
// node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs
|
|
6220
|
-
const FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable";
|
|
6221
|
-
const TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
6222
|
-
const ARROW_LEFT$1 = "ArrowLeft";
|
|
6223
|
-
const ARROW_RIGHT$1 = "ArrowRight";
|
|
6224
|
-
const ARROW_UP$1 = "ArrowUp";
|
|
6225
|
-
const ARROW_DOWN$1 = "ArrowDown";
|
|
6226
|
-
// node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
|
|
6227
|
-
/**
|
|
6228
|
-
* Present when the component begins animating in.
|
|
6229
|
-
*/
|
|
6230
|
-
const startingStyle = "data-starting-style";
|
|
6231
|
-
/**
|
|
6232
|
-
* Present when the component is animating out.
|
|
6233
|
-
*/
|
|
6234
|
-
const endingStyle = "data-ending-style";
|
|
6235
|
-
// node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
|
|
6236
|
-
const STARTING_HOOK = { [startingStyle]: "" };
|
|
6237
|
-
const ENDING_HOOK = { [endingStyle]: "" };
|
|
6238
|
-
const transitionStatusMapping = { transitionStatus(value) {
|
|
6239
|
-
if (value === "starting") return STARTING_HOOK;
|
|
6240
|
-
if (value === "ending") return ENDING_HOOK;
|
|
6241
|
-
return null;
|
|
6242
|
-
} };
|
|
6243
|
-
// node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs
|
|
6244
|
-
/**
|
|
6245
|
-
* Present when the popup is open.
|
|
6246
|
-
*/
|
|
6247
|
-
const open = "data-open";
|
|
6248
|
-
/**
|
|
6249
|
-
* Present when the popup is closed.
|
|
6250
|
-
*/
|
|
6251
|
-
const closed = "data-closed";
|
|
6252
|
-
/**
|
|
6253
|
-
* Present when the anchor is hidden.
|
|
6254
|
-
*/
|
|
6255
|
-
const anchorHidden = "data-anchor-hidden";
|
|
6256
|
-
// node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs
|
|
6257
|
-
/**
|
|
6258
|
-
* Present when the popup is open.
|
|
6259
|
-
*/
|
|
6260
|
-
const popupOpen$2 = "data-popup-open";
|
|
6261
|
-
/**
|
|
6262
|
-
* Present when a pressable trigger is pressed.
|
|
6263
|
-
*/
|
|
6264
|
-
const pressed$1 = "data-pressed";
|
|
6265
|
-
// node_modules/@base-ui/react/utils/popupStateMapping.mjs
|
|
6266
|
-
const TRIGGER_HOOK = { [popupOpen$2]: "" };
|
|
6267
|
-
const PRESSABLE_TRIGGER_HOOK = {
|
|
6268
|
-
[popupOpen$2]: "",
|
|
6269
|
-
[pressed$1]: ""
|
|
6270
|
-
};
|
|
6271
|
-
const POPUP_OPEN_HOOK = { [open]: "" };
|
|
6272
|
-
const POPUP_CLOSED_HOOK = { [closed]: "" };
|
|
6273
|
-
const ANCHOR_HIDDEN_HOOK = { [anchorHidden]: "" };
|
|
6274
|
-
const triggerOpenStateMapping = { open(value) {
|
|
6275
|
-
if (value) return TRIGGER_HOOK;
|
|
6276
|
-
return null;
|
|
6277
|
-
} };
|
|
6278
|
-
const pressableTriggerOpenStateMapping = { open(value) {
|
|
6279
|
-
if (value) return PRESSABLE_TRIGGER_HOOK;
|
|
6280
|
-
return null;
|
|
6281
|
-
} };
|
|
6282
|
-
const popupStateMapping = {
|
|
6283
|
-
open(value) {
|
|
6284
|
-
if (value) return POPUP_OPEN_HOOK;
|
|
6285
|
-
return POPUP_CLOSED_HOOK;
|
|
6286
|
-
},
|
|
6287
|
-
anchorHidden(value) {
|
|
6288
|
-
if (value) return ANCHOR_HIDDEN_HOOK;
|
|
6289
|
-
return null;
|
|
6290
|
-
}
|
|
6291
|
-
};
|
|
6292
|
-
const popupTransitionStateMapping = {
|
|
6293
|
-
...popupStateMapping,
|
|
6294
|
-
...transitionStatusMapping
|
|
6295
|
-
};
|
|
6296
|
-
/**
|
|
6297
|
-
* Present when the trigger is disabled, either by the `disabled` prop or by a parent `<Tooltip.Root>` component.
|
|
6298
|
-
*/
|
|
6299
|
-
const triggerDisabled = "data-trigger-disabled";
|
|
6300
|
-
// node_modules/@base-ui/react/floating-ui-react/utils/element.mjs
|
|
6301
|
-
function isTargetInsideEnabledTrigger(target, triggerElements) {
|
|
6302
|
-
if (!isElement(target)) return false;
|
|
6303
|
-
const targetElement = target;
|
|
6304
|
-
if (triggerElements.hasElement(targetElement)) return !targetElement.hasAttribute(triggerDisabled);
|
|
6305
|
-
for (const [, trigger] of triggerElements.entries()) if (contains(trigger, targetElement)) return !trigger.hasAttribute(triggerDisabled);
|
|
6306
|
-
return false;
|
|
6307
|
-
}
|
|
6308
|
-
function isEventTargetWithin(event, node) {
|
|
6309
|
-
if (node == null) return false;
|
|
6310
|
-
if ("composedPath" in event) return event.composedPath().includes(node);
|
|
6311
|
-
const eventAgain = event;
|
|
6312
|
-
return eventAgain.target != null && node.contains(eventAgain.target);
|
|
6313
|
-
}
|
|
6314
|
-
function isRootElement(element) {
|
|
6315
|
-
return element.matches("html,body");
|
|
6316
|
-
}
|
|
6317
|
-
function isTypeableElement(element) {
|
|
6318
|
-
return isHTMLElement(element) && element.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
6319
|
-
}
|
|
6320
|
-
function isInteractiveElement(element) {
|
|
6321
|
-
return closest(element, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${TYPEABLE_SELECTOR}`) != null;
|
|
6322
|
-
}
|
|
6323
|
-
function isTypeableCombobox(element) {
|
|
6324
|
-
if (!element) return false;
|
|
6325
|
-
return element.getAttribute("role") === "combobox" && isTypeableElement(element);
|
|
5670
|
+
function isTypeableCombobox(element) {
|
|
5671
|
+
if (!element) return false;
|
|
5672
|
+
return element.getAttribute("role") === "combobox" && isTypeableElement(element);
|
|
6326
5673
|
}
|
|
6327
5674
|
function matchesFocusVisible(element) {
|
|
6328
5675
|
if (!element || jsdom) return true;
|
|
@@ -6336,112 +5683,46 @@ window.__ModuleLoader__.load({
|
|
|
6336
5683
|
if (!floatingElement) return null;
|
|
6337
5684
|
return floatingElement.hasAttribute("data-base-ui-focusable") ? floatingElement : floatingElement.querySelector(`[data-base-ui-focusable]`) || floatingElement;
|
|
6338
5685
|
}
|
|
6339
|
-
// node_modules/@base-ui/react/floating-ui-react/
|
|
6340
|
-
function
|
|
6341
|
-
|
|
6342
|
-
if (typeof value === "function") return value();
|
|
6343
|
-
return value;
|
|
5686
|
+
// node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
|
|
5687
|
+
function getNodeChildren(nodes, id, onlyOpenChildren = true) {
|
|
5688
|
+
return nodes.filter((node) => node.parentId === id).flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
|
|
6344
5689
|
}
|
|
6345
|
-
function
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
5690
|
+
function getNodeAncestors(nodes, id) {
|
|
5691
|
+
let allAncestors = [];
|
|
5692
|
+
let currentParentId = nodes.find((node) => node.id === id)?.parentId;
|
|
5693
|
+
while (currentParentId) {
|
|
5694
|
+
const currentNode = nodes.find((node) => node.id === currentParentId);
|
|
5695
|
+
currentParentId = currentNode?.parentId;
|
|
5696
|
+
if (currentNode) allAncestors = allAncestors.concat(currentNode);
|
|
5697
|
+
}
|
|
5698
|
+
return allAncestors;
|
|
6349
5699
|
}
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
5700
|
+
// node_modules/@base-ui/react/floating-ui-react/utils/event.mjs
|
|
5701
|
+
function stopEvent(event) {
|
|
5702
|
+
event.preventDefault();
|
|
5703
|
+
event.stopPropagation();
|
|
6353
5704
|
}
|
|
6354
|
-
function
|
|
6355
|
-
return
|
|
5705
|
+
function isReactEvent(event) {
|
|
5706
|
+
return "nativeEvent" in event;
|
|
6356
5707
|
}
|
|
6357
|
-
function
|
|
6358
|
-
|
|
5708
|
+
function isVirtualClick(event) {
|
|
5709
|
+
if (event.pointerType === "" && event.isTrusted) return true;
|
|
5710
|
+
if (android && event.pointerType) return event.type === "click" && event.buttons === 1;
|
|
5711
|
+
return event.detail === 0 && !event.pointerType;
|
|
6359
5712
|
}
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
*/
|
|
6364
|
-
/**
|
|
6365
|
-
* Details of custom change events emitted by Base UI components.
|
|
6366
|
-
*/
|
|
6367
|
-
/**
|
|
6368
|
-
* Details of custom generic events emitted by Base UI components.
|
|
6369
|
-
*/
|
|
6370
|
-
/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */
|
|
6371
|
-
/**
|
|
6372
|
-
* Creates a Base UI event details object with the given reason and utilities
|
|
6373
|
-
* for preventing Base UI's internal event handling.
|
|
6374
|
-
*/
|
|
6375
|
-
function createChangeEventDetails(reason, event, trigger, customProperties) {
|
|
6376
|
-
let canceled = false;
|
|
6377
|
-
let allowPropagation = false;
|
|
6378
|
-
const custom = customProperties ?? EMPTY_OBJECT;
|
|
6379
|
-
return {
|
|
6380
|
-
reason,
|
|
6381
|
-
event: event ?? new Event("base-ui"),
|
|
6382
|
-
cancel() {
|
|
6383
|
-
canceled = true;
|
|
6384
|
-
},
|
|
6385
|
-
allowPropagation() {
|
|
6386
|
-
allowPropagation = true;
|
|
6387
|
-
},
|
|
6388
|
-
get isCanceled() {
|
|
6389
|
-
return canceled;
|
|
6390
|
-
},
|
|
6391
|
-
get isPropagationAllowed() {
|
|
6392
|
-
return allowPropagation;
|
|
6393
|
-
},
|
|
6394
|
-
trigger,
|
|
6395
|
-
...custom
|
|
6396
|
-
};
|
|
5713
|
+
function isVirtualPointerEvent(event) {
|
|
5714
|
+
if (jsdom) return false;
|
|
5715
|
+
return !android && event.width === 0 && event.height === 0 || event.type === "pointerdown" && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse" && (android || event.buttons === 0) || event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "touch";
|
|
6397
5716
|
}
|
|
6398
|
-
function
|
|
6399
|
-
const
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
5717
|
+
function isMouseLikePointerType(pointerType, strict) {
|
|
5718
|
+
const values = ["mouse", "pen"];
|
|
5719
|
+
if (!strict) values.push("", void 0);
|
|
5720
|
+
return values.includes(pointerType);
|
|
5721
|
+
}
|
|
5722
|
+
function isClickLikeEvent(event) {
|
|
5723
|
+
const type = event.type;
|
|
5724
|
+
return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
|
|
6405
5725
|
}
|
|
6406
|
-
// node_modules/@base-ui/react/internals/reason-parts.mjs
|
|
6407
|
-
const none = "none";
|
|
6408
|
-
const triggerPress = "trigger-press";
|
|
6409
|
-
const triggerHover = "trigger-hover";
|
|
6410
|
-
const triggerFocus = "trigger-focus";
|
|
6411
|
-
const outsidePress = "outside-press";
|
|
6412
|
-
const itemPress = "item-press";
|
|
6413
|
-
const focusOut = "focus-out";
|
|
6414
|
-
const escapeKey = "escape-key";
|
|
6415
|
-
const listNavigation = "list-navigation";
|
|
6416
|
-
const keyboard = "keyboard";
|
|
6417
|
-
const pointer = "pointer";
|
|
6418
|
-
const cancelOpen = "cancel-open";
|
|
6419
|
-
const siblingOpen = "sibling-open";
|
|
6420
|
-
const imperativeAction = "imperative-action";
|
|
6421
|
-
const windowResize = "window-resize";
|
|
6422
|
-
// node_modules/@base-ui/react/utils/FocusGuard.mjs
|
|
6423
|
-
/**
|
|
6424
|
-
* @internal
|
|
6425
|
-
*/
|
|
6426
|
-
const FocusGuard = /*#__PURE__*/ react.forwardRef(function FocusGuard(props, ref) {
|
|
6427
|
-
const [role, setRole] = react.useState();
|
|
6428
|
-
useIsoLayoutEffect(() => {
|
|
6429
|
-
if (voiceOver && webkit) setRole("button");
|
|
6430
|
-
}, []);
|
|
6431
|
-
const restProps = {
|
|
6432
|
-
tabIndex: 0,
|
|
6433
|
-
role
|
|
6434
|
-
};
|
|
6435
|
-
return /*#__PURE__*/ (0, react_jsx_runtime.jsx)("span", {
|
|
6436
|
-
...props,
|
|
6437
|
-
ref,
|
|
6438
|
-
style: visuallyHidden,
|
|
6439
|
-
"aria-hidden": role ? void 0 : true,
|
|
6440
|
-
...restProps,
|
|
6441
|
-
"data-base-ui-focus-guard": ""
|
|
6442
|
-
});
|
|
6443
|
-
});
|
|
6444
|
-
FocusGuard.displayName = "FocusGuard";
|
|
6445
5726
|
// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
6446
5727
|
const min = Math.min;
|
|
6447
5728
|
const max = Math.max;
|
|
@@ -6653,133 +5934,1480 @@ window.__ModuleLoader__.load({
|
|
|
6653
5934
|
if (current.hasAttribute("inert")) return false;
|
|
6654
5935
|
if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) return false;
|
|
6655
5936
|
}
|
|
6656
|
-
return true;
|
|
6657
|
-
}
|
|
6658
|
-
function isVisibleInTabbableTree(element, isAncestor) {
|
|
6659
|
-
const styles = getComputedStyle$1(element);
|
|
6660
|
-
if (!isAncestor) return isElementVisible(element, styles);
|
|
6661
|
-
return styles.display !== "none";
|
|
6662
|
-
}
|
|
6663
|
-
function getTabIndex(element) {
|
|
6664
|
-
const tabIndex = element.tabIndex;
|
|
6665
|
-
if (tabIndex < 0) {
|
|
6666
|
-
const nodeName = getNodeName(element);
|
|
6667
|
-
if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) return 0;
|
|
5937
|
+
return true;
|
|
5938
|
+
}
|
|
5939
|
+
function isVisibleInTabbableTree(element, isAncestor) {
|
|
5940
|
+
const styles = getComputedStyle$1(element);
|
|
5941
|
+
if (!isAncestor) return isElementVisible(element, styles);
|
|
5942
|
+
return styles.display !== "none";
|
|
5943
|
+
}
|
|
5944
|
+
function getTabIndex(element) {
|
|
5945
|
+
const tabIndex = element.tabIndex;
|
|
5946
|
+
if (tabIndex < 0) {
|
|
5947
|
+
const nodeName = getNodeName(element);
|
|
5948
|
+
if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) return 0;
|
|
5949
|
+
}
|
|
5950
|
+
return tabIndex;
|
|
5951
|
+
}
|
|
5952
|
+
function getNamedRadioInput(element) {
|
|
5953
|
+
if (getNodeName(element) !== "input") return null;
|
|
5954
|
+
const input = element;
|
|
5955
|
+
return input.type === "radio" && input.name !== "" ? input : null;
|
|
5956
|
+
}
|
|
5957
|
+
function isTabbableRadio(element, candidates) {
|
|
5958
|
+
const input = getNamedRadioInput(element);
|
|
5959
|
+
if (!input) return true;
|
|
5960
|
+
const checkedRadio = candidates.find((candidate) => {
|
|
5961
|
+
const radio = getNamedRadioInput(candidate);
|
|
5962
|
+
return radio?.name === input.name && radio.form === input.form && radio.checked;
|
|
5963
|
+
});
|
|
5964
|
+
if (checkedRadio) return checkedRadio === input;
|
|
5965
|
+
return candidates.find((candidate) => {
|
|
5966
|
+
const radio = getNamedRadioInput(candidate);
|
|
5967
|
+
return radio?.name === input.name && radio.form === input.form;
|
|
5968
|
+
}) === input;
|
|
5969
|
+
}
|
|
5970
|
+
function getComposedChildren(container) {
|
|
5971
|
+
if (isHTMLElement(container) && getNodeName(container) === "slot") {
|
|
5972
|
+
const assignedElements = container.assignedElements({ flatten: true });
|
|
5973
|
+
if (assignedElements.length > 0) return assignedElements;
|
|
5974
|
+
}
|
|
5975
|
+
if (isHTMLElement(container) && container.shadowRoot) return Array.from(container.shadowRoot.children);
|
|
5976
|
+
return Array.from(container.children);
|
|
5977
|
+
}
|
|
5978
|
+
function appendCandidates(container, list) {
|
|
5979
|
+
getComposedChildren(container).forEach((child) => {
|
|
5980
|
+
if (isFocusableCandidate(child)) list.push(child);
|
|
5981
|
+
appendCandidates(child, list);
|
|
5982
|
+
});
|
|
5983
|
+
}
|
|
5984
|
+
function appendMatchingElements(container, selector, list) {
|
|
5985
|
+
getComposedChildren(container).forEach((child) => {
|
|
5986
|
+
if (isHTMLElement(child) && child.matches(selector)) list.push(child);
|
|
5987
|
+
appendMatchingElements(child, selector, list);
|
|
5988
|
+
});
|
|
5989
|
+
}
|
|
5990
|
+
function isTabbable(element) {
|
|
5991
|
+
return isFocusableElement(element) && getTabIndex(element) >= 0;
|
|
5992
|
+
}
|
|
5993
|
+
function focusable(container) {
|
|
5994
|
+
const candidates = [];
|
|
5995
|
+
appendCandidates(container, candidates);
|
|
5996
|
+
return candidates.filter(isFocusableElement);
|
|
5997
|
+
}
|
|
5998
|
+
function tabbable(container) {
|
|
5999
|
+
const candidates = focusable(container);
|
|
6000
|
+
return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));
|
|
6001
|
+
}
|
|
6002
|
+
function getTabbableIn(container, dir) {
|
|
6003
|
+
const list = tabbable(container);
|
|
6004
|
+
const len = list.length;
|
|
6005
|
+
if (len === 0) return;
|
|
6006
|
+
const active = activeElement(ownerDocument(container));
|
|
6007
|
+
const index = list.indexOf(active);
|
|
6008
|
+
return list[index === -1 ? dir === 1 ? 0 : len - 1 : index + dir];
|
|
6009
|
+
}
|
|
6010
|
+
function getNextTabbable(referenceElement) {
|
|
6011
|
+
return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;
|
|
6012
|
+
}
|
|
6013
|
+
function getPreviousTabbable(referenceElement) {
|
|
6014
|
+
return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;
|
|
6015
|
+
}
|
|
6016
|
+
function getTabbableNearElement(referenceElement, direction, exclude) {
|
|
6017
|
+
if (!referenceElement) return null;
|
|
6018
|
+
const list = [];
|
|
6019
|
+
appendCandidates(ownerDocument(referenceElement).body, list);
|
|
6020
|
+
const index = list.indexOf(referenceElement);
|
|
6021
|
+
if (index === -1) return null;
|
|
6022
|
+
const candidates = list.filter(isFocusableElement);
|
|
6023
|
+
for (let offset = 1; offset < list.length; offset += 1) {
|
|
6024
|
+
const element = list[(index + direction * offset + list.length) % list.length];
|
|
6025
|
+
if (!contains(exclude, element) && isTabbable(element) && isTabbableRadio(element, candidates)) return element;
|
|
6026
|
+
}
|
|
6027
|
+
return list[index];
|
|
6028
|
+
}
|
|
6029
|
+
function isOutsideEvent(event, container) {
|
|
6030
|
+
const containerElement = container || event.currentTarget;
|
|
6031
|
+
const relatedTarget = event.relatedTarget;
|
|
6032
|
+
return !relatedTarget || !contains(containerElement, relatedTarget);
|
|
6033
|
+
}
|
|
6034
|
+
function disableFocusInside(container) {
|
|
6035
|
+
tabbable(container).forEach((element) => {
|
|
6036
|
+
element.dataset.tabindex = element.getAttribute("tabindex") || "";
|
|
6037
|
+
element.setAttribute("tabindex", "-1");
|
|
6038
|
+
});
|
|
6039
|
+
}
|
|
6040
|
+
function enableFocusInside(container) {
|
|
6041
|
+
const elements = [];
|
|
6042
|
+
appendMatchingElements(container, "[data-tabindex]", elements);
|
|
6043
|
+
elements.forEach((element) => {
|
|
6044
|
+
const tabindex = element.dataset.tabindex;
|
|
6045
|
+
delete element.dataset.tabindex;
|
|
6046
|
+
if (tabindex) element.setAttribute("tabindex", tabindex);
|
|
6047
|
+
else element.removeAttribute("tabindex");
|
|
6048
|
+
});
|
|
6049
|
+
}
|
|
6050
|
+
// node_modules/@base-ui/utils/useOnMount.mjs
|
|
6051
|
+
/**
|
|
6052
|
+
* A React.useEffect equivalent that runs once, when the component is mounted.
|
|
6053
|
+
*/
|
|
6054
|
+
function useOnMount(fn) {
|
|
6055
|
+
react.useEffect(fn, EMPTY_ARRAY);
|
|
6056
|
+
}
|
|
6057
|
+
// node_modules/@base-ui/utils/useTimeout.mjs
|
|
6058
|
+
const EMPTY$1 = 0;
|
|
6059
|
+
var Timeout = class Timeout {
|
|
6060
|
+
static create() {
|
|
6061
|
+
return new Timeout();
|
|
6062
|
+
}
|
|
6063
|
+
currentId = EMPTY$1;
|
|
6064
|
+
/**
|
|
6065
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
6066
|
+
*/
|
|
6067
|
+
start(delay, fn) {
|
|
6068
|
+
this.clear();
|
|
6069
|
+
this.currentId = setTimeout(() => {
|
|
6070
|
+
this.currentId = EMPTY$1;
|
|
6071
|
+
fn();
|
|
6072
|
+
}, delay);
|
|
6073
|
+
}
|
|
6074
|
+
isStarted() {
|
|
6075
|
+
return this.currentId !== EMPTY$1;
|
|
6076
|
+
}
|
|
6077
|
+
clear = () => {
|
|
6078
|
+
if (this.currentId !== EMPTY$1) {
|
|
6079
|
+
clearTimeout(this.currentId);
|
|
6080
|
+
this.currentId = EMPTY$1;
|
|
6081
|
+
}
|
|
6082
|
+
};
|
|
6083
|
+
disposeEffect = () => {
|
|
6084
|
+
return this.clear;
|
|
6085
|
+
};
|
|
6086
|
+
};
|
|
6087
|
+
/**
|
|
6088
|
+
* A `setTimeout` with automatic cleanup and guard.
|
|
6089
|
+
*/
|
|
6090
|
+
function useTimeout() {
|
|
6091
|
+
const timeout = useRefWithInit(Timeout.create).current;
|
|
6092
|
+
useOnMount(timeout.disposeEffect);
|
|
6093
|
+
return timeout;
|
|
6094
|
+
}
|
|
6095
|
+
// node_modules/@base-ui/utils/useAnimationFrame.mjs
|
|
6096
|
+
/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have
|
|
6097
|
+
* a monomorphic `uint` type with `0` meaning empty.
|
|
6098
|
+
* See warning note at:
|
|
6099
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */
|
|
6100
|
+
const EMPTY = null;
|
|
6101
|
+
let LAST_RAF = globalThis.requestAnimationFrame;
|
|
6102
|
+
var Scheduler = class {
|
|
6103
|
+
callbacks = [];
|
|
6104
|
+
callbacksCount = 0;
|
|
6105
|
+
nextId = 1;
|
|
6106
|
+
startId = 1;
|
|
6107
|
+
isScheduled = false;
|
|
6108
|
+
tick = (timestamp) => {
|
|
6109
|
+
this.isScheduled = false;
|
|
6110
|
+
const currentCallbacks = this.callbacks;
|
|
6111
|
+
const currentCallbacksCount = this.callbacksCount;
|
|
6112
|
+
this.callbacks = [];
|
|
6113
|
+
this.callbacksCount = 0;
|
|
6114
|
+
this.startId = this.nextId;
|
|
6115
|
+
if (currentCallbacksCount > 0) for (let i = 0; i < currentCallbacks.length; i += 1) currentCallbacks[i]?.(timestamp);
|
|
6116
|
+
};
|
|
6117
|
+
request(fn) {
|
|
6118
|
+
const id = this.nextId;
|
|
6119
|
+
this.nextId += 1;
|
|
6120
|
+
this.callbacks.push(fn);
|
|
6121
|
+
this.callbacksCount += 1;
|
|
6122
|
+
const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
|
|
6123
|
+
if (!this.isScheduled || didRAFChange) {
|
|
6124
|
+
requestAnimationFrame(this.tick);
|
|
6125
|
+
this.isScheduled = true;
|
|
6126
|
+
}
|
|
6127
|
+
return id;
|
|
6128
|
+
}
|
|
6129
|
+
cancel(id) {
|
|
6130
|
+
const index = id - this.startId;
|
|
6131
|
+
if (index < 0 || index >= this.callbacks.length) return;
|
|
6132
|
+
if (this.callbacks[index] === null) return;
|
|
6133
|
+
this.callbacks[index] = null;
|
|
6134
|
+
this.callbacksCount -= 1;
|
|
6135
|
+
}
|
|
6136
|
+
};
|
|
6137
|
+
let scheduler = new Scheduler();
|
|
6138
|
+
var AnimationFrame = class AnimationFrame {
|
|
6139
|
+
static create() {
|
|
6140
|
+
return new AnimationFrame();
|
|
6141
|
+
}
|
|
6142
|
+
static request(fn) {
|
|
6143
|
+
return scheduler.request(fn);
|
|
6144
|
+
}
|
|
6145
|
+
static cancel(id) {
|
|
6146
|
+
return scheduler.cancel(id);
|
|
6147
|
+
}
|
|
6148
|
+
currentId = EMPTY;
|
|
6149
|
+
/**
|
|
6150
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
6151
|
+
*/
|
|
6152
|
+
request(fn) {
|
|
6153
|
+
this.cancel();
|
|
6154
|
+
this.currentId = scheduler.request(() => {
|
|
6155
|
+
this.currentId = EMPTY;
|
|
6156
|
+
fn();
|
|
6157
|
+
});
|
|
6158
|
+
}
|
|
6159
|
+
cancel = () => {
|
|
6160
|
+
if (this.currentId !== EMPTY) {
|
|
6161
|
+
scheduler.cancel(this.currentId);
|
|
6162
|
+
this.currentId = EMPTY;
|
|
6163
|
+
}
|
|
6164
|
+
};
|
|
6165
|
+
disposeEffect = () => {
|
|
6166
|
+
return this.cancel;
|
|
6167
|
+
};
|
|
6168
|
+
};
|
|
6169
|
+
/**
|
|
6170
|
+
* A `requestAnimationFrame` with automatic cleanup and guard.
|
|
6171
|
+
*/
|
|
6172
|
+
function useAnimationFrame() {
|
|
6173
|
+
const timeout = useRefWithInit(AnimationFrame.create).current;
|
|
6174
|
+
useOnMount(timeout.disposeEffect);
|
|
6175
|
+
return timeout;
|
|
6176
|
+
}
|
|
6177
|
+
// node_modules/@base-ui/react/utils/resolveRef.mjs
|
|
6178
|
+
/**
|
|
6179
|
+
* If the provided argument is a ref object, returns its `current` value.
|
|
6180
|
+
* Otherwise, returns the argument itself.
|
|
6181
|
+
*/
|
|
6182
|
+
function resolveRef(maybeRef) {
|
|
6183
|
+
if (maybeRef == null) return maybeRef;
|
|
6184
|
+
return "current" in maybeRef ? maybeRef.current : maybeRef;
|
|
6185
|
+
}
|
|
6186
|
+
// node_modules/@base-ui/react/utils/getFiniteAnimations.mjs
|
|
6187
|
+
/**
|
|
6188
|
+
* Excludes infinite animations, whose finished promises never resolve while they run.
|
|
6189
|
+
*/
|
|
6190
|
+
function getFiniteAnimations(element, options) {
|
|
6191
|
+
return element.getAnimations(options).filter((animation) => {
|
|
6192
|
+
const timing = animation.effect?.getTiming();
|
|
6193
|
+
return timing?.duration !== Infinity && timing?.iterations !== Infinity;
|
|
6194
|
+
});
|
|
6195
|
+
}
|
|
6196
|
+
// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
6197
|
+
let pendingCallbacks = null;
|
|
6198
|
+
/**
|
|
6199
|
+
* Runs the callback in a synchronous flush before the browser paints, so that the
|
|
6200
|
+
* browser doesn't paint an intermediate frame: https://github.com/mui/base-ui/issues/979
|
|
6201
|
+
* Callbacks that become ready within the same microtask checkpoint (e.g. multiple elements
|
|
6202
|
+
* whose animations finish together) are batched into a single commit:
|
|
6203
|
+
* https://github.com/mui/base-ui/issues/5481
|
|
6204
|
+
*/
|
|
6205
|
+
function flushBeforePaint(fn) {
|
|
6206
|
+
if (!pendingCallbacks) {
|
|
6207
|
+
const callbacks = [];
|
|
6208
|
+
pendingCallbacks = callbacks;
|
|
6209
|
+
queueMicrotask(() => {
|
|
6210
|
+
pendingCallbacks = null;
|
|
6211
|
+
react_dom.flushSync(() => {
|
|
6212
|
+
for (const callback of callbacks) callback();
|
|
6213
|
+
});
|
|
6214
|
+
});
|
|
6215
|
+
}
|
|
6216
|
+
pendingCallbacks.push(fn);
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* Executes a function once all animations have finished on the provided element.
|
|
6220
|
+
* If an animation is canceled, waits for any replacement animations before executing.
|
|
6221
|
+
* @param elementOrRef - The element to watch for animations.
|
|
6222
|
+
* @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.
|
|
6223
|
+
* @param batch - Whether completions ready in the same microtask may be coalesced into a single
|
|
6224
|
+
* commit. A batched callback runs before earlier callbacks' React updates have committed, so only
|
|
6225
|
+
* opt in when the callback doesn't read state that another completion can change.
|
|
6226
|
+
* @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback
|
|
6227
|
+
*/
|
|
6228
|
+
function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
|
|
6229
|
+
const frame = useAnimationFrame();
|
|
6230
|
+
return useStableCallback((fnToExecute, signal = null) => {
|
|
6231
|
+
frame.cancel();
|
|
6232
|
+
const element = resolveRef(elementOrRef);
|
|
6233
|
+
if (element == null) return;
|
|
6234
|
+
const resolvedElement = element;
|
|
6235
|
+
const done = () => {
|
|
6236
|
+
if (!batch) {
|
|
6237
|
+
react_dom.flushSync(fnToExecute);
|
|
6238
|
+
return;
|
|
6239
|
+
}
|
|
6240
|
+
flushBeforePaint(() => {
|
|
6241
|
+
if (!signal?.aborted) fnToExecute();
|
|
6242
|
+
});
|
|
6243
|
+
};
|
|
6244
|
+
if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
6245
|
+
fnToExecute();
|
|
6246
|
+
return;
|
|
6247
|
+
}
|
|
6248
|
+
function exec() {
|
|
6249
|
+
Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => {
|
|
6250
|
+
if (!signal?.aborted) done();
|
|
6251
|
+
}, () => {
|
|
6252
|
+
if (signal?.aborted) return;
|
|
6253
|
+
if (getFiniteAnimations(resolvedElement).some((animation) => animation.pending || animation.playState !== "finished")) {
|
|
6254
|
+
exec();
|
|
6255
|
+
return;
|
|
6256
|
+
}
|
|
6257
|
+
done();
|
|
6258
|
+
});
|
|
6259
|
+
}
|
|
6260
|
+
if (waitForStartingStyleRemoved) {
|
|
6261
|
+
const startingStyleAttribute = startingStyle;
|
|
6262
|
+
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
6263
|
+
frame.request(exec);
|
|
6264
|
+
return;
|
|
6265
|
+
}
|
|
6266
|
+
const attributeObserver = new MutationObserver(() => {
|
|
6267
|
+
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
6268
|
+
attributeObserver.disconnect();
|
|
6269
|
+
exec();
|
|
6270
|
+
}
|
|
6271
|
+
});
|
|
6272
|
+
attributeObserver.observe(resolvedElement, {
|
|
6273
|
+
attributes: true,
|
|
6274
|
+
attributeFilter: [startingStyleAttribute]
|
|
6275
|
+
});
|
|
6276
|
+
signal?.addEventListener("abort", () => attributeObserver.disconnect(), { once: true });
|
|
6277
|
+
return;
|
|
6278
|
+
}
|
|
6279
|
+
frame.request(exec);
|
|
6280
|
+
});
|
|
6281
|
+
}
|
|
6282
|
+
// node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
|
|
6283
|
+
/**
|
|
6284
|
+
* Calls the provided function when the CSS open/close animation or transition completes.
|
|
6285
|
+
*/
|
|
6286
|
+
function useOpenChangeComplete(parameters) {
|
|
6287
|
+
const { enabled = true, open, ref, batch = false, onComplete: onCompleteParam } = parameters;
|
|
6288
|
+
const onComplete = useStableCallback(onCompleteParam);
|
|
6289
|
+
const runOnceAnimationsFinish = useAnimationsFinished(ref, open, batch);
|
|
6290
|
+
react.useEffect(() => {
|
|
6291
|
+
if (!enabled) return;
|
|
6292
|
+
const abortController = new AbortController();
|
|
6293
|
+
runOnceAnimationsFinish(onComplete, abortController.signal);
|
|
6294
|
+
return () => {
|
|
6295
|
+
abortController.abort();
|
|
6296
|
+
};
|
|
6297
|
+
}, [
|
|
6298
|
+
enabled,
|
|
6299
|
+
open,
|
|
6300
|
+
onComplete,
|
|
6301
|
+
runOnceAnimationsFinish
|
|
6302
|
+
]);
|
|
6303
|
+
}
|
|
6304
|
+
// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
6305
|
+
/**
|
|
6306
|
+
* Provides a status string for CSS animations.
|
|
6307
|
+
* @param open - a boolean that determines if the element is open.
|
|
6308
|
+
* @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`
|
|
6309
|
+
* @param deferEndingState - a boolean that delays the `'ending'` state by a frame
|
|
6310
|
+
* @param animateInitialOpen - a boolean that makes an element which mounts already open still go
|
|
6311
|
+
* through `'starting'`. Off by default so content that was open on the first render (a
|
|
6312
|
+
* `defaultOpen` popup on page load, SSR'd markup) doesn't animate in.
|
|
6313
|
+
*/
|
|
6314
|
+
function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
|
|
6315
|
+
const [transitionStatus, setTransitionStatus] = react.useState(open && enableIdleState ? "idle" : void 0);
|
|
6316
|
+
const [mounted, setMounted] = react.useState(open && !animateInitialOpen);
|
|
6317
|
+
if (open && !mounted) {
|
|
6318
|
+
setMounted(true);
|
|
6319
|
+
setTransitionStatus("starting");
|
|
6320
|
+
}
|
|
6321
|
+
if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) setTransitionStatus("ending");
|
|
6322
|
+
if (!open && !mounted && transitionStatus === "ending") setTransitionStatus(void 0);
|
|
6323
|
+
useIsoLayoutEffect(() => {
|
|
6324
|
+
if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
|
|
6325
|
+
const frame = AnimationFrame.request(() => {
|
|
6326
|
+
setTransitionStatus("ending");
|
|
6327
|
+
});
|
|
6328
|
+
return () => {
|
|
6329
|
+
AnimationFrame.cancel(frame);
|
|
6330
|
+
};
|
|
6331
|
+
}
|
|
6332
|
+
}, [
|
|
6333
|
+
open,
|
|
6334
|
+
mounted,
|
|
6335
|
+
transitionStatus,
|
|
6336
|
+
deferEndingState
|
|
6337
|
+
]);
|
|
6338
|
+
useIsoLayoutEffect(() => {
|
|
6339
|
+
if (!open || enableIdleState || transitionStatus === void 0) return;
|
|
6340
|
+
const frame = AnimationFrame.request(() => {
|
|
6341
|
+
setTransitionStatus(void 0);
|
|
6342
|
+
});
|
|
6343
|
+
return () => {
|
|
6344
|
+
AnimationFrame.cancel(frame);
|
|
6345
|
+
};
|
|
6346
|
+
}, [
|
|
6347
|
+
enableIdleState,
|
|
6348
|
+
open,
|
|
6349
|
+
transitionStatus
|
|
6350
|
+
]);
|
|
6351
|
+
useIsoLayoutEffect(() => {
|
|
6352
|
+
if (!open || !enableIdleState) return;
|
|
6353
|
+
if (open && mounted && transitionStatus !== "idle") setTransitionStatus("starting");
|
|
6354
|
+
const frame = AnimationFrame.request(() => {
|
|
6355
|
+
setTransitionStatus("idle");
|
|
6356
|
+
});
|
|
6357
|
+
return () => {
|
|
6358
|
+
AnimationFrame.cancel(frame);
|
|
6359
|
+
};
|
|
6360
|
+
}, [
|
|
6361
|
+
enableIdleState,
|
|
6362
|
+
open,
|
|
6363
|
+
mounted,
|
|
6364
|
+
transitionStatus
|
|
6365
|
+
]);
|
|
6366
|
+
return {
|
|
6367
|
+
mounted,
|
|
6368
|
+
setMounted,
|
|
6369
|
+
transitionStatus
|
|
6370
|
+
};
|
|
6371
|
+
}
|
|
6372
|
+
// node_modules/@base-ui/react/internals/field-root-context/useSetFieldFocused.mjs
|
|
6373
|
+
/**
|
|
6374
|
+
* Returns the field's `setFocused`, recording which control the focused state belongs to.
|
|
6375
|
+
*
|
|
6376
|
+
* Disabling or unmounting a focused control moves focus away without firing `blur`, so the focused
|
|
6377
|
+
* state would otherwise stay latched. A field can have several focus targets, so a control only
|
|
6378
|
+
* clears the shared state when focus last landed on itself. The stable callback doubles as that
|
|
6379
|
+
* identity.
|
|
6380
|
+
*/
|
|
6381
|
+
function useSetFieldFocused(disabled, focusTargetRef, onFocusedChange) {
|
|
6382
|
+
const { setFocused, focusOwnerRef } = useFieldRootContext();
|
|
6383
|
+
const setFieldFocused = useStableCallback((focused) => {
|
|
6384
|
+
if (focused ? !disabled : focusOwnerRef.current === setFieldFocused) {
|
|
6385
|
+
focusOwnerRef.current = focused && setFieldFocused;
|
|
6386
|
+
onFocusedChange?.(focused);
|
|
6387
|
+
setFocused(focused);
|
|
6388
|
+
}
|
|
6389
|
+
});
|
|
6390
|
+
useIsoLayoutEffect(() => {
|
|
6391
|
+
const el = focusTargetRef.current;
|
|
6392
|
+
if ((el?.getRootNode())?.activeElement === el) setFieldFocused(true);
|
|
6393
|
+
return () => setFieldFocused(false);
|
|
6394
|
+
}, [
|
|
6395
|
+
disabled,
|
|
6396
|
+
focusTargetRef,
|
|
6397
|
+
setFieldFocused
|
|
6398
|
+
]);
|
|
6399
|
+
return setFieldFocused;
|
|
6400
|
+
}
|
|
6401
|
+
// node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
|
|
6402
|
+
function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name) {
|
|
6403
|
+
const { registerFieldControl } = useFieldRootContext();
|
|
6404
|
+
const sourceRef = useRefWithInit(() => Symbol());
|
|
6405
|
+
useIsoLayoutEffect(() => {
|
|
6406
|
+
const source = sourceRef.current;
|
|
6407
|
+
if (!enabled) {
|
|
6408
|
+
registerFieldControl(source, void 0);
|
|
6409
|
+
return;
|
|
6410
|
+
}
|
|
6411
|
+
registerFieldControl(source, {
|
|
6412
|
+
controlRef,
|
|
6413
|
+
getValue: getFormValueOverride,
|
|
6414
|
+
id,
|
|
6415
|
+
name,
|
|
6416
|
+
value
|
|
6417
|
+
});
|
|
6418
|
+
}, [
|
|
6419
|
+
controlRef,
|
|
6420
|
+
enabled,
|
|
6421
|
+
getFormValueOverride,
|
|
6422
|
+
id,
|
|
6423
|
+
name,
|
|
6424
|
+
registerFieldControl,
|
|
6425
|
+
sourceRef,
|
|
6426
|
+
value
|
|
6427
|
+
]);
|
|
6428
|
+
useIsoLayoutEffect(() => {
|
|
6429
|
+
const source = sourceRef.current;
|
|
6430
|
+
return () => {
|
|
6431
|
+
registerFieldControl(source, void 0);
|
|
6432
|
+
};
|
|
6433
|
+
}, [registerFieldControl, sourceRef]);
|
|
6434
|
+
}
|
|
6435
|
+
// node_modules/@base-ui/react/internals/useValueChanged.mjs
|
|
6436
|
+
function useValueChanged(value, onChange) {
|
|
6437
|
+
const valueRef = react.useRef(value);
|
|
6438
|
+
const onChangeCallback = useStableCallback(onChange);
|
|
6439
|
+
useIsoLayoutEffect(() => {
|
|
6440
|
+
if (valueRef.current !== value) onChangeCallback(valueRef.current);
|
|
6441
|
+
valueRef.current = value;
|
|
6442
|
+
}, [value, onChangeCallback]);
|
|
6443
|
+
}
|
|
6444
|
+
// node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs
|
|
6445
|
+
/**
|
|
6446
|
+
* Maps a change `reason` string to the corresponding native event type.
|
|
6447
|
+
*/
|
|
6448
|
+
/**
|
|
6449
|
+
* Details of custom change events emitted by Base UI components.
|
|
6450
|
+
*/
|
|
6451
|
+
/**
|
|
6452
|
+
* Details of custom generic events emitted by Base UI components.
|
|
6453
|
+
*/
|
|
6454
|
+
/** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */
|
|
6455
|
+
/**
|
|
6456
|
+
* Creates a Base UI event details object with the given reason and utilities
|
|
6457
|
+
* for preventing Base UI's internal event handling.
|
|
6458
|
+
*/
|
|
6459
|
+
function createChangeEventDetails(reason, event, trigger, customProperties) {
|
|
6460
|
+
let canceled = false;
|
|
6461
|
+
let allowPropagation = false;
|
|
6462
|
+
const custom = customProperties ?? EMPTY_OBJECT;
|
|
6463
|
+
return {
|
|
6464
|
+
reason,
|
|
6465
|
+
event: event ?? new Event("base-ui"),
|
|
6466
|
+
cancel() {
|
|
6467
|
+
canceled = true;
|
|
6468
|
+
},
|
|
6469
|
+
allowPropagation() {
|
|
6470
|
+
allowPropagation = true;
|
|
6471
|
+
},
|
|
6472
|
+
get isCanceled() {
|
|
6473
|
+
return canceled;
|
|
6474
|
+
},
|
|
6475
|
+
get isPropagationAllowed() {
|
|
6476
|
+
return allowPropagation;
|
|
6477
|
+
},
|
|
6478
|
+
trigger,
|
|
6479
|
+
...custom
|
|
6480
|
+
};
|
|
6481
|
+
}
|
|
6482
|
+
function createGenericEventDetails(reason, event, customProperties) {
|
|
6483
|
+
const custom = customProperties ?? EMPTY_OBJECT;
|
|
6484
|
+
return {
|
|
6485
|
+
reason,
|
|
6486
|
+
event: event ?? new Event("base-ui"),
|
|
6487
|
+
...custom
|
|
6488
|
+
};
|
|
6489
|
+
}
|
|
6490
|
+
// node_modules/@base-ui/react/internals/reason-parts.mjs
|
|
6491
|
+
const none = "none";
|
|
6492
|
+
const triggerPress = "trigger-press";
|
|
6493
|
+
const triggerHover = "trigger-hover";
|
|
6494
|
+
const triggerFocus = "trigger-focus";
|
|
6495
|
+
const outsidePress = "outside-press";
|
|
6496
|
+
const itemPress = "item-press";
|
|
6497
|
+
const focusOut = "focus-out";
|
|
6498
|
+
const escapeKey = "escape-key";
|
|
6499
|
+
const listNavigation = "list-navigation";
|
|
6500
|
+
const keyboard = "keyboard";
|
|
6501
|
+
const pointer = "pointer";
|
|
6502
|
+
const cancelOpen = "cancel-open";
|
|
6503
|
+
const siblingOpen = "sibling-open";
|
|
6504
|
+
const imperativeAction = "imperative-action";
|
|
6505
|
+
const windowResize = "window-resize";
|
|
6506
|
+
// node_modules/@base-ui/react/field/control/FieldControl.mjs
|
|
6507
|
+
/**
|
|
6508
|
+
* The form control to label and validate.
|
|
6509
|
+
* Renders an `<input>` element.
|
|
6510
|
+
*
|
|
6511
|
+
* You can omit this part and use any Base UI input component instead. For example,
|
|
6512
|
+
* [Input](https://base-ui.com/react/components/input), [Checkbox](https://base-ui.com/react/components/checkbox),
|
|
6513
|
+
* or [Select](https://base-ui.com/react/components/select), among others, will work with Field out of the box.
|
|
6514
|
+
*
|
|
6515
|
+
* Documentation: [Base UI Field](https://base-ui.com/react/components/field)
|
|
6516
|
+
*/
|
|
6517
|
+
const FieldControl = /*#__PURE__*/ react.forwardRef(function FieldControl(componentProps, forwardedRef) {
|
|
6518
|
+
const { render, className, id: idProp, name: nameProp, value, disabled: disabledProp = false, onValueChange, defaultValue, autoFocus = false, style, ...elementProps } = componentProps;
|
|
6519
|
+
const { state: fieldState, name: fieldName, disabled: fieldDisabled, setTouched, setDirty, validityData, setFilled, validationMode, validation } = useFieldRootContext();
|
|
6520
|
+
const { clearErrors, elementRef: formElementRef, submitCountRef } = useFormContext();
|
|
6521
|
+
const disabled = fieldDisabled || disabledProp;
|
|
6522
|
+
const name = fieldName ?? nameProp;
|
|
6523
|
+
const state = {
|
|
6524
|
+
...fieldState,
|
|
6525
|
+
disabled
|
|
6526
|
+
};
|
|
6527
|
+
const { labelId } = useLabelableContext();
|
|
6528
|
+
const id = useLabelableId({ id: idProp });
|
|
6529
|
+
const isControlled = value !== void 0;
|
|
6530
|
+
const serializedValue = value == null ? void 0 : String(value);
|
|
6531
|
+
const getValueFromInput = useStableCallback(() => validation.inputRef.current?.value);
|
|
6532
|
+
useRegisterFieldControl(validation.inputRef, id, serializedValue, getValueFromInput, !disabled, nameProp);
|
|
6533
|
+
useIsoLayoutEffect(() => {
|
|
6534
|
+
const currentValue = serializedValue ?? validation.inputRef.current?.value;
|
|
6535
|
+
if (currentValue !== void 0) setFilled(currentValue !== "");
|
|
6536
|
+
}, [
|
|
6537
|
+
serializedValue,
|
|
6538
|
+
defaultValue,
|
|
6539
|
+
validation.inputRef,
|
|
6540
|
+
setFilled
|
|
6541
|
+
]);
|
|
6542
|
+
useValueChanged(serializedValue, () => {
|
|
6543
|
+
if (serializedValue === void 0) return;
|
|
6544
|
+
clearErrors(name);
|
|
6545
|
+
setDirty(serializedValue !== (validityData.initialValue ?? ""));
|
|
6546
|
+
validation.change(serializedValue);
|
|
6547
|
+
});
|
|
6548
|
+
const inputRef = react.useRef(null);
|
|
6549
|
+
const setFocused = useSetFieldFocused(disabled, inputRef);
|
|
6550
|
+
const enterValidationTimeout = useTimeout();
|
|
6551
|
+
return useRenderElement("input", componentProps, {
|
|
6552
|
+
ref: [forwardedRef, inputRef],
|
|
6553
|
+
state,
|
|
6554
|
+
props: [
|
|
6555
|
+
{
|
|
6556
|
+
id,
|
|
6557
|
+
disabled,
|
|
6558
|
+
name,
|
|
6559
|
+
ref: validation.inputRef,
|
|
6560
|
+
"aria-labelledby": labelId,
|
|
6561
|
+
autoFocus,
|
|
6562
|
+
...isControlled ? { value } : { defaultValue },
|
|
6563
|
+
onChange(event) {
|
|
6564
|
+
const inputValue = event.currentTarget.value;
|
|
6565
|
+
const details = createChangeEventDetails(none, event.nativeEvent);
|
|
6566
|
+
onValueChange?.(inputValue, details);
|
|
6567
|
+
if (isControlled) return;
|
|
6568
|
+
setDirty(inputValue !== (validityData.initialValue ?? ""));
|
|
6569
|
+
setFilled(inputValue !== "");
|
|
6570
|
+
if (!event.nativeEvent.defaultPrevented && !details.isCanceled) {
|
|
6571
|
+
clearErrors(name);
|
|
6572
|
+
validation.change(inputValue);
|
|
6573
|
+
}
|
|
6574
|
+
},
|
|
6575
|
+
onFocus() {
|
|
6576
|
+
setFocused(true);
|
|
6577
|
+
},
|
|
6578
|
+
onBlur(event) {
|
|
6579
|
+
setTouched(true);
|
|
6580
|
+
setFocused(false);
|
|
6581
|
+
if (validationMode === "onBlur") {
|
|
6582
|
+
const inputValue = event.currentTarget.value;
|
|
6583
|
+
validation.commit(inputValue);
|
|
6584
|
+
if (isControlled) queueMicrotask(() => {
|
|
6585
|
+
const nextValue = validation.inputRef.current?.value;
|
|
6586
|
+
if (nextValue !== void 0 && nextValue !== inputValue && nextValue !== (validityData.initialValue ?? "")) validation.commit(nextValue);
|
|
6587
|
+
});
|
|
6588
|
+
}
|
|
6589
|
+
},
|
|
6590
|
+
onKeyDown(event) {
|
|
6591
|
+
if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
|
|
6592
|
+
setTouched(true);
|
|
6593
|
+
const value = event.currentTarget.value;
|
|
6594
|
+
const form = event.currentTarget.form;
|
|
6595
|
+
if (form && form === formElementRef.current && !event.defaultPrevented) {
|
|
6596
|
+
const input = event.currentTarget;
|
|
6597
|
+
const submitCount = submitCountRef.current;
|
|
6598
|
+
enterValidationTimeout.start(0, () => {
|
|
6599
|
+
if (submitCountRef.current === submitCount) validation.commit(input.value);
|
|
6600
|
+
});
|
|
6601
|
+
} else validation.commit(value);
|
|
6602
|
+
}
|
|
6603
|
+
}
|
|
6604
|
+
},
|
|
6605
|
+
elementProps,
|
|
6606
|
+
(props) => validation.getValidationProps(disabled, props)
|
|
6607
|
+
],
|
|
6608
|
+
stateAttributesMapping: fieldValidityMapping
|
|
6609
|
+
});
|
|
6610
|
+
});
|
|
6611
|
+
FieldControl.displayName = "FieldControl";
|
|
6612
|
+
// node_modules/@base-ui/react/input/Input.mjs
|
|
6613
|
+
/**
|
|
6614
|
+
* A native input element that automatically works with [Field](https://base-ui.com/react/components/field).
|
|
6615
|
+
* Renders an `<input>` element.
|
|
6616
|
+
*
|
|
6617
|
+
* Documentation: [Base UI Input](https://base-ui.com/react/components/input)
|
|
6618
|
+
*/
|
|
6619
|
+
const Input$1 = /*#__PURE__*/ react.forwardRef(function Input(props, forwardedRef) {
|
|
6620
|
+
return /*#__PURE__*/ (0, react_jsx_runtime.jsx)(FieldControl, {
|
|
6621
|
+
ref: forwardedRef,
|
|
6622
|
+
...props
|
|
6623
|
+
});
|
|
6624
|
+
});
|
|
6625
|
+
Input$1.displayName = "Input";
|
|
6626
|
+
// client/ui/input.tsx
|
|
6627
|
+
function Input({ className, ...props }) {
|
|
6628
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input$1, {
|
|
6629
|
+
className: cn("cp:h-8 cp:min-w-0 cp:w-full cp:rounded-md cp:border cp:border-solid cp:border-input cp:bg-background cp:px-2.5 cp:text-sm cp:text-foreground cp:placeholder:text-muted-foreground cp:focus-visible:outline-none cp:focus-visible:ring-2 cp:focus-visible:ring-ring cp:disabled:opacity-50", className),
|
|
6630
|
+
...props
|
|
6631
|
+
});
|
|
6632
|
+
}
|
|
6633
|
+
// node_modules/@base-ui/utils/visuallyHidden.mjs
|
|
6634
|
+
const visuallyHiddenBase = {
|
|
6635
|
+
clipPath: "inset(50%)",
|
|
6636
|
+
overflow: "hidden",
|
|
6637
|
+
whiteSpace: "nowrap",
|
|
6638
|
+
border: 0,
|
|
6639
|
+
padding: 0,
|
|
6640
|
+
width: 1,
|
|
6641
|
+
height: 1,
|
|
6642
|
+
margin: -1
|
|
6643
|
+
};
|
|
6644
|
+
const visuallyHidden = {
|
|
6645
|
+
...visuallyHiddenBase,
|
|
6646
|
+
position: "fixed",
|
|
6647
|
+
margin: 0,
|
|
6648
|
+
top: 0,
|
|
6649
|
+
left: 0
|
|
6650
|
+
};
|
|
6651
|
+
const visuallyHiddenInput = {
|
|
6652
|
+
...visuallyHiddenBase,
|
|
6653
|
+
position: "absolute"
|
|
6654
|
+
};
|
|
6655
|
+
// node_modules/@base-ui/utils/useOnFirstRender.mjs
|
|
6656
|
+
function useOnFirstRender(fn) {
|
|
6657
|
+
const ref = react.useRef(true);
|
|
6658
|
+
if (ref.current) {
|
|
6659
|
+
ref.current = false;
|
|
6660
|
+
fn();
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
// node_modules/@base-ui/utils/usePreviousValue.mjs
|
|
6664
|
+
/**
|
|
6665
|
+
* Returns a previous value of its argument.
|
|
6666
|
+
* @param value Current value.
|
|
6667
|
+
* @returns Previous value, or null if there is no previous value.
|
|
6668
|
+
*/
|
|
6669
|
+
function usePreviousValue(value) {
|
|
6670
|
+
const [state, setState] = react.useState({
|
|
6671
|
+
current: value,
|
|
6672
|
+
previous: null
|
|
6673
|
+
});
|
|
6674
|
+
if (!Object.is(value, state.current)) setState({
|
|
6675
|
+
current: value,
|
|
6676
|
+
previous: state.current
|
|
6677
|
+
});
|
|
6678
|
+
return state.previous;
|
|
6679
|
+
}
|
|
6680
|
+
// node_modules/@base-ui/utils/isElementDisabled.mjs
|
|
6681
|
+
function isElementDisabled(element) {
|
|
6682
|
+
return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
|
|
6683
|
+
}
|
|
6684
|
+
// node_modules/@base-ui/utils/useControlled.mjs
|
|
6685
|
+
function useControlled({ controlled, default: defaultProp, name, state = "value" }) {
|
|
6686
|
+
const { current: isControlled } = react.useRef(controlled !== void 0);
|
|
6687
|
+
const [valueState, setValue] = react.useState(() => defaultProp);
|
|
6688
|
+
const value = isControlled && controlled !== void 0 ? controlled : valueState;
|
|
6689
|
+
{
|
|
6690
|
+
react.useEffect(() => {
|
|
6691
|
+
if (isControlled !== (controlled !== void 0)) error([
|
|
6692
|
+
`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`,
|
|
6693
|
+
"Elements should not switch from uncontrolled to controlled (or vice versa).",
|
|
6694
|
+
`Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`,
|
|
6695
|
+
"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",
|
|
6696
|
+
"More info: https://fb.me/react-controlled-components"
|
|
6697
|
+
].join("\n"));
|
|
6698
|
+
}, [
|
|
6699
|
+
state,
|
|
6700
|
+
name,
|
|
6701
|
+
controlled
|
|
6702
|
+
]);
|
|
6703
|
+
const { current: defaultValue } = react.useRef(defaultProp);
|
|
6704
|
+
react.useEffect(() => {
|
|
6705
|
+
if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) error([`A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
|
|
6706
|
+
}, [defaultProp]);
|
|
6707
|
+
}
|
|
6708
|
+
return [value, react.useCallback((newValue) => {
|
|
6709
|
+
if (!isControlled) setValue(newValue);
|
|
6710
|
+
}, [])];
|
|
6711
|
+
}
|
|
6712
|
+
function serializeToDevModeString(input) {
|
|
6713
|
+
let nextId = 0;
|
|
6714
|
+
const seen = /* @__PURE__ */ new WeakMap();
|
|
6715
|
+
try {
|
|
6716
|
+
return JSON.stringify(input, function replacer(key, value) {
|
|
6717
|
+
if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) return;
|
|
6718
|
+
if (typeof value === "bigint") return `__bigint__:${value}`;
|
|
6719
|
+
if (value !== null && typeof value === "object") {
|
|
6720
|
+
const id = seen.get(value);
|
|
6721
|
+
if (id !== void 0) return `__object__:${id}`;
|
|
6722
|
+
seen.set(value, nextId);
|
|
6723
|
+
nextId += 1;
|
|
6724
|
+
}
|
|
6725
|
+
return value;
|
|
6726
|
+
}) ?? `__top__:${typeof input}`;
|
|
6727
|
+
} catch {
|
|
6728
|
+
return "__unserializable__";
|
|
6729
|
+
}
|
|
6730
|
+
}
|
|
6731
|
+
// node_modules/@base-ui/utils/useValueAsRef.mjs
|
|
6732
|
+
/**
|
|
6733
|
+
* Untracks the provided value by turning it into a ref to remove its reactivity.
|
|
6734
|
+
*
|
|
6735
|
+
* Used to access the passed value inside `React.useEffect` without causing the effect to re-run when the value changes.
|
|
6736
|
+
*/
|
|
6737
|
+
function useValueAsRef(value) {
|
|
6738
|
+
const latest = useRefWithInit(createLatestRef, value).current;
|
|
6739
|
+
latest.next = value;
|
|
6740
|
+
useIsoLayoutEffect(latest.effect);
|
|
6741
|
+
return latest;
|
|
6742
|
+
}
|
|
6743
|
+
function createLatestRef(value) {
|
|
6744
|
+
const latest = {
|
|
6745
|
+
current: value,
|
|
6746
|
+
next: value,
|
|
6747
|
+
effect: () => {
|
|
6748
|
+
latest.current = latest.next;
|
|
6749
|
+
}
|
|
6750
|
+
};
|
|
6751
|
+
return latest;
|
|
6752
|
+
}
|
|
6753
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
6754
|
+
/**
|
|
6755
|
+
* @license React
|
|
6756
|
+
* use-sync-external-store-shim.development.js
|
|
6757
|
+
*
|
|
6758
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6759
|
+
*
|
|
6760
|
+
* This source code is licensed under the MIT license found in the
|
|
6761
|
+
* LICENSE file in the root directory of this source tree.
|
|
6762
|
+
*/
|
|
6763
|
+
var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6764
|
+
(function() {
|
|
6765
|
+
function is(x, y) {
|
|
6766
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
6767
|
+
}
|
|
6768
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
6769
|
+
didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
6770
|
+
var value = getSnapshot();
|
|
6771
|
+
if (!didWarnUncachedGetSnapshot) {
|
|
6772
|
+
var cachedValue = getSnapshot();
|
|
6773
|
+
objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
|
|
6774
|
+
}
|
|
6775
|
+
cachedValue = useState({ inst: {
|
|
6776
|
+
value,
|
|
6777
|
+
getSnapshot
|
|
6778
|
+
} });
|
|
6779
|
+
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
6780
|
+
useLayoutEffect(function() {
|
|
6781
|
+
inst.value = value;
|
|
6782
|
+
inst.getSnapshot = getSnapshot;
|
|
6783
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
6784
|
+
}, [
|
|
6785
|
+
subscribe,
|
|
6786
|
+
value,
|
|
6787
|
+
getSnapshot
|
|
6788
|
+
]);
|
|
6789
|
+
useEffect(function() {
|
|
6790
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
6791
|
+
return subscribe(function() {
|
|
6792
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
6793
|
+
});
|
|
6794
|
+
}, [subscribe]);
|
|
6795
|
+
useDebugValue(value);
|
|
6796
|
+
return value;
|
|
6797
|
+
}
|
|
6798
|
+
function checkIfSnapshotChanged(inst) {
|
|
6799
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
6800
|
+
inst = inst.value;
|
|
6801
|
+
try {
|
|
6802
|
+
var nextValue = latestGetSnapshot();
|
|
6803
|
+
return !objectIs(inst, nextValue);
|
|
6804
|
+
} catch (error) {
|
|
6805
|
+
return !0;
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
6809
|
+
return getSnapshot();
|
|
6810
|
+
}
|
|
6811
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
6812
|
+
var React = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
6813
|
+
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
6814
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
6815
|
+
})();
|
|
6816
|
+
}));
|
|
6817
|
+
// node_modules/use-sync-external-store/shim/index.js
|
|
6818
|
+
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6819
|
+
module.exports = require_use_sync_external_store_shim_development();
|
|
6820
|
+
}));
|
|
6821
|
+
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
|
|
6822
|
+
/**
|
|
6823
|
+
* @license React
|
|
6824
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
6825
|
+
*
|
|
6826
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6827
|
+
*
|
|
6828
|
+
* This source code is licensed under the MIT license found in the
|
|
6829
|
+
* LICENSE file in the root directory of this source tree.
|
|
6830
|
+
*/
|
|
6831
|
+
var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6832
|
+
(function() {
|
|
6833
|
+
function is(x, y) {
|
|
6834
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
6835
|
+
}
|
|
6836
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
6837
|
+
var React = require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
6838
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
6839
|
+
var instRef = useRef(null);
|
|
6840
|
+
if (null === instRef.current) {
|
|
6841
|
+
var inst = {
|
|
6842
|
+
hasValue: !1,
|
|
6843
|
+
value: null
|
|
6844
|
+
};
|
|
6845
|
+
instRef.current = inst;
|
|
6846
|
+
} else inst = instRef.current;
|
|
6847
|
+
instRef = useMemo(function() {
|
|
6848
|
+
function memoizedSelector(nextSnapshot) {
|
|
6849
|
+
if (!hasMemo) {
|
|
6850
|
+
hasMemo = !0;
|
|
6851
|
+
memoizedSnapshot = nextSnapshot;
|
|
6852
|
+
nextSnapshot = selector(nextSnapshot);
|
|
6853
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
6854
|
+
var currentSelection = inst.value;
|
|
6855
|
+
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
6856
|
+
}
|
|
6857
|
+
return memoizedSelection = nextSnapshot;
|
|
6858
|
+
}
|
|
6859
|
+
currentSelection = memoizedSelection;
|
|
6860
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
6861
|
+
var nextSelection = selector(nextSnapshot);
|
|
6862
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
6863
|
+
memoizedSnapshot = nextSnapshot;
|
|
6864
|
+
return memoizedSelection = nextSelection;
|
|
6865
|
+
}
|
|
6866
|
+
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
6867
|
+
return [function() {
|
|
6868
|
+
return memoizedSelector(getSnapshot());
|
|
6869
|
+
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
6870
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
6871
|
+
}];
|
|
6872
|
+
}, [
|
|
6873
|
+
getSnapshot,
|
|
6874
|
+
getServerSnapshot,
|
|
6875
|
+
selector,
|
|
6876
|
+
isEqual
|
|
6877
|
+
]);
|
|
6878
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
6879
|
+
useEffect(function() {
|
|
6880
|
+
inst.hasValue = !0;
|
|
6881
|
+
inst.value = value;
|
|
6882
|
+
}, [value]);
|
|
6883
|
+
useDebugValue(value);
|
|
6884
|
+
return value;
|
|
6885
|
+
};
|
|
6886
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
6887
|
+
})();
|
|
6888
|
+
}));
|
|
6889
|
+
// node_modules/use-sync-external-store/shim/with-selector.js
|
|
6890
|
+
var require_with_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6891
|
+
module.exports = require_with_selector_development();
|
|
6892
|
+
}));
|
|
6893
|
+
// node_modules/@base-ui/utils/fastHooks.mjs
|
|
6894
|
+
const hooks = [];
|
|
6895
|
+
let currentInstance = void 0;
|
|
6896
|
+
function getInstance() {
|
|
6897
|
+
return currentInstance;
|
|
6898
|
+
}
|
|
6899
|
+
function register(hook) {
|
|
6900
|
+
hooks.push(hook);
|
|
6901
|
+
}
|
|
6902
|
+
/**
|
|
6903
|
+
* Wraps a component function to enable performance optimizations for internal hooks.
|
|
6904
|
+
*
|
|
6905
|
+
* **Performance Optimization:**
|
|
6906
|
+
* Components wrapped with `fastComponent` have access to a shared "instance" context that enables
|
|
6907
|
+
* specialized hook implementations to batch operations and reduce overhead. The wrapper creates a
|
|
6908
|
+
* stable instance object that persists across renders, sets it as the current context, calls
|
|
6909
|
+
* registered hooks before and after rendering, then clears the context. The primary benefit is
|
|
6910
|
+
* with `useStore`, where multiple store subscriptions within the same component are collapsed into
|
|
6911
|
+
* a single `useSyncExternalStore` subscription per store, significantly reducing re-render overhead.
|
|
6912
|
+
* This optimization is only active on React 19+; on earlier versions `useStore` falls back to a
|
|
6913
|
+
* separate subscription per call.
|
|
6914
|
+
*
|
|
6915
|
+
* **Requirements:**
|
|
6916
|
+
* - The component function should follow standard React component patterns
|
|
6917
|
+
* - `useStore` calls must keep a stable order and count across renders, as batched hooks are
|
|
6918
|
+
* matched by call index
|
|
6919
|
+
* - Do not rely on the instance context outside of specialized hooks
|
|
6920
|
+
*
|
|
6921
|
+
* @param fn - The component function to wrap
|
|
6922
|
+
* @returns A wrapped component with the same signature as the input function
|
|
6923
|
+
*
|
|
6924
|
+
* @example
|
|
6925
|
+
* ```tsx
|
|
6926
|
+
* // Wrapping a component to enable optimized useStore batching
|
|
6927
|
+
* export const TooltipRoot = fastComponent(function TooltipRoot(props) {
|
|
6928
|
+
* // These useStore calls share a single subscription
|
|
6929
|
+
* const open = useStore(store, (state) => state.open);
|
|
6930
|
+
* const disabled = useStore(store, (state) => state.disabled);
|
|
6931
|
+
* const value = useStore(store, (state) => state.value);
|
|
6932
|
+
* // ...
|
|
6933
|
+
* });
|
|
6934
|
+
* ```
|
|
6935
|
+
*/
|
|
6936
|
+
function fastComponent(fn) {
|
|
6937
|
+
const FastComponent = (props, forwardedRef) => {
|
|
6938
|
+
const instance = useRefWithInit(createInstance).current;
|
|
6939
|
+
let result;
|
|
6940
|
+
try {
|
|
6941
|
+
currentInstance = instance;
|
|
6942
|
+
for (const hook of hooks) hook.before(instance);
|
|
6943
|
+
result = fn(props, forwardedRef);
|
|
6944
|
+
for (const hook of hooks) hook.after(instance);
|
|
6945
|
+
instance.didInitialize = true;
|
|
6946
|
+
} finally {
|
|
6947
|
+
currentInstance = void 0;
|
|
6948
|
+
}
|
|
6949
|
+
return result;
|
|
6950
|
+
};
|
|
6951
|
+
FastComponent.displayName = fn.displayName || fn.name;
|
|
6952
|
+
return FastComponent;
|
|
6953
|
+
}
|
|
6954
|
+
/**
|
|
6955
|
+
* Wraps a component function with ref forwarding to enable performance optimizations for internal hooks.
|
|
6956
|
+
*
|
|
6957
|
+
* This is a convenience wrapper that combines `fastComponent` with `React.forwardRef`, enabling
|
|
6958
|
+
* both performance optimizations and proper ref forwarding. See `fastComponent` for details on
|
|
6959
|
+
* the performance benefits.
|
|
6960
|
+
*
|
|
6961
|
+
* @param fn - The component function that accepts props and a forwarded ref
|
|
6962
|
+
* @returns A wrapped component with ref forwarding enabled
|
|
6963
|
+
*
|
|
6964
|
+
* @example
|
|
6965
|
+
* ```tsx
|
|
6966
|
+
* // Wrapping a component with ref forwarding and optimized hooks
|
|
6967
|
+
* export const TooltipTrigger = fastComponentRef(function TooltipTrigger(
|
|
6968
|
+
* props,
|
|
6969
|
+
* forwardedRef
|
|
6970
|
+
* ) {
|
|
6971
|
+
* const store = useContext(TooltipContext);
|
|
6972
|
+
* const open = useStore(store, (state) => state.open);
|
|
6973
|
+
* // ... component logic with ref
|
|
6974
|
+
* return <button ref={forwardedRef} {...props} />;
|
|
6975
|
+
* });
|
|
6976
|
+
* ```
|
|
6977
|
+
*/
|
|
6978
|
+
function fastComponentRef(fn) {
|
|
6979
|
+
return /*#__PURE__*/ react.forwardRef(fastComponent(fn));
|
|
6980
|
+
}
|
|
6981
|
+
function createInstance() {
|
|
6982
|
+
return { didInitialize: false };
|
|
6983
|
+
}
|
|
6984
|
+
// node_modules/@base-ui/utils/store/useStore.mjs
|
|
6985
|
+
var import_shim = require_shim();
|
|
6986
|
+
var import_with_selector = require_with_selector();
|
|
6987
|
+
const useStoreImplementation = isReactVersionAtLeast(19) ? useStoreFast : useStoreLegacy;
|
|
6988
|
+
function useStore(store, selector, a1, a2, a3) {
|
|
6989
|
+
return useStoreImplementation(store, selector, a1, a2, a3);
|
|
6990
|
+
}
|
|
6991
|
+
function useStoreR19(store, selector, a1, a2, a3) {
|
|
6992
|
+
const getSelection = react.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [
|
|
6993
|
+
store,
|
|
6994
|
+
selector,
|
|
6995
|
+
a1,
|
|
6996
|
+
a2,
|
|
6997
|
+
a3
|
|
6998
|
+
]);
|
|
6999
|
+
return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection);
|
|
7000
|
+
}
|
|
7001
|
+
register({
|
|
7002
|
+
before(instance) {
|
|
7003
|
+
instance.syncIndex = 0;
|
|
7004
|
+
if (!instance.didInitialize) {
|
|
7005
|
+
instance.syncTick = 1;
|
|
7006
|
+
instance.syncHooks = [];
|
|
7007
|
+
instance.didChangeStore = true;
|
|
7008
|
+
instance.getSnapshot = () => {
|
|
7009
|
+
let didChange = false;
|
|
7010
|
+
for (let i = 0; i < instance.syncHooks.length; i += 1) {
|
|
7011
|
+
const hook = instance.syncHooks[i];
|
|
7012
|
+
const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);
|
|
7013
|
+
if (!Object.is(hook.value, value)) {
|
|
7014
|
+
didChange = true;
|
|
7015
|
+
hook.value = value;
|
|
7016
|
+
}
|
|
7017
|
+
}
|
|
7018
|
+
if (didChange) instance.syncTick += 1;
|
|
7019
|
+
return instance.syncTick;
|
|
7020
|
+
};
|
|
7021
|
+
}
|
|
7022
|
+
},
|
|
7023
|
+
after(instance) {
|
|
7024
|
+
if (instance.syncHooks.length > 0) {
|
|
7025
|
+
if (instance.didChangeStore) {
|
|
7026
|
+
instance.didChangeStore = false;
|
|
7027
|
+
instance.subscribe = (onStoreChange) => {
|
|
7028
|
+
const stores = /* @__PURE__ */ new Set();
|
|
7029
|
+
for (const hook of instance.syncHooks) stores.add(hook.store);
|
|
7030
|
+
const unsubscribes = [];
|
|
7031
|
+
for (const store of stores) unsubscribes.push(store.subscribe(onStoreChange));
|
|
7032
|
+
return () => {
|
|
7033
|
+
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
7034
|
+
};
|
|
7035
|
+
};
|
|
7036
|
+
}
|
|
7037
|
+
(0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot);
|
|
7038
|
+
}
|
|
7039
|
+
}
|
|
7040
|
+
});
|
|
7041
|
+
function useStoreFast(store, selector, a1, a2, a3) {
|
|
7042
|
+
const instance = getInstance();
|
|
7043
|
+
if (!instance) return useStoreR19(store, selector, a1, a2, a3);
|
|
7044
|
+
const index = instance.syncIndex;
|
|
7045
|
+
instance.syncIndex += 1;
|
|
7046
|
+
let hook;
|
|
7047
|
+
if (!instance.didInitialize) {
|
|
7048
|
+
hook = {
|
|
7049
|
+
store,
|
|
7050
|
+
selector,
|
|
7051
|
+
a1,
|
|
7052
|
+
a2,
|
|
7053
|
+
a3,
|
|
7054
|
+
value: selector(store.getSnapshot(), a1, a2, a3)
|
|
7055
|
+
};
|
|
7056
|
+
instance.syncHooks.push(hook);
|
|
7057
|
+
} else {
|
|
7058
|
+
hook = instance.syncHooks[index];
|
|
7059
|
+
if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {
|
|
7060
|
+
if (hook.store !== store) instance.didChangeStore = true;
|
|
7061
|
+
hook.store = store;
|
|
7062
|
+
hook.selector = selector;
|
|
7063
|
+
hook.a1 = a1;
|
|
7064
|
+
hook.a2 = a2;
|
|
7065
|
+
hook.a3 = a3;
|
|
7066
|
+
hook.value = selector(store.getSnapshot(), a1, a2, a3);
|
|
7067
|
+
}
|
|
7068
|
+
}
|
|
7069
|
+
return hook.value;
|
|
7070
|
+
}
|
|
7071
|
+
function useStoreLegacy(store, selector, a1, a2, a3) {
|
|
7072
|
+
return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3));
|
|
7073
|
+
}
|
|
7074
|
+
// node_modules/@base-ui/utils/store/Store.mjs
|
|
7075
|
+
/**
|
|
7076
|
+
* A data store implementation that allows subscribing to state changes and updating the state.
|
|
7077
|
+
* It uses an observer pattern to notify subscribers when the state changes.
|
|
7078
|
+
*/
|
|
7079
|
+
var Store = class {
|
|
7080
|
+
/**
|
|
7081
|
+
* Creates a store with the given initial state, constructing the class it is called on.
|
|
7082
|
+
* Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that
|
|
7083
|
+
* class but degrades the inferred instance type to `Store`; use `new` there instead.
|
|
7084
|
+
*/
|
|
7085
|
+
static create(state) {
|
|
7086
|
+
return new this(state);
|
|
7087
|
+
}
|
|
7088
|
+
/**
|
|
7089
|
+
* The current state of the store.
|
|
7090
|
+
* This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
|
|
7091
|
+
* To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
|
|
7092
|
+
* The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
|
|
7093
|
+
*
|
|
7094
|
+
* Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
|
|
7095
|
+
*/
|
|
7096
|
+
constructor(state) {
|
|
7097
|
+
this.state = state;
|
|
7098
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
7099
|
+
this.updateTick = 0;
|
|
7100
|
+
}
|
|
7101
|
+
/**
|
|
7102
|
+
* Registers a listener that will be called whenever the store's state changes.
|
|
7103
|
+
*
|
|
7104
|
+
* @param fn The listener function to be called on state changes.
|
|
7105
|
+
* @returns A function to unsubscribe the listener.
|
|
7106
|
+
*/
|
|
7107
|
+
subscribe = (fn) => {
|
|
7108
|
+
this.listeners.add(fn);
|
|
7109
|
+
return () => {
|
|
7110
|
+
this.listeners.delete(fn);
|
|
7111
|
+
};
|
|
7112
|
+
};
|
|
7113
|
+
/**
|
|
7114
|
+
* Returns the current state of the store.
|
|
7115
|
+
*/
|
|
7116
|
+
getSnapshot = () => {
|
|
7117
|
+
return this.state;
|
|
7118
|
+
};
|
|
7119
|
+
/**
|
|
7120
|
+
* Updates the entire store's state and notifies all registered listeners.
|
|
7121
|
+
*
|
|
7122
|
+
* @param newState The new state to set for the store.
|
|
7123
|
+
*/
|
|
7124
|
+
setState(newState) {
|
|
7125
|
+
if (this.state === newState) return;
|
|
7126
|
+
this.state = newState;
|
|
7127
|
+
this.updateTick += 1;
|
|
7128
|
+
const currentTick = this.updateTick;
|
|
7129
|
+
for (const listener of this.listeners) {
|
|
7130
|
+
if (currentTick !== this.updateTick) return;
|
|
7131
|
+
listener(newState);
|
|
7132
|
+
}
|
|
7133
|
+
}
|
|
7134
|
+
/**
|
|
7135
|
+
* Merges the provided changes into the current state and notifies listeners if there are changes.
|
|
7136
|
+
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
7137
|
+
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
7138
|
+
*
|
|
7139
|
+
* @param changes An object containing the changes to apply to the current state.
|
|
7140
|
+
*/
|
|
7141
|
+
update(changes) {
|
|
7142
|
+
for (const key in changes) if (!Object.is(this.state[key], changes[key])) {
|
|
7143
|
+
this.setState({
|
|
7144
|
+
...this.state,
|
|
7145
|
+
...changes
|
|
7146
|
+
});
|
|
7147
|
+
return;
|
|
7148
|
+
}
|
|
7149
|
+
}
|
|
7150
|
+
/**
|
|
7151
|
+
* Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
|
|
7152
|
+
*
|
|
7153
|
+
* @param key The key in the store's state to update.
|
|
7154
|
+
* @param value The new value to set for the specified key.
|
|
7155
|
+
*/
|
|
7156
|
+
set(key, value) {
|
|
7157
|
+
if (!Object.is(this.state[key], value)) this.setState({
|
|
7158
|
+
...this.state,
|
|
7159
|
+
[key]: value
|
|
7160
|
+
});
|
|
7161
|
+
}
|
|
7162
|
+
/**
|
|
7163
|
+
* Gives the state a new reference and updates all registered listeners.
|
|
7164
|
+
*/
|
|
7165
|
+
notifyAll() {
|
|
7166
|
+
const newState = { ...this.state };
|
|
7167
|
+
this.setState(newState);
|
|
7168
|
+
}
|
|
7169
|
+
use(selector, a1, a2, a3) {
|
|
7170
|
+
return useStore(this, selector, a1, a2, a3);
|
|
7171
|
+
}
|
|
7172
|
+
};
|
|
7173
|
+
// node_modules/@base-ui/utils/store/ReactStore.mjs
|
|
7174
|
+
/**
|
|
7175
|
+
* A Store that supports controlled state keys, non-reactive values and provides utility methods for React.
|
|
7176
|
+
*/
|
|
7177
|
+
var ReactStore = class extends Store {
|
|
7178
|
+
/**
|
|
7179
|
+
* Creates a new ReactStore instance.
|
|
7180
|
+
*
|
|
7181
|
+
* @param state Initial state of the store.
|
|
7182
|
+
* @param context Non-reactive context values.
|
|
7183
|
+
* @param selectors Optional selectors for use with `useState`.
|
|
7184
|
+
*/
|
|
7185
|
+
constructor(state, context = {}, selectors) {
|
|
7186
|
+
super(state);
|
|
7187
|
+
this.context = context;
|
|
7188
|
+
this.selectors = selectors;
|
|
7189
|
+
}
|
|
7190
|
+
/**
|
|
7191
|
+
* Non-reactive values such as refs, callbacks, etc.
|
|
7192
|
+
*/
|
|
7193
|
+
/**
|
|
7194
|
+
* Synchronizes a single external value into the store.
|
|
7195
|
+
*
|
|
7196
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
7197
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
7198
|
+
*/
|
|
7199
|
+
useSyncedValue(key, value) {
|
|
7200
|
+
react.useDebugValue(key);
|
|
7201
|
+
const store = this;
|
|
7202
|
+
useIsoLayoutEffect(() => {
|
|
7203
|
+
if (store.state[key] !== value) store.set(key, value);
|
|
7204
|
+
}, [
|
|
7205
|
+
store,
|
|
7206
|
+
key,
|
|
7207
|
+
value
|
|
7208
|
+
]);
|
|
7209
|
+
}
|
|
7210
|
+
/**
|
|
7211
|
+
* Synchronizes a single external value into the store and
|
|
7212
|
+
* cleans it up (sets to `undefined`) on unmount.
|
|
7213
|
+
*
|
|
7214
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
7215
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
7216
|
+
*/
|
|
7217
|
+
useSyncedValueWithCleanup(key, value) {
|
|
7218
|
+
const store = this;
|
|
7219
|
+
useIsoLayoutEffect(() => {
|
|
7220
|
+
if (store.state[key] !== value) store.set(key, value);
|
|
7221
|
+
return () => {
|
|
7222
|
+
store.set(key, void 0);
|
|
7223
|
+
};
|
|
7224
|
+
}, [
|
|
7225
|
+
store,
|
|
7226
|
+
key,
|
|
7227
|
+
value
|
|
7228
|
+
]);
|
|
7229
|
+
}
|
|
7230
|
+
/**
|
|
7231
|
+
* Synchronizes multiple external values into the store.
|
|
7232
|
+
* Each value must match its state key. Pass an exact known subset rather than a broad
|
|
7233
|
+
* `Partial<State>`, which may contain `undefined` for required state fields.
|
|
7234
|
+
*
|
|
7235
|
+
* Note that the while the values in `state` are updated immediately, the values returned
|
|
7236
|
+
* by `useState` are updated before the next render (similarly to React's `useState`).
|
|
7237
|
+
*
|
|
7238
|
+
* @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted.
|
|
7239
|
+
*/
|
|
7240
|
+
useSyncedValues(statePart) {
|
|
7241
|
+
const store = this;
|
|
7242
|
+
{
|
|
7243
|
+
react.useDebugValue(statePart, (p) => Object.keys(p));
|
|
7244
|
+
const keys = react.useRef(Object.keys(statePart)).current;
|
|
7245
|
+
const nextKeys = Object.keys(statePart);
|
|
7246
|
+
if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
7247
|
+
}
|
|
7248
|
+
const dependencies = Object.values(statePart);
|
|
7249
|
+
useIsoLayoutEffect(() => {
|
|
7250
|
+
store.update(statePart);
|
|
7251
|
+
}, [store, ...dependencies]);
|
|
7252
|
+
}
|
|
7253
|
+
/**
|
|
7254
|
+
* Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
|
|
7255
|
+
* is non-undefined, the store's state at `key` is updated to match `controlled`.
|
|
7256
|
+
*/
|
|
7257
|
+
useControlledProp(key, controlled) {
|
|
7258
|
+
react.useDebugValue(key);
|
|
7259
|
+
const store = this;
|
|
7260
|
+
const isControlled = controlled !== void 0;
|
|
7261
|
+
useIsoLayoutEffect(() => {
|
|
7262
|
+
if (isControlled && !Object.is(store.state[key], controlled)) store.setState({
|
|
7263
|
+
...store.state,
|
|
7264
|
+
[key]: controlled
|
|
7265
|
+
});
|
|
7266
|
+
}, [
|
|
7267
|
+
store,
|
|
7268
|
+
key,
|
|
7269
|
+
controlled,
|
|
7270
|
+
isControlled
|
|
7271
|
+
]);
|
|
7272
|
+
{
|
|
7273
|
+
const cache = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
7274
|
+
if (!cache.has(key)) cache.set(key, isControlled);
|
|
7275
|
+
const previouslyControlled = cache.get(key);
|
|
7276
|
+
if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) console.error(`A component is changing the ${previouslyControlled ? "" : "un"}controlled state of ${key.toString()} to be ${previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
7277
|
+
}
|
|
7278
|
+
}
|
|
7279
|
+
/** Gets the current value from the store using a selector with the provided key.
|
|
7280
|
+
*
|
|
7281
|
+
* @param key Key of the selector to use.
|
|
7282
|
+
*/
|
|
7283
|
+
select(key, a1, a2, a3) {
|
|
7284
|
+
const selector = this.selectors[key];
|
|
7285
|
+
return selector(this.state, a1, a2, a3);
|
|
7286
|
+
}
|
|
7287
|
+
/**
|
|
7288
|
+
* Returns a value from the store's state using a selector function.
|
|
7289
|
+
* Used to subscribe to specific parts of the state.
|
|
7290
|
+
* This methods causes a rerender whenever the selected state changes.
|
|
7291
|
+
*
|
|
7292
|
+
* @param key Key of the selector to use.
|
|
7293
|
+
*/
|
|
7294
|
+
useState(key, a1, a2, a3) {
|
|
7295
|
+
react.useDebugValue(key);
|
|
7296
|
+
return useStore(this, this.selectors[key], a1, a2, a3);
|
|
6668
7297
|
}
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
const radio = getNamedRadioInput(candidate);
|
|
6681
|
-
return radio?.name === input.name && radio.form === input.form && radio.checked;
|
|
6682
|
-
});
|
|
6683
|
-
if (checkedRadio) return checkedRadio === input;
|
|
6684
|
-
return candidates.find((candidate) => {
|
|
6685
|
-
const radio = getNamedRadioInput(candidate);
|
|
6686
|
-
return radio?.name === input.name && radio.form === input.form;
|
|
6687
|
-
}) === input;
|
|
6688
|
-
}
|
|
6689
|
-
function getComposedChildren(container) {
|
|
6690
|
-
if (isHTMLElement(container) && getNodeName(container) === "slot") {
|
|
6691
|
-
const assignedElements = container.assignedElements({ flatten: true });
|
|
6692
|
-
if (assignedElements.length > 0) return assignedElements;
|
|
7298
|
+
/**
|
|
7299
|
+
* Wraps a function with `useStableCallback` to ensure it has a stable reference
|
|
7300
|
+
* and assigns it to the context.
|
|
7301
|
+
*
|
|
7302
|
+
* @param key Key of the event callback. Must be a function in the context.
|
|
7303
|
+
* @param fn Function to assign.
|
|
7304
|
+
*/
|
|
7305
|
+
useContextCallback(key, fn) {
|
|
7306
|
+
react.useDebugValue(key);
|
|
7307
|
+
const stableFunction = useStableCallback(fn ?? NOOP);
|
|
7308
|
+
this.context[key] = stableFunction;
|
|
6693
7309
|
}
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
7310
|
+
/**
|
|
7311
|
+
* Returns a stable setter function for a specific key in the store's state.
|
|
7312
|
+
* It's commonly used to pass as a ref callback to React elements.
|
|
7313
|
+
*
|
|
7314
|
+
* @param key Key of the state to set.
|
|
7315
|
+
*/
|
|
7316
|
+
useStateSetter(key) {
|
|
7317
|
+
const ref = react.useRef(void 0);
|
|
7318
|
+
if (ref.current === void 0) ref.current = (value) => {
|
|
7319
|
+
this.set(key, value);
|
|
7320
|
+
};
|
|
7321
|
+
return ref.current;
|
|
7322
|
+
}
|
|
7323
|
+
/**
|
|
7324
|
+
* Observes changes derived from the store's selectors and calls the listener when the selected value changes.
|
|
7325
|
+
*
|
|
7326
|
+
* @param key Key of the selector to observe.
|
|
7327
|
+
* @param listener Listener function called when the selector result changes.
|
|
7328
|
+
*/
|
|
7329
|
+
observe(selector, listener) {
|
|
7330
|
+
let selectFn;
|
|
7331
|
+
if (typeof selector === "function") selectFn = selector;
|
|
7332
|
+
else selectFn = this.selectors[selector];
|
|
7333
|
+
let prevValue = selectFn(this.state);
|
|
7334
|
+
listener(prevValue, prevValue, this);
|
|
7335
|
+
return this.subscribe((nextState) => {
|
|
7336
|
+
const nextValue = selectFn(nextState);
|
|
7337
|
+
if (!Object.is(prevValue, nextValue)) {
|
|
7338
|
+
const oldValue = prevValue;
|
|
7339
|
+
prevValue = nextValue;
|
|
7340
|
+
listener(nextValue, oldValue, this);
|
|
7341
|
+
}
|
|
7342
|
+
});
|
|
7343
|
+
}
|
|
7344
|
+
};
|
|
7345
|
+
// node_modules/@base-ui/utils/mergeCleanups.mjs
|
|
7346
|
+
/**
|
|
7347
|
+
* Combines multiple cleanup functions into a single cleanup function.
|
|
7348
|
+
*/
|
|
7349
|
+
function mergeCleanups(...cleanups) {
|
|
7350
|
+
return () => {
|
|
7351
|
+
for (let i = 0; i < cleanups.length; i += 1) {
|
|
7352
|
+
const cleanup = cleanups[i];
|
|
7353
|
+
if (cleanup) cleanup();
|
|
7354
|
+
}
|
|
7355
|
+
};
|
|
6720
7356
|
}
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
return
|
|
7357
|
+
// node_modules/@base-ui/utils/addEventListener.mjs
|
|
7358
|
+
/**
|
|
7359
|
+
* Adds an event listener and returns a cleanup function to remove it.
|
|
7360
|
+
*/
|
|
7361
|
+
function addEventListener(target, type, listener, options) {
|
|
7362
|
+
target.addEventListener(type, listener, options);
|
|
7363
|
+
return () => {
|
|
7364
|
+
target.removeEventListener(type, listener, options);
|
|
7365
|
+
};
|
|
6728
7366
|
}
|
|
6729
|
-
|
|
6730
|
-
|
|
7367
|
+
// node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs
|
|
7368
|
+
function resolveValue(value, pointerType) {
|
|
7369
|
+
if (pointerType != null && !isMouseLikePointerType(pointerType)) return 0;
|
|
7370
|
+
if (typeof value === "function") return value();
|
|
7371
|
+
return value;
|
|
6731
7372
|
}
|
|
6732
|
-
function
|
|
6733
|
-
|
|
7373
|
+
function getDelay(value, prop, pointerType) {
|
|
7374
|
+
const result = resolveValue(value, pointerType);
|
|
7375
|
+
if (typeof result === "number") return result;
|
|
7376
|
+
return result?.[prop];
|
|
6734
7377
|
}
|
|
6735
|
-
function
|
|
6736
|
-
if (
|
|
6737
|
-
|
|
6738
|
-
appendCandidates(ownerDocument(referenceElement).body, list);
|
|
6739
|
-
const index = list.indexOf(referenceElement);
|
|
6740
|
-
if (index === -1) return null;
|
|
6741
|
-
const candidates = list.filter(isFocusableElement);
|
|
6742
|
-
for (let offset = 1; offset < list.length; offset += 1) {
|
|
6743
|
-
const element = list[(index + direction * offset + list.length) % list.length];
|
|
6744
|
-
if (!contains(exclude, element) && isTabbable(element) && isTabbableRadio(element, candidates)) return element;
|
|
6745
|
-
}
|
|
6746
|
-
return list[index];
|
|
7378
|
+
function getRestMs(value) {
|
|
7379
|
+
if (typeof value === "function") return value();
|
|
7380
|
+
return value;
|
|
6747
7381
|
}
|
|
6748
|
-
function
|
|
6749
|
-
|
|
6750
|
-
const relatedTarget = event.relatedTarget;
|
|
6751
|
-
return !relatedTarget || !contains(containerElement, relatedTarget);
|
|
7382
|
+
function isClickLikeOpenEvent(openEventType, interactedInside) {
|
|
7383
|
+
return interactedInside || openEventType === "click" || openEventType === "mousedown";
|
|
6752
7384
|
}
|
|
6753
|
-
function
|
|
6754
|
-
|
|
6755
|
-
element.dataset.tabindex = element.getAttribute("tabindex") || "";
|
|
6756
|
-
element.setAttribute("tabindex", "-1");
|
|
6757
|
-
});
|
|
7385
|
+
function isHoverOpenEvent(openEventType) {
|
|
7386
|
+
return openEventType?.includes("mouse") && openEventType !== "mousedown";
|
|
6758
7387
|
}
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
7388
|
+
// node_modules/@base-ui/react/utils/FocusGuard.mjs
|
|
7389
|
+
/**
|
|
7390
|
+
* @internal
|
|
7391
|
+
*/
|
|
7392
|
+
const FocusGuard = /*#__PURE__*/ react.forwardRef(function FocusGuard(props, ref) {
|
|
7393
|
+
const [role, setRole] = react.useState();
|
|
7394
|
+
useIsoLayoutEffect(() => {
|
|
7395
|
+
if (voiceOver && webkit) setRole("button");
|
|
7396
|
+
}, []);
|
|
7397
|
+
const restProps = {
|
|
7398
|
+
tabIndex: 0,
|
|
7399
|
+
role
|
|
7400
|
+
};
|
|
7401
|
+
return /*#__PURE__*/ (0, react_jsx_runtime.jsx)("span", {
|
|
7402
|
+
...props,
|
|
7403
|
+
ref,
|
|
7404
|
+
style: visuallyHidden,
|
|
7405
|
+
"aria-hidden": role ? void 0 : true,
|
|
7406
|
+
...restProps,
|
|
7407
|
+
"data-base-ui-focus-guard": ""
|
|
6767
7408
|
});
|
|
6768
|
-
}
|
|
6769
|
-
|
|
6770
|
-
function getNodeChildren(nodes, id, onlyOpenChildren = true) {
|
|
6771
|
-
return nodes.filter((node) => node.parentId === id).flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);
|
|
6772
|
-
}
|
|
6773
|
-
function getNodeAncestors(nodes, id) {
|
|
6774
|
-
let allAncestors = [];
|
|
6775
|
-
let currentParentId = nodes.find((node) => node.id === id)?.parentId;
|
|
6776
|
-
while (currentParentId) {
|
|
6777
|
-
const currentNode = nodes.find((node) => node.id === currentParentId);
|
|
6778
|
-
currentParentId = currentNode?.parentId;
|
|
6779
|
-
if (currentNode) allAncestors = allAncestors.concat(currentNode);
|
|
6780
|
-
}
|
|
6781
|
-
return allAncestors;
|
|
6782
|
-
}
|
|
7409
|
+
});
|
|
7410
|
+
FocusGuard.displayName = "FocusGuard";
|
|
6783
7411
|
// node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
|
|
6784
7412
|
function createAttribute(name) {
|
|
6785
7413
|
return `data-base-ui-${name}`;
|
|
@@ -6891,46 +7519,12 @@ window.__ModuleLoader__.load({
|
|
|
6891
7519
|
uncontrolledElementsSet = /* @__PURE__ */ new WeakSet();
|
|
6892
7520
|
markerCounterMap = /* @__PURE__ */ new WeakMap();
|
|
6893
7521
|
}
|
|
6894
|
-
};
|
|
6895
|
-
}
|
|
6896
|
-
function markOthers(avoidElements, options = {}) {
|
|
6897
|
-
const { ariaHidden = false, mark = true } = options;
|
|
6898
|
-
const body = ownerDocument(avoidElements[0]).body;
|
|
6899
|
-
return applyAttributeToOthers(avoidElements, body, ariaHidden, { mark });
|
|
6900
|
-
}
|
|
6901
|
-
// node_modules/@base-ui/utils/useId.mjs
|
|
6902
|
-
let globalId = 0;
|
|
6903
|
-
function useGlobalId(idOverride, prefix = "mui") {
|
|
6904
|
-
const defaultId = react.useRef(void 0);
|
|
6905
|
-
const forceRerender = useForcedRerendering();
|
|
6906
|
-
const id = idOverride ?? defaultId.current;
|
|
6907
|
-
react.useEffect(() => {
|
|
6908
|
-
if (defaultId.current == null) {
|
|
6909
|
-
globalId += 1;
|
|
6910
|
-
defaultId.current = `${prefix}-${globalId}`;
|
|
6911
|
-
if (idOverride == null) forceRerender();
|
|
6912
|
-
}
|
|
6913
|
-
}, [
|
|
6914
|
-
idOverride,
|
|
6915
|
-
prefix,
|
|
6916
|
-
forceRerender
|
|
6917
|
-
]);
|
|
6918
|
-
return id;
|
|
7522
|
+
};
|
|
6919
7523
|
}
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
* @param {string | undefined} idOverride overrides the generated id when provided
|
|
6925
|
-
* @param {string | undefined} prefix prefixes the generated id when provided
|
|
6926
|
-
* @returns {string | undefined}
|
|
6927
|
-
*/
|
|
6928
|
-
function useId$1(idOverride, prefix) {
|
|
6929
|
-
if (maybeReactUseId !== void 0) {
|
|
6930
|
-
const reactId = maybeReactUseId();
|
|
6931
|
-
return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
|
|
6932
|
-
}
|
|
6933
|
-
return useGlobalId(idOverride, prefix);
|
|
7524
|
+
function markOthers(avoidElements, options = {}) {
|
|
7525
|
+
const { ariaHidden = false, mark = true } = options;
|
|
7526
|
+
const body = ownerDocument(avoidElements[0]).body;
|
|
7527
|
+
return applyAttributeToOthers(avoidElements, body, ariaHidden, { mark });
|
|
6934
7528
|
}
|
|
6935
7529
|
// node_modules/@base-ui/react/internals/constants.mjs
|
|
6936
7530
|
const DISABLED_TRANSITIONS_STYLE = { style: { transition: "none" } };
|
|
@@ -6963,7 +7557,7 @@ window.__ModuleLoader__.load({
|
|
|
6963
7557
|
const attr = createAttribute("portal");
|
|
6964
7558
|
function useFloatingPortalNode(props = {}) {
|
|
6965
7559
|
const { ref, container: containerProp, componentProps = EMPTY_OBJECT, elementProps } = props;
|
|
6966
|
-
const uniqueId = useId$
|
|
7560
|
+
const uniqueId = useId$2();
|
|
6967
7561
|
const parentPortalNode = usePortalContext()?.portalNode;
|
|
6968
7562
|
const [containerElement, setContainerElement] = react.useState(null);
|
|
6969
7563
|
const [portalNode, setPortalNode] = react.useState(null);
|
|
@@ -7147,7 +7741,7 @@ window.__ModuleLoader__.load({
|
|
|
7147
7741
|
* @see https://floating-ui.com/docs/FloatingTree
|
|
7148
7742
|
*/
|
|
7149
7743
|
function useFloatingNodeId(externalTree) {
|
|
7150
|
-
const id = useId$
|
|
7744
|
+
const id = useId$2();
|
|
7151
7745
|
const tree = useFloatingTree(externalTree);
|
|
7152
7746
|
const parentId = useFloatingParentNodeId();
|
|
7153
7747
|
useIsoLayoutEffect(() => {
|
|
@@ -7202,15 +7796,6 @@ window.__ModuleLoader__.load({
|
|
|
7202
7796
|
children
|
|
7203
7797
|
});
|
|
7204
7798
|
}
|
|
7205
|
-
// node_modules/@base-ui/react/utils/resolveRef.mjs
|
|
7206
|
-
/**
|
|
7207
|
-
* If the provided argument is a ref object, returns its `current` value.
|
|
7208
|
-
* Otherwise, returns the argument itself.
|
|
7209
|
-
*/
|
|
7210
|
-
function resolveRef(maybeRef) {
|
|
7211
|
-
if (maybeRef == null) return maybeRef;
|
|
7212
|
-
return "current" in maybeRef ? maybeRef.current : maybeRef;
|
|
7213
|
-
}
|
|
7214
7799
|
// node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs
|
|
7215
7800
|
function getEventType(event, lastInteractionType) {
|
|
7216
7801
|
const win = getWindow(getTarget(event));
|
|
@@ -8075,257 +8660,71 @@ window.__ModuleLoader__.load({
|
|
|
8075
8660
|
}), [closeOnEscapeKeyDown, closeOnReferencePress]);
|
|
8076
8661
|
const floating = react.useMemo(() => ({
|
|
8077
8662
|
onKeyDown: closeOnEscapeKeyDown,
|
|
8078
|
-
onPointerDown: markInsidePressStartPrevented,
|
|
8079
|
-
onMouseDown: markInsidePressStartPrevented,
|
|
8080
|
-
onClickCapture: markInsideReactTree,
|
|
8081
|
-
onMouseDownCapture(event) {
|
|
8082
|
-
markInsideReactTree();
|
|
8083
|
-
markPressStartedInsideReactTree(event);
|
|
8084
|
-
},
|
|
8085
|
-
onPointerDownCapture(event) {
|
|
8086
|
-
markInsideReactTree();
|
|
8087
|
-
markPressStartedInsideReactTree(event);
|
|
8088
|
-
},
|
|
8089
|
-
onMouseUpCapture: markInsideReactTree,
|
|
8090
|
-
onTouchEndCapture: markInsideReactTree,
|
|
8091
|
-
onTouchMoveCapture: markInsideReactTree
|
|
8092
|
-
}), [
|
|
8093
|
-
closeOnEscapeKeyDown,
|
|
8094
|
-
markInsideReactTree,
|
|
8095
|
-
markPressStartedInsideReactTree,
|
|
8096
|
-
markInsidePressStartPrevented
|
|
8097
|
-
]);
|
|
8098
|
-
return react.useMemo(() => enabled ? {
|
|
8099
|
-
reference,
|
|
8100
|
-
floating,
|
|
8101
|
-
trigger: reference
|
|
8102
|
-
} : {}, [
|
|
8103
|
-
enabled,
|
|
8104
|
-
reference,
|
|
8105
|
-
floating
|
|
8106
|
-
]);
|
|
8107
|
-
}
|
|
8108
|
-
// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
|
|
8109
|
-
/**
|
|
8110
|
-
* Narrowed to the store members this hook uses so consumers do not need to provide
|
|
8111
|
-
* unrelated store capabilities.
|
|
8112
|
-
*/
|
|
8113
|
-
/**
|
|
8114
|
-
* Keeps the provided FloatingRootStore in sync with the provided PopupStore.
|
|
8115
|
-
*/
|
|
8116
|
-
function useSyncedFloatingRootContext(options) {
|
|
8117
|
-
const { popupStore, treatPopupAsFloatingElement = false, floatingRootContext: store, floatingId, nested, onOpenChange } = options;
|
|
8118
|
-
const open = popupStore.useState("open");
|
|
8119
|
-
const referenceElement = popupStore.useState("activeTriggerElement");
|
|
8120
|
-
const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
|
|
8121
|
-
const handleOpenChange = onOpenChange;
|
|
8122
|
-
popupStore.useSyncedValue("floatingId", floatingId);
|
|
8123
|
-
useIsoLayoutEffect(() => {
|
|
8124
|
-
const valuesToSync = {
|
|
8125
|
-
open,
|
|
8126
|
-
floatingId,
|
|
8127
|
-
referenceElement,
|
|
8128
|
-
floatingElement
|
|
8129
|
-
};
|
|
8130
|
-
if (isElement(referenceElement)) valuesToSync.domReferenceElement = referenceElement;
|
|
8131
|
-
if (store.state.positionReference === store.state.referenceElement) valuesToSync.positionReference = referenceElement;
|
|
8132
|
-
store.update(valuesToSync);
|
|
8133
|
-
}, [
|
|
8134
|
-
open,
|
|
8135
|
-
floatingId,
|
|
8136
|
-
referenceElement,
|
|
8137
|
-
floatingElement,
|
|
8138
|
-
store
|
|
8139
|
-
]);
|
|
8140
|
-
store.context.onOpenChange = handleOpenChange;
|
|
8141
|
-
store.context.nested = nested;
|
|
8142
|
-
return store;
|
|
8143
|
-
}
|
|
8144
|
-
// node_modules/@base-ui/react/internals/useTransitionStatus.mjs
|
|
8145
|
-
/**
|
|
8146
|
-
* Provides a status string for CSS animations.
|
|
8147
|
-
* @param open - a boolean that determines if the element is open.
|
|
8148
|
-
* @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`
|
|
8149
|
-
* @param deferEndingState - a boolean that delays the `'ending'` state by a frame
|
|
8150
|
-
* @param animateInitialOpen - a boolean that makes an element which mounts already open still go
|
|
8151
|
-
* through `'starting'`. Off by default so content that was open on the first render (a
|
|
8152
|
-
* `defaultOpen` popup on page load, SSR'd markup) doesn't animate in.
|
|
8153
|
-
*/
|
|
8154
|
-
function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
|
|
8155
|
-
const [transitionStatus, setTransitionStatus] = react.useState(open && enableIdleState ? "idle" : void 0);
|
|
8156
|
-
const [mounted, setMounted] = react.useState(open && !animateInitialOpen);
|
|
8157
|
-
if (open && !mounted) {
|
|
8158
|
-
setMounted(true);
|
|
8159
|
-
setTransitionStatus("starting");
|
|
8160
|
-
}
|
|
8161
|
-
if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) setTransitionStatus("ending");
|
|
8162
|
-
if (!open && !mounted && transitionStatus === "ending") setTransitionStatus(void 0);
|
|
8163
|
-
useIsoLayoutEffect(() => {
|
|
8164
|
-
if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
|
|
8165
|
-
const frame = AnimationFrame.request(() => {
|
|
8166
|
-
setTransitionStatus("ending");
|
|
8167
|
-
});
|
|
8168
|
-
return () => {
|
|
8169
|
-
AnimationFrame.cancel(frame);
|
|
8170
|
-
};
|
|
8171
|
-
}
|
|
8172
|
-
}, [
|
|
8173
|
-
open,
|
|
8174
|
-
mounted,
|
|
8175
|
-
transitionStatus,
|
|
8176
|
-
deferEndingState
|
|
8177
|
-
]);
|
|
8178
|
-
useIsoLayoutEffect(() => {
|
|
8179
|
-
if (!open || enableIdleState || transitionStatus === void 0) return;
|
|
8180
|
-
const frame = AnimationFrame.request(() => {
|
|
8181
|
-
setTransitionStatus(void 0);
|
|
8182
|
-
});
|
|
8183
|
-
return () => {
|
|
8184
|
-
AnimationFrame.cancel(frame);
|
|
8185
|
-
};
|
|
8186
|
-
}, [
|
|
8187
|
-
enableIdleState,
|
|
8188
|
-
open,
|
|
8189
|
-
transitionStatus
|
|
8190
|
-
]);
|
|
8191
|
-
useIsoLayoutEffect(() => {
|
|
8192
|
-
if (!open || !enableIdleState) return;
|
|
8193
|
-
if (open && mounted && transitionStatus !== "idle") setTransitionStatus("starting");
|
|
8194
|
-
const frame = AnimationFrame.request(() => {
|
|
8195
|
-
setTransitionStatus("idle");
|
|
8196
|
-
});
|
|
8197
|
-
return () => {
|
|
8198
|
-
AnimationFrame.cancel(frame);
|
|
8199
|
-
};
|
|
8200
|
-
}, [
|
|
8201
|
-
enableIdleState,
|
|
8202
|
-
open,
|
|
8203
|
-
mounted,
|
|
8204
|
-
transitionStatus
|
|
8205
|
-
]);
|
|
8206
|
-
return {
|
|
8207
|
-
mounted,
|
|
8208
|
-
setMounted,
|
|
8209
|
-
transitionStatus
|
|
8210
|
-
};
|
|
8211
|
-
}
|
|
8212
|
-
// node_modules/@base-ui/react/utils/getFiniteAnimations.mjs
|
|
8213
|
-
/**
|
|
8214
|
-
* Excludes infinite animations, whose finished promises never resolve while they run.
|
|
8215
|
-
*/
|
|
8216
|
-
function getFiniteAnimations(element, options) {
|
|
8217
|
-
return element.getAnimations(options).filter((animation) => {
|
|
8218
|
-
const timing = animation.effect?.getTiming();
|
|
8219
|
-
return timing?.duration !== Infinity && timing?.iterations !== Infinity;
|
|
8220
|
-
});
|
|
8221
|
-
}
|
|
8222
|
-
// node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
|
|
8223
|
-
let pendingCallbacks = null;
|
|
8224
|
-
/**
|
|
8225
|
-
* Runs the callback in a synchronous flush before the browser paints, so that the
|
|
8226
|
-
* browser doesn't paint an intermediate frame: https://github.com/mui/base-ui/issues/979
|
|
8227
|
-
* Callbacks that become ready within the same microtask checkpoint (e.g. multiple elements
|
|
8228
|
-
* whose animations finish together) are batched into a single commit:
|
|
8229
|
-
* https://github.com/mui/base-ui/issues/5481
|
|
8230
|
-
*/
|
|
8231
|
-
function flushBeforePaint(fn) {
|
|
8232
|
-
if (!pendingCallbacks) {
|
|
8233
|
-
const callbacks = [];
|
|
8234
|
-
pendingCallbacks = callbacks;
|
|
8235
|
-
queueMicrotask(() => {
|
|
8236
|
-
pendingCallbacks = null;
|
|
8237
|
-
react_dom.flushSync(() => {
|
|
8238
|
-
for (const callback of callbacks) callback();
|
|
8239
|
-
});
|
|
8240
|
-
});
|
|
8241
|
-
}
|
|
8242
|
-
pendingCallbacks.push(fn);
|
|
8243
|
-
}
|
|
8244
|
-
/**
|
|
8245
|
-
* Executes a function once all animations have finished on the provided element.
|
|
8246
|
-
* If an animation is canceled, waits for any replacement animations before executing.
|
|
8247
|
-
* @param elementOrRef - The element to watch for animations.
|
|
8248
|
-
* @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.
|
|
8249
|
-
* @param batch - Whether completions ready in the same microtask may be coalesced into a single
|
|
8250
|
-
* commit. A batched callback runs before earlier callbacks' React updates have committed, so only
|
|
8251
|
-
* opt in when the callback doesn't read state that another completion can change.
|
|
8252
|
-
* @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback
|
|
8253
|
-
*/
|
|
8254
|
-
function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
|
|
8255
|
-
const frame = useAnimationFrame();
|
|
8256
|
-
return useStableCallback((fnToExecute, signal = null) => {
|
|
8257
|
-
frame.cancel();
|
|
8258
|
-
const element = resolveRef(elementOrRef);
|
|
8259
|
-
if (element == null) return;
|
|
8260
|
-
const resolvedElement = element;
|
|
8261
|
-
const done = () => {
|
|
8262
|
-
if (!batch) {
|
|
8263
|
-
react_dom.flushSync(fnToExecute);
|
|
8264
|
-
return;
|
|
8265
|
-
}
|
|
8266
|
-
flushBeforePaint(() => {
|
|
8267
|
-
if (!signal?.aborted) fnToExecute();
|
|
8268
|
-
});
|
|
8269
|
-
};
|
|
8270
|
-
if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
8271
|
-
fnToExecute();
|
|
8272
|
-
return;
|
|
8273
|
-
}
|
|
8274
|
-
function exec() {
|
|
8275
|
-
Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => {
|
|
8276
|
-
if (!signal?.aborted) done();
|
|
8277
|
-
}, () => {
|
|
8278
|
-
if (signal?.aborted) return;
|
|
8279
|
-
if (getFiniteAnimations(resolvedElement).some((animation) => animation.pending || animation.playState !== "finished")) {
|
|
8280
|
-
exec();
|
|
8281
|
-
return;
|
|
8282
|
-
}
|
|
8283
|
-
done();
|
|
8284
|
-
});
|
|
8285
|
-
}
|
|
8286
|
-
if (waitForStartingStyleRemoved) {
|
|
8287
|
-
const startingStyleAttribute = startingStyle;
|
|
8288
|
-
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
8289
|
-
frame.request(exec);
|
|
8290
|
-
return;
|
|
8291
|
-
}
|
|
8292
|
-
const attributeObserver = new MutationObserver(() => {
|
|
8293
|
-
if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
|
|
8294
|
-
attributeObserver.disconnect();
|
|
8295
|
-
exec();
|
|
8296
|
-
}
|
|
8297
|
-
});
|
|
8298
|
-
attributeObserver.observe(resolvedElement, {
|
|
8299
|
-
attributes: true,
|
|
8300
|
-
attributeFilter: [startingStyleAttribute]
|
|
8301
|
-
});
|
|
8302
|
-
signal?.addEventListener("abort", () => attributeObserver.disconnect(), { once: true });
|
|
8303
|
-
return;
|
|
8304
|
-
}
|
|
8305
|
-
frame.request(exec);
|
|
8306
|
-
});
|
|
8663
|
+
onPointerDown: markInsidePressStartPrevented,
|
|
8664
|
+
onMouseDown: markInsidePressStartPrevented,
|
|
8665
|
+
onClickCapture: markInsideReactTree,
|
|
8666
|
+
onMouseDownCapture(event) {
|
|
8667
|
+
markInsideReactTree();
|
|
8668
|
+
markPressStartedInsideReactTree(event);
|
|
8669
|
+
},
|
|
8670
|
+
onPointerDownCapture(event) {
|
|
8671
|
+
markInsideReactTree();
|
|
8672
|
+
markPressStartedInsideReactTree(event);
|
|
8673
|
+
},
|
|
8674
|
+
onMouseUpCapture: markInsideReactTree,
|
|
8675
|
+
onTouchEndCapture: markInsideReactTree,
|
|
8676
|
+
onTouchMoveCapture: markInsideReactTree
|
|
8677
|
+
}), [
|
|
8678
|
+
closeOnEscapeKeyDown,
|
|
8679
|
+
markInsideReactTree,
|
|
8680
|
+
markPressStartedInsideReactTree,
|
|
8681
|
+
markInsidePressStartPrevented
|
|
8682
|
+
]);
|
|
8683
|
+
return react.useMemo(() => enabled ? {
|
|
8684
|
+
reference,
|
|
8685
|
+
floating,
|
|
8686
|
+
trigger: reference
|
|
8687
|
+
} : {}, [
|
|
8688
|
+
enabled,
|
|
8689
|
+
reference,
|
|
8690
|
+
floating
|
|
8691
|
+
]);
|
|
8307
8692
|
}
|
|
8308
|
-
// node_modules/@base-ui/react/
|
|
8693
|
+
// node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
|
|
8309
8694
|
/**
|
|
8310
|
-
*
|
|
8695
|
+
* Narrowed to the store members this hook uses so consumers do not need to provide
|
|
8696
|
+
* unrelated store capabilities.
|
|
8311
8697
|
*/
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8698
|
+
/**
|
|
8699
|
+
* Keeps the provided FloatingRootStore in sync with the provided PopupStore.
|
|
8700
|
+
*/
|
|
8701
|
+
function useSyncedFloatingRootContext(options) {
|
|
8702
|
+
const { popupStore, treatPopupAsFloatingElement = false, floatingRootContext: store, floatingId, nested, onOpenChange } = options;
|
|
8703
|
+
const open = popupStore.useState("open");
|
|
8704
|
+
const referenceElement = popupStore.useState("activeTriggerElement");
|
|
8705
|
+
const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement");
|
|
8706
|
+
const handleOpenChange = onOpenChange;
|
|
8707
|
+
popupStore.useSyncedValue("floatingId", floatingId);
|
|
8708
|
+
useIsoLayoutEffect(() => {
|
|
8709
|
+
const valuesToSync = {
|
|
8710
|
+
open,
|
|
8711
|
+
floatingId,
|
|
8712
|
+
referenceElement,
|
|
8713
|
+
floatingElement
|
|
8322
8714
|
};
|
|
8715
|
+
if (isElement(referenceElement)) valuesToSync.domReferenceElement = referenceElement;
|
|
8716
|
+
if (store.state.positionReference === store.state.referenceElement) valuesToSync.positionReference = referenceElement;
|
|
8717
|
+
store.update(valuesToSync);
|
|
8323
8718
|
}, [
|
|
8324
|
-
enabled,
|
|
8325
8719
|
open,
|
|
8326
|
-
|
|
8327
|
-
|
|
8720
|
+
floatingId,
|
|
8721
|
+
referenceElement,
|
|
8722
|
+
floatingElement,
|
|
8723
|
+
store
|
|
8328
8724
|
]);
|
|
8725
|
+
store.context.onOpenChange = handleOpenChange;
|
|
8726
|
+
store.context.nested = nested;
|
|
8727
|
+
return store;
|
|
8329
8728
|
}
|
|
8330
8729
|
// node_modules/@base-ui/react/internals/useUnmountAfterClose.mjs
|
|
8331
8730
|
/**
|
|
@@ -8952,7 +9351,7 @@ window.__ModuleLoader__.load({
|
|
|
8952
9351
|
// node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs
|
|
8953
9352
|
function useFloatingRootContext(options) {
|
|
8954
9353
|
const { open = false, onOpenChange, elements = {} } = options;
|
|
8955
|
-
const floatingId = useId$
|
|
9354
|
+
const floatingId = useId$2();
|
|
8956
9355
|
const nested = useFloatingParentNodeId() != null;
|
|
8957
9356
|
{
|
|
8958
9357
|
const optionDomReference = elements.reference;
|
|
@@ -11400,268 +11799,84 @@ window.__ModuleLoader__.load({
|
|
|
11400
11799
|
]);
|
|
11401
11800
|
}
|
|
11402
11801
|
/**
|
|
11403
|
-
* Modifies the placement by translating the floating element along the
|
|
11404
|
-
* specified axes.
|
|
11405
|
-
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
11406
|
-
* object may be passed.
|
|
11407
|
-
* @see https://floating-ui.com/docs/offset
|
|
11408
|
-
*/
|
|
11409
|
-
const offset = (options, deps) => {
|
|
11410
|
-
const result = offset$2(options);
|
|
11411
|
-
return {
|
|
11412
|
-
name: result.name,
|
|
11413
|
-
fn: result.fn,
|
|
11414
|
-
options: [options, deps]
|
|
11415
|
-
};
|
|
11416
|
-
};
|
|
11417
|
-
/**
|
|
11418
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
11419
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
11420
|
-
* @see https://floating-ui.com/docs/shift
|
|
11421
|
-
*/
|
|
11422
|
-
const shift = (options, deps) => {
|
|
11423
|
-
const result = shift$2(options);
|
|
11424
|
-
return {
|
|
11425
|
-
name: result.name,
|
|
11426
|
-
fn: result.fn,
|
|
11427
|
-
options: [options, deps]
|
|
11428
|
-
};
|
|
11429
|
-
};
|
|
11430
|
-
/**
|
|
11431
|
-
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
11432
|
-
*/
|
|
11433
|
-
const limitShift = (options, deps) => {
|
|
11434
|
-
return {
|
|
11435
|
-
fn: limitShift$2(options).fn,
|
|
11436
|
-
options: [options, deps]
|
|
11437
|
-
};
|
|
11438
|
-
};
|
|
11439
|
-
/**
|
|
11440
|
-
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
11441
|
-
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
11442
|
-
* clipping boundary. Alternative to `autoPlacement`.
|
|
11443
|
-
* @see https://floating-ui.com/docs/flip
|
|
11444
|
-
*/
|
|
11445
|
-
const flip = (options, deps) => {
|
|
11446
|
-
const result = flip$2(options);
|
|
11447
|
-
return {
|
|
11448
|
-
name: result.name,
|
|
11449
|
-
fn: result.fn,
|
|
11450
|
-
options: [options, deps]
|
|
11451
|
-
};
|
|
11452
|
-
};
|
|
11453
|
-
/**
|
|
11454
|
-
* Provides data that allows you to change the size of the floating element —
|
|
11455
|
-
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
11456
|
-
* width of the reference element.
|
|
11457
|
-
* @see https://floating-ui.com/docs/size
|
|
11458
|
-
*/
|
|
11459
|
-
const size = (options, deps) => {
|
|
11460
|
-
const result = size$2(options);
|
|
11461
|
-
return {
|
|
11462
|
-
name: result.name,
|
|
11463
|
-
fn: result.fn,
|
|
11464
|
-
options: [options, deps]
|
|
11465
|
-
};
|
|
11466
|
-
};
|
|
11467
|
-
// node_modules/@base-ui/react/select/root/SelectRootContext.mjs
|
|
11468
|
-
const SelectRootContext = /*#__PURE__*/ react.createContext(void 0);
|
|
11469
|
-
SelectRootContext.displayName = "SelectRootContext";
|
|
11470
|
-
const SelectFloatingContext = /*#__PURE__*/ react.createContext(void 0);
|
|
11471
|
-
SelectFloatingContext.displayName = "SelectFloatingContext";
|
|
11472
|
-
function useSelectRootContext() {
|
|
11473
|
-
const store = react.useContext(SelectRootContext);
|
|
11474
|
-
if (store === void 0) throw new Error("Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
11475
|
-
return store;
|
|
11476
|
-
}
|
|
11477
|
-
function useSelectFloatingContext() {
|
|
11478
|
-
const context = react.useContext(SelectFloatingContext);
|
|
11479
|
-
if (context === void 0) throw new Error("Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
11480
|
-
return context;
|
|
11481
|
-
}
|
|
11482
|
-
// node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
|
|
11483
|
-
/**
|
|
11484
|
-
* Present when the field is in a valid state.
|
|
11485
|
-
*/
|
|
11486
|
-
const valid = "data-valid";
|
|
11487
|
-
/**
|
|
11488
|
-
* Present when the field is in an invalid state.
|
|
11489
|
-
*/
|
|
11490
|
-
const invalid = "data-invalid";
|
|
11491
|
-
// node_modules/@base-ui/react/internals/field-constants/constants.mjs
|
|
11492
|
-
const DEFAULT_VALIDITY_STATE = {
|
|
11493
|
-
badInput: false,
|
|
11494
|
-
customError: false,
|
|
11495
|
-
patternMismatch: false,
|
|
11496
|
-
rangeOverflow: false,
|
|
11497
|
-
rangeUnderflow: false,
|
|
11498
|
-
stepMismatch: false,
|
|
11499
|
-
tooLong: false,
|
|
11500
|
-
tooShort: false,
|
|
11501
|
-
typeMismatch: false,
|
|
11502
|
-
valid: null,
|
|
11503
|
-
valueMissing: false
|
|
11504
|
-
};
|
|
11505
|
-
const DEFAULT_FIELD_ROOT_STATE = {
|
|
11506
|
-
disabled: false,
|
|
11507
|
-
valid: null,
|
|
11508
|
-
touched: false,
|
|
11509
|
-
dirty: false,
|
|
11510
|
-
filled: false,
|
|
11511
|
-
focused: false
|
|
11512
|
-
};
|
|
11513
|
-
const fieldValidityMapping = { valid(value) {
|
|
11514
|
-
if (value === null) return null;
|
|
11515
|
-
if (value) return { [valid]: "" };
|
|
11516
|
-
return { [invalid]: "" };
|
|
11517
|
-
} };
|
|
11518
|
-
// node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
|
|
11519
|
-
const DEFAULT_FIELD_ROOT_CONTEXT = {
|
|
11520
|
-
invalid: void 0,
|
|
11521
|
-
name: void 0,
|
|
11522
|
-
validityData: {
|
|
11523
|
-
state: DEFAULT_VALIDITY_STATE,
|
|
11524
|
-
errors: [],
|
|
11525
|
-
error: "",
|
|
11526
|
-
value: "",
|
|
11527
|
-
initialValue: null
|
|
11528
|
-
},
|
|
11529
|
-
setValidityData: NOOP,
|
|
11530
|
-
disabled: void 0,
|
|
11531
|
-
setTouched: NOOP,
|
|
11532
|
-
setDirty: NOOP,
|
|
11533
|
-
setFilled: NOOP,
|
|
11534
|
-
setFocused: NOOP,
|
|
11535
|
-
focusOwnerRef: { current: void 0 },
|
|
11536
|
-
validationMode: "onSubmit",
|
|
11537
|
-
shouldValidateOnChange: () => false,
|
|
11538
|
-
state: DEFAULT_FIELD_ROOT_STATE,
|
|
11539
|
-
registerFieldControl: NOOP,
|
|
11540
|
-
validation: {
|
|
11541
|
-
getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,
|
|
11542
|
-
inputRef: { current: null },
|
|
11543
|
-
registeredInputs: /* @__PURE__ */ new Map(),
|
|
11544
|
-
registerInput: NOOP,
|
|
11545
|
-
getInputControl: () => null,
|
|
11546
|
-
commit: async () => {},
|
|
11547
|
-
change: NOOP
|
|
11548
|
-
}
|
|
11549
|
-
};
|
|
11550
|
-
const FieldRootContext = /*#__PURE__*/ react.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
|
|
11551
|
-
FieldRootContext.displayName = "FieldRootContext";
|
|
11552
|
-
function useFieldRootContext(optional = true) {
|
|
11553
|
-
const context = react.useContext(FieldRootContext);
|
|
11554
|
-
if (context.setValidityData === NOOP && !optional) throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
11555
|
-
return context;
|
|
11556
|
-
}
|
|
11557
|
-
// node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
|
|
11558
|
-
function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name) {
|
|
11559
|
-
const { registerFieldControl } = useFieldRootContext();
|
|
11560
|
-
const sourceRef = useRefWithInit(() => Symbol());
|
|
11561
|
-
useIsoLayoutEffect(() => {
|
|
11562
|
-
const source = sourceRef.current;
|
|
11563
|
-
if (!enabled) {
|
|
11564
|
-
registerFieldControl(source, void 0);
|
|
11565
|
-
return;
|
|
11566
|
-
}
|
|
11567
|
-
registerFieldControl(source, {
|
|
11568
|
-
controlRef,
|
|
11569
|
-
getValue: getFormValueOverride,
|
|
11570
|
-
id,
|
|
11571
|
-
name,
|
|
11572
|
-
value
|
|
11573
|
-
});
|
|
11574
|
-
}, [
|
|
11575
|
-
controlRef,
|
|
11576
|
-
enabled,
|
|
11577
|
-
getFormValueOverride,
|
|
11578
|
-
id,
|
|
11579
|
-
name,
|
|
11580
|
-
registerFieldControl,
|
|
11581
|
-
sourceRef,
|
|
11582
|
-
value
|
|
11583
|
-
]);
|
|
11584
|
-
useIsoLayoutEffect(() => {
|
|
11585
|
-
const source = sourceRef.current;
|
|
11586
|
-
return () => {
|
|
11587
|
-
registerFieldControl(source, void 0);
|
|
11588
|
-
};
|
|
11589
|
-
}, [registerFieldControl, sourceRef]);
|
|
11590
|
-
}
|
|
11591
|
-
// node_modules/@base-ui/react/internals/useBaseUiId.mjs
|
|
11592
|
-
/**
|
|
11593
|
-
* Wraps `useId` and prefixes generated `id`s with `base-ui-`
|
|
11594
|
-
* @param {string | undefined} idOverride overrides the generated id when provided
|
|
11595
|
-
* @returns {string | undefined}
|
|
11802
|
+
* Modifies the placement by translating the floating element along the
|
|
11803
|
+
* specified axes.
|
|
11804
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
11805
|
+
* object may be passed.
|
|
11806
|
+
* @see https://floating-ui.com/docs/offset
|
|
11596
11807
|
*/
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11808
|
+
const offset = (options, deps) => {
|
|
11809
|
+
const result = offset$2(options);
|
|
11810
|
+
return {
|
|
11811
|
+
name: result.name,
|
|
11812
|
+
fn: result.fn,
|
|
11813
|
+
options: [options, deps]
|
|
11814
|
+
};
|
|
11815
|
+
};
|
|
11601
11816
|
/**
|
|
11602
|
-
*
|
|
11603
|
-
*
|
|
11817
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
11818
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
11819
|
+
* @see https://floating-ui.com/docs/shift
|
|
11604
11820
|
*/
|
|
11605
|
-
const
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
return
|
|
11821
|
+
const shift = (options, deps) => {
|
|
11822
|
+
const result = shift$2(options);
|
|
11823
|
+
return {
|
|
11824
|
+
name: result.name,
|
|
11825
|
+
fn: result.fn,
|
|
11826
|
+
options: [options, deps]
|
|
11827
|
+
};
|
|
11828
|
+
};
|
|
11829
|
+
/**
|
|
11830
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
11831
|
+
*/
|
|
11832
|
+
const limitShift = (options, deps) => {
|
|
11833
|
+
return {
|
|
11834
|
+
fn: limitShift$2(options).fn,
|
|
11835
|
+
options: [options, deps]
|
|
11836
|
+
};
|
|
11837
|
+
};
|
|
11838
|
+
/**
|
|
11839
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
11840
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
11841
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
11842
|
+
* @see https://floating-ui.com/docs/flip
|
|
11843
|
+
*/
|
|
11844
|
+
const flip = (options, deps) => {
|
|
11845
|
+
const result = flip$2(options);
|
|
11846
|
+
return {
|
|
11847
|
+
name: result.name,
|
|
11848
|
+
fn: result.fn,
|
|
11849
|
+
options: [options, deps]
|
|
11850
|
+
};
|
|
11851
|
+
};
|
|
11852
|
+
/**
|
|
11853
|
+
* Provides data that allows you to change the size of the floating element —
|
|
11854
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
11855
|
+
* width of the reference element.
|
|
11856
|
+
* @see https://floating-ui.com/docs/size
|
|
11857
|
+
*/
|
|
11858
|
+
const size = (options, deps) => {
|
|
11859
|
+
const result = size$2(options);
|
|
11860
|
+
return {
|
|
11861
|
+
name: result.name,
|
|
11862
|
+
fn: result.fn,
|
|
11863
|
+
options: [options, deps]
|
|
11864
|
+
};
|
|
11865
|
+
};
|
|
11866
|
+
// node_modules/@base-ui/react/select/root/SelectRootContext.mjs
|
|
11867
|
+
const SelectRootContext = /*#__PURE__*/ react.createContext(void 0);
|
|
11868
|
+
SelectRootContext.displayName = "SelectRootContext";
|
|
11869
|
+
const SelectFloatingContext = /*#__PURE__*/ react.createContext(void 0);
|
|
11870
|
+
SelectFloatingContext.displayName = "SelectFloatingContext";
|
|
11871
|
+
function useSelectRootContext() {
|
|
11872
|
+
const store = react.useContext(SelectRootContext);
|
|
11873
|
+
if (store === void 0) throw new Error("Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
|
|
11874
|
+
return store;
|
|
11618
11875
|
}
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
const defaultId = useBaseUiId();
|
|
11624
|
-
const controlSourceRef = useRefWithInit(() => Symbol());
|
|
11625
|
-
const hasRegisteredRef = react.useRef(false);
|
|
11626
|
-
const hadExplicitIdRef = react.useRef(false);
|
|
11627
|
-
const unregisterControlId = useStableCallback(() => {
|
|
11628
|
-
if (!hasRegisteredRef.current || registerControlId === NOOP) return;
|
|
11629
|
-
hasRegisteredRef.current = false;
|
|
11630
|
-
registerControlId(controlSourceRef.current, void 0);
|
|
11631
|
-
});
|
|
11632
|
-
useIsoLayoutEffect(() => {
|
|
11633
|
-
if (!enabled || registerControlId === NOOP) {
|
|
11634
|
-
unregisterControlId();
|
|
11635
|
-
return;
|
|
11636
|
-
}
|
|
11637
|
-
let nextId;
|
|
11638
|
-
if (id !== void 0) {
|
|
11639
|
-
hadExplicitIdRef.current = true;
|
|
11640
|
-
nextId = id;
|
|
11641
|
-
} else if (hadExplicitIdRef.current) nextId = defaultId;
|
|
11642
|
-
else {
|
|
11643
|
-
resetControlId();
|
|
11644
|
-
return;
|
|
11645
|
-
}
|
|
11646
|
-
if (nextId === void 0) {
|
|
11647
|
-
unregisterControlId();
|
|
11648
|
-
return;
|
|
11649
|
-
}
|
|
11650
|
-
hasRegisteredRef.current = true;
|
|
11651
|
-
registerControlId(controlSourceRef.current, nextId);
|
|
11652
|
-
}, [
|
|
11653
|
-
id,
|
|
11654
|
-
enabled,
|
|
11655
|
-
registerControlId,
|
|
11656
|
-
resetControlId,
|
|
11657
|
-
defaultId,
|
|
11658
|
-
controlSourceRef,
|
|
11659
|
-
unregisterControlId
|
|
11660
|
-
]);
|
|
11661
|
-
useIsoLayoutEffect(() => {
|
|
11662
|
-
return unregisterControlId;
|
|
11663
|
-
}, [unregisterControlId]);
|
|
11664
|
-
return (enabled ? controlId : void 0) ?? id ?? defaultId;
|
|
11876
|
+
function useSelectFloatingContext() {
|
|
11877
|
+
const context = react.useContext(SelectFloatingContext);
|
|
11878
|
+
if (context === void 0) throw new Error("Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
|
|
11879
|
+
return context;
|
|
11665
11880
|
}
|
|
11666
11881
|
// node_modules/@base-ui/utils/areArraysEqual.mjs
|
|
11667
11882
|
/**
|
|
@@ -11846,28 +12061,6 @@ window.__ModuleLoader__.load({
|
|
|
11846
12061
|
scrollDownArrowVisible: (state) => state.scrollDownArrowVisible,
|
|
11847
12062
|
hasScrollArrows: (state) => state.hasScrollArrows
|
|
11848
12063
|
};
|
|
11849
|
-
// node_modules/@base-ui/react/internals/form-context/FormContext.mjs
|
|
11850
|
-
const FormContext = /*#__PURE__*/ react.createContext({
|
|
11851
|
-
elementRef: { current: null },
|
|
11852
|
-
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
11853
|
-
errors: {},
|
|
11854
|
-
clearErrors: NOOP,
|
|
11855
|
-
validationMode: "onSubmit",
|
|
11856
|
-
submitCountRef: { current: 0 }
|
|
11857
|
-
});
|
|
11858
|
-
FormContext.displayName = "FormContext";
|
|
11859
|
-
function useFormContext() {
|
|
11860
|
-
return react.useContext(FormContext);
|
|
11861
|
-
}
|
|
11862
|
-
// node_modules/@base-ui/react/internals/useValueChanged.mjs
|
|
11863
|
-
function useValueChanged(value, onChange) {
|
|
11864
|
-
const valueRef = react.useRef(value);
|
|
11865
|
-
const onChangeCallback = useStableCallback(onChange);
|
|
11866
|
-
useIsoLayoutEffect(() => {
|
|
11867
|
-
if (valueRef.current !== value) onChangeCallback(valueRef.current);
|
|
11868
|
-
valueRef.current = value;
|
|
11869
|
-
}, [value, onChangeCallback]);
|
|
11870
|
-
}
|
|
11871
12064
|
// node_modules/@base-ui/utils/useEnhancedClickHandler.mjs
|
|
11872
12065
|
/**
|
|
11873
12066
|
* Provides a cross-browser way to determine the type of the pointer used to click.
|
|
@@ -12309,35 +12502,6 @@ window.__ModuleLoader__.load({
|
|
|
12309
12502
|
function resolveAriaLabelledBy(fieldLabelId, localLabelId) {
|
|
12310
12503
|
return fieldLabelId ?? localLabelId;
|
|
12311
12504
|
}
|
|
12312
|
-
// node_modules/@base-ui/react/internals/field-root-context/useSetFieldFocused.mjs
|
|
12313
|
-
/**
|
|
12314
|
-
* Returns the field's `setFocused`, recording which control the focused state belongs to.
|
|
12315
|
-
*
|
|
12316
|
-
* Disabling or unmounting a focused control moves focus away without firing `blur`, so the focused
|
|
12317
|
-
* state would otherwise stay latched. A field can have several focus targets, so a control only
|
|
12318
|
-
* clears the shared state when focus last landed on itself. The stable callback doubles as that
|
|
12319
|
-
* identity.
|
|
12320
|
-
*/
|
|
12321
|
-
function useSetFieldFocused(disabled, focusTargetRef, onFocusedChange) {
|
|
12322
|
-
const { setFocused, focusOwnerRef } = useFieldRootContext();
|
|
12323
|
-
const setFieldFocused = useStableCallback((focused) => {
|
|
12324
|
-
if (focused ? !disabled : focusOwnerRef.current === setFieldFocused) {
|
|
12325
|
-
focusOwnerRef.current = focused && setFieldFocused;
|
|
12326
|
-
onFocusedChange?.(focused);
|
|
12327
|
-
setFocused(focused);
|
|
12328
|
-
}
|
|
12329
|
-
});
|
|
12330
|
-
useIsoLayoutEffect(() => {
|
|
12331
|
-
const el = focusTargetRef.current;
|
|
12332
|
-
if ((el?.getRootNode())?.activeElement === el) setFieldFocused(true);
|
|
12333
|
-
return () => setFieldFocused(false);
|
|
12334
|
-
}, [
|
|
12335
|
-
disabled,
|
|
12336
|
-
focusTargetRef,
|
|
12337
|
-
setFieldFocused
|
|
12338
|
-
]);
|
|
12339
|
-
return setFieldFocused;
|
|
12340
|
-
}
|
|
12341
12505
|
// node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs
|
|
12342
12506
|
const BOUNDARY_OFFSET = 5;
|
|
12343
12507
|
/**
|
|
@@ -14456,36 +14620,6 @@ window.__ModuleLoader__.load({
|
|
|
14456
14620
|
return { [unchecked]: "" };
|
|
14457
14621
|
}
|
|
14458
14622
|
};
|
|
14459
|
-
// node_modules/@base-ui/react/internals/labelable-provider/useAriaLabelledBy.mjs
|
|
14460
|
-
function useAriaLabelledBy(explicitAriaLabelledBy, labelId, labelSourceRef, enableFallback = true, labelSourceId, ariaLabel) {
|
|
14461
|
-
const [fallbackAriaLabelledBy, setFallbackAriaLabelledBy] = react.useState();
|
|
14462
|
-
const generatedLabelId = useBaseUiId(labelSourceId ? `${labelSourceId}-label` : void 0);
|
|
14463
|
-
const hasAriaLabel = Boolean(ariaLabel?.trim());
|
|
14464
|
-
const ariaLabelledBy = explicitAriaLabelledBy ?? (hasAriaLabel ? void 0 : labelId) ?? fallbackAriaLabelledBy;
|
|
14465
|
-
useIsoLayoutEffect(() => {
|
|
14466
|
-
const nextAriaLabelledBy = explicitAriaLabelledBy || labelId || hasAriaLabel || !enableFallback ? void 0 : getAriaLabelledBy(labelSourceRef.current, generatedLabelId);
|
|
14467
|
-
if (fallbackAriaLabelledBy !== nextAriaLabelledBy) setFallbackAriaLabelledBy(nextAriaLabelledBy);
|
|
14468
|
-
});
|
|
14469
|
-
return ariaLabelledBy;
|
|
14470
|
-
}
|
|
14471
|
-
function getAriaLabelledBy(labelSource, generatedLabelId) {
|
|
14472
|
-
const label = findAssociatedLabel(labelSource);
|
|
14473
|
-
if (!label) return;
|
|
14474
|
-
if (!label.id && generatedLabelId) label.id = generatedLabelId;
|
|
14475
|
-
return label.id || void 0;
|
|
14476
|
-
}
|
|
14477
|
-
function findAssociatedLabel(labelSource) {
|
|
14478
|
-
if (!labelSource) return;
|
|
14479
|
-
const parent = labelSource.parentElement;
|
|
14480
|
-
if (parent && parent.tagName === "LABEL") return parent;
|
|
14481
|
-
const controlId = labelSource.id;
|
|
14482
|
-
if (controlId) {
|
|
14483
|
-
const nextSibling = labelSource.nextElementSibling;
|
|
14484
|
-
if (nextSibling && nextSibling.htmlFor === controlId) return nextSibling;
|
|
14485
|
-
}
|
|
14486
|
-
const labels = labelSource.labels;
|
|
14487
|
-
return labels && labels[0];
|
|
14488
|
-
}
|
|
14489
14623
|
// node_modules/@base-ui/react/switch/root/SwitchRoot.mjs
|
|
14490
14624
|
/**
|
|
14491
14625
|
* Represents the switch itself.
|
|
@@ -14660,17 +14794,22 @@ window.__ModuleLoader__.load({
|
|
|
14660
14794
|
});
|
|
14661
14795
|
}
|
|
14662
14796
|
// client/feature-settings.tsx
|
|
14663
|
-
function SettingRow({ title, description, error, children }) {
|
|
14797
|
+
function SettingRow({ title, description, error, inputId, children }) {
|
|
14664
14798
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14665
|
-
className: "cp:flex cp:items-center cp:justify-between cp:gap-6 cp:border-0 cp:border-b cp:border-solid cp:border-border cp:py-4 cp:last:border-b-0",
|
|
14799
|
+
className: cn("cp:flex cp:items-center cp:justify-between cp:gap-6 cp:border-0 cp:border-b cp:border-solid cp:border-border cp:py-4 cp:last:border-b-0", inputId && "cp:flex-wrap cp:gap-x-6 cp:gap-y-2"),
|
|
14666
14800
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14667
|
-
className: "cp:min-w-0",
|
|
14801
|
+
className: cn("cp:min-w-0", inputId && "cp:flex-1 cp:basis-52"),
|
|
14668
14802
|
children: [
|
|
14669
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
14803
|
+
inputId ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
14804
|
+
htmlFor: inputId,
|
|
14805
|
+
className: "cp:text-sm cp:leading-5",
|
|
14806
|
+
children: title
|
|
14807
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14670
14808
|
className: "cp:text-sm cp:leading-5",
|
|
14671
14809
|
children: title
|
|
14672
14810
|
}),
|
|
14673
14811
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
14812
|
+
id: inputId && `${inputId}-hint`,
|
|
14674
14813
|
className: "cp:mt-1 cp:mb-0 cp:text-xs cp:leading-[18px] cp:text-muted-foreground",
|
|
14675
14814
|
children: description
|
|
14676
14815
|
}),
|
|
@@ -14718,22 +14857,61 @@ window.__ModuleLoader__.load({
|
|
|
14718
14857
|
const snapshot = (0, react.useSyncExternalStore)((listener) => form.subscribe(listener), () => form.getSnapshot());
|
|
14719
14858
|
const [saving, setSaving] = (0, react.useState)();
|
|
14720
14859
|
const [error, setError] = (0, react.useState)();
|
|
14860
|
+
const [proxyDraft, setProxyDraft] = (0, react.useState)();
|
|
14861
|
+
const [proxyCommit, setProxyCommit] = (0, react.useState)();
|
|
14862
|
+
const [proxyNotice, setProxyNotice] = (0, react.useState)();
|
|
14863
|
+
const savingProxy = (0, react.useRef)(false);
|
|
14864
|
+
const proxyId = (0, react.useId)();
|
|
14721
14865
|
async function save(key, value) {
|
|
14722
14866
|
setSaving(key);
|
|
14723
14867
|
setError(void 0);
|
|
14724
14868
|
try {
|
|
14725
14869
|
await setPreference(rpc, key, value);
|
|
14870
|
+
return true;
|
|
14726
14871
|
} catch (cause) {
|
|
14727
14872
|
setError({
|
|
14728
14873
|
key,
|
|
14874
|
+
code: cause instanceof PreferenceError ? cause.code : void 0,
|
|
14729
14875
|
message: cause instanceof Error ? cause.message : "Could not save settings. Please try again."
|
|
14730
14876
|
});
|
|
14877
|
+
return false;
|
|
14731
14878
|
} finally {
|
|
14732
14879
|
setSaving(void 0);
|
|
14733
14880
|
}
|
|
14734
14881
|
}
|
|
14735
|
-
const
|
|
14882
|
+
const writable = snapshot.status === "ready" && snapshot.writable;
|
|
14883
|
+
const disabled = !!saving || !writable;
|
|
14736
14884
|
const canSearch = capabilities?.webSearch !== false;
|
|
14885
|
+
const modelProxy = snapshot.value?.modelProxy ?? "";
|
|
14886
|
+
const currentProxy = proxyCommit?.previous === modelProxy ? proxyCommit.value : modelProxy;
|
|
14887
|
+
(0, react.useEffect)(() => {
|
|
14888
|
+
if (proxyCommit && proxyCommit.previous !== modelProxy) setProxyCommit(void 0);
|
|
14889
|
+
}, [modelProxy, proxyCommit]);
|
|
14890
|
+
const nextProxy = proxyDraft?.trim();
|
|
14891
|
+
const canSaveProxy = !disabled && nextProxy !== void 0 && nextProxy !== currentProxy;
|
|
14892
|
+
const proxyError = error?.key === "modelProxy" ? error : void 0;
|
|
14893
|
+
let proxyStatus = proxyNotice;
|
|
14894
|
+
if (snapshot.status === "loading") proxyStatus = "Loading proxy settings…";
|
|
14895
|
+
else if (snapshot.status === "unavailable") proxyStatus = "Proxy settings are unavailable.";
|
|
14896
|
+
else if (!writable) proxyStatus = "Proxy settings are read-only.";
|
|
14897
|
+
else if (saving === "modelProxy") proxyStatus = "Saving…";
|
|
14898
|
+
async function saveProxy() {
|
|
14899
|
+
if (!canSaveProxy || savingProxy.current) return;
|
|
14900
|
+
savingProxy.current = true;
|
|
14901
|
+
setProxyNotice(void 0);
|
|
14902
|
+
try {
|
|
14903
|
+
if (await save("modelProxy", nextProxy)) {
|
|
14904
|
+
setProxyCommit({
|
|
14905
|
+
previous: modelProxy,
|
|
14906
|
+
value: nextProxy
|
|
14907
|
+
});
|
|
14908
|
+
setProxyDraft(void 0);
|
|
14909
|
+
setProxyNotice(nextProxy ? "Proxy settings saved." : "Using default network settings.");
|
|
14910
|
+
}
|
|
14911
|
+
} finally {
|
|
14912
|
+
savingProxy.current = false;
|
|
14913
|
+
}
|
|
14914
|
+
}
|
|
14737
14915
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14738
14916
|
className: "cp:mt-5 cp:border-0 cp:border-t cp:border-solid cp:border-border",
|
|
14739
14917
|
children: [
|
|
@@ -14810,6 +14988,64 @@ window.__ModuleLoader__.load({
|
|
|
14810
14988
|
disabled,
|
|
14811
14989
|
onChange: (value) => void save("imageDetail", value)
|
|
14812
14990
|
})
|
|
14991
|
+
}),
|
|
14992
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, {
|
|
14993
|
+
title: t("Model request proxy"),
|
|
14994
|
+
description: t("Use an HTTP or HTTPS forward proxy for ChatGPT model requests only. If it fails, requests are not sent directly. Clear the address and save to restore the default network settings."),
|
|
14995
|
+
inputId: proxyId,
|
|
14996
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
14997
|
+
className: "cp:min-w-0 cp:flex-1 cp:basis-60",
|
|
14998
|
+
children: [
|
|
14999
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15000
|
+
className: "cp:flex cp:items-center cp:gap-2",
|
|
15001
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Input, {
|
|
15002
|
+
id: proxyId,
|
|
15003
|
+
"aria-describedby": `${proxyId}-hint${proxyError ? ` ${proxyId}-error` : ""}`,
|
|
15004
|
+
"aria-invalid": proxyError?.code === "invalid-model-proxy" || void 0,
|
|
15005
|
+
autoComplete: "off",
|
|
15006
|
+
spellCheck: false,
|
|
15007
|
+
inputMode: "url",
|
|
15008
|
+
placeholder: "http://127.0.0.1:7890",
|
|
15009
|
+
value: proxyDraft ?? currentProxy,
|
|
15010
|
+
disabled: !writable,
|
|
15011
|
+
readOnly: !!saving,
|
|
15012
|
+
onChange: (event) => {
|
|
15013
|
+
setProxyDraft(event.currentTarget.value);
|
|
15014
|
+
setProxyNotice(void 0);
|
|
15015
|
+
if (proxyError) setError(void 0);
|
|
15016
|
+
},
|
|
15017
|
+
onKeyDown: (event) => {
|
|
15018
|
+
if (event.key !== "Enter" || event.nativeEvent.isComposing) return;
|
|
15019
|
+
event.preventDefault();
|
|
15020
|
+
saveProxy();
|
|
15021
|
+
}
|
|
15022
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
15023
|
+
type: "button",
|
|
15024
|
+
size: "sm",
|
|
15025
|
+
variant: "outline",
|
|
15026
|
+
className: "cp:aria-disabled:opacity-50",
|
|
15027
|
+
disabled: !canSaveProxy,
|
|
15028
|
+
focusableWhenDisabled: true,
|
|
15029
|
+
onClick: saveProxy,
|
|
15030
|
+
children: t("Save")
|
|
15031
|
+
})]
|
|
15032
|
+
}),
|
|
15033
|
+
proxyError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15034
|
+
id: `${proxyId}-error`,
|
|
15035
|
+
role: "alert",
|
|
15036
|
+
className: "cp:mt-1 cp:mb-0 cp:text-xs cp:text-destructive",
|
|
15037
|
+
children: t(proxyError.message)
|
|
15038
|
+
}),
|
|
15039
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15040
|
+
role: "status",
|
|
15041
|
+
className: "cp:text-xs cp:text-muted-foreground",
|
|
15042
|
+
children: proxyStatus && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
15043
|
+
className: "cp:mt-1 cp:mb-0",
|
|
15044
|
+
children: t(proxyStatus)
|
|
15045
|
+
})
|
|
15046
|
+
})
|
|
15047
|
+
]
|
|
15048
|
+
})
|
|
14813
15049
|
})
|
|
14814
15050
|
]
|
|
14815
15051
|
});
|
|
@@ -15307,6 +15543,16 @@ window.__ModuleLoader__.load({
|
|
|
15307
15543
|
Team: "Team",
|
|
15308
15544
|
"Built-in web search is not available with this sign-in method.": "Built-in web search is not available with this sign-in method.",
|
|
15309
15545
|
"Built-in web search is not available with this sign-in method. Choose an SIWC account to use it.": "Built-in web search is not available with this sign-in method. Choose an SIWC account to use it.",
|
|
15546
|
+
"Model request proxy": "Model request proxy",
|
|
15547
|
+
"Use an HTTP or HTTPS forward proxy for ChatGPT model requests only. If it fails, requests are not sent directly. Clear the address and save to restore the default network settings.": "Use an HTTP or HTTPS forward proxy for ChatGPT model requests only. If it fails, requests are not sent directly. Clear the address and save to restore the default network settings.",
|
|
15548
|
+
"Enter an HTTP or HTTPS proxy address without credentials or a path.": "Enter an HTTP or HTTPS proxy address without credentials or a path.",
|
|
15549
|
+
Save: "Save",
|
|
15550
|
+
"Saving…": "Saving…",
|
|
15551
|
+
"Loading proxy settings…": "Loading proxy settings…",
|
|
15552
|
+
"Proxy settings are unavailable.": "Proxy settings are unavailable.",
|
|
15553
|
+
"Proxy settings are read-only.": "Proxy settings are read-only.",
|
|
15554
|
+
"Proxy settings saved.": "Proxy settings saved.",
|
|
15555
|
+
"Using default network settings.": "Using default network settings.",
|
|
15310
15556
|
"Image detail": "Image detail",
|
|
15311
15557
|
"Choose the detail used to read attached images. Available levels depend on the model.": "Choose the detail used to read attached images. Available levels depend on the model.",
|
|
15312
15558
|
Automatic: "Automatic",
|
|
@@ -15455,6 +15701,16 @@ window.__ModuleLoader__.load({
|
|
|
15455
15701
|
Team: "Team",
|
|
15456
15702
|
"Built-in web search is not available with this sign-in method.": "当前登录方式暂未提供内置网页搜索。",
|
|
15457
15703
|
"Built-in web search is not available with this sign-in method. Choose an SIWC account to use it.": "当前登录方式暂未提供内置网页搜索。切换到 SIWC 账号后可使用。",
|
|
15704
|
+
"Model request proxy": "模型请求代理",
|
|
15705
|
+
"Use an HTTP or HTTPS forward proxy for ChatGPT model requests only. If it fails, requests are not sent directly. Clear the address and save to restore the default network settings.": "仅为 ChatGPT 模型请求使用 HTTP 或 HTTPS 转发代理。代理失败时不会改为直连。清空地址并保存可恢复默认网络设置。",
|
|
15706
|
+
"Enter an HTTP or HTTPS proxy address without credentials or a path.": "请输入不含用户名、密码或路径的 HTTP 或 HTTPS 代理地址。",
|
|
15707
|
+
Save: "保存",
|
|
15708
|
+
"Saving…": "正在保存…",
|
|
15709
|
+
"Loading proxy settings…": "正在读取代理设置…",
|
|
15710
|
+
"Proxy settings are unavailable.": "代理设置暂不可用。",
|
|
15711
|
+
"Proxy settings are read-only.": "代理设置为只读。",
|
|
15712
|
+
"Proxy settings saved.": "代理设置已保存。",
|
|
15713
|
+
"Using default network settings.": "已恢复默认网络设置。",
|
|
15458
15714
|
"Image detail": "图片精度",
|
|
15459
15715
|
"Choose the detail used to read attached images. Available levels depend on the model.": "选择读取所附图片时使用的精度。可用档位取决于模型。",
|
|
15460
15716
|
Automatic: "自动",
|
|
@@ -17367,7 +17623,7 @@ window.__ModuleLoader__.load({
|
|
|
17367
17623
|
});
|
|
17368
17624
|
}
|
|
17369
17625
|
// client/styles.generated.css?inline
|
|
17370
|
-
var styles_generated_default = "/*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */\n@layer properties {\n @supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {\n *, :before, :after, ::backdrop {\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n }\n }\n}\n\n@layer theme {\n :root, :host {\n --cp-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n --cp-color-black: #000;\n --cp-color-white: #fff;\n --cp-spacing: .25rem;\n --cp-container-sm: 24rem;\n --cp-container-3xl: 48rem;\n --cp-text-xs: .75rem;\n --cp-text-xs--line-height: calc(1 / .75);\n --cp-text-sm: .875rem;\n --cp-text-sm--line-height: calc(1.25 / .875);\n --cp-text-base: 1rem;\n --cp-text-base--line-height: calc(1.5 / 1);\n --cp-text-lg: 1.125rem;\n --cp-text-lg--line-height: calc(1.75 / 1.125);\n --cp-font-weight-normal: 400;\n --cp-font-weight-medium: 500;\n --cp-font-weight-semibold: 600;\n --cp-tracking-tight: -.025em;\n --cp-tracking-widest: .1em;\n --cp-leading-relaxed: 1.625;\n --cp-radius-md: .375rem;\n --cp-radius-lg: .5rem;\n --cp-radius-xl: .75rem;\n --cp-radius-2xl: 1rem;\n --cp-animate-spin: spin 1s linear infinite;\n --cp-animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;\n --cp-default-transition-duration: .15s;\n --cp-default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n }\n}\n\n@layer base, components;\n\n@layer utilities {\n .cp\\:pointer-events-none {\n pointer-events: none;\n }\n\n .cp\\:absolute {\n position: absolute;\n }\n\n .cp\\:relative {\n position: relative;\n }\n\n .cp\\:right-2\\.5 {\n right: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:z-50 {\n z-index: 50;\n }\n\n .cp\\:m-0 {\n margin: 0;\n }\n\n .cp\\:mx-0\\.5 {\n margin-inline: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:mx-1 {\n margin-inline: var(--cp-spacing);\n }\n\n .cp\\:mx-2\\.5 {\n margin-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:mx-auto {\n margin-inline: auto;\n }\n\n .cp\\:my-1 {\n margin-block: var(--cp-spacing);\n }\n\n .cp\\:my-2 {\n margin-block: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:mt-0\\.5 {\n margin-top: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:mt-1 {\n margin-top: var(--cp-spacing);\n }\n\n .cp\\:mt-2 {\n margin-top: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:mt-3 {\n margin-top: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:mt-5 {\n margin-top: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:mr-auto {\n margin-right: auto;\n }\n\n .cp\\:mb-0 {\n margin-bottom: 0;\n }\n\n .cp\\:mb-5 {\n margin-bottom: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:mb-6 {\n margin-bottom: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:mb-7 {\n margin-bottom: calc(var(--cp-spacing) * 7);\n }\n\n .cp\\:ml-auto {\n margin-left: auto;\n }\n\n .cp\\:box-border {\n box-sizing: border-box;\n }\n\n .cp\\:block {\n display: block;\n }\n\n .cp\\:flex {\n display: flex;\n }\n\n .cp\\:inline-flex {\n display: inline-flex;\n }\n\n .cp\\:size-3 {\n width: calc(var(--cp-spacing) * 3);\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:size-3\\.5 {\n width: calc(var(--cp-spacing) * 3.5);\n height: calc(var(--cp-spacing) * 3.5);\n }\n\n .cp\\:size-4 {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:size-5 {\n width: calc(var(--cp-spacing) * 5);\n height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:size-6 {\n width: calc(var(--cp-spacing) * 6);\n height: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:size-8 {\n width: calc(var(--cp-spacing) * 8);\n height: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:size-9 {\n width: calc(var(--cp-spacing) * 9);\n height: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:size-10 {\n width: calc(var(--cp-spacing) * 10);\n height: calc(var(--cp-spacing) * 10);\n }\n\n .cp\\:size-full {\n width: 100%;\n height: 100%;\n }\n\n .cp\\:h-2 {\n height: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:h-3 {\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:h-4 {\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:h-5 {\n height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:h-6 {\n height: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:h-8 {\n height: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:h-9 {\n height: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:h-10 {\n height: calc(var(--cp-spacing) * 10);\n }\n\n .cp\\:h-11 {\n height: calc(var(--cp-spacing) * 11);\n }\n\n .cp\\:h-auto {\n height: auto;\n }\n\n .cp\\:h-px {\n height: 1px;\n }\n\n .cp\\:max-h-\\[var\\(--available-height\\)\\] {\n max-height: var(--available-height);\n }\n\n .cp\\:min-h-14 {\n min-height: calc(var(--cp-spacing) * 14);\n }\n\n .cp\\:w-2\\/3 {\n width: 66.6667%;\n }\n\n .cp\\:w-9 {\n width: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:w-40 {\n width: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:w-56 {\n width: calc(var(--cp-spacing) * 56);\n }\n\n .cp\\:w-\\[calc\\(100\\%-2rem\\)\\] {\n width: calc(100% - 2rem);\n }\n\n .cp\\:w-\\[calc\\(100\\%-4px\\)\\] {\n width: calc(100% - 4px);\n }\n\n .cp\\:w-full {\n width: 100%;\n }\n\n .cp\\:max-w-3xl {\n max-width: var(--cp-container-3xl);\n }\n\n .cp\\:max-w-56 {\n max-width: calc(var(--cp-spacing) * 56);\n }\n\n .cp\\:max-w-\\[calc\\(100vw-1rem\\)\\] {\n max-width: calc(100vw - 1rem);\n }\n\n .cp\\:max-w-full {\n max-width: 100%;\n }\n\n .cp\\:max-w-sm {\n max-width: var(--cp-container-sm);\n }\n\n .cp\\:min-w-0 {\n min-width: 0;\n }\n\n .cp\\:min-w-40 {\n min-width: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:min-w-52 {\n min-width: calc(var(--cp-spacing) * 52);\n }\n\n .cp\\:flex-1 {\n flex: 1;\n }\n\n .cp\\:shrink-0 {\n flex-shrink: 0;\n }\n\n .cp\\:basis-40 {\n flex-basis: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:basis-full {\n flex-basis: 100%;\n }\n\n .cp\\:animate-pulse {\n animation: var(--cp-animate-pulse);\n }\n\n .cp\\:animate-spin {\n animation: var(--cp-animate-spin);\n }\n\n .cp\\:cursor-default {\n cursor: default;\n }\n\n .cp\\:cursor-pointer {\n cursor: pointer;\n }\n\n .cp\\:flex-wrap {\n flex-wrap: wrap;\n }\n\n .cp\\:items-center {\n align-items: center;\n }\n\n .cp\\:items-start {\n align-items: flex-start;\n }\n\n .cp\\:justify-between {\n justify-content: space-between;\n }\n\n .cp\\:justify-center {\n justify-content: center;\n }\n\n .cp\\:justify-end {\n justify-content: flex-end;\n }\n\n .cp\\:justify-start {\n justify-content: flex-start;\n }\n\n .cp\\:gap-0 {\n gap: 0;\n }\n\n .cp\\:gap-1 {\n gap: var(--cp-spacing);\n }\n\n .cp\\:gap-1\\.5 {\n gap: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:gap-2 {\n gap: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:gap-3 {\n gap: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:gap-6 {\n gap: calc(var(--cp-spacing) * 6);\n }\n\n :where(.cp\\:space-y-1 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(var(--cp-spacing) * var(--tw-space-y-reverse));\n margin-block-end: calc(var(--cp-spacing) * calc(1 - var(--tw-space-y-reverse)));\n }\n\n :where(.cp\\:space-y-3 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--cp-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--cp-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n\n .cp\\:gap-x-3 {\n column-gap: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:gap-y-1 {\n row-gap: var(--cp-spacing);\n }\n\n .cp\\:truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n .cp\\:overflow-hidden {\n overflow: hidden;\n }\n\n .cp\\:overflow-y-auto {\n overflow-y: auto;\n }\n\n .cp\\:rounded-2xl {\n border-radius: var(--cp-radius-2xl);\n }\n\n .cp\\:rounded-\\[var\\(--dsw-radius-md\\)\\] {\n border-radius: var(--dsw-radius-md);\n }\n\n .cp\\:rounded-full {\n border-radius: 2147483647px;\n }\n\n .cp\\:rounded-lg {\n border-radius: var(--cp-radius-lg);\n }\n\n .cp\\:rounded-md {\n border-radius: var(--cp-radius-md);\n }\n\n .cp\\:rounded-xl {\n border-radius: var(--cp-radius-xl);\n }\n\n .cp\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n\n .cp\\:border-0 {\n border-style: var(--tw-border-style);\n border-width: 0;\n }\n\n .cp\\:border-x-0 {\n border-inline-style: var(--tw-border-style);\n border-inline-width: 0;\n }\n\n .cp\\:border-y {\n border-block-style: var(--tw-border-style);\n border-block-width: 1px;\n }\n\n .cp\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n\n .cp\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n\n .cp\\:border-solid {\n --tw-border-style: solid;\n border-style: solid;\n }\n\n .cp\\:border-border {\n border-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:border-transparent {\n border-color: #0000;\n }\n\n .cp\\:bg-accent {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:bg-background {\n background-color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:bg-border {\n background-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:bg-destructive {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:bg-foreground {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:bg-muted, .cp\\:bg-muted\\/20 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/20 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 20%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/40 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/40 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 40%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/50 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/50 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 50%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/60 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/60 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 60%, transparent);\n }\n }\n\n .cp\\:bg-primary {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:bg-secondary {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:bg-transparent {\n background-color: #0000;\n }\n\n .cp\\:object-cover {\n object-fit: cover;\n }\n\n .cp\\:p-0 {\n padding: 0;\n }\n\n .cp\\:p-0\\.5 {\n padding: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:p-1 {\n padding: var(--cp-spacing);\n }\n\n .cp\\:p-1\\.5 {\n padding: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:p-6 {\n padding: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:px-1\\.5 {\n padding-inline: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:px-2 {\n padding-inline: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:px-2\\.5 {\n padding-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:px-3 {\n padding-inline: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:px-4 {\n padding-inline: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:px-6 {\n padding-inline: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:py-0\\.5 {\n padding-block: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:py-2 {\n padding-block: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:py-2\\.5 {\n padding-block: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:py-3 {\n padding-block: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:py-4 {\n padding-block: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:py-5 {\n padding-block: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:py-8 {\n padding-block: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:pt-4 {\n padding-top: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:pr-8 {\n padding-right: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:pb-2 {\n padding-bottom: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:pb-3 {\n padding-bottom: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:pb-4 {\n padding-bottom: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:pl-2\\.5 {\n padding-left: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:pl-4 {\n padding-left: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:text-left {\n text-align: left;\n }\n\n .cp\\:font-mono {\n font-family: var(--cp-font-mono);\n }\n\n .cp\\:text-base {\n font-size: var(--cp-text-base);\n line-height: var(--tw-leading, var(--cp-text-base--line-height));\n }\n\n .cp\\:text-lg {\n font-size: var(--cp-text-lg);\n line-height: var(--tw-leading, var(--cp-text-lg--line-height));\n }\n\n .cp\\:text-sm {\n font-size: var(--cp-text-sm);\n line-height: var(--tw-leading, var(--cp-text-sm--line-height));\n }\n\n .cp\\:text-xs {\n font-size: var(--cp-text-xs);\n line-height: var(--tw-leading, var(--cp-text-xs--line-height));\n }\n\n .cp\\:text-\\[10px\\] {\n font-size: 10px;\n }\n\n .cp\\:leading-4 {\n --tw-leading: calc(var(--cp-spacing) * 4);\n line-height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:leading-5 {\n --tw-leading: calc(var(--cp-spacing) * 5);\n line-height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:leading-\\[18px\\] {\n --tw-leading: 18px;\n line-height: 18px;\n }\n\n .cp\\:leading-relaxed {\n --tw-leading: var(--cp-leading-relaxed);\n line-height: var(--cp-leading-relaxed);\n }\n\n .cp\\:font-medium {\n --tw-font-weight: var(--cp-font-weight-medium);\n font-weight: var(--cp-font-weight-medium);\n }\n\n .cp\\:font-normal {\n --tw-font-weight: var(--cp-font-weight-normal);\n font-weight: var(--cp-font-weight-normal);\n }\n\n .cp\\:font-semibold {\n --tw-font-weight: var(--cp-font-weight-semibold);\n font-weight: var(--cp-font-weight-semibold);\n }\n\n .cp\\:tracking-tight {\n --tw-tracking: var(--cp-tracking-tight);\n letter-spacing: var(--cp-tracking-tight);\n }\n\n .cp\\:tracking-widest {\n --tw-tracking: var(--cp-tracking-widest);\n letter-spacing: var(--cp-tracking-widest);\n }\n\n .cp\\:break-words {\n overflow-wrap: break-word;\n }\n\n .cp\\:break-all {\n word-break: break-all;\n }\n\n .cp\\:whitespace-normal {\n white-space: normal;\n }\n\n .cp\\:whitespace-nowrap {\n white-space: nowrap;\n }\n\n .cp\\:text-destructive {\n color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:text-foreground {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-muted-foreground {\n color: var(--dsw-alias-label-secondary);\n }\n\n .cp\\:text-primary {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-primary-foreground {\n color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:text-secondary-foreground {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-white {\n color: var(--cp-color-white);\n }\n\n .cp\\:underline {\n text-decoration-line: underline;\n }\n\n .cp\\:underline-offset-4 {\n text-underline-offset: 4px;\n }\n\n .cp\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), 0 4px 6px -4px var(--tw-shadow-color, #0000001a);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), 0 8px 10px -6px var(--tw-shadow-color, #0000001a);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:shadow-xs {\n --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:duration-150 {\n --tw-duration: .15s;\n transition-duration: .15s;\n }\n\n .cp\\:outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n\n .cp\\:select-all {\n -webkit-user-select: all;\n user-select: all;\n }\n\n .cp\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n\n @media (hover: hover) {\n :is(:where(.cp\\:group):hover .cp\\:group-hover\\:translate-x-1) {\n --tw-translate-x: var(--cp-spacing);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n\n :is(:where(.cp\\:group):focus-visible .cp\\:group-focus-visible\\:translate-x-1) {\n --tw-translate-x: var(--cp-spacing);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n\n .cp\\:backdrop\\:bg-black\\/60::backdrop {\n background-color: var(--cp-color-black);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:backdrop\\:bg-black\\/60::backdrop {\n background-color: color-mix(in oklab, var(--cp-color-black) 60%, transparent);\n }\n }\n\n .cp\\:last\\:border-b-0:last-child {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 0;\n }\n\n @media (hover: hover) {\n .cp\\:hover\\:bg-accent:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:hover\\:bg-destructive\\/10:hover {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-destructive\\/10:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 10%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-destructive\\/90:hover {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-destructive\\/90:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 90%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-primary\\/90:hover {\n background-color: var(--dsw-alias-label-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-primary\\/90:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-label-primary) 90%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-secondary\\/80:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-secondary\\/80:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 80%, transparent);\n }\n }\n\n .cp\\:hover\\:text-accent-foreground:hover {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:hover\\:text-destructive:hover {\n color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:hover\\:underline:hover {\n text-decoration-line: underline;\n }\n }\n\n .cp\\:focus-visible\\:border-ring:focus-visible {\n border-color: var(--dsw-alias-brand-primary);\n }\n\n .cp\\:focus-visible\\:ring-2:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:focus-visible\\:ring-\\[3px\\]:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:focus-visible\\:ring-destructive\\/20:focus-visible {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:focus-visible\\:ring-destructive\\/20:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 20%, transparent);\n }\n }\n\n .cp\\:focus-visible\\:ring-ring:focus-visible, .cp\\:focus-visible\\:ring-ring\\/50:focus-visible {\n --tw-ring-color: var(--dsw-alias-brand-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:focus-visible\\:ring-ring\\/50:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-brand-primary) 50%, transparent);\n }\n }\n\n .cp\\:focus-visible\\:outline-none:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n\n .cp\\:disabled\\:pointer-events-none:disabled {\n pointer-events: none;\n }\n\n .cp\\:disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n }\n\n .cp\\:disabled\\:opacity-50:disabled {\n opacity: .5;\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-0:has( > svg) {\n padding-inline: 0;\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-1\\.5:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-2\\.5:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-3:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-4:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:pr-5:has( > svg) {\n padding-right: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:pl-3:has( > svg) {\n padding-left: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:aria-invalid\\:border-destructive[aria-invalid=\"true\"] {\n border-color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=\"true\"] {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=\"true\"] {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 20%, transparent);\n }\n }\n\n .cp\\:data-checked\\:translate-x-4[data-checked] {\n --tw-translate-x: calc(var(--cp-spacing) * 4);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n\n .cp\\:data-checked\\:bg-primary[data-checked] {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:data-checked\\:bg-primary-foreground[data-checked] {\n background-color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:data-disabled\\:pointer-events-none[data-disabled] {\n pointer-events: none;\n }\n\n .cp\\:data-disabled\\:opacity-50[data-disabled] {\n opacity: .5;\n }\n\n .cp\\:data-highlighted\\:bg-accent[data-highlighted], .cp\\:data-unchecked\\:bg-accent[data-unchecked] {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .cp\\:motion-reduce\\:transform-none {\n transform: none;\n }\n\n .cp\\:motion-reduce\\:animate-none {\n animation: none;\n }\n\n .cp\\:motion-reduce\\:transition-none {\n transition-property: none;\n }\n }\n\n @media (prefers-color-scheme: dark) {\n .cp\\:dark\\:border-input {\n border-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:dark\\:bg-destructive\\/60 {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:bg-destructive\\/60 {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 60%, transparent);\n }\n }\n\n .cp\\:dark\\:bg-input\\/30 {\n background-color: var(--dsw-alias-border-l2);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:bg-input\\/30 {\n background-color: color-mix(in oklab, var(--dsw-alias-border-l2) 30%, transparent);\n }\n }\n\n @media (hover: hover) {\n .cp\\:dark\\:hover\\:bg-accent\\/50:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:hover\\:bg-accent\\/50:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 50%, transparent);\n }\n }\n\n .cp\\:dark\\:hover\\:bg-input\\/50:hover {\n background-color: var(--dsw-alias-border-l2);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:hover\\:bg-input\\/50:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-border-l2) 50%, transparent);\n }\n }\n }\n\n .cp\\:dark\\:focus-visible\\:ring-destructive\\/40:focus-visible {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:focus-visible\\:ring-destructive\\/40:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 40%, transparent);\n }\n }\n\n .cp\\:dark\\:aria-invalid\\:ring-destructive\\/40[aria-invalid=\"true\"] {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:aria-invalid\\:ring-destructive\\/40[aria-invalid=\"true\"] {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 40%, transparent);\n }\n }\n }\n\n .cp\\:\\[\\&_\\*\\]\\:box-border * {\n box-sizing: border-box;\n }\n\n .cp\\:\\[\\&_button\\]\\:font-\\[inherit\\] button {\n font-family: inherit;\n }\n\n .cp\\:\\[\\&_svg\\]\\:pointer-events-none svg {\n pointer-events: none;\n }\n\n .cp\\:\\[\\&_svg\\]\\:size-4 svg {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:\\[\\&_svg\\]\\:shrink-0 svg {\n flex-shrink: 0;\n }\n\n .cp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-3 svg:not([class*=\"size-\"]) {\n width: calc(var(--cp-spacing) * 3);\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=\"size-\"]) {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:\\[\\&\\:\\:-moz-progress-bar\\]\\:bg-foreground::-moz-progress-bar {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:\\[\\&\\:\\:-webkit-progress-bar\\]\\:bg-muted::-webkit-progress-bar {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:\\[\\&\\:\\:-webkit-progress-value\\]\\:bg-foreground::-webkit-progress-value {\n background-color: var(--dsw-alias-label-primary);\n }\n}\n\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n\n@property --tw-leading {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-duration {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n";
|
|
17626
|
+
var styles_generated_default = "/*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */\n@layer properties {\n @supports (((-webkit-hyphens: none)) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {\n *, :before, :after, ::backdrop {\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n }\n }\n}\n\n@layer theme {\n :root, :host {\n --cp-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n --cp-color-black: #000;\n --cp-color-white: #fff;\n --cp-spacing: .25rem;\n --cp-container-sm: 24rem;\n --cp-container-3xl: 48rem;\n --cp-text-xs: .75rem;\n --cp-text-xs--line-height: calc(1 / .75);\n --cp-text-sm: .875rem;\n --cp-text-sm--line-height: calc(1.25 / .875);\n --cp-text-base: 1rem;\n --cp-text-base--line-height: calc(1.5 / 1);\n --cp-text-lg: 1.125rem;\n --cp-text-lg--line-height: calc(1.75 / 1.125);\n --cp-font-weight-normal: 400;\n --cp-font-weight-medium: 500;\n --cp-font-weight-semibold: 600;\n --cp-tracking-tight: -.025em;\n --cp-tracking-widest: .1em;\n --cp-leading-relaxed: 1.625;\n --cp-radius-md: .375rem;\n --cp-radius-lg: .5rem;\n --cp-radius-xl: .75rem;\n --cp-radius-2xl: 1rem;\n --cp-animate-spin: spin 1s linear infinite;\n --cp-animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;\n --cp-default-transition-duration: .15s;\n --cp-default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);\n }\n}\n\n@layer base, components;\n\n@layer utilities {\n .cp\\:pointer-events-none {\n pointer-events: none;\n }\n\n .cp\\:absolute {\n position: absolute;\n }\n\n .cp\\:relative {\n position: relative;\n }\n\n .cp\\:right-2\\.5 {\n right: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:z-50 {\n z-index: 50;\n }\n\n .cp\\:m-0 {\n margin: 0;\n }\n\n .cp\\:mx-0\\.5 {\n margin-inline: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:mx-1 {\n margin-inline: var(--cp-spacing);\n }\n\n .cp\\:mx-2\\.5 {\n margin-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:mx-auto {\n margin-inline: auto;\n }\n\n .cp\\:my-1 {\n margin-block: var(--cp-spacing);\n }\n\n .cp\\:my-2 {\n margin-block: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:mt-0\\.5 {\n margin-top: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:mt-1 {\n margin-top: var(--cp-spacing);\n }\n\n .cp\\:mt-2 {\n margin-top: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:mt-3 {\n margin-top: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:mt-5 {\n margin-top: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:mr-auto {\n margin-right: auto;\n }\n\n .cp\\:mb-0 {\n margin-bottom: 0;\n }\n\n .cp\\:mb-5 {\n margin-bottom: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:mb-6 {\n margin-bottom: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:mb-7 {\n margin-bottom: calc(var(--cp-spacing) * 7);\n }\n\n .cp\\:ml-auto {\n margin-left: auto;\n }\n\n .cp\\:box-border {\n box-sizing: border-box;\n }\n\n .cp\\:block {\n display: block;\n }\n\n .cp\\:flex {\n display: flex;\n }\n\n .cp\\:inline-flex {\n display: inline-flex;\n }\n\n .cp\\:size-3 {\n width: calc(var(--cp-spacing) * 3);\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:size-3\\.5 {\n width: calc(var(--cp-spacing) * 3.5);\n height: calc(var(--cp-spacing) * 3.5);\n }\n\n .cp\\:size-4 {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:size-5 {\n width: calc(var(--cp-spacing) * 5);\n height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:size-6 {\n width: calc(var(--cp-spacing) * 6);\n height: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:size-8 {\n width: calc(var(--cp-spacing) * 8);\n height: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:size-9 {\n width: calc(var(--cp-spacing) * 9);\n height: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:size-10 {\n width: calc(var(--cp-spacing) * 10);\n height: calc(var(--cp-spacing) * 10);\n }\n\n .cp\\:size-full {\n width: 100%;\n height: 100%;\n }\n\n .cp\\:h-2 {\n height: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:h-3 {\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:h-4 {\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:h-5 {\n height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:h-6 {\n height: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:h-8 {\n height: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:h-9 {\n height: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:h-10 {\n height: calc(var(--cp-spacing) * 10);\n }\n\n .cp\\:h-11 {\n height: calc(var(--cp-spacing) * 11);\n }\n\n .cp\\:h-auto {\n height: auto;\n }\n\n .cp\\:h-px {\n height: 1px;\n }\n\n .cp\\:max-h-\\[var\\(--available-height\\)\\] {\n max-height: var(--available-height);\n }\n\n .cp\\:min-h-14 {\n min-height: calc(var(--cp-spacing) * 14);\n }\n\n .cp\\:w-2\\/3 {\n width: 66.6667%;\n }\n\n .cp\\:w-9 {\n width: calc(var(--cp-spacing) * 9);\n }\n\n .cp\\:w-40 {\n width: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:w-56 {\n width: calc(var(--cp-spacing) * 56);\n }\n\n .cp\\:w-\\[calc\\(100\\%-2rem\\)\\] {\n width: calc(100% - 2rem);\n }\n\n .cp\\:w-\\[calc\\(100\\%-4px\\)\\] {\n width: calc(100% - 4px);\n }\n\n .cp\\:w-full {\n width: 100%;\n }\n\n .cp\\:max-w-3xl {\n max-width: var(--cp-container-3xl);\n }\n\n .cp\\:max-w-56 {\n max-width: calc(var(--cp-spacing) * 56);\n }\n\n .cp\\:max-w-\\[calc\\(100vw-1rem\\)\\] {\n max-width: calc(100vw - 1rem);\n }\n\n .cp\\:max-w-full {\n max-width: 100%;\n }\n\n .cp\\:max-w-sm {\n max-width: var(--cp-container-sm);\n }\n\n .cp\\:min-w-0 {\n min-width: 0;\n }\n\n .cp\\:min-w-40 {\n min-width: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:min-w-52 {\n min-width: calc(var(--cp-spacing) * 52);\n }\n\n .cp\\:flex-1 {\n flex: 1;\n }\n\n .cp\\:shrink-0 {\n flex-shrink: 0;\n }\n\n .cp\\:basis-40 {\n flex-basis: calc(var(--cp-spacing) * 40);\n }\n\n .cp\\:basis-52 {\n flex-basis: calc(var(--cp-spacing) * 52);\n }\n\n .cp\\:basis-60 {\n flex-basis: calc(var(--cp-spacing) * 60);\n }\n\n .cp\\:basis-full {\n flex-basis: 100%;\n }\n\n .cp\\:animate-pulse {\n animation: var(--cp-animate-pulse);\n }\n\n .cp\\:animate-spin {\n animation: var(--cp-animate-spin);\n }\n\n .cp\\:cursor-default {\n cursor: default;\n }\n\n .cp\\:cursor-pointer {\n cursor: pointer;\n }\n\n .cp\\:flex-wrap {\n flex-wrap: wrap;\n }\n\n .cp\\:items-center {\n align-items: center;\n }\n\n .cp\\:items-start {\n align-items: flex-start;\n }\n\n .cp\\:justify-between {\n justify-content: space-between;\n }\n\n .cp\\:justify-center {\n justify-content: center;\n }\n\n .cp\\:justify-end {\n justify-content: flex-end;\n }\n\n .cp\\:justify-start {\n justify-content: flex-start;\n }\n\n .cp\\:gap-0 {\n gap: 0;\n }\n\n .cp\\:gap-1 {\n gap: var(--cp-spacing);\n }\n\n .cp\\:gap-1\\.5 {\n gap: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:gap-2 {\n gap: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:gap-3 {\n gap: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:gap-6 {\n gap: calc(var(--cp-spacing) * 6);\n }\n\n :where(.cp\\:space-y-1 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(var(--cp-spacing) * var(--tw-space-y-reverse));\n margin-block-end: calc(var(--cp-spacing) * calc(1 - var(--tw-space-y-reverse)));\n }\n\n :where(.cp\\:space-y-3 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--cp-spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--cp-spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n\n .cp\\:gap-x-3 {\n column-gap: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:gap-x-6 {\n column-gap: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:gap-y-1 {\n row-gap: var(--cp-spacing);\n }\n\n .cp\\:gap-y-2 {\n row-gap: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:truncate {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n .cp\\:overflow-hidden {\n overflow: hidden;\n }\n\n .cp\\:overflow-y-auto {\n overflow-y: auto;\n }\n\n .cp\\:rounded-2xl {\n border-radius: var(--cp-radius-2xl);\n }\n\n .cp\\:rounded-\\[var\\(--dsw-radius-md\\)\\] {\n border-radius: var(--dsw-radius-md);\n }\n\n .cp\\:rounded-full {\n border-radius: 2147483647px;\n }\n\n .cp\\:rounded-lg {\n border-radius: var(--cp-radius-lg);\n }\n\n .cp\\:rounded-md {\n border-radius: var(--cp-radius-md);\n }\n\n .cp\\:rounded-xl {\n border-radius: var(--cp-radius-xl);\n }\n\n .cp\\:border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n\n .cp\\:border-0 {\n border-style: var(--tw-border-style);\n border-width: 0;\n }\n\n .cp\\:border-x-0 {\n border-inline-style: var(--tw-border-style);\n border-inline-width: 0;\n }\n\n .cp\\:border-y {\n border-block-style: var(--tw-border-style);\n border-block-width: 1px;\n }\n\n .cp\\:border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n\n .cp\\:border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n\n .cp\\:border-solid {\n --tw-border-style: solid;\n border-style: solid;\n }\n\n .cp\\:border-border, .cp\\:border-input {\n border-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:border-transparent {\n border-color: #0000;\n }\n\n .cp\\:bg-accent {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:bg-background {\n background-color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:bg-border {\n background-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:bg-destructive {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:bg-foreground {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:bg-muted, .cp\\:bg-muted\\/20 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/20 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 20%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/40 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/40 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 40%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/50 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/50 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 50%, transparent);\n }\n }\n\n .cp\\:bg-muted\\/60 {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:bg-muted\\/60 {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 60%, transparent);\n }\n }\n\n .cp\\:bg-primary {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:bg-secondary {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:bg-transparent {\n background-color: #0000;\n }\n\n .cp\\:object-cover {\n object-fit: cover;\n }\n\n .cp\\:p-0 {\n padding: 0;\n }\n\n .cp\\:p-0\\.5 {\n padding: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:p-1 {\n padding: var(--cp-spacing);\n }\n\n .cp\\:p-1\\.5 {\n padding: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:p-6 {\n padding: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:px-1\\.5 {\n padding-inline: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:px-2 {\n padding-inline: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:px-2\\.5 {\n padding-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:px-3 {\n padding-inline: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:px-4 {\n padding-inline: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:px-6 {\n padding-inline: calc(var(--cp-spacing) * 6);\n }\n\n .cp\\:py-0\\.5 {\n padding-block: calc(var(--cp-spacing) * .5);\n }\n\n .cp\\:py-2 {\n padding-block: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:py-2\\.5 {\n padding-block: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:py-3 {\n padding-block: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:py-4 {\n padding-block: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:py-5 {\n padding-block: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:py-8 {\n padding-block: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:pt-4 {\n padding-top: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:pr-8 {\n padding-right: calc(var(--cp-spacing) * 8);\n }\n\n .cp\\:pb-2 {\n padding-bottom: calc(var(--cp-spacing) * 2);\n }\n\n .cp\\:pb-3 {\n padding-bottom: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:pb-4 {\n padding-bottom: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:pl-2\\.5 {\n padding-left: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:pl-4 {\n padding-left: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:text-left {\n text-align: left;\n }\n\n .cp\\:font-mono {\n font-family: var(--cp-font-mono);\n }\n\n .cp\\:text-base {\n font-size: var(--cp-text-base);\n line-height: var(--tw-leading, var(--cp-text-base--line-height));\n }\n\n .cp\\:text-lg {\n font-size: var(--cp-text-lg);\n line-height: var(--tw-leading, var(--cp-text-lg--line-height));\n }\n\n .cp\\:text-sm {\n font-size: var(--cp-text-sm);\n line-height: var(--tw-leading, var(--cp-text-sm--line-height));\n }\n\n .cp\\:text-xs {\n font-size: var(--cp-text-xs);\n line-height: var(--tw-leading, var(--cp-text-xs--line-height));\n }\n\n .cp\\:text-\\[10px\\] {\n font-size: 10px;\n }\n\n .cp\\:leading-4 {\n --tw-leading: calc(var(--cp-spacing) * 4);\n line-height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:leading-5 {\n --tw-leading: calc(var(--cp-spacing) * 5);\n line-height: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:leading-\\[18px\\] {\n --tw-leading: 18px;\n line-height: 18px;\n }\n\n .cp\\:leading-relaxed {\n --tw-leading: var(--cp-leading-relaxed);\n line-height: var(--cp-leading-relaxed);\n }\n\n .cp\\:font-medium {\n --tw-font-weight: var(--cp-font-weight-medium);\n font-weight: var(--cp-font-weight-medium);\n }\n\n .cp\\:font-normal {\n --tw-font-weight: var(--cp-font-weight-normal);\n font-weight: var(--cp-font-weight-normal);\n }\n\n .cp\\:font-semibold {\n --tw-font-weight: var(--cp-font-weight-semibold);\n font-weight: var(--cp-font-weight-semibold);\n }\n\n .cp\\:tracking-tight {\n --tw-tracking: var(--cp-tracking-tight);\n letter-spacing: var(--cp-tracking-tight);\n }\n\n .cp\\:tracking-widest {\n --tw-tracking: var(--cp-tracking-widest);\n letter-spacing: var(--cp-tracking-widest);\n }\n\n .cp\\:break-words {\n overflow-wrap: break-word;\n }\n\n .cp\\:break-all {\n word-break: break-all;\n }\n\n .cp\\:whitespace-normal {\n white-space: normal;\n }\n\n .cp\\:whitespace-nowrap {\n white-space: nowrap;\n }\n\n .cp\\:text-destructive {\n color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:text-foreground {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-muted-foreground {\n color: var(--dsw-alias-label-secondary);\n }\n\n .cp\\:text-primary {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-primary-foreground {\n color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:text-secondary-foreground {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:text-white {\n color: var(--cp-color-white);\n }\n\n .cp\\:underline {\n text-decoration-line: underline;\n }\n\n .cp\\:underline-offset-4 {\n text-underline-offset: 4px;\n }\n\n .cp\\:shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, #0000001a), 0 4px 6px -4px var(--tw-shadow-color, #0000001a);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:shadow-xl {\n --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, #0000001a), 0 8px 10px -6px var(--tw-shadow-color, #0000001a);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:shadow-xs {\n --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--cp-default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--cp-default-transition-duration));\n }\n\n .cp\\:duration-150 {\n --tw-duration: .15s;\n transition-duration: .15s;\n }\n\n .cp\\:outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n\n .cp\\:select-all {\n -webkit-user-select: all;\n user-select: all;\n }\n\n .cp\\:select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n\n @media (hover: hover) {\n :is(:where(.cp\\:group):hover .cp\\:group-hover\\:translate-x-1) {\n --tw-translate-x: var(--cp-spacing);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n\n :is(:where(.cp\\:group):focus-visible .cp\\:group-focus-visible\\:translate-x-1) {\n --tw-translate-x: var(--cp-spacing);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n\n .cp\\:placeholder\\:text-muted-foreground::placeholder {\n color: var(--dsw-alias-label-secondary);\n }\n\n .cp\\:backdrop\\:bg-black\\/60::backdrop {\n background-color: var(--cp-color-black);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:backdrop\\:bg-black\\/60::backdrop {\n background-color: color-mix(in oklab, var(--cp-color-black) 60%, transparent);\n }\n }\n\n .cp\\:last\\:border-b-0:last-child {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 0;\n }\n\n @media (hover: hover) {\n .cp\\:hover\\:bg-accent:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:hover\\:bg-destructive\\/10:hover {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-destructive\\/10:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 10%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-destructive\\/90:hover {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-destructive\\/90:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 90%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-primary\\/90:hover {\n background-color: var(--dsw-alias-label-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-primary\\/90:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-label-primary) 90%, transparent);\n }\n }\n\n .cp\\:hover\\:bg-secondary\\/80:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:hover\\:bg-secondary\\/80:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 80%, transparent);\n }\n }\n\n .cp\\:hover\\:text-accent-foreground:hover {\n color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:hover\\:text-destructive:hover {\n color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:hover\\:underline:hover {\n text-decoration-line: underline;\n }\n }\n\n .cp\\:focus-visible\\:border-ring:focus-visible {\n border-color: var(--dsw-alias-brand-primary);\n }\n\n .cp\\:focus-visible\\:ring-2:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:focus-visible\\:ring-\\[3px\\]:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n\n .cp\\:focus-visible\\:ring-destructive\\/20:focus-visible {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:focus-visible\\:ring-destructive\\/20:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 20%, transparent);\n }\n }\n\n .cp\\:focus-visible\\:ring-ring:focus-visible, .cp\\:focus-visible\\:ring-ring\\/50:focus-visible {\n --tw-ring-color: var(--dsw-alias-brand-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:focus-visible\\:ring-ring\\/50:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-brand-primary) 50%, transparent);\n }\n }\n\n .cp\\:focus-visible\\:outline-none:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n\n .cp\\:disabled\\:pointer-events-none:disabled {\n pointer-events: none;\n }\n\n .cp\\:disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n }\n\n .cp\\:disabled\\:opacity-50:disabled {\n opacity: .5;\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-0:has( > svg) {\n padding-inline: 0;\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-1\\.5:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 1.5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-2\\.5:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 2.5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-3:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:px-4:has( > svg) {\n padding-inline: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:pr-5:has( > svg) {\n padding-right: calc(var(--cp-spacing) * 5);\n }\n\n .cp\\:has-\\[\\>svg\\]\\:pl-3:has( > svg) {\n padding-left: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:aria-disabled\\:opacity-50[aria-disabled=\"true\"] {\n opacity: .5;\n }\n\n .cp\\:aria-invalid\\:border-destructive[aria-invalid=\"true\"] {\n border-color: var(--dsw-alias-state-error-primary);\n }\n\n .cp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=\"true\"] {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=\"true\"] {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 20%, transparent);\n }\n }\n\n .cp\\:data-checked\\:translate-x-4[data-checked] {\n --tw-translate-x: calc(var(--cp-spacing) * 4);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n\n .cp\\:data-checked\\:bg-primary[data-checked] {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:data-checked\\:bg-primary-foreground[data-checked] {\n background-color: var(--dsw-alias-bg-layer-1);\n }\n\n .cp\\:data-disabled\\:pointer-events-none[data-disabled] {\n pointer-events: none;\n }\n\n .cp\\:data-disabled\\:opacity-50[data-disabled] {\n opacity: .5;\n }\n\n .cp\\:data-highlighted\\:bg-accent[data-highlighted], .cp\\:data-unchecked\\:bg-accent[data-unchecked] {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .cp\\:motion-reduce\\:transform-none {\n transform: none;\n }\n\n .cp\\:motion-reduce\\:animate-none {\n animation: none;\n }\n\n .cp\\:motion-reduce\\:transition-none {\n transition-property: none;\n }\n }\n\n @media (prefers-color-scheme: dark) {\n .cp\\:dark\\:border-input {\n border-color: var(--dsw-alias-border-l2);\n }\n\n .cp\\:dark\\:bg-destructive\\/60 {\n background-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:bg-destructive\\/60 {\n background-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 60%, transparent);\n }\n }\n\n .cp\\:dark\\:bg-input\\/30 {\n background-color: var(--dsw-alias-border-l2);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:bg-input\\/30 {\n background-color: color-mix(in oklab, var(--dsw-alias-border-l2) 30%, transparent);\n }\n }\n\n @media (hover: hover) {\n .cp\\:dark\\:hover\\:bg-accent\\/50:hover {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:hover\\:bg-accent\\/50:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-interactive-bg-hover) 50%, transparent);\n }\n }\n\n .cp\\:dark\\:hover\\:bg-input\\/50:hover {\n background-color: var(--dsw-alias-border-l2);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:hover\\:bg-input\\/50:hover {\n background-color: color-mix(in oklab, var(--dsw-alias-border-l2) 50%, transparent);\n }\n }\n }\n\n .cp\\:dark\\:focus-visible\\:ring-destructive\\/40:focus-visible {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:focus-visible\\:ring-destructive\\/40:focus-visible {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 40%, transparent);\n }\n }\n\n .cp\\:dark\\:aria-invalid\\:ring-destructive\\/40[aria-invalid=\"true\"] {\n --tw-ring-color: var(--dsw-alias-state-error-primary);\n }\n\n @supports (color: color-mix(in lab, red, red)) {\n .cp\\:dark\\:aria-invalid\\:ring-destructive\\/40[aria-invalid=\"true\"] {\n --tw-ring-color: color-mix(in oklab, var(--dsw-alias-state-error-primary) 40%, transparent);\n }\n }\n }\n\n .cp\\:\\[\\&_\\*\\]\\:box-border * {\n box-sizing: border-box;\n }\n\n .cp\\:\\[\\&_button\\]\\:font-\\[inherit\\] button {\n font-family: inherit;\n }\n\n .cp\\:\\[\\&_svg\\]\\:pointer-events-none svg {\n pointer-events: none;\n }\n\n .cp\\:\\[\\&_svg\\]\\:size-4 svg {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:\\[\\&_svg\\]\\:shrink-0 svg {\n flex-shrink: 0;\n }\n\n .cp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-3 svg:not([class*=\"size-\"]) {\n width: calc(var(--cp-spacing) * 3);\n height: calc(var(--cp-spacing) * 3);\n }\n\n .cp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=\"size-\"]) {\n width: calc(var(--cp-spacing) * 4);\n height: calc(var(--cp-spacing) * 4);\n }\n\n .cp\\:\\[\\&\\:\\:-moz-progress-bar\\]\\:bg-foreground::-moz-progress-bar {\n background-color: var(--dsw-alias-label-primary);\n }\n\n .cp\\:\\[\\&\\:\\:-webkit-progress-bar\\]\\:bg-muted::-webkit-progress-bar {\n background-color: var(--dsw-alias-interactive-bg-hover);\n }\n\n .cp\\:\\[\\&\\:\\:-webkit-progress-value\\]\\:bg-foreground::-webkit-progress-value {\n background-color: var(--dsw-alias-label-primary);\n }\n}\n\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n\n@property --tw-leading {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n\n@property --tw-duration {\n syntax: \"*\";\n inherits: false\n}\n\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n";
|
|
17371
17627
|
// client/index.tsx
|
|
17372
17628
|
const inject = [
|
|
17373
17629
|
"slots",
|