@windrun-huaiin/third-ui 5.13.4 → 5.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fuma/mdx/index.d.mts +5 -1
- package/dist/fuma/mdx/index.d.ts +5 -1
- package/dist/fuma/mdx/index.js +2713 -325
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +2714 -326
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +2471 -210
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +2468 -207
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/lib/server.d.mts +148 -0
- package/dist/lib/server.d.ts +148 -0
- package/package.json +2 -2
- package/src/fuma/mdx/mermaid.tsx +141 -3
package/dist/fuma/server.js
CHANGED
|
@@ -903,7 +903,7 @@ var require_acorn = __commonJS({
|
|
|
903
903
|
this.privateNameStack = [];
|
|
904
904
|
};
|
|
905
905
|
var prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
906
|
-
Parser3.prototype.parse = function
|
|
906
|
+
Parser3.prototype.parse = function parse6() {
|
|
907
907
|
var node2 = this.options.program || this.startNode();
|
|
908
908
|
this.nextToken();
|
|
909
909
|
return this.parseTopLevel(node2);
|
|
@@ -963,7 +963,7 @@ var require_acorn = __commonJS({
|
|
|
963
963
|
}
|
|
964
964
|
return cls;
|
|
965
965
|
};
|
|
966
|
-
Parser3.parse = function
|
|
966
|
+
Parser3.parse = function parse6(input, options) {
|
|
967
967
|
return new this(options, input).parse();
|
|
968
968
|
};
|
|
969
969
|
Parser3.parseExpressionAt = function parseExpressionAt3(input, pos, options) {
|
|
@@ -3763,7 +3763,7 @@ var require_acorn = __commonJS({
|
|
|
3763
3763
|
}
|
|
3764
3764
|
}
|
|
3765
3765
|
};
|
|
3766
|
-
var
|
|
3766
|
+
var Node4 = function Node5(parser, pos, loc) {
|
|
3767
3767
|
this.type = "";
|
|
3768
3768
|
this.start = pos;
|
|
3769
3769
|
this.end = 0;
|
|
@@ -3779,10 +3779,10 @@ var require_acorn = __commonJS({
|
|
|
3779
3779
|
};
|
|
3780
3780
|
var pp$22 = Parser3.prototype;
|
|
3781
3781
|
pp$22.startNode = function() {
|
|
3782
|
-
return new
|
|
3782
|
+
return new Node4(this, this.start, this.startLoc);
|
|
3783
3783
|
};
|
|
3784
3784
|
pp$22.startNodeAt = function(pos, loc) {
|
|
3785
|
-
return new
|
|
3785
|
+
return new Node4(this, pos, loc);
|
|
3786
3786
|
};
|
|
3787
3787
|
function finishNodeAt2(node2, type, pos, loc) {
|
|
3788
3788
|
node2.type = type;
|
|
@@ -3802,7 +3802,7 @@ var require_acorn = __commonJS({
|
|
|
3802
3802
|
return finishNodeAt2.call(this, node2, type, pos, loc);
|
|
3803
3803
|
};
|
|
3804
3804
|
pp$22.copyNode = function(node2) {
|
|
3805
|
-
var newNode = new
|
|
3805
|
+
var newNode = new Node4(this, node2.start, this.startLoc);
|
|
3806
3806
|
for (var prop in node2) {
|
|
3807
3807
|
newNode[prop] = node2[prop];
|
|
3808
3808
|
}
|
|
@@ -5000,11 +5000,11 @@ var require_acorn = __commonJS({
|
|
|
5000
5000
|
return result;
|
|
5001
5001
|
};
|
|
5002
5002
|
pp$12.regexp_classString = function(state) {
|
|
5003
|
-
var
|
|
5003
|
+
var count3 = 0;
|
|
5004
5004
|
while (this.regexp_eatClassSetCharacter(state)) {
|
|
5005
|
-
|
|
5005
|
+
count3++;
|
|
5006
5006
|
}
|
|
5007
|
-
return
|
|
5007
|
+
return count3 === 1 ? CharSetOk2 : CharSetString2;
|
|
5008
5008
|
};
|
|
5009
5009
|
pp$12.regexp_eatClassSetCharacter = function(state) {
|
|
5010
5010
|
var start2 = state.pos;
|
|
@@ -6011,7 +6011,7 @@ var require_acorn = __commonJS({
|
|
|
6011
6011
|
Position: Position3,
|
|
6012
6012
|
SourceLocation: SourceLocation3,
|
|
6013
6013
|
getLineInfo: getLineInfo2,
|
|
6014
|
-
Node:
|
|
6014
|
+
Node: Node4,
|
|
6015
6015
|
TokenType: TokenType3,
|
|
6016
6016
|
tokTypes: types$12,
|
|
6017
6017
|
keywordTypes: keywords2,
|
|
@@ -6025,7 +6025,7 @@ var require_acorn = __commonJS({
|
|
|
6025
6025
|
lineBreakG: lineBreakG2,
|
|
6026
6026
|
nonASCIIwhitespace: nonASCIIwhitespace2
|
|
6027
6027
|
};
|
|
6028
|
-
function
|
|
6028
|
+
function parse5(input, options) {
|
|
6029
6029
|
return Parser3.parse(input, options);
|
|
6030
6030
|
}
|
|
6031
6031
|
function parseExpressionAt2(input, pos, options) {
|
|
@@ -6034,7 +6034,7 @@ var require_acorn = __commonJS({
|
|
|
6034
6034
|
function tokenizer2(input, options) {
|
|
6035
6035
|
return Parser3.tokenizer(input, options);
|
|
6036
6036
|
}
|
|
6037
|
-
exports3.Node =
|
|
6037
|
+
exports3.Node = Node4;
|
|
6038
6038
|
exports3.Parser = Parser3;
|
|
6039
6039
|
exports3.Position = Position3;
|
|
6040
6040
|
exports3.SourceLocation = SourceLocation3;
|
|
@@ -6050,7 +6050,7 @@ var require_acorn = __commonJS({
|
|
|
6050
6050
|
exports3.lineBreak = lineBreak2;
|
|
6051
6051
|
exports3.lineBreakG = lineBreakG2;
|
|
6052
6052
|
exports3.nonASCIIwhitespace = nonASCIIwhitespace2;
|
|
6053
|
-
exports3.parse =
|
|
6053
|
+
exports3.parse = parse5;
|
|
6054
6054
|
exports3.parseExpressionAt = parseExpressionAt2;
|
|
6055
6055
|
exports3.tokContexts = types2;
|
|
6056
6056
|
exports3.tokTypes = types$12;
|
|
@@ -6233,12 +6233,12 @@ var require_acorn_jsx = __commonJS({
|
|
|
6233
6233
|
return this.finishToken(tt.string, out);
|
|
6234
6234
|
}
|
|
6235
6235
|
jsx_readEntity() {
|
|
6236
|
-
let str = "",
|
|
6236
|
+
let str = "", count3 = 0, entity;
|
|
6237
6237
|
let ch = this.input[this.pos];
|
|
6238
6238
|
if (ch !== "&")
|
|
6239
6239
|
this.raise(this.pos, "Entity must start with an ampersand");
|
|
6240
6240
|
let startPos = ++this.pos;
|
|
6241
|
-
while (this.pos < this.input.length &&
|
|
6241
|
+
while (this.pos < this.input.length && count3++ < 10) {
|
|
6242
6242
|
ch = this.input[this.pos++];
|
|
6243
6243
|
if (ch === ";") {
|
|
6244
6244
|
if (str[0] === "#") {
|
|
@@ -6592,7 +6592,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
6592
6592
|
|
|
6593
6593
|
// src/fuma/fuma-page-genarator.tsx
|
|
6594
6594
|
var import_page = require("fumadocs-ui/page");
|
|
6595
|
-
var
|
|
6595
|
+
var import_react43 = require("react");
|
|
6596
6596
|
|
|
6597
6597
|
// ../base-ui/src/assets/github.tsx
|
|
6598
6598
|
var import_react = __toESM(require("react"), 1);
|
|
@@ -9235,40 +9235,95 @@ var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart
|
|
|
9235
9235
|
|
|
9236
9236
|
// src/fuma/mdx/mermaid.tsx
|
|
9237
9237
|
var import_next_themes = require("next-themes");
|
|
9238
|
-
var import_react35 = require("react");
|
|
9239
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9240
|
-
|
|
9241
|
-
// src/fuma/mdx/image-zoom.tsx
|
|
9242
|
-
var import_framework = require("fumadocs-core/framework");
|
|
9243
9238
|
var import_react36 = require("react");
|
|
9244
|
-
var import_react_medium_image_zoom = __toESM(require("react-medium-image-zoom"));
|
|
9245
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9246
9239
|
|
|
9247
|
-
// src/
|
|
9248
|
-
var
|
|
9240
|
+
// ../base-ui/src/ui/alert-dialog.tsx
|
|
9241
|
+
var React57 = __toESM(require("react"), 1);
|
|
9249
9242
|
|
|
9250
|
-
//
|
|
9251
|
-
var
|
|
9243
|
+
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
9244
|
+
var React55 = __toESM(require("react"), 1);
|
|
9252
9245
|
|
|
9253
|
-
//
|
|
9254
|
-
var
|
|
9255
|
-
var
|
|
9256
|
-
function
|
|
9257
|
-
|
|
9246
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
9247
|
+
var React33 = __toESM(require("react"), 1);
|
|
9248
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9249
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
9250
|
+
const Context = React33.createContext(defaultContext);
|
|
9251
|
+
const Provider = (props) => {
|
|
9252
|
+
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
9253
|
+
const value2 = React33.useMemo(() => context, Object.values(context));
|
|
9254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Context.Provider, { value: value2, children });
|
|
9255
|
+
};
|
|
9256
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
9257
|
+
function useContext22(consumerName) {
|
|
9258
|
+
const context = React33.useContext(Context);
|
|
9259
|
+
if (context) return context;
|
|
9260
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
9261
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
9262
|
+
}
|
|
9263
|
+
return [Provider, useContext22];
|
|
9264
|
+
}
|
|
9265
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
9266
|
+
let defaultContexts = [];
|
|
9267
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
9268
|
+
const BaseContext = React33.createContext(defaultContext);
|
|
9269
|
+
const index2 = defaultContexts.length;
|
|
9270
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
9271
|
+
const Provider = (props) => {
|
|
9272
|
+
var _b;
|
|
9273
|
+
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
9274
|
+
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index2]) || BaseContext;
|
|
9275
|
+
const value2 = React33.useMemo(() => context, Object.values(context));
|
|
9276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Context.Provider, { value: value2, children });
|
|
9277
|
+
};
|
|
9278
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
9279
|
+
function useContext22(consumerName, scope) {
|
|
9280
|
+
var _a;
|
|
9281
|
+
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
|
|
9282
|
+
const context = React33.useContext(Context);
|
|
9283
|
+
if (context) return context;
|
|
9284
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
9285
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
9286
|
+
}
|
|
9287
|
+
return [Provider, useContext22];
|
|
9288
|
+
}
|
|
9289
|
+
const createScope = () => {
|
|
9290
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
9291
|
+
return React33.createContext(defaultContext);
|
|
9292
|
+
});
|
|
9293
|
+
return function useScope(scope) {
|
|
9294
|
+
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
9295
|
+
return React33.useMemo(
|
|
9296
|
+
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
9297
|
+
[scope, contexts]
|
|
9298
|
+
);
|
|
9299
|
+
};
|
|
9300
|
+
};
|
|
9301
|
+
createScope.scopeName = scopeName;
|
|
9302
|
+
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
9303
|
+
}
|
|
9304
|
+
function composeContextScopes(...scopes) {
|
|
9305
|
+
const baseScope = scopes[0];
|
|
9306
|
+
if (scopes.length === 1) return baseScope;
|
|
9307
|
+
const createScope = () => {
|
|
9308
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
9309
|
+
useScope: createScope2(),
|
|
9310
|
+
scopeName: createScope2.scopeName
|
|
9311
|
+
}));
|
|
9312
|
+
return function useComposedScopes(overrideScopes) {
|
|
9313
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
9314
|
+
const scopeProps = useScope(overrideScopes);
|
|
9315
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
9316
|
+
return __spreadValues(__spreadValues({}, nextScopes2), currentScope);
|
|
9317
|
+
}, {});
|
|
9318
|
+
return React33.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
9319
|
+
};
|
|
9320
|
+
};
|
|
9321
|
+
createScope.scopeName = baseScope.scopeName;
|
|
9322
|
+
return createScope;
|
|
9258
9323
|
}
|
|
9259
9324
|
|
|
9260
|
-
// src/fuma/mdx/zia-card.tsx
|
|
9261
|
-
var import_link2 = __toESM(require("next/link"));
|
|
9262
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
9263
|
-
|
|
9264
|
-
// ../base-ui/src/ui/button.tsx
|
|
9265
|
-
var React35 = __toESM(require("react"), 1);
|
|
9266
|
-
|
|
9267
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
9268
|
-
var React34 = __toESM(require("react"), 1);
|
|
9269
|
-
|
|
9270
9325
|
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
9271
|
-
var
|
|
9326
|
+
var React34 = __toESM(require("react"), 1);
|
|
9272
9327
|
function setRef(ref2, value2) {
|
|
9273
9328
|
if (typeof ref2 === "function") {
|
|
9274
9329
|
return ref2(value2);
|
|
@@ -9300,54 +9355,177 @@ function composeRefs(...refs) {
|
|
|
9300
9355
|
}
|
|
9301
9356
|
};
|
|
9302
9357
|
}
|
|
9358
|
+
function useComposedRefs(...refs) {
|
|
9359
|
+
return React34.useCallback(composeRefs(...refs), refs);
|
|
9360
|
+
}
|
|
9361
|
+
|
|
9362
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
9363
|
+
var React54 = __toESM(require("react"), 1);
|
|
9364
|
+
|
|
9365
|
+
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
9366
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9367
|
+
return function handleEvent(event) {
|
|
9368
|
+
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
9369
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
9370
|
+
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
9371
|
+
}
|
|
9372
|
+
};
|
|
9373
|
+
}
|
|
9374
|
+
|
|
9375
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
9376
|
+
var React36 = __toESM(require("react"), 1);
|
|
9377
|
+
|
|
9378
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
9379
|
+
var React35 = __toESM(require("react"), 1);
|
|
9380
|
+
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React35.useLayoutEffect : () => {
|
|
9381
|
+
};
|
|
9382
|
+
|
|
9383
|
+
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
9384
|
+
var useReactId = React36[" useId ".trim().toString()] || (() => void 0);
|
|
9385
|
+
var count = 0;
|
|
9386
|
+
function useId(deterministicId) {
|
|
9387
|
+
const [id, setId] = React36.useState(useReactId());
|
|
9388
|
+
useLayoutEffect2(() => {
|
|
9389
|
+
if (!deterministicId) setId((reactId) => reactId != null ? reactId : String(count++));
|
|
9390
|
+
}, [deterministicId]);
|
|
9391
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
9392
|
+
}
|
|
9393
|
+
|
|
9394
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
9395
|
+
var React37 = __toESM(require("react"), 1);
|
|
9396
|
+
var React210 = __toESM(require("react"), 1);
|
|
9397
|
+
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
9398
|
+
function useControllableState({
|
|
9399
|
+
prop,
|
|
9400
|
+
defaultProp,
|
|
9401
|
+
onChange = () => {
|
|
9402
|
+
},
|
|
9403
|
+
caller
|
|
9404
|
+
}) {
|
|
9405
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
9406
|
+
defaultProp,
|
|
9407
|
+
onChange
|
|
9408
|
+
});
|
|
9409
|
+
const isControlled = prop !== void 0;
|
|
9410
|
+
const value2 = isControlled ? prop : uncontrolledProp;
|
|
9411
|
+
if (true) {
|
|
9412
|
+
const isControlledRef = React37.useRef(prop !== void 0);
|
|
9413
|
+
React37.useEffect(() => {
|
|
9414
|
+
const wasControlled = isControlledRef.current;
|
|
9415
|
+
if (wasControlled !== isControlled) {
|
|
9416
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
9417
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
9418
|
+
console.warn(
|
|
9419
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
9420
|
+
);
|
|
9421
|
+
}
|
|
9422
|
+
isControlledRef.current = isControlled;
|
|
9423
|
+
}, [isControlled, caller]);
|
|
9424
|
+
}
|
|
9425
|
+
const setValue = React37.useCallback(
|
|
9426
|
+
(nextValue) => {
|
|
9427
|
+
var _a;
|
|
9428
|
+
if (isControlled) {
|
|
9429
|
+
const value22 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
9430
|
+
if (value22 !== prop) {
|
|
9431
|
+
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value22);
|
|
9432
|
+
}
|
|
9433
|
+
} else {
|
|
9434
|
+
setUncontrolledProp(nextValue);
|
|
9435
|
+
}
|
|
9436
|
+
},
|
|
9437
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
9438
|
+
);
|
|
9439
|
+
return [value2, setValue];
|
|
9440
|
+
}
|
|
9441
|
+
function useUncontrolledState({
|
|
9442
|
+
defaultProp,
|
|
9443
|
+
onChange
|
|
9444
|
+
}) {
|
|
9445
|
+
const [value2, setValue] = React37.useState(defaultProp);
|
|
9446
|
+
const prevValueRef = React37.useRef(value2);
|
|
9447
|
+
const onChangeRef = React37.useRef(onChange);
|
|
9448
|
+
useInsertionEffect(() => {
|
|
9449
|
+
onChangeRef.current = onChange;
|
|
9450
|
+
}, [onChange]);
|
|
9451
|
+
React37.useEffect(() => {
|
|
9452
|
+
var _a;
|
|
9453
|
+
if (prevValueRef.current !== value2) {
|
|
9454
|
+
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
|
|
9455
|
+
prevValueRef.current = value2;
|
|
9456
|
+
}
|
|
9457
|
+
}, [value2, prevValueRef]);
|
|
9458
|
+
return [value2, setValue, onChangeRef];
|
|
9459
|
+
}
|
|
9460
|
+
function isFunction(value2) {
|
|
9461
|
+
return typeof value2 === "function";
|
|
9462
|
+
}
|
|
9463
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
9464
|
+
|
|
9465
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
9466
|
+
var React42 = __toESM(require("react"), 1);
|
|
9467
|
+
|
|
9468
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
9469
|
+
var React39 = __toESM(require("react"), 1);
|
|
9470
|
+
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
9303
9471
|
|
|
9304
9472
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
9305
|
-
var
|
|
9473
|
+
var React38 = __toESM(require("react"), 1);
|
|
9474
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9306
9475
|
// @__NO_SIDE_EFFECTS__
|
|
9307
9476
|
function createSlot(ownerName) {
|
|
9308
9477
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
9309
|
-
const
|
|
9478
|
+
const Slot22 = React38.forwardRef((props, forwardedRef) => {
|
|
9310
9479
|
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
9311
|
-
const childrenArray =
|
|
9480
|
+
const childrenArray = React38.Children.toArray(children);
|
|
9312
9481
|
const slottable = childrenArray.find(isSlottable);
|
|
9313
9482
|
if (slottable) {
|
|
9314
9483
|
const newElement = slottable.props.children;
|
|
9315
9484
|
const newChildren = childrenArray.map((child) => {
|
|
9316
9485
|
if (child === slottable) {
|
|
9317
|
-
if (
|
|
9318
|
-
return
|
|
9486
|
+
if (React38.Children.count(newElement) > 1) return React38.Children.only(null);
|
|
9487
|
+
return React38.isValidElement(newElement) ? newElement.props.children : null;
|
|
9319
9488
|
} else {
|
|
9320
9489
|
return child;
|
|
9321
9490
|
}
|
|
9322
9491
|
});
|
|
9323
|
-
return /* @__PURE__ */ (0,
|
|
9492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, void 0, newChildren) : null }));
|
|
9324
9493
|
}
|
|
9325
|
-
return /* @__PURE__ */ (0,
|
|
9494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
9326
9495
|
});
|
|
9327
|
-
|
|
9328
|
-
return
|
|
9496
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
9497
|
+
return Slot22;
|
|
9329
9498
|
}
|
|
9330
9499
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
9331
9500
|
// @__NO_SIDE_EFFECTS__
|
|
9332
9501
|
function createSlotClone(ownerName) {
|
|
9333
|
-
const SlotClone =
|
|
9502
|
+
const SlotClone = React38.forwardRef((props, forwardedRef) => {
|
|
9334
9503
|
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
9335
|
-
if (
|
|
9504
|
+
if (React38.isValidElement(children)) {
|
|
9336
9505
|
const childrenRef = getElementRef(children);
|
|
9337
9506
|
const props2 = mergeProps(slotProps, children.props);
|
|
9338
|
-
if (children.type !==
|
|
9507
|
+
if (children.type !== React38.Fragment) {
|
|
9339
9508
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
9340
9509
|
}
|
|
9341
|
-
return
|
|
9510
|
+
return React38.cloneElement(children, props2);
|
|
9342
9511
|
}
|
|
9343
|
-
return
|
|
9512
|
+
return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
|
|
9344
9513
|
});
|
|
9345
9514
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
9346
9515
|
return SlotClone;
|
|
9347
9516
|
}
|
|
9348
9517
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
9518
|
+
// @__NO_SIDE_EFFECTS__
|
|
9519
|
+
function createSlottable(ownerName) {
|
|
9520
|
+
const Slottable2 = ({ children }) => {
|
|
9521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children });
|
|
9522
|
+
};
|
|
9523
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
9524
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
9525
|
+
return Slottable2;
|
|
9526
|
+
}
|
|
9349
9527
|
function isSlottable(child) {
|
|
9350
|
-
return
|
|
9528
|
+
return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
9351
9529
|
}
|
|
9352
9530
|
function mergeProps(slotProps, childProps) {
|
|
9353
9531
|
const overrideProps = __spreadValues({}, childProps);
|
|
@@ -9388,155 +9566,2238 @@ function getElementRef(element) {
|
|
|
9388
9566
|
return element.props.ref || element.ref;
|
|
9389
9567
|
}
|
|
9390
9568
|
|
|
9391
|
-
//
|
|
9392
|
-
var
|
|
9393
|
-
var
|
|
9394
|
-
|
|
9395
|
-
"
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9569
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
9570
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
9571
|
+
var NODES = [
|
|
9572
|
+
"a",
|
|
9573
|
+
"button",
|
|
9574
|
+
"div",
|
|
9575
|
+
"form",
|
|
9576
|
+
"h2",
|
|
9577
|
+
"h3",
|
|
9578
|
+
"img",
|
|
9579
|
+
"input",
|
|
9580
|
+
"label",
|
|
9581
|
+
"li",
|
|
9582
|
+
"nav",
|
|
9583
|
+
"ol",
|
|
9584
|
+
"p",
|
|
9585
|
+
"select",
|
|
9586
|
+
"span",
|
|
9587
|
+
"svg",
|
|
9588
|
+
"ul"
|
|
9589
|
+
];
|
|
9590
|
+
var Primitive = NODES.reduce((primitive, node2) => {
|
|
9591
|
+
const Slot3 = createSlot(`Primitive.${node2}`);
|
|
9592
|
+
const Node4 = React39.forwardRef((props, forwardedRef) => {
|
|
9593
|
+
const _a = props, { asChild } = _a, primitiveProps = __objRest(_a, ["asChild"]);
|
|
9594
|
+
const Comp = asChild ? Slot3 : node2;
|
|
9595
|
+
if (typeof window !== "undefined") {
|
|
9596
|
+
window[Symbol.for("radix-ui")] = true;
|
|
9597
|
+
}
|
|
9598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Comp, __spreadProps(__spreadValues({}, primitiveProps), { ref: forwardedRef }));
|
|
9599
|
+
});
|
|
9600
|
+
Node4.displayName = `Primitive.${node2}`;
|
|
9601
|
+
return __spreadProps(__spreadValues({}, primitive), { [node2]: Node4 });
|
|
9602
|
+
}, {});
|
|
9603
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
|
9604
|
+
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
9605
|
+
}
|
|
9606
|
+
|
|
9607
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
9608
|
+
var React40 = __toESM(require("react"), 1);
|
|
9609
|
+
function useCallbackRef(callback) {
|
|
9610
|
+
const callbackRef = React40.useRef(callback);
|
|
9611
|
+
React40.useEffect(() => {
|
|
9612
|
+
callbackRef.current = callback;
|
|
9613
|
+
});
|
|
9614
|
+
return React40.useMemo(() => (...args) => {
|
|
9615
|
+
var _a;
|
|
9616
|
+
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
9617
|
+
}, []);
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
9621
|
+
var React41 = __toESM(require("react"), 1);
|
|
9622
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
9623
|
+
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
9624
|
+
React41.useEffect(() => {
|
|
9625
|
+
const handleKeyDown = (event) => {
|
|
9626
|
+
if (event.key === "Escape") {
|
|
9627
|
+
onEscapeKeyDown(event);
|
|
9411
9628
|
}
|
|
9412
|
-
}
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
var
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9629
|
+
};
|
|
9630
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
9631
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
9632
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
9633
|
+
}
|
|
9634
|
+
|
|
9635
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
9636
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9637
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
9638
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
9639
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
9640
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
9641
|
+
var originalBodyPointerEvents;
|
|
9642
|
+
var DismissableLayerContext = React42.createContext({
|
|
9643
|
+
layers: /* @__PURE__ */ new Set(),
|
|
9644
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
9645
|
+
branches: /* @__PURE__ */ new Set()
|
|
9646
|
+
});
|
|
9647
|
+
var DismissableLayer = React42.forwardRef(
|
|
9648
|
+
(props, forwardedRef) => {
|
|
9649
|
+
var _b;
|
|
9650
|
+
const _a = props, {
|
|
9651
|
+
disableOutsidePointerEvents = false,
|
|
9652
|
+
onEscapeKeyDown,
|
|
9653
|
+
onPointerDownOutside,
|
|
9654
|
+
onFocusOutside,
|
|
9655
|
+
onInteractOutside,
|
|
9656
|
+
onDismiss
|
|
9657
|
+
} = _a, layerProps = __objRest(_a, [
|
|
9658
|
+
"disableOutsidePointerEvents",
|
|
9659
|
+
"onEscapeKeyDown",
|
|
9660
|
+
"onPointerDownOutside",
|
|
9661
|
+
"onFocusOutside",
|
|
9662
|
+
"onInteractOutside",
|
|
9663
|
+
"onDismiss"
|
|
9664
|
+
]);
|
|
9665
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
9666
|
+
const [node2, setNode] = React42.useState(null);
|
|
9667
|
+
const ownerDocument = (_b = node2 == null ? void 0 : node2.ownerDocument) != null ? _b : globalThis == null ? void 0 : globalThis.document;
|
|
9668
|
+
const [, force] = React42.useState({});
|
|
9669
|
+
const composedRefs = useComposedRefs(forwardedRef, (node22) => setNode(node22));
|
|
9670
|
+
const layers = Array.from(context.layers);
|
|
9671
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
9672
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
9673
|
+
const index2 = node2 ? layers.indexOf(node2) : -1;
|
|
9674
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
9675
|
+
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
9676
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
9677
|
+
const target = event.target;
|
|
9678
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9679
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
9680
|
+
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
|
|
9681
|
+
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
9682
|
+
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
9683
|
+
}, ownerDocument);
|
|
9684
|
+
const focusOutside = useFocusOutside((event) => {
|
|
9685
|
+
const target = event.target;
|
|
9686
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9687
|
+
if (isFocusInBranch) return;
|
|
9688
|
+
onFocusOutside == null ? void 0 : onFocusOutside(event);
|
|
9689
|
+
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
9690
|
+
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
9691
|
+
}, ownerDocument);
|
|
9692
|
+
useEscapeKeydown((event) => {
|
|
9693
|
+
const isHighestLayer = index2 === context.layers.size - 1;
|
|
9694
|
+
if (!isHighestLayer) return;
|
|
9695
|
+
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
|
|
9696
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
9697
|
+
event.preventDefault();
|
|
9698
|
+
onDismiss();
|
|
9699
|
+
}
|
|
9700
|
+
}, ownerDocument);
|
|
9701
|
+
React42.useEffect(() => {
|
|
9702
|
+
if (!node2) return;
|
|
9703
|
+
if (disableOutsidePointerEvents) {
|
|
9704
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
9705
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
9706
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
9707
|
+
}
|
|
9708
|
+
context.layersWithOutsidePointerEventsDisabled.add(node2);
|
|
9709
|
+
}
|
|
9710
|
+
context.layers.add(node2);
|
|
9711
|
+
dispatchUpdate();
|
|
9712
|
+
return () => {
|
|
9713
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
9714
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
9715
|
+
}
|
|
9716
|
+
};
|
|
9717
|
+
}, [node2, ownerDocument, disableOutsidePointerEvents, context]);
|
|
9718
|
+
React42.useEffect(() => {
|
|
9719
|
+
return () => {
|
|
9720
|
+
if (!node2) return;
|
|
9721
|
+
context.layers.delete(node2);
|
|
9722
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node2);
|
|
9723
|
+
dispatchUpdate();
|
|
9724
|
+
};
|
|
9725
|
+
}, [node2, context]);
|
|
9726
|
+
React42.useEffect(() => {
|
|
9727
|
+
const handleUpdate = () => force({});
|
|
9728
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9729
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9730
|
+
}, []);
|
|
9731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
9732
|
+
Primitive.div,
|
|
9733
|
+
__spreadProps(__spreadValues({}, layerProps), {
|
|
9734
|
+
ref: composedRefs,
|
|
9735
|
+
style: __spreadValues({
|
|
9736
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0
|
|
9737
|
+
}, props.style),
|
|
9738
|
+
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
9739
|
+
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
9740
|
+
onPointerDownCapture: composeEventHandlers(
|
|
9741
|
+
props.onPointerDownCapture,
|
|
9742
|
+
pointerDownOutside.onPointerDownCapture
|
|
9743
|
+
)
|
|
9446
9744
|
})
|
|
9447
9745
|
);
|
|
9448
9746
|
}
|
|
9449
9747
|
);
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9748
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
9749
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
|
9750
|
+
var DismissableLayerBranch = React42.forwardRef((props, forwardedRef) => {
|
|
9751
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
9752
|
+
const ref2 = React42.useRef(null);
|
|
9753
|
+
const composedRefs = useComposedRefs(forwardedRef, ref2);
|
|
9754
|
+
React42.useEffect(() => {
|
|
9755
|
+
const node2 = ref2.current;
|
|
9756
|
+
if (node2) {
|
|
9757
|
+
context.branches.add(node2);
|
|
9758
|
+
return () => {
|
|
9759
|
+
context.branches.delete(node2);
|
|
9760
|
+
};
|
|
9761
|
+
}
|
|
9762
|
+
}, [context.branches]);
|
|
9763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Primitive.div, __spreadProps(__spreadValues({}, props), { ref: composedRefs }));
|
|
9764
|
+
});
|
|
9765
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
9766
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
9767
|
+
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
9768
|
+
const isPointerInsideReactTreeRef = React42.useRef(false);
|
|
9769
|
+
const handleClickRef = React42.useRef(() => {
|
|
9770
|
+
});
|
|
9771
|
+
React42.useEffect(() => {
|
|
9772
|
+
const handlePointerDown = (event) => {
|
|
9773
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
9774
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
9775
|
+
handleAndDispatchCustomEvent(
|
|
9776
|
+
POINTER_DOWN_OUTSIDE,
|
|
9777
|
+
handlePointerDownOutside,
|
|
9778
|
+
eventDetail,
|
|
9779
|
+
{ discrete: true }
|
|
9780
|
+
);
|
|
9781
|
+
};
|
|
9782
|
+
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
9783
|
+
const eventDetail = { originalEvent: event };
|
|
9784
|
+
if (event.pointerType === "touch") {
|
|
9785
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9786
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
9787
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
9788
|
+
} else {
|
|
9789
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
9790
|
+
}
|
|
9791
|
+
} else {
|
|
9792
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9793
|
+
}
|
|
9794
|
+
isPointerInsideReactTreeRef.current = false;
|
|
9795
|
+
};
|
|
9796
|
+
const timerId = window.setTimeout(() => {
|
|
9797
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
9798
|
+
}, 0);
|
|
9799
|
+
return () => {
|
|
9800
|
+
window.clearTimeout(timerId);
|
|
9801
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
9802
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9803
|
+
};
|
|
9804
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
|
9805
|
+
return {
|
|
9806
|
+
// ensures we check React component tree (not just DOM tree)
|
|
9807
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
9808
|
+
};
|
|
9809
|
+
}
|
|
9810
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
9811
|
+
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
9812
|
+
const isFocusInsideReactTreeRef = React42.useRef(false);
|
|
9813
|
+
React42.useEffect(() => {
|
|
9814
|
+
const handleFocus = (event) => {
|
|
9815
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
9816
|
+
const eventDetail = { originalEvent: event };
|
|
9817
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
9818
|
+
discrete: false
|
|
9819
|
+
});
|
|
9820
|
+
}
|
|
9821
|
+
};
|
|
9822
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
9823
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
9824
|
+
}, [ownerDocument, handleFocusOutside]);
|
|
9825
|
+
return {
|
|
9826
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
9827
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
9828
|
+
};
|
|
9829
|
+
}
|
|
9830
|
+
function dispatchUpdate() {
|
|
9831
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
9832
|
+
document.dispatchEvent(event);
|
|
9833
|
+
}
|
|
9834
|
+
function handleAndDispatchCustomEvent(name2, handler2, detail, { discrete }) {
|
|
9835
|
+
const target = detail.originalEvent.target;
|
|
9836
|
+
const event = new CustomEvent(name2, { bubbles: false, cancelable: true, detail });
|
|
9837
|
+
if (handler2) target.addEventListener(name2, handler2, { once: true });
|
|
9838
|
+
if (discrete) {
|
|
9839
|
+
dispatchDiscreteCustomEvent(target, event);
|
|
9840
|
+
} else {
|
|
9841
|
+
target.dispatchEvent(event);
|
|
9842
|
+
}
|
|
9843
|
+
}
|
|
9456
9844
|
|
|
9457
|
-
//
|
|
9458
|
-
var
|
|
9459
|
-
var
|
|
9460
|
-
var
|
|
9461
|
-
var
|
|
9462
|
-
var
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9845
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.3_@types+react@19.1.2__@types+r_1ff7b04b7c975087a2da2b1568ac976e/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
9846
|
+
var React43 = __toESM(require("react"), 1);
|
|
9847
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
9848
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
9849
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
9850
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
9851
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
9852
|
+
var FocusScope = React43.forwardRef((props, forwardedRef) => {
|
|
9853
|
+
const _a = props, {
|
|
9854
|
+
loop = false,
|
|
9855
|
+
trapped = false,
|
|
9856
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
|
9857
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp
|
|
9858
|
+
} = _a, scopeProps = __objRest(_a, [
|
|
9859
|
+
"loop",
|
|
9860
|
+
"trapped",
|
|
9861
|
+
"onMountAutoFocus",
|
|
9862
|
+
"onUnmountAutoFocus"
|
|
9863
|
+
]);
|
|
9864
|
+
const [container, setContainer] = React43.useState(null);
|
|
9865
|
+
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
9866
|
+
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
9867
|
+
const lastFocusedElementRef = React43.useRef(null);
|
|
9868
|
+
const composedRefs = useComposedRefs(forwardedRef, (node2) => setContainer(node2));
|
|
9869
|
+
const focusScope = React43.useRef({
|
|
9870
|
+
paused: false,
|
|
9871
|
+
pause() {
|
|
9872
|
+
this.paused = true;
|
|
9873
|
+
},
|
|
9874
|
+
resume() {
|
|
9875
|
+
this.paused = false;
|
|
9876
|
+
}
|
|
9877
|
+
}).current;
|
|
9878
|
+
React43.useEffect(() => {
|
|
9879
|
+
if (trapped) {
|
|
9880
|
+
let handleFocusIn2 = function(event) {
|
|
9881
|
+
if (focusScope.paused || !container) return;
|
|
9882
|
+
const target = event.target;
|
|
9883
|
+
if (container.contains(target)) {
|
|
9884
|
+
lastFocusedElementRef.current = target;
|
|
9885
|
+
} else {
|
|
9886
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
9887
|
+
}
|
|
9888
|
+
}, handleFocusOut2 = function(event) {
|
|
9889
|
+
if (focusScope.paused || !container) return;
|
|
9890
|
+
const relatedTarget = event.relatedTarget;
|
|
9891
|
+
if (relatedTarget === null) return;
|
|
9892
|
+
if (!container.contains(relatedTarget)) {
|
|
9893
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
9894
|
+
}
|
|
9895
|
+
}, handleMutations2 = function(mutations) {
|
|
9896
|
+
const focusedElement = document.activeElement;
|
|
9897
|
+
if (focusedElement !== document.body) return;
|
|
9898
|
+
for (const mutation of mutations) {
|
|
9899
|
+
if (mutation.removedNodes.length > 0) focus(container);
|
|
9900
|
+
}
|
|
9901
|
+
};
|
|
9902
|
+
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
9903
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
9904
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
9905
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
|
9906
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
9907
|
+
return () => {
|
|
9908
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
9909
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
9910
|
+
mutationObserver.disconnect();
|
|
9911
|
+
};
|
|
9473
9912
|
}
|
|
9913
|
+
}, [trapped, container, focusScope.paused]);
|
|
9914
|
+
React43.useEffect(() => {
|
|
9915
|
+
if (container) {
|
|
9916
|
+
focusScopesStack.add(focusScope);
|
|
9917
|
+
const previouslyFocusedElement = document.activeElement;
|
|
9918
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
9919
|
+
if (!hasFocusedCandidate) {
|
|
9920
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
9921
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
9922
|
+
container.dispatchEvent(mountEvent);
|
|
9923
|
+
if (!mountEvent.defaultPrevented) {
|
|
9924
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
9925
|
+
if (document.activeElement === previouslyFocusedElement) {
|
|
9926
|
+
focus(container);
|
|
9927
|
+
}
|
|
9928
|
+
}
|
|
9929
|
+
}
|
|
9930
|
+
return () => {
|
|
9931
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
9932
|
+
setTimeout(() => {
|
|
9933
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
9934
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
9935
|
+
container.dispatchEvent(unmountEvent);
|
|
9936
|
+
if (!unmountEvent.defaultPrevented) {
|
|
9937
|
+
focus(previouslyFocusedElement != null ? previouslyFocusedElement : document.body, { select: true });
|
|
9938
|
+
}
|
|
9939
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
9940
|
+
focusScopesStack.remove(focusScope);
|
|
9941
|
+
}, 0);
|
|
9942
|
+
};
|
|
9943
|
+
}
|
|
9944
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
9945
|
+
const handleKeyDown = React43.useCallback(
|
|
9946
|
+
(event) => {
|
|
9947
|
+
if (!loop && !trapped) return;
|
|
9948
|
+
if (focusScope.paused) return;
|
|
9949
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
9950
|
+
const focusedElement = document.activeElement;
|
|
9951
|
+
if (isTabKey && focusedElement) {
|
|
9952
|
+
const container2 = event.currentTarget;
|
|
9953
|
+
const [first, last] = getTabbableEdges(container2);
|
|
9954
|
+
const hasTabbableElementsInside = first && last;
|
|
9955
|
+
if (!hasTabbableElementsInside) {
|
|
9956
|
+
if (focusedElement === container2) event.preventDefault();
|
|
9957
|
+
} else {
|
|
9958
|
+
if (!event.shiftKey && focusedElement === last) {
|
|
9959
|
+
event.preventDefault();
|
|
9960
|
+
if (loop) focus(first, { select: true });
|
|
9961
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
9962
|
+
event.preventDefault();
|
|
9963
|
+
if (loop) focus(last, { select: true });
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
}
|
|
9967
|
+
},
|
|
9968
|
+
[loop, trapped, focusScope.paused]
|
|
9474
9969
|
);
|
|
9970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Primitive.div, __spreadProps(__spreadValues({ tabIndex: -1 }, scopeProps), { ref: composedRefs, onKeyDown: handleKeyDown }));
|
|
9971
|
+
});
|
|
9972
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
9973
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
9974
|
+
const previouslyFocusedElement = document.activeElement;
|
|
9975
|
+
for (const candidate of candidates) {
|
|
9976
|
+
focus(candidate, { select });
|
|
9977
|
+
if (document.activeElement !== previouslyFocusedElement) return;
|
|
9978
|
+
}
|
|
9979
|
+
}
|
|
9980
|
+
function getTabbableEdges(container) {
|
|
9981
|
+
const candidates = getTabbableCandidates(container);
|
|
9982
|
+
const first = findVisible(candidates, container);
|
|
9983
|
+
const last = findVisible(candidates.reverse(), container);
|
|
9984
|
+
return [first, last];
|
|
9985
|
+
}
|
|
9986
|
+
function getTabbableCandidates(container) {
|
|
9987
|
+
const nodes = [];
|
|
9988
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
9989
|
+
acceptNode: (node2) => {
|
|
9990
|
+
const isHiddenInput = node2.tagName === "INPUT" && node2.type === "hidden";
|
|
9991
|
+
if (node2.disabled || node2.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
9992
|
+
return node2.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
9993
|
+
}
|
|
9994
|
+
});
|
|
9995
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
9996
|
+
return nodes;
|
|
9475
9997
|
}
|
|
9476
|
-
function
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
date ? date : "Ages ago"
|
|
9481
|
-
] });
|
|
9998
|
+
function findVisible(elements, container) {
|
|
9999
|
+
for (const element of elements) {
|
|
10000
|
+
if (!isHidden(element, { upTo: container })) return element;
|
|
10001
|
+
}
|
|
9482
10002
|
}
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
10003
|
+
function isHidden(node2, { upTo }) {
|
|
10004
|
+
if (getComputedStyle(node2).visibility === "hidden") return true;
|
|
10005
|
+
while (node2) {
|
|
10006
|
+
if (upTo !== void 0 && node2 === upTo) return false;
|
|
10007
|
+
if (getComputedStyle(node2).display === "none") return true;
|
|
10008
|
+
node2 = node2.parentElement;
|
|
10009
|
+
}
|
|
10010
|
+
return false;
|
|
10011
|
+
}
|
|
10012
|
+
function isSelectableInput(element) {
|
|
10013
|
+
return element instanceof HTMLInputElement && "select" in element;
|
|
10014
|
+
}
|
|
10015
|
+
function focus(element, { select = false } = {}) {
|
|
10016
|
+
if (element && element.focus) {
|
|
10017
|
+
const previouslyFocusedElement = document.activeElement;
|
|
10018
|
+
element.focus({ preventScroll: true });
|
|
10019
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
10020
|
+
element.select();
|
|
10021
|
+
}
|
|
10022
|
+
}
|
|
10023
|
+
var focusScopesStack = createFocusScopesStack();
|
|
10024
|
+
function createFocusScopesStack() {
|
|
10025
|
+
let stack = [];
|
|
10026
|
+
return {
|
|
10027
|
+
add(focusScope) {
|
|
10028
|
+
const activeFocusScope = stack[0];
|
|
10029
|
+
if (focusScope !== activeFocusScope) {
|
|
10030
|
+
activeFocusScope == null ? void 0 : activeFocusScope.pause();
|
|
9505
10031
|
}
|
|
10032
|
+
stack = arrayRemove(stack, focusScope);
|
|
10033
|
+
stack.unshift(focusScope);
|
|
10034
|
+
},
|
|
10035
|
+
remove(focusScope) {
|
|
10036
|
+
var _a;
|
|
10037
|
+
stack = arrayRemove(stack, focusScope);
|
|
10038
|
+
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
9506
10039
|
}
|
|
10040
|
+
};
|
|
10041
|
+
}
|
|
10042
|
+
function arrayRemove(array, item) {
|
|
10043
|
+
const updatedArray = [...array];
|
|
10044
|
+
const index2 = updatedArray.indexOf(item);
|
|
10045
|
+
if (index2 !== -1) {
|
|
10046
|
+
updatedArray.splice(index2, 1);
|
|
9507
10047
|
}
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
10048
|
+
return updatedArray;
|
|
10049
|
+
}
|
|
10050
|
+
function removeLinks(items) {
|
|
10051
|
+
return items.filter((item) => item.tagName !== "A");
|
|
10052
|
+
}
|
|
9512
10053
|
|
|
9513
|
-
//
|
|
9514
|
-
var
|
|
10054
|
+
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react@_a0745de0839b0b019298ec068509a840/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
10055
|
+
var React44 = __toESM(require("react"), 1);
|
|
10056
|
+
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
10057
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10058
|
+
var PORTAL_NAME = "Portal";
|
|
10059
|
+
var Portal = React44.forwardRef((props, forwardedRef) => {
|
|
10060
|
+
var _b;
|
|
10061
|
+
const _a = props, { container: containerProp } = _a, portalProps = __objRest(_a, ["container"]);
|
|
10062
|
+
const [mounted, setMounted] = React44.useState(false);
|
|
10063
|
+
useLayoutEffect2(() => setMounted(true), []);
|
|
10064
|
+
const container = containerProp || mounted && ((_b = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _b.body);
|
|
10065
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Primitive.div, __spreadProps(__spreadValues({}, portalProps), { ref: forwardedRef })), container) : null;
|
|
10066
|
+
});
|
|
10067
|
+
Portal.displayName = PORTAL_NAME;
|
|
10068
|
+
|
|
10069
|
+
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.3_@types+react@19.1.2__@types+reac_dbbe976722e7c3e02883ea31c3bbbf14/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
10070
|
+
var React211 = __toESM(require("react"), 1);
|
|
10071
|
+
var React45 = __toESM(require("react"), 1);
|
|
10072
|
+
function useStateMachine(initialState, machine) {
|
|
10073
|
+
return React45.useReducer((state, event) => {
|
|
10074
|
+
const nextState = machine[state][event];
|
|
10075
|
+
return nextState != null ? nextState : state;
|
|
10076
|
+
}, initialState);
|
|
10077
|
+
}
|
|
10078
|
+
var Presence = (props) => {
|
|
10079
|
+
const { present, children } = props;
|
|
10080
|
+
const presence = usePresence(present);
|
|
10081
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React211.Children.only(children);
|
|
10082
|
+
const ref2 = useComposedRefs(presence.ref, getElementRef2(child));
|
|
10083
|
+
const forceMount = typeof children === "function";
|
|
10084
|
+
return forceMount || presence.isPresent ? React211.cloneElement(child, { ref: ref2 }) : null;
|
|
10085
|
+
};
|
|
10086
|
+
Presence.displayName = "Presence";
|
|
10087
|
+
function usePresence(present) {
|
|
10088
|
+
const [node2, setNode] = React211.useState();
|
|
10089
|
+
const stylesRef = React211.useRef(null);
|
|
10090
|
+
const prevPresentRef = React211.useRef(present);
|
|
10091
|
+
const prevAnimationNameRef = React211.useRef("none");
|
|
10092
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
10093
|
+
const [state, send] = useStateMachine(initialState, {
|
|
10094
|
+
mounted: {
|
|
10095
|
+
UNMOUNT: "unmounted",
|
|
10096
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
10097
|
+
},
|
|
10098
|
+
unmountSuspended: {
|
|
10099
|
+
MOUNT: "mounted",
|
|
10100
|
+
ANIMATION_END: "unmounted"
|
|
10101
|
+
},
|
|
10102
|
+
unmounted: {
|
|
10103
|
+
MOUNT: "mounted"
|
|
10104
|
+
}
|
|
10105
|
+
});
|
|
10106
|
+
React211.useEffect(() => {
|
|
10107
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
10108
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
10109
|
+
}, [state]);
|
|
10110
|
+
useLayoutEffect2(() => {
|
|
10111
|
+
const styles = stylesRef.current;
|
|
10112
|
+
const wasPresent = prevPresentRef.current;
|
|
10113
|
+
const hasPresentChanged = wasPresent !== present;
|
|
10114
|
+
if (hasPresentChanged) {
|
|
10115
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
10116
|
+
const currentAnimationName = getAnimationName(styles);
|
|
10117
|
+
if (present) {
|
|
10118
|
+
send("MOUNT");
|
|
10119
|
+
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
|
10120
|
+
send("UNMOUNT");
|
|
10121
|
+
} else {
|
|
10122
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
10123
|
+
if (wasPresent && isAnimating) {
|
|
10124
|
+
send("ANIMATION_OUT");
|
|
10125
|
+
} else {
|
|
10126
|
+
send("UNMOUNT");
|
|
10127
|
+
}
|
|
10128
|
+
}
|
|
10129
|
+
prevPresentRef.current = present;
|
|
10130
|
+
}
|
|
10131
|
+
}, [present, send]);
|
|
10132
|
+
useLayoutEffect2(() => {
|
|
10133
|
+
var _a;
|
|
10134
|
+
if (node2) {
|
|
10135
|
+
let timeoutId;
|
|
10136
|
+
const ownerWindow = (_a = node2.ownerDocument.defaultView) != null ? _a : window;
|
|
10137
|
+
const handleAnimationEnd = (event) => {
|
|
10138
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
10139
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
10140
|
+
if (event.target === node2 && isCurrentAnimation) {
|
|
10141
|
+
send("ANIMATION_END");
|
|
10142
|
+
if (!prevPresentRef.current) {
|
|
10143
|
+
const currentFillMode = node2.style.animationFillMode;
|
|
10144
|
+
node2.style.animationFillMode = "forwards";
|
|
10145
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
10146
|
+
if (node2.style.animationFillMode === "forwards") {
|
|
10147
|
+
node2.style.animationFillMode = currentFillMode;
|
|
10148
|
+
}
|
|
10149
|
+
});
|
|
10150
|
+
}
|
|
10151
|
+
}
|
|
10152
|
+
};
|
|
10153
|
+
const handleAnimationStart = (event) => {
|
|
10154
|
+
if (event.target === node2) {
|
|
10155
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
10156
|
+
}
|
|
10157
|
+
};
|
|
10158
|
+
node2.addEventListener("animationstart", handleAnimationStart);
|
|
10159
|
+
node2.addEventListener("animationcancel", handleAnimationEnd);
|
|
10160
|
+
node2.addEventListener("animationend", handleAnimationEnd);
|
|
10161
|
+
return () => {
|
|
10162
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
10163
|
+
node2.removeEventListener("animationstart", handleAnimationStart);
|
|
10164
|
+
node2.removeEventListener("animationcancel", handleAnimationEnd);
|
|
10165
|
+
node2.removeEventListener("animationend", handleAnimationEnd);
|
|
10166
|
+
};
|
|
10167
|
+
} else {
|
|
10168
|
+
send("ANIMATION_END");
|
|
10169
|
+
}
|
|
10170
|
+
}, [node2, send]);
|
|
10171
|
+
return {
|
|
10172
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
10173
|
+
ref: React211.useCallback((node22) => {
|
|
10174
|
+
stylesRef.current = node22 ? getComputedStyle(node22) : null;
|
|
10175
|
+
setNode(node22);
|
|
10176
|
+
}, [])
|
|
10177
|
+
};
|
|
10178
|
+
}
|
|
10179
|
+
function getAnimationName(styles) {
|
|
10180
|
+
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
10181
|
+
}
|
|
10182
|
+
function getElementRef2(element) {
|
|
10183
|
+
var _a, _b;
|
|
10184
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
10185
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10186
|
+
if (mayWarn) {
|
|
10187
|
+
return element.ref;
|
|
10188
|
+
}
|
|
10189
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
10190
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10191
|
+
if (mayWarn) {
|
|
10192
|
+
return element.props.ref;
|
|
10193
|
+
}
|
|
10194
|
+
return element.props.ref || element.ref;
|
|
10195
|
+
}
|
|
10196
|
+
|
|
10197
|
+
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
10198
|
+
var React46 = __toESM(require("react"), 1);
|
|
10199
|
+
var count2 = 0;
|
|
10200
|
+
function useFocusGuards() {
|
|
10201
|
+
React46.useEffect(() => {
|
|
10202
|
+
var _a, _b;
|
|
10203
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
10204
|
+
document.body.insertAdjacentElement("afterbegin", (_a = edgeGuards[0]) != null ? _a : createFocusGuard());
|
|
10205
|
+
document.body.insertAdjacentElement("beforeend", (_b = edgeGuards[1]) != null ? _b : createFocusGuard());
|
|
10206
|
+
count2++;
|
|
10207
|
+
return () => {
|
|
10208
|
+
if (count2 === 1) {
|
|
10209
|
+
document.querySelectorAll("[data-radix-focus-guard]").forEach((node2) => node2.remove());
|
|
10210
|
+
}
|
|
10211
|
+
count2--;
|
|
10212
|
+
};
|
|
10213
|
+
}, []);
|
|
10214
|
+
}
|
|
10215
|
+
function createFocusGuard() {
|
|
10216
|
+
const element = document.createElement("span");
|
|
10217
|
+
element.setAttribute("data-radix-focus-guard", "");
|
|
10218
|
+
element.tabIndex = 0;
|
|
10219
|
+
element.style.outline = "none";
|
|
10220
|
+
element.style.opacity = "0";
|
|
10221
|
+
element.style.position = "fixed";
|
|
10222
|
+
element.style.pointerEvents = "none";
|
|
10223
|
+
return element;
|
|
10224
|
+
}
|
|
10225
|
+
|
|
10226
|
+
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
10227
|
+
var __assign = function() {
|
|
10228
|
+
__assign = Object.assign || function __assign2(t) {
|
|
10229
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10230
|
+
s = arguments[i];
|
|
10231
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10232
|
+
}
|
|
10233
|
+
return t;
|
|
10234
|
+
};
|
|
10235
|
+
return __assign.apply(this, arguments);
|
|
10236
|
+
};
|
|
10237
|
+
function __rest(s, e) {
|
|
10238
|
+
var t = {};
|
|
10239
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
10240
|
+
t[p] = s[p];
|
|
10241
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10242
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
10243
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
10244
|
+
t[p[i]] = s[p[i]];
|
|
10245
|
+
}
|
|
10246
|
+
return t;
|
|
10247
|
+
}
|
|
10248
|
+
function __spreadArray(to, from, pack) {
|
|
10249
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
10250
|
+
if (ar || !(i in from)) {
|
|
10251
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
10252
|
+
ar[i] = from[i];
|
|
10253
|
+
}
|
|
10254
|
+
}
|
|
10255
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10256
|
+
}
|
|
10257
|
+
|
|
10258
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
10259
|
+
var React53 = __toESM(require("react"));
|
|
10260
|
+
|
|
10261
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
10262
|
+
var React49 = __toESM(require("react"));
|
|
10263
|
+
|
|
10264
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
10265
|
+
var zeroRightClassName = "right-scroll-bar-position";
|
|
10266
|
+
var fullWidthClassName = "width-before-scroll-bar";
|
|
10267
|
+
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
10268
|
+
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
10269
|
+
|
|
10270
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
10271
|
+
function assignRef(ref2, value2) {
|
|
10272
|
+
if (typeof ref2 === "function") {
|
|
10273
|
+
ref2(value2);
|
|
10274
|
+
} else if (ref2) {
|
|
10275
|
+
ref2.current = value2;
|
|
10276
|
+
}
|
|
10277
|
+
return ref2;
|
|
10278
|
+
}
|
|
10279
|
+
|
|
10280
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
10281
|
+
var import_react35 = require("react");
|
|
10282
|
+
function useCallbackRef2(initialValue, callback) {
|
|
10283
|
+
var ref2 = (0, import_react35.useState)(function() {
|
|
10284
|
+
return {
|
|
10285
|
+
// value
|
|
10286
|
+
value: initialValue,
|
|
10287
|
+
// last callback
|
|
10288
|
+
callback,
|
|
10289
|
+
// "memoized" public interface
|
|
10290
|
+
facade: {
|
|
10291
|
+
get current() {
|
|
10292
|
+
return ref2.value;
|
|
10293
|
+
},
|
|
10294
|
+
set current(value2) {
|
|
10295
|
+
var last = ref2.value;
|
|
10296
|
+
if (last !== value2) {
|
|
10297
|
+
ref2.value = value2;
|
|
10298
|
+
ref2.callback(value2, last);
|
|
10299
|
+
}
|
|
10300
|
+
}
|
|
10301
|
+
}
|
|
10302
|
+
};
|
|
10303
|
+
})[0];
|
|
10304
|
+
ref2.callback = callback;
|
|
10305
|
+
return ref2.facade;
|
|
10306
|
+
}
|
|
10307
|
+
|
|
10308
|
+
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
10309
|
+
var React47 = __toESM(require("react"));
|
|
10310
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
10311
|
+
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
10312
|
+
function useMergeRefs(refs, defaultValue) {
|
|
10313
|
+
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
10314
|
+
return refs.forEach(function(ref2) {
|
|
10315
|
+
return assignRef(ref2, newValue);
|
|
10316
|
+
});
|
|
10317
|
+
});
|
|
10318
|
+
useIsomorphicLayoutEffect(function() {
|
|
10319
|
+
var oldValue = currentValues.get(callbackRef);
|
|
10320
|
+
if (oldValue) {
|
|
10321
|
+
var prevRefs_1 = new Set(oldValue);
|
|
10322
|
+
var nextRefs_1 = new Set(refs);
|
|
10323
|
+
var current_1 = callbackRef.current;
|
|
10324
|
+
prevRefs_1.forEach(function(ref2) {
|
|
10325
|
+
if (!nextRefs_1.has(ref2)) {
|
|
10326
|
+
assignRef(ref2, null);
|
|
10327
|
+
}
|
|
10328
|
+
});
|
|
10329
|
+
nextRefs_1.forEach(function(ref2) {
|
|
10330
|
+
if (!prevRefs_1.has(ref2)) {
|
|
10331
|
+
assignRef(ref2, current_1);
|
|
10332
|
+
}
|
|
10333
|
+
});
|
|
10334
|
+
}
|
|
10335
|
+
currentValues.set(callbackRef, refs);
|
|
10336
|
+
}, [refs]);
|
|
10337
|
+
return callbackRef;
|
|
10338
|
+
}
|
|
10339
|
+
|
|
10340
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.js
|
|
10341
|
+
function ItoI(a) {
|
|
10342
|
+
return a;
|
|
10343
|
+
}
|
|
10344
|
+
function innerCreateMedium(defaults, middleware) {
|
|
10345
|
+
if (middleware === void 0) {
|
|
10346
|
+
middleware = ItoI;
|
|
10347
|
+
}
|
|
10348
|
+
var buffer = [];
|
|
10349
|
+
var assigned = false;
|
|
10350
|
+
var medium = {
|
|
10351
|
+
read: function() {
|
|
10352
|
+
if (assigned) {
|
|
10353
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
10354
|
+
}
|
|
10355
|
+
if (buffer.length) {
|
|
10356
|
+
return buffer[buffer.length - 1];
|
|
10357
|
+
}
|
|
10358
|
+
return defaults;
|
|
10359
|
+
},
|
|
10360
|
+
useMedium: function(data2) {
|
|
10361
|
+
var item = middleware(data2, assigned);
|
|
10362
|
+
buffer.push(item);
|
|
10363
|
+
return function() {
|
|
10364
|
+
buffer = buffer.filter(function(x) {
|
|
10365
|
+
return x !== item;
|
|
10366
|
+
});
|
|
10367
|
+
};
|
|
10368
|
+
},
|
|
10369
|
+
assignSyncMedium: function(cb) {
|
|
10370
|
+
assigned = true;
|
|
10371
|
+
while (buffer.length) {
|
|
10372
|
+
var cbs = buffer;
|
|
10373
|
+
buffer = [];
|
|
10374
|
+
cbs.forEach(cb);
|
|
10375
|
+
}
|
|
10376
|
+
buffer = {
|
|
10377
|
+
push: function(x) {
|
|
10378
|
+
return cb(x);
|
|
10379
|
+
},
|
|
10380
|
+
filter: function() {
|
|
10381
|
+
return buffer;
|
|
10382
|
+
}
|
|
10383
|
+
};
|
|
10384
|
+
},
|
|
10385
|
+
assignMedium: function(cb) {
|
|
10386
|
+
assigned = true;
|
|
10387
|
+
var pendingQueue = [];
|
|
10388
|
+
if (buffer.length) {
|
|
10389
|
+
var cbs = buffer;
|
|
10390
|
+
buffer = [];
|
|
10391
|
+
cbs.forEach(cb);
|
|
10392
|
+
pendingQueue = buffer;
|
|
10393
|
+
}
|
|
10394
|
+
var executeQueue = function() {
|
|
10395
|
+
var cbs2 = pendingQueue;
|
|
10396
|
+
pendingQueue = [];
|
|
10397
|
+
cbs2.forEach(cb);
|
|
10398
|
+
};
|
|
10399
|
+
var cycle = function() {
|
|
10400
|
+
return Promise.resolve().then(executeQueue);
|
|
10401
|
+
};
|
|
10402
|
+
cycle();
|
|
10403
|
+
buffer = {
|
|
10404
|
+
push: function(x) {
|
|
10405
|
+
pendingQueue.push(x);
|
|
10406
|
+
cycle();
|
|
10407
|
+
},
|
|
10408
|
+
filter: function(filter) {
|
|
10409
|
+
pendingQueue = pendingQueue.filter(filter);
|
|
10410
|
+
return buffer;
|
|
10411
|
+
}
|
|
10412
|
+
};
|
|
10413
|
+
}
|
|
10414
|
+
};
|
|
10415
|
+
return medium;
|
|
10416
|
+
}
|
|
10417
|
+
function createSidecarMedium(options) {
|
|
10418
|
+
if (options === void 0) {
|
|
10419
|
+
options = {};
|
|
10420
|
+
}
|
|
10421
|
+
var medium = innerCreateMedium(null);
|
|
10422
|
+
medium.options = __assign({ async: true, ssr: false }, options);
|
|
10423
|
+
return medium;
|
|
10424
|
+
}
|
|
10425
|
+
|
|
10426
|
+
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
10427
|
+
var React48 = __toESM(require("react"));
|
|
10428
|
+
var SideCar = function(_a) {
|
|
10429
|
+
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
10430
|
+
if (!sideCar) {
|
|
10431
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
10432
|
+
}
|
|
10433
|
+
var Target = sideCar.read();
|
|
10434
|
+
if (!Target) {
|
|
10435
|
+
throw new Error("Sidecar medium not found");
|
|
10436
|
+
}
|
|
10437
|
+
return React48.createElement(Target, __assign({}, rest));
|
|
10438
|
+
};
|
|
10439
|
+
SideCar.isSideCarExport = true;
|
|
10440
|
+
function exportSidecar(medium, exported) {
|
|
10441
|
+
medium.useMedium(exported);
|
|
10442
|
+
return SideCar;
|
|
10443
|
+
}
|
|
10444
|
+
|
|
10445
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
10446
|
+
var effectCar = createSidecarMedium();
|
|
10447
|
+
|
|
10448
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
10449
|
+
var nothing = function() {
|
|
10450
|
+
return;
|
|
10451
|
+
};
|
|
10452
|
+
var RemoveScroll = React49.forwardRef(function(props, parentRef) {
|
|
10453
|
+
var ref2 = React49.useRef(null);
|
|
10454
|
+
var _a = React49.useState({
|
|
10455
|
+
onScrollCapture: nothing,
|
|
10456
|
+
onWheelCapture: nothing,
|
|
10457
|
+
onTouchMoveCapture: nothing
|
|
10458
|
+
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
10459
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
10460
|
+
var SideCar2 = sideCar;
|
|
10461
|
+
var containerRef = useMergeRefs([ref2, parentRef]);
|
|
10462
|
+
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
10463
|
+
return React49.createElement(
|
|
10464
|
+
React49.Fragment,
|
|
10465
|
+
null,
|
|
10466
|
+
enabled && React49.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref2, gapMode }),
|
|
10467
|
+
forwardProps ? React49.cloneElement(React49.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React49.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
10468
|
+
);
|
|
10469
|
+
});
|
|
10470
|
+
RemoveScroll.defaultProps = {
|
|
10471
|
+
enabled: true,
|
|
10472
|
+
removeScrollBar: true,
|
|
10473
|
+
inert: false
|
|
10474
|
+
};
|
|
10475
|
+
RemoveScroll.classNames = {
|
|
10476
|
+
fullWidth: fullWidthClassName,
|
|
10477
|
+
zeroRight: zeroRightClassName
|
|
10478
|
+
};
|
|
10479
|
+
|
|
10480
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
10481
|
+
var React52 = __toESM(require("react"));
|
|
10482
|
+
|
|
10483
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
10484
|
+
var React51 = __toESM(require("react"));
|
|
10485
|
+
|
|
10486
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
10487
|
+
var React50 = __toESM(require("react"));
|
|
10488
|
+
|
|
10489
|
+
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
10490
|
+
var currentNonce;
|
|
10491
|
+
var getNonce = function() {
|
|
10492
|
+
if (currentNonce) {
|
|
10493
|
+
return currentNonce;
|
|
10494
|
+
}
|
|
10495
|
+
if (typeof __webpack_nonce__ !== "undefined") {
|
|
10496
|
+
return __webpack_nonce__;
|
|
10497
|
+
}
|
|
10498
|
+
return void 0;
|
|
10499
|
+
};
|
|
10500
|
+
|
|
10501
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
10502
|
+
function makeStyleTag() {
|
|
10503
|
+
if (!document)
|
|
10504
|
+
return null;
|
|
10505
|
+
var tag = document.createElement("style");
|
|
10506
|
+
tag.type = "text/css";
|
|
10507
|
+
var nonce = getNonce();
|
|
10508
|
+
if (nonce) {
|
|
10509
|
+
tag.setAttribute("nonce", nonce);
|
|
10510
|
+
}
|
|
10511
|
+
return tag;
|
|
10512
|
+
}
|
|
10513
|
+
function injectStyles(tag, css) {
|
|
10514
|
+
if (tag.styleSheet) {
|
|
10515
|
+
tag.styleSheet.cssText = css;
|
|
10516
|
+
} else {
|
|
10517
|
+
tag.appendChild(document.createTextNode(css));
|
|
10518
|
+
}
|
|
10519
|
+
}
|
|
10520
|
+
function insertStyleTag(tag) {
|
|
10521
|
+
var head = document.head || document.getElementsByTagName("head")[0];
|
|
10522
|
+
head.appendChild(tag);
|
|
10523
|
+
}
|
|
10524
|
+
var stylesheetSingleton = function() {
|
|
10525
|
+
var counter = 0;
|
|
10526
|
+
var stylesheet = null;
|
|
10527
|
+
return {
|
|
10528
|
+
add: function(style) {
|
|
10529
|
+
if (counter == 0) {
|
|
10530
|
+
if (stylesheet = makeStyleTag()) {
|
|
10531
|
+
injectStyles(stylesheet, style);
|
|
10532
|
+
insertStyleTag(stylesheet);
|
|
10533
|
+
}
|
|
10534
|
+
}
|
|
10535
|
+
counter++;
|
|
10536
|
+
},
|
|
10537
|
+
remove: function() {
|
|
10538
|
+
counter--;
|
|
10539
|
+
if (!counter && stylesheet) {
|
|
10540
|
+
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
10541
|
+
stylesheet = null;
|
|
10542
|
+
}
|
|
10543
|
+
}
|
|
10544
|
+
};
|
|
10545
|
+
};
|
|
10546
|
+
|
|
10547
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
10548
|
+
var styleHookSingleton = function() {
|
|
10549
|
+
var sheet = stylesheetSingleton();
|
|
10550
|
+
return function(styles, isDynamic) {
|
|
10551
|
+
React50.useEffect(function() {
|
|
10552
|
+
sheet.add(styles);
|
|
10553
|
+
return function() {
|
|
10554
|
+
sheet.remove();
|
|
10555
|
+
};
|
|
10556
|
+
}, [styles && isDynamic]);
|
|
10557
|
+
};
|
|
10558
|
+
};
|
|
10559
|
+
|
|
10560
|
+
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.js
|
|
10561
|
+
var styleSingleton = function() {
|
|
10562
|
+
var useStyle = styleHookSingleton();
|
|
10563
|
+
var Sheet = function(_a) {
|
|
10564
|
+
var styles = _a.styles, dynamic = _a.dynamic;
|
|
10565
|
+
useStyle(styles, dynamic);
|
|
10566
|
+
return null;
|
|
10567
|
+
};
|
|
10568
|
+
return Sheet;
|
|
10569
|
+
};
|
|
10570
|
+
|
|
10571
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
10572
|
+
var zeroGap = {
|
|
10573
|
+
left: 0,
|
|
10574
|
+
top: 0,
|
|
10575
|
+
right: 0,
|
|
10576
|
+
gap: 0
|
|
10577
|
+
};
|
|
10578
|
+
var parse = function(x) {
|
|
10579
|
+
return parseInt(x || "", 10) || 0;
|
|
10580
|
+
};
|
|
10581
|
+
var getOffset = function(gapMode) {
|
|
10582
|
+
var cs = window.getComputedStyle(document.body);
|
|
10583
|
+
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
10584
|
+
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
10585
|
+
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
10586
|
+
return [parse(left), parse(top), parse(right)];
|
|
10587
|
+
};
|
|
10588
|
+
var getGapWidth = function(gapMode) {
|
|
10589
|
+
if (gapMode === void 0) {
|
|
10590
|
+
gapMode = "margin";
|
|
10591
|
+
}
|
|
10592
|
+
if (typeof window === "undefined") {
|
|
10593
|
+
return zeroGap;
|
|
10594
|
+
}
|
|
10595
|
+
var offsets = getOffset(gapMode);
|
|
10596
|
+
var documentWidth = document.documentElement.clientWidth;
|
|
10597
|
+
var windowWidth = window.innerWidth;
|
|
10598
|
+
return {
|
|
10599
|
+
left: offsets[0],
|
|
10600
|
+
top: offsets[1],
|
|
10601
|
+
right: offsets[2],
|
|
10602
|
+
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
10603
|
+
};
|
|
10604
|
+
};
|
|
10605
|
+
|
|
10606
|
+
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
10607
|
+
var Style = styleSingleton();
|
|
10608
|
+
var lockAttribute = "data-scroll-locked";
|
|
10609
|
+
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
10610
|
+
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
10611
|
+
if (gapMode === void 0) {
|
|
10612
|
+
gapMode = "margin";
|
|
10613
|
+
}
|
|
10614
|
+
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
10615
|
+
allowRelative && "position: relative ".concat(important, ";"),
|
|
10616
|
+
gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
10617
|
+
gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
|
|
10618
|
+
].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
10619
|
+
};
|
|
10620
|
+
var getCurrentUseCounter = function() {
|
|
10621
|
+
var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
|
|
10622
|
+
return isFinite(counter) ? counter : 0;
|
|
10623
|
+
};
|
|
10624
|
+
var useLockAttribute = function() {
|
|
10625
|
+
React51.useEffect(function() {
|
|
10626
|
+
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
10627
|
+
return function() {
|
|
10628
|
+
var newCounter = getCurrentUseCounter() - 1;
|
|
10629
|
+
if (newCounter <= 0) {
|
|
10630
|
+
document.body.removeAttribute(lockAttribute);
|
|
10631
|
+
} else {
|
|
10632
|
+
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
10633
|
+
}
|
|
10634
|
+
};
|
|
10635
|
+
}, []);
|
|
10636
|
+
};
|
|
10637
|
+
var RemoveScrollBar = function(_a) {
|
|
10638
|
+
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
10639
|
+
useLockAttribute();
|
|
10640
|
+
var gap = React51.useMemo(function() {
|
|
10641
|
+
return getGapWidth(gapMode);
|
|
10642
|
+
}, [gapMode]);
|
|
10643
|
+
return React51.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
10644
|
+
};
|
|
10645
|
+
|
|
10646
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
10647
|
+
var passiveSupported = false;
|
|
10648
|
+
if (typeof window !== "undefined") {
|
|
10649
|
+
try {
|
|
10650
|
+
options = Object.defineProperty({}, "passive", {
|
|
10651
|
+
get: function() {
|
|
10652
|
+
passiveSupported = true;
|
|
10653
|
+
return true;
|
|
10654
|
+
}
|
|
10655
|
+
});
|
|
10656
|
+
window.addEventListener("test", options, options);
|
|
10657
|
+
window.removeEventListener("test", options, options);
|
|
10658
|
+
} catch (err) {
|
|
10659
|
+
passiveSupported = false;
|
|
10660
|
+
}
|
|
10661
|
+
}
|
|
10662
|
+
var options;
|
|
10663
|
+
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
10664
|
+
|
|
10665
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
10666
|
+
var alwaysContainsScroll = function(node2) {
|
|
10667
|
+
return node2.tagName === "TEXTAREA";
|
|
10668
|
+
};
|
|
10669
|
+
var elementCanBeScrolled = function(node2, overflow) {
|
|
10670
|
+
if (!(node2 instanceof Element)) {
|
|
10671
|
+
return false;
|
|
10672
|
+
}
|
|
10673
|
+
var styles = window.getComputedStyle(node2);
|
|
10674
|
+
return (
|
|
10675
|
+
// not-not-scrollable
|
|
10676
|
+
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
10677
|
+
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node2) && styles[overflow] === "visible")
|
|
10678
|
+
);
|
|
10679
|
+
};
|
|
10680
|
+
var elementCouldBeVScrolled = function(node2) {
|
|
10681
|
+
return elementCanBeScrolled(node2, "overflowY");
|
|
10682
|
+
};
|
|
10683
|
+
var elementCouldBeHScrolled = function(node2) {
|
|
10684
|
+
return elementCanBeScrolled(node2, "overflowX");
|
|
10685
|
+
};
|
|
10686
|
+
var locationCouldBeScrolled = function(axis, node2) {
|
|
10687
|
+
var ownerDocument = node2.ownerDocument;
|
|
10688
|
+
var current2 = node2;
|
|
10689
|
+
do {
|
|
10690
|
+
if (typeof ShadowRoot !== "undefined" && current2 instanceof ShadowRoot) {
|
|
10691
|
+
current2 = current2.host;
|
|
10692
|
+
}
|
|
10693
|
+
var isScrollable = elementCouldBeScrolled(axis, current2);
|
|
10694
|
+
if (isScrollable) {
|
|
10695
|
+
var _a = getScrollVariables(axis, current2), scrollHeight = _a[1], clientHeight = _a[2];
|
|
10696
|
+
if (scrollHeight > clientHeight) {
|
|
10697
|
+
return true;
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
current2 = current2.parentNode;
|
|
10701
|
+
} while (current2 && current2 !== ownerDocument.body);
|
|
10702
|
+
return false;
|
|
10703
|
+
};
|
|
10704
|
+
var getVScrollVariables = function(_a) {
|
|
10705
|
+
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
10706
|
+
return [
|
|
10707
|
+
scrollTop,
|
|
10708
|
+
scrollHeight,
|
|
10709
|
+
clientHeight
|
|
10710
|
+
];
|
|
10711
|
+
};
|
|
10712
|
+
var getHScrollVariables = function(_a) {
|
|
10713
|
+
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
10714
|
+
return [
|
|
10715
|
+
scrollLeft,
|
|
10716
|
+
scrollWidth,
|
|
10717
|
+
clientWidth
|
|
10718
|
+
];
|
|
10719
|
+
};
|
|
10720
|
+
var elementCouldBeScrolled = function(axis, node2) {
|
|
10721
|
+
return axis === "v" ? elementCouldBeVScrolled(node2) : elementCouldBeHScrolled(node2);
|
|
10722
|
+
};
|
|
10723
|
+
var getScrollVariables = function(axis, node2) {
|
|
10724
|
+
return axis === "v" ? getVScrollVariables(node2) : getHScrollVariables(node2);
|
|
10725
|
+
};
|
|
10726
|
+
var getDirectionFactor = function(axis, direction) {
|
|
10727
|
+
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
10728
|
+
};
|
|
10729
|
+
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
10730
|
+
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
10731
|
+
var delta = directionFactor * sourceDelta;
|
|
10732
|
+
var target = event.target;
|
|
10733
|
+
var targetInLock = endTarget.contains(target);
|
|
10734
|
+
var shouldCancelScroll = false;
|
|
10735
|
+
var isDeltaPositive = delta > 0;
|
|
10736
|
+
var availableScroll = 0;
|
|
10737
|
+
var availableScrollTop = 0;
|
|
10738
|
+
do {
|
|
10739
|
+
if (!target) {
|
|
10740
|
+
break;
|
|
10741
|
+
}
|
|
10742
|
+
var _a = getScrollVariables(axis, target), position2 = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
10743
|
+
var elementScroll = scroll_1 - capacity - directionFactor * position2;
|
|
10744
|
+
if (position2 || elementScroll) {
|
|
10745
|
+
if (elementCouldBeScrolled(axis, target)) {
|
|
10746
|
+
availableScroll += elementScroll;
|
|
10747
|
+
availableScrollTop += position2;
|
|
10748
|
+
}
|
|
10749
|
+
}
|
|
10750
|
+
var parent_1 = target.parentNode;
|
|
10751
|
+
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
10752
|
+
} while (
|
|
10753
|
+
// portaled content
|
|
10754
|
+
!targetInLock && target !== document.body || // self content
|
|
10755
|
+
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
10756
|
+
);
|
|
10757
|
+
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
10758
|
+
shouldCancelScroll = true;
|
|
10759
|
+
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
10760
|
+
shouldCancelScroll = true;
|
|
10761
|
+
}
|
|
10762
|
+
return shouldCancelScroll;
|
|
10763
|
+
};
|
|
10764
|
+
|
|
10765
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
10766
|
+
var getTouchXY = function(event) {
|
|
10767
|
+
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
10768
|
+
};
|
|
10769
|
+
var getDeltaXY = function(event) {
|
|
10770
|
+
return [event.deltaX, event.deltaY];
|
|
10771
|
+
};
|
|
10772
|
+
var extractRef = function(ref2) {
|
|
10773
|
+
return ref2 && "current" in ref2 ? ref2.current : ref2;
|
|
10774
|
+
};
|
|
10775
|
+
var deltaCompare = function(x, y) {
|
|
10776
|
+
return x[0] === y[0] && x[1] === y[1];
|
|
10777
|
+
};
|
|
10778
|
+
var generateStyle = function(id) {
|
|
10779
|
+
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
10780
|
+
};
|
|
10781
|
+
var idCounter = 0;
|
|
10782
|
+
var lockStack = [];
|
|
10783
|
+
function RemoveScrollSideCar(props) {
|
|
10784
|
+
var shouldPreventQueue = React52.useRef([]);
|
|
10785
|
+
var touchStartRef = React52.useRef([0, 0]);
|
|
10786
|
+
var activeAxis = React52.useRef();
|
|
10787
|
+
var id = React52.useState(idCounter++)[0];
|
|
10788
|
+
var Style2 = React52.useState(styleSingleton)[0];
|
|
10789
|
+
var lastProps = React52.useRef(props);
|
|
10790
|
+
React52.useEffect(function() {
|
|
10791
|
+
lastProps.current = props;
|
|
10792
|
+
}, [props]);
|
|
10793
|
+
React52.useEffect(function() {
|
|
10794
|
+
if (props.inert) {
|
|
10795
|
+
document.body.classList.add("block-interactivity-".concat(id));
|
|
10796
|
+
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
10797
|
+
allow_1.forEach(function(el) {
|
|
10798
|
+
return el.classList.add("allow-interactivity-".concat(id));
|
|
10799
|
+
});
|
|
10800
|
+
return function() {
|
|
10801
|
+
document.body.classList.remove("block-interactivity-".concat(id));
|
|
10802
|
+
allow_1.forEach(function(el) {
|
|
10803
|
+
return el.classList.remove("allow-interactivity-".concat(id));
|
|
10804
|
+
});
|
|
10805
|
+
};
|
|
10806
|
+
}
|
|
10807
|
+
return;
|
|
10808
|
+
}, [props.inert, props.lockRef.current, props.shards]);
|
|
10809
|
+
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
10810
|
+
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
10811
|
+
return !lastProps.current.allowPinchZoom;
|
|
10812
|
+
}
|
|
10813
|
+
var touch = getTouchXY(event);
|
|
10814
|
+
var touchStart = touchStartRef.current;
|
|
10815
|
+
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
10816
|
+
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
10817
|
+
var currentAxis;
|
|
10818
|
+
var target = event.target;
|
|
10819
|
+
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
10820
|
+
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
10821
|
+
return false;
|
|
10822
|
+
}
|
|
10823
|
+
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
10824
|
+
if (!canBeScrolledInMainDirection) {
|
|
10825
|
+
return true;
|
|
10826
|
+
}
|
|
10827
|
+
if (canBeScrolledInMainDirection) {
|
|
10828
|
+
currentAxis = moveDirection;
|
|
10829
|
+
} else {
|
|
10830
|
+
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
10831
|
+
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
10832
|
+
}
|
|
10833
|
+
if (!canBeScrolledInMainDirection) {
|
|
10834
|
+
return false;
|
|
10835
|
+
}
|
|
10836
|
+
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
10837
|
+
activeAxis.current = currentAxis;
|
|
10838
|
+
}
|
|
10839
|
+
if (!currentAxis) {
|
|
10840
|
+
return true;
|
|
10841
|
+
}
|
|
10842
|
+
var cancelingAxis = activeAxis.current || currentAxis;
|
|
10843
|
+
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
10844
|
+
}, []);
|
|
10845
|
+
var shouldPrevent = React52.useCallback(function(_event) {
|
|
10846
|
+
var event = _event;
|
|
10847
|
+
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
10848
|
+
return;
|
|
10849
|
+
}
|
|
10850
|
+
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
10851
|
+
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
10852
|
+
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
10853
|
+
})[0];
|
|
10854
|
+
if (sourceEvent && sourceEvent.should) {
|
|
10855
|
+
if (event.cancelable) {
|
|
10856
|
+
event.preventDefault();
|
|
10857
|
+
}
|
|
10858
|
+
return;
|
|
10859
|
+
}
|
|
10860
|
+
if (!sourceEvent) {
|
|
10861
|
+
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node2) {
|
|
10862
|
+
return node2.contains(event.target);
|
|
10863
|
+
});
|
|
10864
|
+
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
10865
|
+
if (shouldStop) {
|
|
10866
|
+
if (event.cancelable) {
|
|
10867
|
+
event.preventDefault();
|
|
10868
|
+
}
|
|
10869
|
+
}
|
|
10870
|
+
}
|
|
10871
|
+
}, []);
|
|
10872
|
+
var shouldCancel = React52.useCallback(function(name2, delta, target, should) {
|
|
10873
|
+
var event = { name: name2, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
10874
|
+
shouldPreventQueue.current.push(event);
|
|
10875
|
+
setTimeout(function() {
|
|
10876
|
+
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
10877
|
+
return e !== event;
|
|
10878
|
+
});
|
|
10879
|
+
}, 1);
|
|
10880
|
+
}, []);
|
|
10881
|
+
var scrollTouchStart = React52.useCallback(function(event) {
|
|
10882
|
+
touchStartRef.current = getTouchXY(event);
|
|
10883
|
+
activeAxis.current = void 0;
|
|
10884
|
+
}, []);
|
|
10885
|
+
var scrollWheel = React52.useCallback(function(event) {
|
|
10886
|
+
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
10887
|
+
}, []);
|
|
10888
|
+
var scrollTouchMove = React52.useCallback(function(event) {
|
|
10889
|
+
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
10890
|
+
}, []);
|
|
10891
|
+
React52.useEffect(function() {
|
|
10892
|
+
lockStack.push(Style2);
|
|
10893
|
+
props.setCallbacks({
|
|
10894
|
+
onScrollCapture: scrollWheel,
|
|
10895
|
+
onWheelCapture: scrollWheel,
|
|
10896
|
+
onTouchMoveCapture: scrollTouchMove
|
|
10897
|
+
});
|
|
10898
|
+
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
|
10899
|
+
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
|
10900
|
+
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
10901
|
+
return function() {
|
|
10902
|
+
lockStack = lockStack.filter(function(inst) {
|
|
10903
|
+
return inst !== Style2;
|
|
10904
|
+
});
|
|
10905
|
+
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
|
10906
|
+
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
|
10907
|
+
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
10908
|
+
};
|
|
10909
|
+
}, []);
|
|
10910
|
+
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
10911
|
+
return React52.createElement(
|
|
10912
|
+
React52.Fragment,
|
|
10913
|
+
null,
|
|
10914
|
+
inert ? React52.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
10915
|
+
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
10916
|
+
);
|
|
10917
|
+
}
|
|
10918
|
+
function getOutermostShadowParent(node2) {
|
|
10919
|
+
var shadowParent = null;
|
|
10920
|
+
while (node2 !== null) {
|
|
10921
|
+
if (node2 instanceof ShadowRoot) {
|
|
10922
|
+
shadowParent = node2.host;
|
|
10923
|
+
node2 = node2.host;
|
|
10924
|
+
}
|
|
10925
|
+
node2 = node2.parentNode;
|
|
10926
|
+
}
|
|
10927
|
+
return shadowParent;
|
|
10928
|
+
}
|
|
10929
|
+
|
|
10930
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
10931
|
+
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
10932
|
+
|
|
10933
|
+
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
10934
|
+
var ReactRemoveScroll = React53.forwardRef(function(props, ref2) {
|
|
10935
|
+
return React53.createElement(RemoveScroll, __assign({}, props, { ref: ref2, sideCar: sidecar_default }));
|
|
10936
|
+
});
|
|
10937
|
+
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
10938
|
+
var Combination_default = ReactRemoveScroll;
|
|
10939
|
+
|
|
10940
|
+
// ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
10941
|
+
var getDefaultParent = function(originalTarget) {
|
|
10942
|
+
if (typeof document === "undefined") {
|
|
10943
|
+
return null;
|
|
10944
|
+
}
|
|
10945
|
+
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
10946
|
+
return sampleTarget.ownerDocument.body;
|
|
10947
|
+
};
|
|
10948
|
+
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
10949
|
+
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
10950
|
+
var markerMap = {};
|
|
10951
|
+
var lockCount = 0;
|
|
10952
|
+
var unwrapHost = function(node2) {
|
|
10953
|
+
return node2 && (node2.host || unwrapHost(node2.parentNode));
|
|
10954
|
+
};
|
|
10955
|
+
var correctTargets = function(parent, targets) {
|
|
10956
|
+
return targets.map(function(target) {
|
|
10957
|
+
if (parent.contains(target)) {
|
|
10958
|
+
return target;
|
|
10959
|
+
}
|
|
10960
|
+
var correctedTarget = unwrapHost(target);
|
|
10961
|
+
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
10962
|
+
return correctedTarget;
|
|
10963
|
+
}
|
|
10964
|
+
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
10965
|
+
return null;
|
|
10966
|
+
}).filter(function(x) {
|
|
10967
|
+
return Boolean(x);
|
|
10968
|
+
});
|
|
10969
|
+
};
|
|
10970
|
+
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
10971
|
+
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
10972
|
+
if (!markerMap[markerName]) {
|
|
10973
|
+
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
10974
|
+
}
|
|
10975
|
+
var markerCounter = markerMap[markerName];
|
|
10976
|
+
var hiddenNodes = [];
|
|
10977
|
+
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
10978
|
+
var elementsToStop = new Set(targets);
|
|
10979
|
+
var keep = function(el) {
|
|
10980
|
+
if (!el || elementsToKeep.has(el)) {
|
|
10981
|
+
return;
|
|
10982
|
+
}
|
|
10983
|
+
elementsToKeep.add(el);
|
|
10984
|
+
keep(el.parentNode);
|
|
10985
|
+
};
|
|
10986
|
+
targets.forEach(keep);
|
|
10987
|
+
var deep = function(parent) {
|
|
10988
|
+
if (!parent || elementsToStop.has(parent)) {
|
|
10989
|
+
return;
|
|
10990
|
+
}
|
|
10991
|
+
Array.prototype.forEach.call(parent.children, function(node2) {
|
|
10992
|
+
if (elementsToKeep.has(node2)) {
|
|
10993
|
+
deep(node2);
|
|
10994
|
+
} else {
|
|
10995
|
+
try {
|
|
10996
|
+
var attr = node2.getAttribute(controlAttribute);
|
|
10997
|
+
var alreadyHidden = attr !== null && attr !== "false";
|
|
10998
|
+
var counterValue = (counterMap.get(node2) || 0) + 1;
|
|
10999
|
+
var markerValue = (markerCounter.get(node2) || 0) + 1;
|
|
11000
|
+
counterMap.set(node2, counterValue);
|
|
11001
|
+
markerCounter.set(node2, markerValue);
|
|
11002
|
+
hiddenNodes.push(node2);
|
|
11003
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
11004
|
+
uncontrolledNodes.set(node2, true);
|
|
11005
|
+
}
|
|
11006
|
+
if (markerValue === 1) {
|
|
11007
|
+
node2.setAttribute(markerName, "true");
|
|
11008
|
+
}
|
|
11009
|
+
if (!alreadyHidden) {
|
|
11010
|
+
node2.setAttribute(controlAttribute, "true");
|
|
11011
|
+
}
|
|
11012
|
+
} catch (e) {
|
|
11013
|
+
console.error("aria-hidden: cannot operate on ", node2, e);
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
});
|
|
11017
|
+
};
|
|
11018
|
+
deep(parentNode);
|
|
11019
|
+
elementsToKeep.clear();
|
|
11020
|
+
lockCount++;
|
|
11021
|
+
return function() {
|
|
11022
|
+
hiddenNodes.forEach(function(node2) {
|
|
11023
|
+
var counterValue = counterMap.get(node2) - 1;
|
|
11024
|
+
var markerValue = markerCounter.get(node2) - 1;
|
|
11025
|
+
counterMap.set(node2, counterValue);
|
|
11026
|
+
markerCounter.set(node2, markerValue);
|
|
11027
|
+
if (!counterValue) {
|
|
11028
|
+
if (!uncontrolledNodes.has(node2)) {
|
|
11029
|
+
node2.removeAttribute(controlAttribute);
|
|
11030
|
+
}
|
|
11031
|
+
uncontrolledNodes.delete(node2);
|
|
11032
|
+
}
|
|
11033
|
+
if (!markerValue) {
|
|
11034
|
+
node2.removeAttribute(markerName);
|
|
11035
|
+
}
|
|
11036
|
+
});
|
|
11037
|
+
lockCount--;
|
|
11038
|
+
if (!lockCount) {
|
|
11039
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
11040
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
11041
|
+
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
11042
|
+
markerMap = {};
|
|
11043
|
+
}
|
|
11044
|
+
};
|
|
11045
|
+
};
|
|
11046
|
+
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
11047
|
+
if (markerName === void 0) {
|
|
11048
|
+
markerName = "data-aria-hidden";
|
|
11049
|
+
}
|
|
11050
|
+
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
11051
|
+
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
11052
|
+
if (!activeParentNode) {
|
|
11053
|
+
return function() {
|
|
11054
|
+
return null;
|
|
11055
|
+
};
|
|
11056
|
+
}
|
|
11057
|
+
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
11058
|
+
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
11059
|
+
};
|
|
11060
|
+
|
|
11061
|
+
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
11062
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
11063
|
+
var DIALOG_NAME = "Dialog";
|
|
11064
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
11065
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
11066
|
+
var Dialog = (props) => {
|
|
11067
|
+
const {
|
|
11068
|
+
__scopeDialog,
|
|
11069
|
+
children,
|
|
11070
|
+
open: openProp,
|
|
11071
|
+
defaultOpen,
|
|
11072
|
+
onOpenChange,
|
|
11073
|
+
modal = true
|
|
11074
|
+
} = props;
|
|
11075
|
+
const triggerRef = React54.useRef(null);
|
|
11076
|
+
const contentRef = React54.useRef(null);
|
|
11077
|
+
const [open, setOpen] = useControllableState({
|
|
11078
|
+
prop: openProp,
|
|
11079
|
+
defaultProp: defaultOpen != null ? defaultOpen : false,
|
|
11080
|
+
onChange: onOpenChange,
|
|
11081
|
+
caller: DIALOG_NAME
|
|
11082
|
+
});
|
|
11083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11084
|
+
DialogProvider,
|
|
11085
|
+
{
|
|
11086
|
+
scope: __scopeDialog,
|
|
11087
|
+
triggerRef,
|
|
11088
|
+
contentRef,
|
|
11089
|
+
contentId: useId(),
|
|
11090
|
+
titleId: useId(),
|
|
11091
|
+
descriptionId: useId(),
|
|
11092
|
+
open,
|
|
11093
|
+
onOpenChange: setOpen,
|
|
11094
|
+
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
11095
|
+
modal,
|
|
11096
|
+
children
|
|
11097
|
+
}
|
|
11098
|
+
);
|
|
11099
|
+
};
|
|
11100
|
+
Dialog.displayName = DIALOG_NAME;
|
|
11101
|
+
var TRIGGER_NAME = "DialogTrigger";
|
|
11102
|
+
var DialogTrigger = React54.forwardRef(
|
|
11103
|
+
(props, forwardedRef) => {
|
|
11104
|
+
const _a = props, { __scopeDialog } = _a, triggerProps = __objRest(_a, ["__scopeDialog"]);
|
|
11105
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
11106
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
11107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11108
|
+
Primitive.button,
|
|
11109
|
+
__spreadProps(__spreadValues({
|
|
11110
|
+
type: "button",
|
|
11111
|
+
"aria-haspopup": "dialog",
|
|
11112
|
+
"aria-expanded": context.open,
|
|
11113
|
+
"aria-controls": context.contentId,
|
|
11114
|
+
"data-state": getState(context.open)
|
|
11115
|
+
}, triggerProps), {
|
|
11116
|
+
ref: composedTriggerRef,
|
|
11117
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
11118
|
+
})
|
|
11119
|
+
);
|
|
11120
|
+
}
|
|
11121
|
+
);
|
|
11122
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
|
11123
|
+
var PORTAL_NAME2 = "DialogPortal";
|
|
11124
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
11125
|
+
forceMount: void 0
|
|
11126
|
+
});
|
|
11127
|
+
var DialogPortal = (props) => {
|
|
11128
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
|
11129
|
+
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
11130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React54.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
11131
|
+
};
|
|
11132
|
+
DialogPortal.displayName = PORTAL_NAME2;
|
|
11133
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
11134
|
+
var DialogOverlay = React54.forwardRef(
|
|
11135
|
+
(props, forwardedRef) => {
|
|
11136
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
11137
|
+
const _a = props, { forceMount = portalContext.forceMount } = _a, overlayProps = __objRest(_a, ["forceMount"]);
|
|
11138
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
11139
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogOverlayImpl, __spreadProps(__spreadValues({}, overlayProps), { ref: forwardedRef })) }) : null;
|
|
11140
|
+
}
|
|
11141
|
+
);
|
|
11142
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
11143
|
+
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
11144
|
+
var DialogOverlayImpl = React54.forwardRef(
|
|
11145
|
+
(props, forwardedRef) => {
|
|
11146
|
+
const _a = props, { __scopeDialog } = _a, overlayProps = __objRest(_a, ["__scopeDialog"]);
|
|
11147
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
11148
|
+
return (
|
|
11149
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
11150
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
11151
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11152
|
+
Primitive.div,
|
|
11153
|
+
__spreadProps(__spreadValues({
|
|
11154
|
+
"data-state": getState(context.open)
|
|
11155
|
+
}, overlayProps), {
|
|
11156
|
+
ref: forwardedRef,
|
|
11157
|
+
style: __spreadValues({ pointerEvents: "auto" }, overlayProps.style)
|
|
11158
|
+
})
|
|
11159
|
+
) })
|
|
11160
|
+
);
|
|
11161
|
+
}
|
|
11162
|
+
);
|
|
11163
|
+
var CONTENT_NAME = "DialogContent";
|
|
11164
|
+
var DialogContent = React54.forwardRef(
|
|
11165
|
+
(props, forwardedRef) => {
|
|
11166
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
11167
|
+
const _a = props, { forceMount = portalContext.forceMount } = _a, contentProps = __objRest(_a, ["forceMount"]);
|
|
11168
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentNonModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) });
|
|
11170
|
+
}
|
|
11171
|
+
);
|
|
11172
|
+
DialogContent.displayName = CONTENT_NAME;
|
|
11173
|
+
var DialogContentModal = React54.forwardRef(
|
|
11174
|
+
(props, forwardedRef) => {
|
|
11175
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11176
|
+
const contentRef = React54.useRef(null);
|
|
11177
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
11178
|
+
React54.useEffect(() => {
|
|
11179
|
+
const content3 = contentRef.current;
|
|
11180
|
+
if (content3) return hideOthers(content3);
|
|
11181
|
+
}, []);
|
|
11182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11183
|
+
DialogContentImpl,
|
|
11184
|
+
__spreadProps(__spreadValues({}, props), {
|
|
11185
|
+
ref: composedRefs,
|
|
11186
|
+
trapFocus: context.open,
|
|
11187
|
+
disableOutsidePointerEvents: true,
|
|
11188
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
11189
|
+
var _a;
|
|
11190
|
+
event.preventDefault();
|
|
11191
|
+
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
11192
|
+
}),
|
|
11193
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
11194
|
+
const originalEvent = event.detail.originalEvent;
|
|
11195
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
11196
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
11197
|
+
if (isRightClick) event.preventDefault();
|
|
11198
|
+
}),
|
|
11199
|
+
onFocusOutside: composeEventHandlers(
|
|
11200
|
+
props.onFocusOutside,
|
|
11201
|
+
(event) => event.preventDefault()
|
|
11202
|
+
)
|
|
11203
|
+
})
|
|
11204
|
+
);
|
|
11205
|
+
}
|
|
11206
|
+
);
|
|
11207
|
+
var DialogContentNonModal = React54.forwardRef(
|
|
11208
|
+
(props, forwardedRef) => {
|
|
11209
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11210
|
+
const hasInteractedOutsideRef = React54.useRef(false);
|
|
11211
|
+
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
11212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11213
|
+
DialogContentImpl,
|
|
11214
|
+
__spreadProps(__spreadValues({}, props), {
|
|
11215
|
+
ref: forwardedRef,
|
|
11216
|
+
trapFocus: false,
|
|
11217
|
+
disableOutsidePointerEvents: false,
|
|
11218
|
+
onCloseAutoFocus: (event) => {
|
|
11219
|
+
var _a, _b;
|
|
11220
|
+
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
|
11221
|
+
if (!event.defaultPrevented) {
|
|
11222
|
+
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
11223
|
+
event.preventDefault();
|
|
11224
|
+
}
|
|
11225
|
+
hasInteractedOutsideRef.current = false;
|
|
11226
|
+
hasPointerDownOutsideRef.current = false;
|
|
11227
|
+
},
|
|
11228
|
+
onInteractOutside: (event) => {
|
|
11229
|
+
var _a, _b;
|
|
11230
|
+
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
|
11231
|
+
if (!event.defaultPrevented) {
|
|
11232
|
+
hasInteractedOutsideRef.current = true;
|
|
11233
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
11234
|
+
hasPointerDownOutsideRef.current = true;
|
|
11235
|
+
}
|
|
11236
|
+
}
|
|
11237
|
+
const target = event.target;
|
|
11238
|
+
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
11239
|
+
if (targetIsTrigger) event.preventDefault();
|
|
11240
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
11241
|
+
event.preventDefault();
|
|
11242
|
+
}
|
|
11243
|
+
}
|
|
11244
|
+
})
|
|
11245
|
+
);
|
|
11246
|
+
}
|
|
11247
|
+
);
|
|
11248
|
+
var DialogContentImpl = React54.forwardRef(
|
|
11249
|
+
(props, forwardedRef) => {
|
|
11250
|
+
const _a = props, { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus } = _a, contentProps = __objRest(_a, ["__scopeDialog", "trapFocus", "onOpenAutoFocus", "onCloseAutoFocus"]);
|
|
11251
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
11252
|
+
const contentRef = React54.useRef(null);
|
|
11253
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
11254
|
+
useFocusGuards();
|
|
11255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
11256
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11257
|
+
FocusScope,
|
|
11258
|
+
{
|
|
11259
|
+
asChild: true,
|
|
11260
|
+
loop: true,
|
|
11261
|
+
trapped: trapFocus,
|
|
11262
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
11263
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
11264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11265
|
+
DismissableLayer,
|
|
11266
|
+
__spreadProps(__spreadValues({
|
|
11267
|
+
role: "dialog",
|
|
11268
|
+
id: context.contentId,
|
|
11269
|
+
"aria-describedby": context.descriptionId,
|
|
11270
|
+
"aria-labelledby": context.titleId,
|
|
11271
|
+
"data-state": getState(context.open)
|
|
11272
|
+
}, contentProps), {
|
|
11273
|
+
ref: composedRefs,
|
|
11274
|
+
onDismiss: () => context.onOpenChange(false)
|
|
11275
|
+
})
|
|
11276
|
+
)
|
|
11277
|
+
}
|
|
11278
|
+
),
|
|
11279
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
11280
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
11281
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
11282
|
+
] })
|
|
11283
|
+
] });
|
|
11284
|
+
}
|
|
11285
|
+
);
|
|
11286
|
+
var TITLE_NAME = "DialogTitle";
|
|
11287
|
+
var DialogTitle = React54.forwardRef(
|
|
11288
|
+
(props, forwardedRef) => {
|
|
11289
|
+
const _a = props, { __scopeDialog } = _a, titleProps = __objRest(_a, ["__scopeDialog"]);
|
|
11290
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
11291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.h2, __spreadProps(__spreadValues({ id: context.titleId }, titleProps), { ref: forwardedRef }));
|
|
11292
|
+
}
|
|
11293
|
+
);
|
|
11294
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
11295
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
11296
|
+
var DialogDescription = React54.forwardRef(
|
|
11297
|
+
(props, forwardedRef) => {
|
|
11298
|
+
const _a = props, { __scopeDialog } = _a, descriptionProps = __objRest(_a, ["__scopeDialog"]);
|
|
11299
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
11300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.p, __spreadProps(__spreadValues({ id: context.descriptionId }, descriptionProps), { ref: forwardedRef }));
|
|
11301
|
+
}
|
|
11302
|
+
);
|
|
11303
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
11304
|
+
var CLOSE_NAME = "DialogClose";
|
|
11305
|
+
var DialogClose = React54.forwardRef(
|
|
11306
|
+
(props, forwardedRef) => {
|
|
11307
|
+
const _a = props, { __scopeDialog } = _a, closeProps = __objRest(_a, ["__scopeDialog"]);
|
|
11308
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
11309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11310
|
+
Primitive.button,
|
|
11311
|
+
__spreadProps(__spreadValues({
|
|
11312
|
+
type: "button"
|
|
11313
|
+
}, closeProps), {
|
|
11314
|
+
ref: forwardedRef,
|
|
11315
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
11316
|
+
})
|
|
11317
|
+
);
|
|
11318
|
+
}
|
|
11319
|
+
);
|
|
11320
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
11321
|
+
function getState(open) {
|
|
11322
|
+
return open ? "open" : "closed";
|
|
11323
|
+
}
|
|
11324
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
11325
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
11326
|
+
contentName: CONTENT_NAME,
|
|
11327
|
+
titleName: TITLE_NAME,
|
|
11328
|
+
docsSlug: "dialog"
|
|
11329
|
+
});
|
|
11330
|
+
var TitleWarning = ({ titleId }) => {
|
|
11331
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
11332
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
11333
|
+
|
|
11334
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
11335
|
+
|
|
11336
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
11337
|
+
React54.useEffect(() => {
|
|
11338
|
+
if (titleId) {
|
|
11339
|
+
const hasTitle = document.getElementById(titleId);
|
|
11340
|
+
if (!hasTitle) console.error(MESSAGE);
|
|
11341
|
+
}
|
|
11342
|
+
}, [MESSAGE, titleId]);
|
|
11343
|
+
return null;
|
|
11344
|
+
};
|
|
11345
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
11346
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
11347
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
11348
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
11349
|
+
React54.useEffect(() => {
|
|
11350
|
+
var _a;
|
|
11351
|
+
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
11352
|
+
if (descriptionId && describedById) {
|
|
11353
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
11354
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
11355
|
+
}
|
|
11356
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
11357
|
+
return null;
|
|
11358
|
+
};
|
|
11359
|
+
var Root = Dialog;
|
|
11360
|
+
var Trigger = DialogTrigger;
|
|
11361
|
+
var Portal2 = DialogPortal;
|
|
11362
|
+
var Overlay = DialogOverlay;
|
|
11363
|
+
var Content = DialogContent;
|
|
11364
|
+
var Title = DialogTitle;
|
|
11365
|
+
var Description = DialogDescription;
|
|
11366
|
+
var Close = DialogClose;
|
|
11367
|
+
|
|
11368
|
+
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
11369
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
11370
|
+
var ROOT_NAME = "AlertDialog";
|
|
11371
|
+
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
11372
|
+
createDialogScope
|
|
11373
|
+
]);
|
|
11374
|
+
var useDialogScope = createDialogScope();
|
|
11375
|
+
var AlertDialog = (props) => {
|
|
11376
|
+
const _a = props, { __scopeAlertDialog } = _a, alertDialogProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11377
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Root, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), alertDialogProps), { modal: true }));
|
|
11379
|
+
};
|
|
11380
|
+
AlertDialog.displayName = ROOT_NAME;
|
|
11381
|
+
var TRIGGER_NAME2 = "AlertDialogTrigger";
|
|
11382
|
+
var AlertDialogTrigger = React55.forwardRef(
|
|
11383
|
+
(props, forwardedRef) => {
|
|
11384
|
+
const _a = props, { __scopeAlertDialog } = _a, triggerProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11385
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Trigger, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), triggerProps), { ref: forwardedRef }));
|
|
11387
|
+
}
|
|
11388
|
+
);
|
|
11389
|
+
AlertDialogTrigger.displayName = TRIGGER_NAME2;
|
|
11390
|
+
var PORTAL_NAME3 = "AlertDialogPortal";
|
|
11391
|
+
var AlertDialogPortal = (props) => {
|
|
11392
|
+
const _a = props, { __scopeAlertDialog } = _a, portalProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11393
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Portal2, __spreadValues(__spreadValues({}, dialogScope), portalProps));
|
|
11395
|
+
};
|
|
11396
|
+
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
11397
|
+
var OVERLAY_NAME2 = "AlertDialogOverlay";
|
|
11398
|
+
var AlertDialogOverlay = React55.forwardRef(
|
|
11399
|
+
(props, forwardedRef) => {
|
|
11400
|
+
const _a = props, { __scopeAlertDialog } = _a, overlayProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11401
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Overlay, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), overlayProps), { ref: forwardedRef }));
|
|
11403
|
+
}
|
|
11404
|
+
);
|
|
11405
|
+
AlertDialogOverlay.displayName = OVERLAY_NAME2;
|
|
11406
|
+
var CONTENT_NAME2 = "AlertDialogContent";
|
|
11407
|
+
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME2);
|
|
11408
|
+
var Slottable = createSlottable("AlertDialogContent");
|
|
11409
|
+
var AlertDialogContent = React55.forwardRef(
|
|
11410
|
+
(props, forwardedRef) => {
|
|
11411
|
+
const _a = props, { __scopeAlertDialog, children } = _a, contentProps = __objRest(_a, ["__scopeAlertDialog", "children"]);
|
|
11412
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11413
|
+
const contentRef = React55.useRef(null);
|
|
11414
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
11415
|
+
const cancelRef = React55.useRef(null);
|
|
11416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
11417
|
+
WarningProvider,
|
|
11418
|
+
{
|
|
11419
|
+
contentName: CONTENT_NAME2,
|
|
11420
|
+
titleName: TITLE_NAME2,
|
|
11421
|
+
docsSlug: "alert-dialog",
|
|
11422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
11423
|
+
Content,
|
|
11424
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
11425
|
+
role: "alertdialog"
|
|
11426
|
+
}, dialogScope), contentProps), {
|
|
11427
|
+
ref: composedRefs,
|
|
11428
|
+
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
|
11429
|
+
var _a2;
|
|
11430
|
+
event.preventDefault();
|
|
11431
|
+
(_a2 = cancelRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
11432
|
+
}),
|
|
11433
|
+
onPointerDownOutside: (event) => event.preventDefault(),
|
|
11434
|
+
onInteractOutside: (event) => event.preventDefault(),
|
|
11435
|
+
children: [
|
|
11436
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Slottable, { children }),
|
|
11437
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DescriptionWarning2, { contentRef })
|
|
11438
|
+
]
|
|
11439
|
+
})
|
|
11440
|
+
) })
|
|
11441
|
+
}
|
|
11442
|
+
);
|
|
11443
|
+
}
|
|
11444
|
+
);
|
|
11445
|
+
AlertDialogContent.displayName = CONTENT_NAME2;
|
|
11446
|
+
var TITLE_NAME2 = "AlertDialogTitle";
|
|
11447
|
+
var AlertDialogTitle = React55.forwardRef(
|
|
11448
|
+
(props, forwardedRef) => {
|
|
11449
|
+
const _a = props, { __scopeAlertDialog } = _a, titleProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11450
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), titleProps), { ref: forwardedRef }));
|
|
11452
|
+
}
|
|
11453
|
+
);
|
|
11454
|
+
AlertDialogTitle.displayName = TITLE_NAME2;
|
|
11455
|
+
var DESCRIPTION_NAME2 = "AlertDialogDescription";
|
|
11456
|
+
var AlertDialogDescription = React55.forwardRef((props, forwardedRef) => {
|
|
11457
|
+
const _a = props, { __scopeAlertDialog } = _a, descriptionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11458
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Description, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), descriptionProps), { ref: forwardedRef }));
|
|
11460
|
+
});
|
|
11461
|
+
AlertDialogDescription.displayName = DESCRIPTION_NAME2;
|
|
11462
|
+
var ACTION_NAME = "AlertDialogAction";
|
|
11463
|
+
var AlertDialogAction = React55.forwardRef(
|
|
11464
|
+
(props, forwardedRef) => {
|
|
11465
|
+
const _a = props, { __scopeAlertDialog } = _a, actionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11466
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), actionProps), { ref: forwardedRef }));
|
|
11468
|
+
}
|
|
11469
|
+
);
|
|
11470
|
+
AlertDialogAction.displayName = ACTION_NAME;
|
|
11471
|
+
var CANCEL_NAME = "AlertDialogCancel";
|
|
11472
|
+
var AlertDialogCancel = React55.forwardRef(
|
|
11473
|
+
(props, forwardedRef) => {
|
|
11474
|
+
const _a = props, { __scopeAlertDialog } = _a, cancelProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11475
|
+
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
11476
|
+
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11477
|
+
const ref2 = useComposedRefs(forwardedRef, cancelRef);
|
|
11478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), cancelProps), { ref: ref2 }));
|
|
11479
|
+
}
|
|
11480
|
+
);
|
|
11481
|
+
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
11482
|
+
var DescriptionWarning2 = ({ contentRef }) => {
|
|
11483
|
+
const MESSAGE = `\`${CONTENT_NAME2}\` requires a description for the component to be accessible for screen reader users.
|
|
11484
|
+
|
|
11485
|
+
You can add a description to the \`${CONTENT_NAME2}\` by passing a \`${DESCRIPTION_NAME2}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
11486
|
+
|
|
11487
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
11488
|
+
|
|
11489
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
11490
|
+
React55.useEffect(() => {
|
|
11491
|
+
var _a;
|
|
11492
|
+
const hasDescription = document.getElementById(
|
|
11493
|
+
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
11494
|
+
);
|
|
11495
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
11496
|
+
}, [MESSAGE, contentRef]);
|
|
11497
|
+
return null;
|
|
11498
|
+
};
|
|
11499
|
+
var Portal22 = AlertDialogPortal;
|
|
11500
|
+
var Overlay2 = AlertDialogOverlay;
|
|
11501
|
+
var Content2 = AlertDialogContent;
|
|
11502
|
+
var Action = AlertDialogAction;
|
|
11503
|
+
var Cancel = AlertDialogCancel;
|
|
11504
|
+
var Title2 = AlertDialogTitle;
|
|
11505
|
+
var Description2 = AlertDialogDescription;
|
|
11506
|
+
|
|
11507
|
+
// ../lib/src/utils.ts
|
|
11508
|
+
var import_clsx = require("clsx");
|
|
11509
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
11510
|
+
function cn(...inputs) {
|
|
11511
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
11512
|
+
}
|
|
11513
|
+
|
|
11514
|
+
// ../base-ui/src/ui/button.tsx
|
|
11515
|
+
var React56 = __toESM(require("react"), 1);
|
|
11516
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
11517
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11518
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
11519
|
+
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
11520
|
+
{
|
|
11521
|
+
variants: {
|
|
11522
|
+
variant: {
|
|
11523
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11524
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
11525
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
11526
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11527
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
11528
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
11529
|
+
},
|
|
11530
|
+
size: {
|
|
11531
|
+
default: "h-10 px-4 py-2",
|
|
11532
|
+
sm: "h-9 rounded-md px-3",
|
|
11533
|
+
lg: "h-11 rounded-md px-8",
|
|
11534
|
+
icon: "h-10 w-10"
|
|
11535
|
+
}
|
|
11536
|
+
},
|
|
11537
|
+
defaultVariants: {
|
|
11538
|
+
variant: "default",
|
|
11539
|
+
size: "default"
|
|
11540
|
+
}
|
|
11541
|
+
}
|
|
11542
|
+
);
|
|
11543
|
+
var Button = React56.forwardRef(
|
|
11544
|
+
(_a, ref2) => {
|
|
11545
|
+
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
11546
|
+
const Comp = asChild ? Slot : "button";
|
|
11547
|
+
if (asChild) {
|
|
11548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11549
|
+
Comp,
|
|
11550
|
+
__spreadProps(__spreadValues({
|
|
11551
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
11552
|
+
ref: ref2,
|
|
11553
|
+
disabled: loading || props.disabled
|
|
11554
|
+
}, props), {
|
|
11555
|
+
children
|
|
11556
|
+
})
|
|
11557
|
+
);
|
|
11558
|
+
}
|
|
11559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11560
|
+
Comp,
|
|
11561
|
+
__spreadProps(__spreadValues({
|
|
11562
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
11563
|
+
ref: ref2,
|
|
11564
|
+
disabled: loading || props.disabled
|
|
11565
|
+
}, props), {
|
|
11566
|
+
children: [
|
|
11567
|
+
children,
|
|
11568
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
11569
|
+
]
|
|
11570
|
+
})
|
|
11571
|
+
);
|
|
11572
|
+
}
|
|
11573
|
+
);
|
|
11574
|
+
Button.displayName = "Button";
|
|
11575
|
+
|
|
11576
|
+
// ../base-ui/src/ui/alert-dialog.tsx
|
|
11577
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
11578
|
+
var AlertDialogPortal2 = Portal22;
|
|
11579
|
+
var AlertDialogOverlay2 = React57.forwardRef((_a, ref2) => {
|
|
11580
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11582
|
+
Overlay2,
|
|
11583
|
+
__spreadProps(__spreadValues({
|
|
11584
|
+
className: cn(
|
|
11585
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
11586
|
+
className
|
|
11587
|
+
)
|
|
11588
|
+
}, props), {
|
|
11589
|
+
ref: ref2
|
|
11590
|
+
})
|
|
11591
|
+
);
|
|
11592
|
+
});
|
|
11593
|
+
AlertDialogOverlay2.displayName = Overlay2.displayName;
|
|
11594
|
+
var AlertDialogContent2 = React57.forwardRef((_a, ref2) => {
|
|
11595
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AlertDialogPortal2, { children: [
|
|
11597
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AlertDialogOverlay2, {}),
|
|
11598
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11599
|
+
Content2,
|
|
11600
|
+
__spreadValues({
|
|
11601
|
+
ref: ref2,
|
|
11602
|
+
className: cn(
|
|
11603
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
11604
|
+
className
|
|
11605
|
+
)
|
|
11606
|
+
}, props)
|
|
11607
|
+
)
|
|
11608
|
+
] });
|
|
11609
|
+
});
|
|
11610
|
+
AlertDialogContent2.displayName = Content2.displayName;
|
|
11611
|
+
var AlertDialogHeader = (_a) => {
|
|
11612
|
+
var _b = _a, {
|
|
11613
|
+
className
|
|
11614
|
+
} = _b, props = __objRest(_b, [
|
|
11615
|
+
"className"
|
|
11616
|
+
]);
|
|
11617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11618
|
+
"div",
|
|
11619
|
+
__spreadValues({
|
|
11620
|
+
className: cn(
|
|
11621
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
11622
|
+
className
|
|
11623
|
+
)
|
|
11624
|
+
}, props)
|
|
11625
|
+
);
|
|
11626
|
+
};
|
|
11627
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
11628
|
+
var AlertDialogFooter = (_a) => {
|
|
11629
|
+
var _b = _a, {
|
|
11630
|
+
className
|
|
11631
|
+
} = _b, props = __objRest(_b, [
|
|
11632
|
+
"className"
|
|
11633
|
+
]);
|
|
11634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11635
|
+
"div",
|
|
11636
|
+
__spreadValues({
|
|
11637
|
+
className: cn(
|
|
11638
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
11639
|
+
className
|
|
11640
|
+
)
|
|
11641
|
+
}, props)
|
|
11642
|
+
);
|
|
11643
|
+
};
|
|
11644
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
11645
|
+
var AlertDialogTitle2 = React57.forwardRef((_a, ref2) => {
|
|
11646
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11648
|
+
Title2,
|
|
11649
|
+
__spreadValues({
|
|
11650
|
+
ref: ref2,
|
|
11651
|
+
className: cn("text-lg font-semibold", className)
|
|
11652
|
+
}, props)
|
|
11653
|
+
);
|
|
11654
|
+
});
|
|
11655
|
+
AlertDialogTitle2.displayName = Title2.displayName;
|
|
11656
|
+
var AlertDialogDescription2 = React57.forwardRef((_a, ref2) => {
|
|
11657
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11659
|
+
Description2,
|
|
11660
|
+
__spreadValues({
|
|
11661
|
+
ref: ref2,
|
|
11662
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
11663
|
+
}, props)
|
|
11664
|
+
);
|
|
11665
|
+
});
|
|
11666
|
+
AlertDialogDescription2.displayName = Description2.displayName;
|
|
11667
|
+
var AlertDialogAction2 = React57.forwardRef((_a, ref2) => {
|
|
11668
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11670
|
+
Action,
|
|
11671
|
+
__spreadValues({
|
|
11672
|
+
ref: ref2,
|
|
11673
|
+
className: cn(buttonVariants(), className)
|
|
11674
|
+
}, props)
|
|
11675
|
+
);
|
|
11676
|
+
});
|
|
11677
|
+
AlertDialogAction2.displayName = Action.displayName;
|
|
11678
|
+
var AlertDialogCancel2 = React57.forwardRef((_a, ref2) => {
|
|
11679
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11681
|
+
Cancel,
|
|
11682
|
+
__spreadValues({
|
|
11683
|
+
ref: ref2,
|
|
11684
|
+
className: cn(
|
|
11685
|
+
buttonVariants({ variant: "outline" }),
|
|
11686
|
+
"mt-2 sm:mt-0",
|
|
11687
|
+
className
|
|
11688
|
+
)
|
|
11689
|
+
}, props)
|
|
11690
|
+
);
|
|
11691
|
+
});
|
|
11692
|
+
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
11693
|
+
|
|
11694
|
+
// src/fuma/mdx/mermaid.tsx
|
|
11695
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11696
|
+
|
|
11697
|
+
// src/fuma/mdx/image-zoom.tsx
|
|
11698
|
+
var import_framework = require("fumadocs-core/framework");
|
|
11699
|
+
var import_react37 = require("react");
|
|
11700
|
+
var import_react_medium_image_zoom = __toESM(require("react-medium-image-zoom"));
|
|
9515
11701
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
9516
11702
|
|
|
11703
|
+
// src/fuma/mdx/trophy-card.tsx
|
|
11704
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
11705
|
+
|
|
11706
|
+
// src/fuma/mdx/image-grid.tsx
|
|
11707
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11708
|
+
|
|
11709
|
+
// src/fuma/mdx/zia-card.tsx
|
|
11710
|
+
var import_link2 = __toESM(require("next/link"));
|
|
11711
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11712
|
+
|
|
11713
|
+
// src/fuma/mdx/gradient-button.tsx
|
|
11714
|
+
var import_link3 = __toESM(require("next/link"));
|
|
11715
|
+
var import_react38 = __toESM(require("react"));
|
|
11716
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
11717
|
+
|
|
11718
|
+
// src/fuma/mdx/toc-base.tsx
|
|
11719
|
+
var import_react39 = require("react");
|
|
11720
|
+
var import_navigation = require("next/navigation");
|
|
11721
|
+
var import_use_copy_button = require("fumadocs-ui/utils/use-copy-button");
|
|
11722
|
+
var import_link4 = __toESM(require("fumadocs-core/link"));
|
|
11723
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
11724
|
+
function EditOnGitHub({ url }) {
|
|
11725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
11726
|
+
import_link4.default,
|
|
11727
|
+
{
|
|
11728
|
+
className: "flex items-center gap-x-2 text-stone-600 hover:text-stone-500 dark:text-stone-400 dark:hover:text-stone-300 text-sm",
|
|
11729
|
+
href: url,
|
|
11730
|
+
children: [
|
|
11731
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(globalLucideIcons.GitHub, {}),
|
|
11732
|
+
"Edit this page on GitHub"
|
|
11733
|
+
]
|
|
11734
|
+
}
|
|
11735
|
+
);
|
|
11736
|
+
}
|
|
11737
|
+
function LastUpdatedDate({ date }) {
|
|
11738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-x-2 text-stone-600 dark:text-stone-400 text-sm", children: [
|
|
11739
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(globalLucideIcons.LastUpdated, {}),
|
|
11740
|
+
"Lastest on ",
|
|
11741
|
+
date ? date : "Ages ago"
|
|
11742
|
+
] });
|
|
11743
|
+
}
|
|
11744
|
+
|
|
11745
|
+
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
11746
|
+
var import_next_intl = require("next-intl");
|
|
11747
|
+
|
|
11748
|
+
// src/fuma/mdx/banner.tsx
|
|
11749
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
11750
|
+
var import_react40 = require("react");
|
|
11751
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
11752
|
+
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
11753
|
+
"inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50",
|
|
11754
|
+
{
|
|
11755
|
+
variants: {
|
|
11756
|
+
color: {
|
|
11757
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11758
|
+
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
11759
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
11760
|
+
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
11761
|
+
},
|
|
11762
|
+
size: {
|
|
11763
|
+
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
11764
|
+
icon: "p-1.5 [&_svg]:size-5",
|
|
11765
|
+
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
11766
|
+
}
|
|
11767
|
+
}
|
|
11768
|
+
}
|
|
11769
|
+
);
|
|
11770
|
+
|
|
11771
|
+
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
11772
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
11773
|
+
|
|
11774
|
+
// src/fuma/mdx/fuma-github-info.tsx
|
|
11775
|
+
var import_react41 = require("react");
|
|
11776
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
11777
|
+
|
|
9517
11778
|
// src/fuma/mdx/site-x.tsx
|
|
9518
11779
|
var import_next_intl2 = require("next-intl");
|
|
9519
|
-
var
|
|
11780
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
9520
11781
|
|
|
9521
11782
|
// src/fuma/mdx/zia-file.tsx
|
|
9522
|
-
var
|
|
11783
|
+
var import_react42 = require("react");
|
|
9523
11784
|
var import_collapsible = require("fumadocs-ui/components/ui/collapsible");
|
|
9524
11785
|
var import_link5 = __toESM(require("next/link"));
|
|
9525
|
-
var
|
|
11786
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
9526
11787
|
|
|
9527
11788
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
9528
|
-
var
|
|
11789
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
9529
11790
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
9530
11791
|
const showEdit = githubBaseUrl && editPath;
|
|
9531
|
-
return /* @__PURE__ */ (0,
|
|
9532
|
-
/* @__PURE__ */ (0,
|
|
11792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
11793
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LastUpdatedDate, { date: lastModified }),
|
|
9533
11794
|
copyButtonComponent,
|
|
9534
|
-
showEdit && /* @__PURE__ */ (0,
|
|
11795
|
+
showEdit && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
9535
11796
|
] });
|
|
9536
11797
|
}
|
|
9537
11798
|
|
|
9538
11799
|
// src/fuma/fuma-page-genarator.tsx
|
|
9539
|
-
var
|
|
11800
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
9540
11801
|
function createFumaPage({
|
|
9541
11802
|
sourceKey,
|
|
9542
11803
|
mdxContentSource,
|
|
@@ -9553,20 +11814,20 @@ function createFumaPage({
|
|
|
9553
11814
|
const { slug, locale } = yield params;
|
|
9554
11815
|
const page = mdxContentSource.getPage(slug, locale);
|
|
9555
11816
|
if (!page) {
|
|
9556
|
-
return /* @__PURE__ */ (0,
|
|
11817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FallbackPage, { siteIcon });
|
|
9557
11818
|
}
|
|
9558
11819
|
const path2 = githubBaseUrl ? `${mdxSourceDir}/${page.file.path}` : void 0;
|
|
9559
|
-
const tocFooterElement = /* @__PURE__ */ (0,
|
|
11820
|
+
const tocFooterElement = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
9560
11821
|
TocFooterWrapper,
|
|
9561
11822
|
{
|
|
9562
11823
|
lastModified: page.data.date,
|
|
9563
|
-
copyButtonComponent: copyButtonComponent ? (0,
|
|
11824
|
+
copyButtonComponent: copyButtonComponent ? (0, import_react43.cloneElement)(copyButtonComponent, { sourceKey }) : void 0,
|
|
9564
11825
|
editPath: path2,
|
|
9565
11826
|
githubBaseUrl
|
|
9566
11827
|
}
|
|
9567
11828
|
);
|
|
9568
11829
|
const MDX = page.data.body;
|
|
9569
|
-
return /* @__PURE__ */ (0,
|
|
11830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
9570
11831
|
import_page.DocsPage,
|
|
9571
11832
|
{
|
|
9572
11833
|
tableOfContent: { style: "clerk", single: false, footer: tocFooterElement },
|
|
@@ -9575,9 +11836,9 @@ function createFumaPage({
|
|
|
9575
11836
|
full: page.data.full,
|
|
9576
11837
|
article: { className: "max-sm:pb-16" },
|
|
9577
11838
|
children: [
|
|
9578
|
-
/* @__PURE__ */ (0,
|
|
9579
|
-
/* @__PURE__ */ (0,
|
|
9580
|
-
/* @__PURE__ */ (0,
|
|
11839
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_page.DocsTitle, { children: page.data.title }),
|
|
11840
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_page.DocsDescription, { className: "mb-2", children: page.data.description }),
|
|
11841
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_page.DocsBody, { className: "text-fd-foreground/80", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(MDX, { components: getMDXComponents() }) })
|
|
9581
11842
|
]
|
|
9582
11843
|
}
|
|
9583
11844
|
);
|
|
@@ -13027,9 +15288,9 @@ var SpliceBuffer = class {
|
|
|
13027
15288
|
* Any removed items.
|
|
13028
15289
|
*/
|
|
13029
15290
|
splice(start2, deleteCount, items) {
|
|
13030
|
-
const
|
|
15291
|
+
const count3 = deleteCount || 0;
|
|
13031
15292
|
this.setCursor(Math.trunc(start2));
|
|
13032
|
-
const removed = this.right.splice(this.right.length -
|
|
15293
|
+
const removed = this.right.splice(this.right.length - count3, Number.POSITIVE_INFINITY);
|
|
13033
15294
|
if (items) chunkedPush(this.left, items);
|
|
13034
15295
|
return removed.reverse();
|
|
13035
15296
|
}
|
|
@@ -15647,7 +17908,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
15647
17908
|
}
|
|
15648
17909
|
|
|
15649
17910
|
// ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.js
|
|
15650
|
-
function
|
|
17911
|
+
function parse2(options) {
|
|
15651
17912
|
const settings = options || {};
|
|
15652
17913
|
const constructs2 = (
|
|
15653
17914
|
/** @type {FullNormalizedExtension} */
|
|
@@ -15809,7 +18070,7 @@ function fromMarkdown(value2, encoding, options) {
|
|
|
15809
18070
|
options = encoding;
|
|
15810
18071
|
encoding = void 0;
|
|
15811
18072
|
}
|
|
15812
|
-
return compiler(options)(postprocess(
|
|
18073
|
+
return compiler(options)(postprocess(parse2(options).document().write(preprocess()(value2, encoding, true))));
|
|
15813
18074
|
}
|
|
15814
18075
|
function compiler(options) {
|
|
15815
18076
|
const config = {
|
|
@@ -16648,18 +18909,18 @@ function longestStreak(value2, substring) {
|
|
|
16648
18909
|
const source = String(value2);
|
|
16649
18910
|
let index2 = source.indexOf(substring);
|
|
16650
18911
|
let expected = index2;
|
|
16651
|
-
let
|
|
18912
|
+
let count3 = 0;
|
|
16652
18913
|
let max = 0;
|
|
16653
18914
|
if (typeof substring !== "string") {
|
|
16654
18915
|
throw new TypeError("Expected substring");
|
|
16655
18916
|
}
|
|
16656
18917
|
while (index2 !== -1) {
|
|
16657
18918
|
if (index2 === expected) {
|
|
16658
|
-
if (++
|
|
16659
|
-
max =
|
|
18919
|
+
if (++count3 > max) {
|
|
18920
|
+
max = count3;
|
|
16660
18921
|
}
|
|
16661
18922
|
} else {
|
|
16662
|
-
|
|
18923
|
+
count3 = 1;
|
|
16663
18924
|
}
|
|
16664
18925
|
expected = index2 + substring.length;
|
|
16665
18926
|
index2 = source.indexOf(substring, expected);
|
|
@@ -18282,7 +20543,7 @@ function wrap(middleware, callback) {
|
|
|
18282
20543
|
}
|
|
18283
20544
|
}
|
|
18284
20545
|
|
|
18285
|
-
// ../../node_modules/.pnpm/vfile-message@4.0.
|
|
20546
|
+
// ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.js
|
|
18286
20547
|
var VFileMessage = class extends Error {
|
|
18287
20548
|
/**
|
|
18288
20549
|
* Create a message for `reason`.
|
|
@@ -18389,7 +20650,7 @@ var VFileMessage = class extends Error {
|
|
|
18389
20650
|
this.cause = options.cause || void 0;
|
|
18390
20651
|
this.column = start2 ? start2.column : void 0;
|
|
18391
20652
|
this.fatal = void 0;
|
|
18392
|
-
this.file;
|
|
20653
|
+
this.file = "";
|
|
18393
20654
|
this.message = reason;
|
|
18394
20655
|
this.line = start2 ? start2.line : void 0;
|
|
18395
20656
|
this.name = stringifyPosition(options.place) || "1:1";
|
|
@@ -18398,10 +20659,10 @@ var VFileMessage = class extends Error {
|
|
|
18398
20659
|
this.ruleId = options.ruleId || void 0;
|
|
18399
20660
|
this.source = options.source || void 0;
|
|
18400
20661
|
this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
|
|
18401
|
-
this.actual;
|
|
18402
|
-
this.expected;
|
|
18403
|
-
this.note;
|
|
18404
|
-
this.url;
|
|
20662
|
+
this.actual = void 0;
|
|
20663
|
+
this.expected = void 0;
|
|
20664
|
+
this.note = void 0;
|
|
20665
|
+
this.url = void 0;
|
|
18405
20666
|
}
|
|
18406
20667
|
};
|
|
18407
20668
|
VFileMessage.prototype.file = "";
|
|
@@ -19565,13 +21826,13 @@ function ccount(value2, character) {
|
|
|
19565
21826
|
if (typeof character !== "string") {
|
|
19566
21827
|
throw new TypeError("Expected character");
|
|
19567
21828
|
}
|
|
19568
|
-
let
|
|
21829
|
+
let count3 = 0;
|
|
19569
21830
|
let index2 = source.indexOf(character);
|
|
19570
21831
|
while (index2 !== -1) {
|
|
19571
|
-
|
|
21832
|
+
count3++;
|
|
19572
21833
|
index2 = source.indexOf(character, index2 + character.length);
|
|
19573
21834
|
}
|
|
19574
|
-
return
|
|
21835
|
+
return count3;
|
|
19575
21836
|
}
|
|
19576
21837
|
|
|
19577
21838
|
// ../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
@@ -23188,7 +25449,7 @@ var Parser = function Parser2(options, input, startPos) {
|
|
|
23188
25449
|
this.privateNameStack = [];
|
|
23189
25450
|
};
|
|
23190
25451
|
var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
23191
|
-
Parser.prototype.parse = function
|
|
25452
|
+
Parser.prototype.parse = function parse3() {
|
|
23192
25453
|
var node2 = this.options.program || this.startNode();
|
|
23193
25454
|
this.nextToken();
|
|
23194
25455
|
return this.parseTopLevel(node2);
|
|
@@ -23248,7 +25509,7 @@ Parser.extend = function extend2() {
|
|
|
23248
25509
|
}
|
|
23249
25510
|
return cls;
|
|
23250
25511
|
};
|
|
23251
|
-
Parser.parse = function
|
|
25512
|
+
Parser.parse = function parse4(input, options) {
|
|
23252
25513
|
return new this(options, input).parse();
|
|
23253
25514
|
};
|
|
23254
25515
|
Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
|
|
@@ -26051,7 +28312,7 @@ pp$3.currentThisScope = function() {
|
|
|
26051
28312
|
}
|
|
26052
28313
|
}
|
|
26053
28314
|
};
|
|
26054
|
-
var
|
|
28315
|
+
var Node2 = function Node3(parser, pos, loc) {
|
|
26055
28316
|
this.type = "";
|
|
26056
28317
|
this.start = pos;
|
|
26057
28318
|
this.end = 0;
|
|
@@ -26067,10 +28328,10 @@ var Node = function Node2(parser, pos, loc) {
|
|
|
26067
28328
|
};
|
|
26068
28329
|
var pp$2 = Parser.prototype;
|
|
26069
28330
|
pp$2.startNode = function() {
|
|
26070
|
-
return new
|
|
28331
|
+
return new Node2(this, this.start, this.startLoc);
|
|
26071
28332
|
};
|
|
26072
28333
|
pp$2.startNodeAt = function(pos, loc) {
|
|
26073
|
-
return new
|
|
28334
|
+
return new Node2(this, pos, loc);
|
|
26074
28335
|
};
|
|
26075
28336
|
function finishNodeAt(node2, type, pos, loc) {
|
|
26076
28337
|
node2.type = type;
|
|
@@ -26090,7 +28351,7 @@ pp$2.finishNodeAt = function(node2, type, pos, loc) {
|
|
|
26090
28351
|
return finishNodeAt.call(this, node2, type, pos, loc);
|
|
26091
28352
|
};
|
|
26092
28353
|
pp$2.copyNode = function(node2) {
|
|
26093
|
-
var newNode = new
|
|
28354
|
+
var newNode = new Node2(this, node2.start, this.startLoc);
|
|
26094
28355
|
for (var prop in node2) {
|
|
26095
28356
|
newNode[prop] = node2[prop];
|
|
26096
28357
|
}
|
|
@@ -27291,11 +29552,11 @@ pp$1.regexp_classStringDisjunctionContents = function(state) {
|
|
|
27291
29552
|
return result;
|
|
27292
29553
|
};
|
|
27293
29554
|
pp$1.regexp_classString = function(state) {
|
|
27294
|
-
var
|
|
29555
|
+
var count3 = 0;
|
|
27295
29556
|
while (this.regexp_eatClassSetCharacter(state)) {
|
|
27296
|
-
|
|
29557
|
+
count3++;
|
|
27297
29558
|
}
|
|
27298
|
-
return
|
|
29559
|
+
return count3 === 1 ? CharSetOk : CharSetString;
|
|
27299
29560
|
};
|
|
27300
29561
|
pp$1.regexp_eatClassSetCharacter = function(state) {
|
|
27301
29562
|
var start2 = state.pos;
|
|
@@ -28302,7 +30563,7 @@ Parser.acorn = {
|
|
|
28302
30563
|
Position,
|
|
28303
30564
|
SourceLocation,
|
|
28304
30565
|
getLineInfo,
|
|
28305
|
-
Node,
|
|
30566
|
+
Node: Node2,
|
|
28306
30567
|
TokenType,
|
|
28307
30568
|
tokTypes: types$1,
|
|
28308
30569
|
keywordTypes: keywords,
|