@norskvideo/norsk-studio-built-ins 1.27.0-2025-05-21-b03b48ea → 1.27.0-2025-05-26-a443eb84
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/client/info.js +2609 -214
- package/lib/info.js +10 -8
- package/lib/info.js.map +1 -1
- package/lib/output.autoCmaf/runtime.d.ts +11 -0
- package/lib/output.autoCmaf/runtime.js +37 -0
- package/lib/output.autoCmaf/runtime.js.map +1 -1
- package/lib/processor.gate/info.d.ts +3 -0
- package/lib/processor.gate/info.js +75 -0
- package/lib/processor.gate/info.js.map +1 -0
- package/lib/processor.gate/inline-view.d.ts +4 -0
- package/lib/processor.gate/inline-view.js +16 -0
- package/lib/processor.gate/inline-view.js.map +1 -0
- package/lib/processor.gate/runtime.d.ts +45 -0
- package/lib/processor.gate/runtime.js +112 -0
- package/lib/processor.gate/runtime.js.map +1 -0
- package/lib/processor.gate/types.d.ts +91 -0
- package/lib/processor.gate/types.js +3 -0
- package/lib/processor.gate/types.js.map +1 -0
- package/lib/processor.gate/types.yaml +64 -0
- package/lib/processor.smartSingleMediaSwitch/runtime.js +5 -2
- package/lib/processor.smartSingleMediaSwitch/runtime.js.map +1 -1
- package/lib/processor.smartSourceSwitch/runtime.js +9 -3
- package/lib/processor.smartSourceSwitch/runtime.js.map +1 -1
- package/lib/test/gate.d.ts +1 -0
- package/lib/test/gate.js +187 -0
- package/lib/test/gate.js.map +1 -0
- package/package.json +3 -3
package/client/info.js
CHANGED
@@ -346,7 +346,7 @@ var require_util = __commonJS({
|
|
346
346
|
exports.getObjectByType = getObjectByType;
|
347
347
|
exports.getObjectByPath = getObjectByPath;
|
348
348
|
exports.displayNodeId = displayNodeId;
|
349
|
-
exports.assertUnreachable =
|
349
|
+
exports.assertUnreachable = assertUnreachable24;
|
350
350
|
exports.waitForCondition = waitForCondition;
|
351
351
|
exports.streamMatchesExpected = streamMatchesExpected;
|
352
352
|
exports.shortStreamNameFromDefinition = shortStreamNameFromDefinition;
|
@@ -419,7 +419,7 @@ var require_util = __commonJS({
|
|
419
419
|
}
|
420
420
|
return document2.components[id]?.config?.displayName ?? id;
|
421
421
|
}
|
422
|
-
function
|
422
|
+
function assertUnreachable24(_) {
|
423
423
|
throw new Error("Didn't expect to get here");
|
424
424
|
}
|
425
425
|
async function waitForCondition(condition, timeout, interval) {
|
@@ -22831,9 +22831,9 @@ var require_lucide_react = __commonJS({
|
|
22831
22831
|
}
|
22832
22832
|
});
|
22833
22833
|
|
22834
|
-
//
|
22834
|
+
// ../../node_modules/tailwind-merge/dist/bundle-cjs.js
|
22835
22835
|
var require_bundle_cjs = __commonJS({
|
22836
|
-
"
|
22836
|
+
"../../node_modules/tailwind-merge/dist/bundle-cjs.js"(exports) {
|
22837
22837
|
"use strict";
|
22838
22838
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
22839
22839
|
value: "Module"
|
@@ -47123,13 +47123,13 @@ var require_dist3 = __commonJS({
|
|
47123
47123
|
});
|
47124
47124
|
module.exports = __toCommonJS2(src_exports);
|
47125
47125
|
var React3 = __toESM2(require_react());
|
47126
|
-
var
|
47126
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47127
47127
|
function createContext2(rootComponentName, defaultContext) {
|
47128
47128
|
const Context = React3.createContext(defaultContext);
|
47129
47129
|
const Provider = (props) => {
|
47130
47130
|
const { children, ...context } = props;
|
47131
47131
|
const value = React3.useMemo(() => context, Object.values(context));
|
47132
|
-
return /* @__PURE__ */ (0,
|
47132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
47133
47133
|
};
|
47134
47134
|
Provider.displayName = rootComponentName + "Provider";
|
47135
47135
|
function useContext2(consumerName) {
|
@@ -47152,7 +47152,7 @@ var require_dist3 = __commonJS({
|
|
47152
47152
|
const { scope, children, ...context } = props;
|
47153
47153
|
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
47154
47154
|
const value = React3.useMemo(() => context, Object.values(context));
|
47155
|
-
return /* @__PURE__ */ (0,
|
47155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
47156
47156
|
};
|
47157
47157
|
Provider.displayName = rootComponentName + "Provider";
|
47158
47158
|
function useContext2(consumerName, scope) {
|
@@ -47320,7 +47320,7 @@ var require_dist5 = __commonJS({
|
|
47320
47320
|
module.exports = __toCommonJS2(src_exports);
|
47321
47321
|
var React3 = __toESM2(require_react());
|
47322
47322
|
var import_react_compose_refs = require_dist4();
|
47323
|
-
var
|
47323
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47324
47324
|
var Slot = React3.forwardRef((props, forwardedRef) => {
|
47325
47325
|
const { children, ...slotProps } = props;
|
47326
47326
|
const childrenArray = React3.Children.toArray(children);
|
@@ -47336,9 +47336,9 @@ var require_dist5 = __commonJS({
|
|
47336
47336
|
return child;
|
47337
47337
|
}
|
47338
47338
|
});
|
47339
|
-
return /* @__PURE__ */ (0,
|
47339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
47340
47340
|
}
|
47341
|
-
return /* @__PURE__ */ (0,
|
47341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
47342
47342
|
});
|
47343
47343
|
Slot.displayName = "Slot";
|
47344
47344
|
var SlotClone = React3.forwardRef((props, forwardedRef) => {
|
@@ -47355,7 +47355,7 @@ var require_dist5 = __commonJS({
|
|
47355
47355
|
});
|
47356
47356
|
SlotClone.displayName = "SlotClone";
|
47357
47357
|
var Slottable = ({ children }) => {
|
47358
|
-
return /* @__PURE__ */ (0,
|
47358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
|
47359
47359
|
};
|
47360
47360
|
function isSlottable(child) {
|
47361
47361
|
return React3.isValidElement(child) && child.type === Slottable;
|
@@ -47441,7 +47441,7 @@ var require_dist6 = __commonJS({
|
|
47441
47441
|
var import_react_context = require_dist3();
|
47442
47442
|
var import_react_compose_refs = require_dist4();
|
47443
47443
|
var import_react_slot = require_dist5();
|
47444
|
-
var
|
47444
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47445
47445
|
function createCollection(name) {
|
47446
47446
|
const PROVIDER_NAME = name + "CollectionProvider";
|
47447
47447
|
const [createCollectionContext, createCollectionScope] = (0, import_react_context.createContextScope)(PROVIDER_NAME);
|
@@ -47453,7 +47453,7 @@ var require_dist6 = __commonJS({
|
|
47453
47453
|
const { scope, children } = props;
|
47454
47454
|
const ref = import_react12.default.useRef(null);
|
47455
47455
|
const itemMap = import_react12.default.useRef(/* @__PURE__ */ new Map()).current;
|
47456
|
-
return /* @__PURE__ */ (0,
|
47456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
47457
47457
|
};
|
47458
47458
|
CollectionProvider.displayName = PROVIDER_NAME;
|
47459
47459
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
@@ -47462,7 +47462,7 @@ var require_dist6 = __commonJS({
|
|
47462
47462
|
const { scope, children } = props;
|
47463
47463
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
47464
47464
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
47465
|
-
return /* @__PURE__ */ (0,
|
47465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_slot.Slot, { ref: composedRefs, children });
|
47466
47466
|
}
|
47467
47467
|
);
|
47468
47468
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
@@ -47478,7 +47478,7 @@ var require_dist6 = __commonJS({
|
|
47478
47478
|
context.itemMap.set(ref, { ref, ...itemData });
|
47479
47479
|
return () => void context.itemMap.delete(ref);
|
47480
47480
|
});
|
47481
|
-
return /* @__PURE__ */ (0,
|
47481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_slot.Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
47482
47482
|
}
|
47483
47483
|
);
|
47484
47484
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
@@ -47545,11 +47545,11 @@ var require_dist7 = __commonJS({
|
|
47545
47545
|
});
|
47546
47546
|
module.exports = __toCommonJS2(src_exports);
|
47547
47547
|
var React3 = __toESM2(require_react());
|
47548
|
-
var
|
47548
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47549
47549
|
var DirectionContext = React3.createContext(void 0);
|
47550
47550
|
var DirectionProvider = (props) => {
|
47551
47551
|
const { dir, children } = props;
|
47552
|
-
return /* @__PURE__ */ (0,
|
47552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DirectionContext.Provider, { value: dir, children });
|
47553
47553
|
};
|
47554
47554
|
function useDirection(localDir) {
|
47555
47555
|
const globalDir = React3.useContext(DirectionContext);
|
@@ -47600,7 +47600,7 @@ var require_dist8 = __commonJS({
|
|
47600
47600
|
var React3 = __toESM2(require_react());
|
47601
47601
|
var ReactDOM2 = __toESM2(require_react_dom());
|
47602
47602
|
var import_react_slot = require_dist5();
|
47603
|
-
var
|
47603
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47604
47604
|
var NODES = [
|
47605
47605
|
"a",
|
47606
47606
|
"button",
|
@@ -47626,7 +47626,7 @@ var require_dist8 = __commonJS({
|
|
47626
47626
|
if (typeof window !== "undefined") {
|
47627
47627
|
window[Symbol.for("radix-ui")] = true;
|
47628
47628
|
}
|
47629
|
-
return /* @__PURE__ */ (0,
|
47629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
47630
47630
|
});
|
47631
47631
|
Node2.displayName = `Primitive.${node}`;
|
47632
47632
|
return { ...primitive, [node]: Node2 };
|
@@ -47785,7 +47785,7 @@ var require_dist11 = __commonJS({
|
|
47785
47785
|
var import_react_compose_refs = require_dist4();
|
47786
47786
|
var import_react_use_callback_ref = require_dist9();
|
47787
47787
|
var import_react_use_escape_keydown = require_dist10();
|
47788
|
-
var
|
47788
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
47789
47789
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
47790
47790
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
47791
47791
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
@@ -47880,7 +47880,7 @@ var require_dist11 = __commonJS({
|
|
47880
47880
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
47881
47881
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
47882
47882
|
}, []);
|
47883
|
-
return /* @__PURE__ */ (0,
|
47883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
47884
47884
|
import_react_primitive.Primitive.div,
|
47885
47885
|
{
|
47886
47886
|
...layerProps,
|
@@ -47914,7 +47914,7 @@ var require_dist11 = __commonJS({
|
|
47914
47914
|
};
|
47915
47915
|
}
|
47916
47916
|
}, [context.branches]);
|
47917
|
-
return /* @__PURE__ */ (0,
|
47917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
|
47918
47918
|
});
|
47919
47919
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
47920
47920
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
@@ -48116,7 +48116,7 @@ var require_dist13 = __commonJS({
|
|
48116
48116
|
var import_react_compose_refs = require_dist4();
|
48117
48117
|
var import_react_primitive = require_dist8();
|
48118
48118
|
var import_react_use_callback_ref = require_dist9();
|
48119
|
-
var
|
48119
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
48120
48120
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
48121
48121
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
48122
48122
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
@@ -48246,7 +48246,7 @@ var require_dist13 = __commonJS({
|
|
48246
48246
|
},
|
48247
48247
|
[loop, trapped, focusScope.paused]
|
48248
48248
|
);
|
48249
|
-
return /* @__PURE__ */ (0,
|
48249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
48250
48250
|
});
|
48251
48251
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
48252
48252
|
function focusFirst(candidates, { select = false } = {}) {
|
@@ -50606,11 +50606,11 @@ var require_dist16 = __commonJS({
|
|
50606
50606
|
module.exports = __toCommonJS2(src_exports);
|
50607
50607
|
var React3 = __toESM2(require_react());
|
50608
50608
|
var import_react_primitive = require_dist8();
|
50609
|
-
var
|
50609
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
50610
50610
|
var NAME = "Arrow";
|
50611
50611
|
var Arrow = React3.forwardRef((props, forwardedRef) => {
|
50612
50612
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
50613
|
-
return /* @__PURE__ */ (0,
|
50613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50614
50614
|
import_react_primitive.Primitive.svg,
|
50615
50615
|
{
|
50616
50616
|
...arrowProps,
|
@@ -50619,7 +50619,7 @@ var require_dist16 = __commonJS({
|
|
50619
50619
|
height,
|
50620
50620
|
viewBox: "0 0 30 10",
|
50621
50621
|
preserveAspectRatio: "none",
|
50622
|
-
children: props.asChild ? children : /* @__PURE__ */ (0,
|
50622
|
+
children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
50623
50623
|
}
|
50624
50624
|
);
|
50625
50625
|
});
|
@@ -50759,7 +50759,7 @@ var require_dist18 = __commonJS({
|
|
50759
50759
|
var import_react_use_callback_ref = require_dist9();
|
50760
50760
|
var import_react_use_layout_effect = require_dist14();
|
50761
50761
|
var import_react_use_size = require_dist17();
|
50762
|
-
var
|
50762
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
50763
50763
|
var SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
50764
50764
|
var ALIGN_OPTIONS = ["start", "center", "end"];
|
50765
50765
|
var POPPER_NAME = "Popper";
|
@@ -50768,7 +50768,7 @@ var require_dist18 = __commonJS({
|
|
50768
50768
|
var Popper = (props) => {
|
50769
50769
|
const { __scopePopper, children } = props;
|
50770
50770
|
const [anchor, setAnchor] = React3.useState(null);
|
50771
|
-
return /* @__PURE__ */ (0,
|
50771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
50772
50772
|
};
|
50773
50773
|
Popper.displayName = POPPER_NAME;
|
50774
50774
|
var ANCHOR_NAME = "PopperAnchor";
|
@@ -50781,7 +50781,7 @@ var require_dist18 = __commonJS({
|
|
50781
50781
|
React3.useEffect(() => {
|
50782
50782
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
50783
50783
|
});
|
50784
|
-
return virtualRef ? null : /* @__PURE__ */ (0,
|
50784
|
+
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...anchorProps, ref: composedRefs });
|
50785
50785
|
}
|
50786
50786
|
);
|
50787
50787
|
PopperAnchor.displayName = ANCHOR_NAME;
|
@@ -50875,7 +50875,7 @@ var require_dist18 = __commonJS({
|
|
50875
50875
|
if (content)
|
50876
50876
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
50877
50877
|
}, [content]);
|
50878
|
-
return /* @__PURE__ */ (0,
|
50878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50879
50879
|
"div",
|
50880
50880
|
{
|
50881
50881
|
ref: refs.setFloating,
|
@@ -50899,7 +50899,7 @@ var require_dist18 = __commonJS({
|
|
50899
50899
|
}
|
50900
50900
|
},
|
50901
50901
|
dir: props.dir,
|
50902
|
-
children: /* @__PURE__ */ (0,
|
50902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50903
50903
|
PopperContentProvider,
|
50904
50904
|
{
|
50905
50905
|
scope: __scopePopper,
|
@@ -50908,7 +50908,7 @@ var require_dist18 = __commonJS({
|
|
50908
50908
|
arrowX,
|
50909
50909
|
arrowY,
|
50910
50910
|
shouldHideArrow: cannotCenterArrow,
|
50911
|
-
children: /* @__PURE__ */ (0,
|
50911
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50912
50912
|
import_react_primitive.Primitive.div,
|
50913
50913
|
{
|
50914
50914
|
"data-side": placedSide,
|
@@ -50945,7 +50945,7 @@ var require_dist18 = __commonJS({
|
|
50945
50945
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
50946
50946
|
// doesn't report size as we'd expect on SVG elements.
|
50947
50947
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
50948
|
-
/* @__PURE__ */ (0,
|
50948
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50949
50949
|
"span",
|
50950
50950
|
{
|
50951
50951
|
ref: contentContext.onArrowChange,
|
@@ -50968,7 +50968,7 @@ var require_dist18 = __commonJS({
|
|
50968
50968
|
}[contentContext.placedSide],
|
50969
50969
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
50970
50970
|
},
|
50971
|
-
children: /* @__PURE__ */ (0,
|
50971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
50972
50972
|
ArrowPrimitive.Root,
|
50973
50973
|
{
|
50974
50974
|
...arrowProps,
|
@@ -51072,14 +51072,14 @@ var require_dist19 = __commonJS({
|
|
51072
51072
|
var import_react_dom = __toESM2(require_react_dom());
|
51073
51073
|
var import_react_primitive = require_dist8();
|
51074
51074
|
var import_react_use_layout_effect = require_dist14();
|
51075
|
-
var
|
51075
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
51076
51076
|
var PORTAL_NAME = "Portal";
|
51077
51077
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
51078
51078
|
const { container: containerProp, ...portalProps } = props;
|
51079
51079
|
const [mounted, setMounted] = React3.useState(false);
|
51080
51080
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
51081
51081
|
const container = containerProp || mounted && globalThis?.document?.body;
|
51082
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
51082
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
51083
51083
|
});
|
51084
51084
|
Portal.displayName = PORTAL_NAME;
|
51085
51085
|
var Root = Portal;
|
@@ -51257,11 +51257,11 @@ var require_dist22 = __commonJS({
|
|
51257
51257
|
module.exports = __toCommonJS2(src_exports);
|
51258
51258
|
var React3 = __toESM2(require_react());
|
51259
51259
|
var import_react_primitive = require_dist8();
|
51260
|
-
var
|
51260
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
51261
51261
|
var NAME = "VisuallyHidden";
|
51262
51262
|
var VisuallyHidden = React3.forwardRef(
|
51263
51263
|
(props, forwardedRef) => {
|
51264
|
-
return /* @__PURE__ */ (0,
|
51264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
51265
51265
|
import_react_primitive.Primitive.span,
|
51266
51266
|
{
|
51267
51267
|
...props,
|
@@ -53420,7 +53420,7 @@ var require_dist23 = __commonJS({
|
|
53420
53420
|
var import_react_visually_hidden = require_dist22();
|
53421
53421
|
var import_aria_hidden = require_es5();
|
53422
53422
|
var import_react_remove_scroll = require_es57();
|
53423
|
-
var
|
53423
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
53424
53424
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
53425
53425
|
var SELECTION_KEYS = [" ", "Enter"];
|
53426
53426
|
var SELECT_NAME = "Select";
|
@@ -53468,7 +53468,7 @@ var require_dist23 = __commonJS({
|
|
53468
53468
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
53469
53469
|
const [nativeOptionsSet, setNativeOptionsSet] = React3.useState(/* @__PURE__ */ new Set());
|
53470
53470
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
53471
|
-
return /* @__PURE__ */ (0,
|
53471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
53472
53472
|
SelectProvider,
|
53473
53473
|
{
|
53474
53474
|
required,
|
@@ -53488,7 +53488,7 @@ var require_dist23 = __commonJS({
|
|
53488
53488
|
triggerPointerDownPosRef,
|
53489
53489
|
disabled,
|
53490
53490
|
children: [
|
53491
|
-
/* @__PURE__ */ (0,
|
53491
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53492
53492
|
SelectNativeOptionsProvider,
|
53493
53493
|
{
|
53494
53494
|
scope: props.__scopeSelect,
|
@@ -53505,7 +53505,7 @@ var require_dist23 = __commonJS({
|
|
53505
53505
|
children
|
53506
53506
|
}
|
53507
53507
|
) }),
|
53508
|
-
isFormControl ? /* @__PURE__ */ (0,
|
53508
|
+
isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
53509
53509
|
BubbleSelect,
|
53510
53510
|
{
|
53511
53511
|
"aria-hidden": true,
|
@@ -53518,7 +53518,7 @@ var require_dist23 = __commonJS({
|
|
53518
53518
|
disabled,
|
53519
53519
|
form,
|
53520
53520
|
children: [
|
53521
|
-
value === void 0 ? /* @__PURE__ */ (0,
|
53521
|
+
value === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: "" }) : null,
|
53522
53522
|
Array.from(nativeOptionsSet)
|
53523
53523
|
]
|
53524
53524
|
},
|
@@ -53559,7 +53559,7 @@ var require_dist23 = __commonJS({
|
|
53559
53559
|
};
|
53560
53560
|
}
|
53561
53561
|
};
|
53562
|
-
return /* @__PURE__ */ (0,
|
53562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53563
53563
|
import_react_primitive.Primitive.button,
|
53564
53564
|
{
|
53565
53565
|
type: "button",
|
@@ -53620,13 +53620,13 @@ var require_dist23 = __commonJS({
|
|
53620
53620
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
53621
53621
|
onValueNodeHasChildrenChange(hasChildren);
|
53622
53622
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
53623
|
-
return /* @__PURE__ */ (0,
|
53623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53624
53624
|
import_react_primitive.Primitive.span,
|
53625
53625
|
{
|
53626
53626
|
...valueProps,
|
53627
53627
|
ref: composedRefs,
|
53628
53628
|
style: { pointerEvents: "none" },
|
53629
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0,
|
53629
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: placeholder }) : children
|
53630
53630
|
}
|
53631
53631
|
);
|
53632
53632
|
}
|
@@ -53636,13 +53636,13 @@ var require_dist23 = __commonJS({
|
|
53636
53636
|
var SelectIcon = React3.forwardRef(
|
53637
53637
|
(props, forwardedRef) => {
|
53638
53638
|
const { __scopeSelect, children, ...iconProps } = props;
|
53639
|
-
return /* @__PURE__ */ (0,
|
53639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
53640
53640
|
}
|
53641
53641
|
);
|
53642
53642
|
SelectIcon.displayName = ICON_NAME;
|
53643
53643
|
var PORTAL_NAME = "SelectPortal";
|
53644
53644
|
var SelectPortal = (props) => {
|
53645
|
-
return /* @__PURE__ */ (0,
|
53645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_portal.Portal, { asChild: true, ...props });
|
53646
53646
|
};
|
53647
53647
|
SelectPortal.displayName = PORTAL_NAME;
|
53648
53648
|
var CONTENT_NAME = "SelectContent";
|
@@ -53656,11 +53656,11 @@ var require_dist23 = __commonJS({
|
|
53656
53656
|
if (!context.open) {
|
53657
53657
|
const frag = fragment;
|
53658
53658
|
return frag ? ReactDOM2.createPortal(
|
53659
|
-
/* @__PURE__ */ (0,
|
53659
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { children: props.children }) }) }),
|
53660
53660
|
frag
|
53661
53661
|
) : null;
|
53662
53662
|
}
|
53663
|
-
return /* @__PURE__ */ (0,
|
53663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectContentImpl, { ...props, ref: forwardedRef });
|
53664
53664
|
}
|
53665
53665
|
);
|
53666
53666
|
SelectContent.displayName = CONTENT_NAME;
|
@@ -53819,7 +53819,7 @@ var require_dist23 = __commonJS({
|
|
53819
53819
|
hideWhenDetached,
|
53820
53820
|
avoidCollisions
|
53821
53821
|
} : {};
|
53822
|
-
return /* @__PURE__ */ (0,
|
53822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53823
53823
|
SelectContentProvider,
|
53824
53824
|
{
|
53825
53825
|
scope: __scopeSelect,
|
@@ -53835,7 +53835,7 @@ var require_dist23 = __commonJS({
|
|
53835
53835
|
position,
|
53836
53836
|
isPositioned,
|
53837
53837
|
searchRef,
|
53838
|
-
children: /* @__PURE__ */ (0,
|
53838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_remove_scroll.RemoveScroll, { as: import_react_slot.Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53839
53839
|
import_react_focus_scope.FocusScope,
|
53840
53840
|
{
|
53841
53841
|
asChild: true,
|
@@ -53847,7 +53847,7 @@ var require_dist23 = __commonJS({
|
|
53847
53847
|
context.trigger?.focus({ preventScroll: true });
|
53848
53848
|
event.preventDefault();
|
53849
53849
|
}),
|
53850
|
-
children: /* @__PURE__ */ (0,
|
53850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53851
53851
|
import_react_dismissable_layer.DismissableLayer,
|
53852
53852
|
{
|
53853
53853
|
asChild: true,
|
@@ -53856,7 +53856,7 @@ var require_dist23 = __commonJS({
|
|
53856
53856
|
onPointerDownOutside,
|
53857
53857
|
onFocusOutside: (event) => event.preventDefault(),
|
53858
53858
|
onDismiss: () => context.onOpenChange(false),
|
53859
|
-
children: /* @__PURE__ */ (0,
|
53859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
53860
53860
|
SelectPosition,
|
53861
53861
|
{
|
53862
53862
|
role: "listbox",
|
@@ -54035,14 +54035,14 @@ var require_dist23 = __commonJS({
|
|
54035
54035
|
},
|
54036
54036
|
[position, focusSelectedItem]
|
54037
54037
|
);
|
54038
|
-
return /* @__PURE__ */ (0,
|
54038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54039
54039
|
SelectViewportProvider,
|
54040
54040
|
{
|
54041
54041
|
scope: __scopeSelect,
|
54042
54042
|
contentWrapper,
|
54043
54043
|
shouldExpandOnScrollRef,
|
54044
54044
|
onScrollButtonChange: handleScrollButtonChange,
|
54045
|
-
children: /* @__PURE__ */ (0,
|
54045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54046
54046
|
"div",
|
54047
54047
|
{
|
54048
54048
|
ref: setContentWrapper,
|
@@ -54052,7 +54052,7 @@ var require_dist23 = __commonJS({
|
|
54052
54052
|
position: "fixed",
|
54053
54053
|
zIndex: contentZIndex
|
54054
54054
|
},
|
54055
|
-
children: /* @__PURE__ */ (0,
|
54055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54056
54056
|
import_react_primitive.Primitive.div,
|
54057
54057
|
{
|
54058
54058
|
...popperProps,
|
@@ -54082,7 +54082,7 @@ var require_dist23 = __commonJS({
|
|
54082
54082
|
...popperProps
|
54083
54083
|
} = props;
|
54084
54084
|
const popperScope = usePopperScope(__scopeSelect);
|
54085
|
-
return /* @__PURE__ */ (0,
|
54085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54086
54086
|
PopperPrimitive.Content,
|
54087
54087
|
{
|
54088
54088
|
...popperScope,
|
@@ -54116,8 +54116,8 @@ var require_dist23 = __commonJS({
|
|
54116
54116
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
54117
54117
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentContext.onViewportChange);
|
54118
54118
|
const prevScrollTopRef = React3.useRef(0);
|
54119
|
-
return /* @__PURE__ */ (0,
|
54120
|
-
/* @__PURE__ */ (0,
|
54119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
54120
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54121
54121
|
"style",
|
54122
54122
|
{
|
54123
54123
|
dangerouslySetInnerHTML: {
|
@@ -54126,7 +54126,7 @@ var require_dist23 = __commonJS({
|
|
54126
54126
|
nonce
|
54127
54127
|
}
|
54128
54128
|
),
|
54129
|
-
/* @__PURE__ */ (0,
|
54129
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54130
54130
|
import_react_primitive.Primitive.div,
|
54131
54131
|
{
|
54132
54132
|
"data-radix-select-viewport": "",
|
@@ -54182,7 +54182,7 @@ var require_dist23 = __commonJS({
|
|
54182
54182
|
(props, forwardedRef) => {
|
54183
54183
|
const { __scopeSelect, ...groupProps } = props;
|
54184
54184
|
const groupId = (0, import_react_id.useId)();
|
54185
|
-
return /* @__PURE__ */ (0,
|
54185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
54186
54186
|
}
|
54187
54187
|
);
|
54188
54188
|
SelectGroup.displayName = GROUP_NAME;
|
@@ -54191,7 +54191,7 @@ var require_dist23 = __commonJS({
|
|
54191
54191
|
(props, forwardedRef) => {
|
54192
54192
|
const { __scopeSelect, ...labelProps } = props;
|
54193
54193
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
54194
|
-
return /* @__PURE__ */ (0,
|
54194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
54195
54195
|
}
|
54196
54196
|
);
|
54197
54197
|
SelectLabel.displayName = LABEL_NAME;
|
@@ -54228,7 +54228,7 @@ var require_dist23 = __commonJS({
|
|
54228
54228
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
54229
54229
|
);
|
54230
54230
|
}
|
54231
|
-
return /* @__PURE__ */ (0,
|
54231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54232
54232
|
SelectItemContextProvider,
|
54233
54233
|
{
|
54234
54234
|
scope: __scopeSelect,
|
@@ -54239,14 +54239,14 @@ var require_dist23 = __commonJS({
|
|
54239
54239
|
onItemTextChange: React3.useCallback((node) => {
|
54240
54240
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
54241
54241
|
}, []),
|
54242
|
-
children: /* @__PURE__ */ (0,
|
54242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54243
54243
|
Collection.ItemSlot,
|
54244
54244
|
{
|
54245
54245
|
scope: __scopeSelect,
|
54246
54246
|
value,
|
54247
54247
|
disabled,
|
54248
54248
|
textValue,
|
54249
|
-
children: /* @__PURE__ */ (0,
|
54249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54250
54250
|
import_react_primitive.Primitive.div,
|
54251
54251
|
{
|
54252
54252
|
role: "option",
|
@@ -54320,7 +54320,7 @@ var require_dist23 = __commonJS({
|
|
54320
54320
|
);
|
54321
54321
|
const textContent = itemTextNode?.textContent;
|
54322
54322
|
const nativeOption = React3.useMemo(
|
54323
|
-
() => /* @__PURE__ */ (0,
|
54323
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
54324
54324
|
[itemContext.disabled, itemContext.value, textContent]
|
54325
54325
|
);
|
54326
54326
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
@@ -54328,8 +54328,8 @@ var require_dist23 = __commonJS({
|
|
54328
54328
|
onNativeOptionAdd(nativeOption);
|
54329
54329
|
return () => onNativeOptionRemove(nativeOption);
|
54330
54330
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
54331
|
-
return /* @__PURE__ */ (0,
|
54332
|
-
/* @__PURE__ */ (0,
|
54331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
54332
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
54333
54333
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM2.createPortal(itemTextProps.children, context.valueNode) : null
|
54334
54334
|
] });
|
54335
54335
|
}
|
@@ -54340,7 +54340,7 @@ var require_dist23 = __commonJS({
|
|
54340
54340
|
(props, forwardedRef) => {
|
54341
54341
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
54342
54342
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
54343
|
-
return itemContext.isSelected ? /* @__PURE__ */ (0,
|
54343
|
+
return itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
54344
54344
|
}
|
54345
54345
|
);
|
54346
54346
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
@@ -54363,7 +54363,7 @@ var require_dist23 = __commonJS({
|
|
54363
54363
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
54364
54364
|
}
|
54365
54365
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
54366
|
-
return canScrollUp ? /* @__PURE__ */ (0,
|
54366
|
+
return canScrollUp ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54367
54367
|
SelectScrollButtonImpl,
|
54368
54368
|
{
|
54369
54369
|
...props,
|
@@ -54398,7 +54398,7 @@ var require_dist23 = __commonJS({
|
|
54398
54398
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
54399
54399
|
}
|
54400
54400
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
54401
|
-
return canScrollDown ? /* @__PURE__ */ (0,
|
54401
|
+
return canScrollDown ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54402
54402
|
SelectScrollButtonImpl,
|
54403
54403
|
{
|
54404
54404
|
...props,
|
@@ -54431,7 +54431,7 @@ var require_dist23 = __commonJS({
|
|
54431
54431
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
54432
54432
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
54433
54433
|
}, [getItems]);
|
54434
|
-
return /* @__PURE__ */ (0,
|
54434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54435
54435
|
import_react_primitive.Primitive.div,
|
54436
54436
|
{
|
54437
54437
|
"aria-hidden": true,
|
@@ -54459,7 +54459,7 @@ var require_dist23 = __commonJS({
|
|
54459
54459
|
var SelectSeparator = React3.forwardRef(
|
54460
54460
|
(props, forwardedRef) => {
|
54461
54461
|
const { __scopeSelect, ...separatorProps } = props;
|
54462
|
-
return /* @__PURE__ */ (0,
|
54462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
54463
54463
|
}
|
54464
54464
|
);
|
54465
54465
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
@@ -54470,7 +54470,7 @@ var require_dist23 = __commonJS({
|
|
54470
54470
|
const popperScope = usePopperScope(__scopeSelect);
|
54471
54471
|
const context = useSelectContext(ARROW_NAME, __scopeSelect);
|
54472
54472
|
const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);
|
54473
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0,
|
54473
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
54474
54474
|
}
|
54475
54475
|
);
|
54476
54476
|
SelectArrow.displayName = ARROW_NAME;
|
@@ -54497,7 +54497,7 @@ var require_dist23 = __commonJS({
|
|
54497
54497
|
select.dispatchEvent(event);
|
54498
54498
|
}
|
54499
54499
|
}, [prevValue, value]);
|
54500
|
-
return /* @__PURE__ */ (0,
|
54500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_visually_hidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
|
54501
54501
|
}
|
54502
54502
|
);
|
54503
54503
|
BubbleSelect.displayName = "BubbleSelect";
|
@@ -54881,7 +54881,7 @@ var require_dist25 = __commonJS({
|
|
54881
54881
|
var import_react_use_controllable_state = require_dist20();
|
54882
54882
|
var import_aria_hidden = require_es5();
|
54883
54883
|
var import_react_remove_scroll = require_es57();
|
54884
|
-
var
|
54884
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
54885
54885
|
var POPOVER_NAME = "Popover";
|
54886
54886
|
var [createPopoverContext, createPopoverScope] = (0, import_react_context.createContextScope)(POPOVER_NAME, [
|
54887
54887
|
import_react_popper.createPopperScope
|
@@ -54905,7 +54905,7 @@ var require_dist25 = __commonJS({
|
|
54905
54905
|
defaultProp: defaultOpen,
|
54906
54906
|
onChange: onOpenChange
|
54907
54907
|
});
|
54908
|
-
return /* @__PURE__ */ (0,
|
54908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54909
54909
|
PopoverProvider,
|
54910
54910
|
{
|
54911
54911
|
scope: __scopePopover,
|
@@ -54934,7 +54934,7 @@ var require_dist25 = __commonJS({
|
|
54934
54934
|
onCustomAnchorAdd();
|
54935
54935
|
return () => onCustomAnchorRemove();
|
54936
54936
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
54937
|
-
return /* @__PURE__ */ (0,
|
54937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
54938
54938
|
}
|
54939
54939
|
);
|
54940
54940
|
PopoverAnchor.displayName = ANCHOR_NAME;
|
@@ -54945,7 +54945,7 @@ var require_dist25 = __commonJS({
|
|
54945
54945
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
54946
54946
|
const popperScope = usePopperScope(__scopePopover);
|
54947
54947
|
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
54948
|
-
const trigger = /* @__PURE__ */ (0,
|
54948
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54949
54949
|
import_react_primitive.Primitive.button,
|
54950
54950
|
{
|
54951
54951
|
type: "button",
|
@@ -54958,7 +54958,7 @@ var require_dist25 = __commonJS({
|
|
54958
54958
|
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle)
|
54959
54959
|
}
|
54960
54960
|
);
|
54961
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0,
|
54961
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });
|
54962
54962
|
}
|
54963
54963
|
);
|
54964
54964
|
PopoverTrigger.displayName = TRIGGER_NAME;
|
@@ -54969,7 +54969,7 @@ var require_dist25 = __commonJS({
|
|
54969
54969
|
var PopoverPortal = (props) => {
|
54970
54970
|
const { __scopePopover, forceMount, children, container } = props;
|
54971
54971
|
const context = usePopoverContext(PORTAL_NAME, __scopePopover);
|
54972
|
-
return /* @__PURE__ */ (0,
|
54972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) });
|
54973
54973
|
};
|
54974
54974
|
PopoverPortal.displayName = PORTAL_NAME;
|
54975
54975
|
var CONTENT_NAME = "PopoverContent";
|
@@ -54978,7 +54978,7 @@ var require_dist25 = __commonJS({
|
|
54978
54978
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
|
54979
54979
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
54980
54980
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
54981
|
-
return /* @__PURE__ */ (0,
|
54981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
54982
54982
|
}
|
54983
54983
|
);
|
54984
54984
|
PopoverContent.displayName = CONTENT_NAME;
|
@@ -54993,7 +54993,7 @@ var require_dist25 = __commonJS({
|
|
54993
54993
|
if (content)
|
54994
54994
|
return (0, import_aria_hidden.hideOthers)(content);
|
54995
54995
|
}, []);
|
54996
|
-
return /* @__PURE__ */ (0,
|
54996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_remove_scroll.RemoveScroll, { as: import_react_slot.Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
54997
54997
|
PopoverContentImpl,
|
54998
54998
|
{
|
54999
54999
|
...props,
|
@@ -55029,7 +55029,7 @@ var require_dist25 = __commonJS({
|
|
55029
55029
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
55030
55030
|
const hasInteractedOutsideRef = React3.useRef(false);
|
55031
55031
|
const hasPointerDownOutsideRef = React3.useRef(false);
|
55032
|
-
return /* @__PURE__ */ (0,
|
55032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
55033
55033
|
PopoverContentImpl,
|
55034
55034
|
{
|
55035
55035
|
...props,
|
@@ -55083,7 +55083,7 @@ var require_dist25 = __commonJS({
|
|
55083
55083
|
const context = usePopoverContext(CONTENT_NAME, __scopePopover);
|
55084
55084
|
const popperScope = usePopperScope(__scopePopover);
|
55085
55085
|
(0, import_react_focus_guards.useFocusGuards)();
|
55086
|
-
return /* @__PURE__ */ (0,
|
55086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
55087
55087
|
import_react_focus_scope.FocusScope,
|
55088
55088
|
{
|
55089
55089
|
asChild: true,
|
@@ -55091,7 +55091,7 @@ var require_dist25 = __commonJS({
|
|
55091
55091
|
trapped: trapFocus,
|
55092
55092
|
onMountAutoFocus: onOpenAutoFocus,
|
55093
55093
|
onUnmountAutoFocus: onCloseAutoFocus,
|
55094
|
-
children: /* @__PURE__ */ (0,
|
55094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
55095
55095
|
import_react_dismissable_layer.DismissableLayer,
|
55096
55096
|
{
|
55097
55097
|
asChild: true,
|
@@ -55101,7 +55101,7 @@ var require_dist25 = __commonJS({
|
|
55101
55101
|
onPointerDownOutside,
|
55102
55102
|
onFocusOutside,
|
55103
55103
|
onDismiss: () => context.onOpenChange(false),
|
55104
|
-
children: /* @__PURE__ */ (0,
|
55104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
55105
55105
|
PopperPrimitive.Content,
|
55106
55106
|
{
|
55107
55107
|
"data-state": getState(context.open),
|
@@ -55134,7 +55134,7 @@ var require_dist25 = __commonJS({
|
|
55134
55134
|
(props, forwardedRef) => {
|
55135
55135
|
const { __scopePopover, ...closeProps } = props;
|
55136
55136
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
55137
|
-
return /* @__PURE__ */ (0,
|
55137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
55138
55138
|
import_react_primitive.Primitive.button,
|
55139
55139
|
{
|
55140
55140
|
type: "button",
|
@@ -55151,7 +55151,7 @@ var require_dist25 = __commonJS({
|
|
55151
55151
|
(props, forwardedRef) => {
|
55152
55152
|
const { __scopePopover, ...arrowProps } = props;
|
55153
55153
|
const popperScope = usePopperScope(__scopePopover);
|
55154
|
-
return /* @__PURE__ */ (0,
|
55154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
55155
55155
|
}
|
55156
55156
|
);
|
55157
55157
|
PopoverArrow.displayName = ARROW_NAME;
|
@@ -55377,13 +55377,13 @@ var require_dist28 = __commonJS({
|
|
55377
55377
|
});
|
55378
55378
|
module.exports = __toCommonJS2(index_exports);
|
55379
55379
|
var React3 = __toESM2(require_react());
|
55380
|
-
var
|
55380
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
55381
55381
|
function createContext2(rootComponentName, defaultContext) {
|
55382
55382
|
const Context = React3.createContext(defaultContext);
|
55383
55383
|
const Provider = (props) => {
|
55384
55384
|
const { children, ...context } = props;
|
55385
55385
|
const value = React3.useMemo(() => context, Object.values(context));
|
55386
|
-
return /* @__PURE__ */ (0,
|
55386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
55387
55387
|
};
|
55388
55388
|
Provider.displayName = rootComponentName + "Provider";
|
55389
55389
|
function useContext2(consumerName) {
|
@@ -55406,7 +55406,7 @@ var require_dist28 = __commonJS({
|
|
55406
55406
|
const { scope, children, ...context } = props;
|
55407
55407
|
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
55408
55408
|
const value = React3.useMemo(() => context, Object.values(context));
|
55409
|
-
return /* @__PURE__ */ (0,
|
55409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
55410
55410
|
};
|
55411
55411
|
Provider.displayName = rootComponentName + "Provider";
|
55412
55412
|
function useContext2(consumerName, scope) {
|
@@ -55865,7 +55865,7 @@ var require_dist34 = __commonJS({
|
|
55865
55865
|
module.exports = __toCommonJS2(index_exports);
|
55866
55866
|
var React3 = __toESM2(require_react());
|
55867
55867
|
var import_react_compose_refs = require_dist27();
|
55868
|
-
var
|
55868
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
55869
55869
|
// @__NO_SIDE_EFFECTS__
|
55870
55870
|
function createSlot(ownerName) {
|
55871
55871
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
@@ -55884,9 +55884,9 @@ var require_dist34 = __commonJS({
|
|
55884
55884
|
return child;
|
55885
55885
|
}
|
55886
55886
|
});
|
55887
|
-
return /* @__PURE__ */ (0,
|
55887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
55888
55888
|
}
|
55889
|
-
return /* @__PURE__ */ (0,
|
55889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
55890
55890
|
});
|
55891
55891
|
Slot2.displayName = `${ownerName}.Slot`;
|
55892
55892
|
return Slot2;
|
@@ -55913,7 +55913,7 @@ var require_dist34 = __commonJS({
|
|
55913
55913
|
// @__NO_SIDE_EFFECTS__
|
55914
55914
|
function createSlottable(ownerName) {
|
55915
55915
|
const Slottable2 = ({ children }) => {
|
55916
|
-
return /* @__PURE__ */ (0,
|
55916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
|
55917
55917
|
};
|
55918
55918
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
55919
55919
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
@@ -56003,7 +56003,7 @@ var require_dist35 = __commonJS({
|
|
56003
56003
|
var React3 = __toESM2(require_react());
|
56004
56004
|
var ReactDOM2 = __toESM2(require_react_dom());
|
56005
56005
|
var import_react_slot = require_dist34();
|
56006
|
-
var
|
56006
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
56007
56007
|
var NODES = [
|
56008
56008
|
"a",
|
56009
56009
|
"button",
|
@@ -56031,7 +56031,7 @@ var require_dist35 = __commonJS({
|
|
56031
56031
|
if (typeof window !== "undefined") {
|
56032
56032
|
window[Symbol.for("radix-ui")] = true;
|
56033
56033
|
}
|
56034
|
-
return /* @__PURE__ */ (0,
|
56034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
56035
56035
|
});
|
56036
56036
|
Node2.displayName = `Primitive.${node}`;
|
56037
56037
|
return { ...primitive, [node]: Node2 };
|
@@ -56190,7 +56190,7 @@ var require_dist38 = __commonJS({
|
|
56190
56190
|
var import_react_compose_refs = require_dist27();
|
56191
56191
|
var import_react_use_callback_ref = require_dist36();
|
56192
56192
|
var import_react_use_escape_keydown = require_dist37();
|
56193
|
-
var
|
56193
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
56194
56194
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
56195
56195
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
56196
56196
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
@@ -56285,7 +56285,7 @@ var require_dist38 = __commonJS({
|
|
56285
56285
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
56286
56286
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
56287
56287
|
}, []);
|
56288
|
-
return /* @__PURE__ */ (0,
|
56288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
56289
56289
|
import_react_primitive.Primitive.div,
|
56290
56290
|
{
|
56291
56291
|
...layerProps,
|
@@ -56319,7 +56319,7 @@ var require_dist38 = __commonJS({
|
|
56319
56319
|
};
|
56320
56320
|
}
|
56321
56321
|
}, [context.branches]);
|
56322
|
-
return /* @__PURE__ */ (0,
|
56322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
|
56323
56323
|
});
|
56324
56324
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
56325
56325
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
@@ -56448,7 +56448,7 @@ var require_dist39 = __commonJS({
|
|
56448
56448
|
var import_react_compose_refs = require_dist27();
|
56449
56449
|
var import_react_primitive = require_dist35();
|
56450
56450
|
var import_react_use_callback_ref = require_dist36();
|
56451
|
-
var
|
56451
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
56452
56452
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
56453
56453
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
56454
56454
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
@@ -56578,7 +56578,7 @@ var require_dist39 = __commonJS({
|
|
56578
56578
|
},
|
56579
56579
|
[loop, trapped, focusScope.paused]
|
56580
56580
|
);
|
56581
|
-
return /* @__PURE__ */ (0,
|
56581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
56582
56582
|
});
|
56583
56583
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
56584
56584
|
function focusFirst(candidates, { select = false } = {}) {
|
@@ -56713,14 +56713,14 @@ var require_dist40 = __commonJS({
|
|
56713
56713
|
var import_react_dom = __toESM2(require_react_dom());
|
56714
56714
|
var import_react_primitive = require_dist35();
|
56715
56715
|
var import_react_use_layout_effect = require_dist29();
|
56716
|
-
var
|
56716
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
56717
56717
|
var PORTAL_NAME = "Portal";
|
56718
56718
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
56719
56719
|
const { container: containerProp, ...portalProps } = props;
|
56720
56720
|
const [mounted, setMounted] = React3.useState(false);
|
56721
56721
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
56722
56722
|
const container = containerProp || mounted && globalThis?.document?.body;
|
56723
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
56723
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
56724
56724
|
});
|
56725
56725
|
Portal.displayName = PORTAL_NAME;
|
56726
56726
|
var Root = Portal;
|
@@ -57037,7 +57037,7 @@ var require_dist43 = __commonJS({
|
|
57037
57037
|
var import_react_remove_scroll = require_es57();
|
57038
57038
|
var import_aria_hidden = require_es5();
|
57039
57039
|
var import_react_slot = require_dist34();
|
57040
|
-
var
|
57040
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
57041
57041
|
var DIALOG_NAME = "Dialog";
|
57042
57042
|
var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME);
|
57043
57043
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
@@ -57058,7 +57058,7 @@ var require_dist43 = __commonJS({
|
|
57058
57058
|
onChange: onOpenChange,
|
57059
57059
|
caller: DIALOG_NAME
|
57060
57060
|
});
|
57061
|
-
return /* @__PURE__ */ (0,
|
57061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57062
57062
|
DialogProvider,
|
57063
57063
|
{
|
57064
57064
|
scope: __scopeDialog,
|
@@ -57082,7 +57082,7 @@ var require_dist43 = __commonJS({
|
|
57082
57082
|
const { __scopeDialog, ...triggerProps } = props;
|
57083
57083
|
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
57084
57084
|
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
57085
|
-
return /* @__PURE__ */ (0,
|
57085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57086
57086
|
import_react_primitive.Primitive.button,
|
57087
57087
|
{
|
57088
57088
|
type: "button",
|
@@ -57105,7 +57105,7 @@ var require_dist43 = __commonJS({
|
|
57105
57105
|
var DialogPortal = (props) => {
|
57106
57106
|
const { __scopeDialog, forceMount, children, container } = props;
|
57107
57107
|
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
57108
|
-
return /* @__PURE__ */ (0,
|
57108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React3.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) });
|
57109
57109
|
};
|
57110
57110
|
DialogPortal.displayName = PORTAL_NAME;
|
57111
57111
|
var OVERLAY_NAME = "DialogOverlay";
|
@@ -57114,7 +57114,7 @@ var require_dist43 = __commonJS({
|
|
57114
57114
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
57115
57115
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
57116
57116
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
57117
|
-
return context.modal ? /* @__PURE__ */ (0,
|
57117
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
57118
57118
|
}
|
57119
57119
|
);
|
57120
57120
|
DialogOverlay.displayName = OVERLAY_NAME;
|
@@ -57126,7 +57126,7 @@ var require_dist43 = __commonJS({
|
|
57126
57126
|
return (
|
57127
57127
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
57128
57128
|
// ie. when `Overlay` and `Content` are siblings
|
57129
|
-
/* @__PURE__ */ (0,
|
57129
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57130
57130
|
import_react_primitive.Primitive.div,
|
57131
57131
|
{
|
57132
57132
|
"data-state": getState(context.open),
|
@@ -57144,7 +57144,7 @@ var require_dist43 = __commonJS({
|
|
57144
57144
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
57145
57145
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
57146
57146
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
57147
|
-
return /* @__PURE__ */ (0,
|
57147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
57148
57148
|
}
|
57149
57149
|
);
|
57150
57150
|
DialogContent.displayName = CONTENT_NAME;
|
@@ -57158,7 +57158,7 @@ var require_dist43 = __commonJS({
|
|
57158
57158
|
if (content)
|
57159
57159
|
return (0, import_aria_hidden.hideOthers)(content);
|
57160
57160
|
}, []);
|
57161
|
-
return /* @__PURE__ */ (0,
|
57161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57162
57162
|
DialogContentImpl,
|
57163
57163
|
{
|
57164
57164
|
...props,
|
@@ -57189,7 +57189,7 @@ var require_dist43 = __commonJS({
|
|
57189
57189
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
57190
57190
|
const hasInteractedOutsideRef = React3.useRef(false);
|
57191
57191
|
const hasPointerDownOutsideRef = React3.useRef(false);
|
57192
|
-
return /* @__PURE__ */ (0,
|
57192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57193
57193
|
DialogContentImpl,
|
57194
57194
|
{
|
57195
57195
|
...props,
|
@@ -57233,8 +57233,8 @@ var require_dist43 = __commonJS({
|
|
57233
57233
|
const contentRef = React3.useRef(null);
|
57234
57234
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
57235
57235
|
(0, import_react_focus_guards.useFocusGuards)();
|
57236
|
-
return /* @__PURE__ */ (0,
|
57237
|
-
/* @__PURE__ */ (0,
|
57236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
57237
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57238
57238
|
import_react_focus_scope.FocusScope,
|
57239
57239
|
{
|
57240
57240
|
asChild: true,
|
@@ -57242,7 +57242,7 @@ var require_dist43 = __commonJS({
|
|
57242
57242
|
trapped: trapFocus,
|
57243
57243
|
onMountAutoFocus: onOpenAutoFocus,
|
57244
57244
|
onUnmountAutoFocus: onCloseAutoFocus,
|
57245
|
-
children: /* @__PURE__ */ (0,
|
57245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57246
57246
|
import_react_dismissable_layer.DismissableLayer,
|
57247
57247
|
{
|
57248
57248
|
role: "dialog",
|
@@ -57257,9 +57257,9 @@ var require_dist43 = __commonJS({
|
|
57257
57257
|
)
|
57258
57258
|
}
|
57259
57259
|
),
|
57260
|
-
/* @__PURE__ */ (0,
|
57261
|
-
/* @__PURE__ */ (0,
|
57262
|
-
/* @__PURE__ */ (0,
|
57260
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
57261
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TitleWarning, { titleId: context.titleId }),
|
57262
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
57263
57263
|
] })
|
57264
57264
|
] });
|
57265
57265
|
}
|
@@ -57269,7 +57269,7 @@ var require_dist43 = __commonJS({
|
|
57269
57269
|
(props, forwardedRef) => {
|
57270
57270
|
const { __scopeDialog, ...titleProps } = props;
|
57271
57271
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
57272
|
-
return /* @__PURE__ */ (0,
|
57272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
57273
57273
|
}
|
57274
57274
|
);
|
57275
57275
|
DialogTitle.displayName = TITLE_NAME;
|
@@ -57278,7 +57278,7 @@ var require_dist43 = __commonJS({
|
|
57278
57278
|
(props, forwardedRef) => {
|
57279
57279
|
const { __scopeDialog, ...descriptionProps } = props;
|
57280
57280
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
57281
|
-
return /* @__PURE__ */ (0,
|
57281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
57282
57282
|
}
|
57283
57283
|
);
|
57284
57284
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
@@ -57287,7 +57287,7 @@ var require_dist43 = __commonJS({
|
|
57287
57287
|
(props, forwardedRef) => {
|
57288
57288
|
const { __scopeDialog, ...closeProps } = props;
|
57289
57289
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
57290
|
-
return /* @__PURE__ */ (0,
|
57290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
57291
57291
|
import_react_primitive.Primitive.button,
|
57292
57292
|
{
|
57293
57293
|
type: "button",
|
@@ -57737,6 +57737,2276 @@ var require_dist44 = __commonJS({
|
|
57737
57737
|
}
|
57738
57738
|
});
|
57739
57739
|
|
57740
|
+
// ../core/node_modules/@radix-ui/primitive/dist/index.js
|
57741
|
+
var require_dist45 = __commonJS({
|
57742
|
+
"../core/node_modules/@radix-ui/primitive/dist/index.js"(exports, module) {
|
57743
|
+
"use strict";
|
57744
|
+
var __defProp2 = Object.defineProperty;
|
57745
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57746
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57747
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57748
|
+
var __export2 = (target, all) => {
|
57749
|
+
for (var name in all)
|
57750
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57751
|
+
};
|
57752
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57753
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57754
|
+
for (let key of __getOwnPropNames2(from2))
|
57755
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57756
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57757
|
+
}
|
57758
|
+
return to2;
|
57759
|
+
};
|
57760
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57761
|
+
var index_exports = {};
|
57762
|
+
__export2(index_exports, {
|
57763
|
+
composeEventHandlers: () => composeEventHandlers
|
57764
|
+
});
|
57765
|
+
module.exports = __toCommonJS2(index_exports);
|
57766
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
57767
|
+
return function handleEvent(event) {
|
57768
|
+
originalEventHandler?.(event);
|
57769
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
57770
|
+
return ourEventHandler?.(event);
|
57771
|
+
}
|
57772
|
+
};
|
57773
|
+
}
|
57774
|
+
}
|
57775
|
+
});
|
57776
|
+
|
57777
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js
|
57778
|
+
var require_dist46 = __commonJS({
|
57779
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js"(exports, module) {
|
57780
|
+
"use strict";
|
57781
|
+
var __create2 = Object.create;
|
57782
|
+
var __defProp2 = Object.defineProperty;
|
57783
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57784
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57785
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57786
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57787
|
+
var __export2 = (target, all) => {
|
57788
|
+
for (var name in all)
|
57789
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57790
|
+
};
|
57791
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57792
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57793
|
+
for (let key of __getOwnPropNames2(from2))
|
57794
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57795
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57796
|
+
}
|
57797
|
+
return to2;
|
57798
|
+
};
|
57799
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57800
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57801
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57802
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57803
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57804
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
57805
|
+
mod
|
57806
|
+
));
|
57807
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57808
|
+
var index_exports = {};
|
57809
|
+
__export2(index_exports, {
|
57810
|
+
composeRefs: () => composeRefs,
|
57811
|
+
useComposedRefs: () => useComposedRefs
|
57812
|
+
});
|
57813
|
+
module.exports = __toCommonJS2(index_exports);
|
57814
|
+
var React3 = __toESM2(require_react());
|
57815
|
+
function setRef(ref, value) {
|
57816
|
+
if (typeof ref === "function") {
|
57817
|
+
return ref(value);
|
57818
|
+
} else if (ref !== null && ref !== void 0) {
|
57819
|
+
ref.current = value;
|
57820
|
+
}
|
57821
|
+
}
|
57822
|
+
function composeRefs(...refs) {
|
57823
|
+
return (node) => {
|
57824
|
+
let hasCleanup = false;
|
57825
|
+
const cleanups = refs.map((ref) => {
|
57826
|
+
const cleanup = setRef(ref, node);
|
57827
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
57828
|
+
hasCleanup = true;
|
57829
|
+
}
|
57830
|
+
return cleanup;
|
57831
|
+
});
|
57832
|
+
if (hasCleanup) {
|
57833
|
+
return () => {
|
57834
|
+
for (let i = 0; i < cleanups.length; i++) {
|
57835
|
+
const cleanup = cleanups[i];
|
57836
|
+
if (typeof cleanup == "function") {
|
57837
|
+
cleanup();
|
57838
|
+
} else {
|
57839
|
+
setRef(refs[i], null);
|
57840
|
+
}
|
57841
|
+
}
|
57842
|
+
};
|
57843
|
+
}
|
57844
|
+
};
|
57845
|
+
}
|
57846
|
+
function useComposedRefs(...refs) {
|
57847
|
+
return React3.useCallback(composeRefs(...refs), refs);
|
57848
|
+
}
|
57849
|
+
}
|
57850
|
+
});
|
57851
|
+
|
57852
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js
|
57853
|
+
var require_dist47 = __commonJS({
|
57854
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js"(exports, module) {
|
57855
|
+
"use strict";
|
57856
|
+
var __create2 = Object.create;
|
57857
|
+
var __defProp2 = Object.defineProperty;
|
57858
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57859
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57860
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57861
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57862
|
+
var __export2 = (target, all) => {
|
57863
|
+
for (var name in all)
|
57864
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57865
|
+
};
|
57866
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57867
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57868
|
+
for (let key of __getOwnPropNames2(from2))
|
57869
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57870
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57871
|
+
}
|
57872
|
+
return to2;
|
57873
|
+
};
|
57874
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57875
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57876
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57877
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57878
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57879
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
57880
|
+
mod
|
57881
|
+
));
|
57882
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57883
|
+
var index_exports = {};
|
57884
|
+
__export2(index_exports, {
|
57885
|
+
createContext: () => createContext2,
|
57886
|
+
createContextScope: () => createContextScope
|
57887
|
+
});
|
57888
|
+
module.exports = __toCommonJS2(index_exports);
|
57889
|
+
var React3 = __toESM2(require_react());
|
57890
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
57891
|
+
function createContext2(rootComponentName, defaultContext) {
|
57892
|
+
const Context = React3.createContext(defaultContext);
|
57893
|
+
const Provider = (props) => {
|
57894
|
+
const { children, ...context } = props;
|
57895
|
+
const value = React3.useMemo(() => context, Object.values(context));
|
57896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
57897
|
+
};
|
57898
|
+
Provider.displayName = rootComponentName + "Provider";
|
57899
|
+
function useContext2(consumerName) {
|
57900
|
+
const context = React3.useContext(Context);
|
57901
|
+
if (context)
|
57902
|
+
return context;
|
57903
|
+
if (defaultContext !== void 0)
|
57904
|
+
return defaultContext;
|
57905
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
57906
|
+
}
|
57907
|
+
return [Provider, useContext2];
|
57908
|
+
}
|
57909
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
57910
|
+
let defaultContexts = [];
|
57911
|
+
function createContext3(rootComponentName, defaultContext) {
|
57912
|
+
const BaseContext = React3.createContext(defaultContext);
|
57913
|
+
const index3 = defaultContexts.length;
|
57914
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
57915
|
+
const Provider = (props) => {
|
57916
|
+
const { scope, children, ...context } = props;
|
57917
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
57918
|
+
const value = React3.useMemo(() => context, Object.values(context));
|
57919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Context.Provider, { value, children });
|
57920
|
+
};
|
57921
|
+
Provider.displayName = rootComponentName + "Provider";
|
57922
|
+
function useContext2(consumerName, scope) {
|
57923
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
57924
|
+
const context = React3.useContext(Context);
|
57925
|
+
if (context)
|
57926
|
+
return context;
|
57927
|
+
if (defaultContext !== void 0)
|
57928
|
+
return defaultContext;
|
57929
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
57930
|
+
}
|
57931
|
+
return [Provider, useContext2];
|
57932
|
+
}
|
57933
|
+
const createScope = () => {
|
57934
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
57935
|
+
return React3.createContext(defaultContext);
|
57936
|
+
});
|
57937
|
+
return function useScope(scope) {
|
57938
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
57939
|
+
return React3.useMemo(
|
57940
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
57941
|
+
[scope, contexts]
|
57942
|
+
);
|
57943
|
+
};
|
57944
|
+
};
|
57945
|
+
createScope.scopeName = scopeName;
|
57946
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
57947
|
+
}
|
57948
|
+
function composeContextScopes(...scopes) {
|
57949
|
+
const baseScope = scopes[0];
|
57950
|
+
if (scopes.length === 1)
|
57951
|
+
return baseScope;
|
57952
|
+
const createScope = () => {
|
57953
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
57954
|
+
useScope: createScope2(),
|
57955
|
+
scopeName: createScope2.scopeName
|
57956
|
+
}));
|
57957
|
+
return function useComposedScopes(overrideScopes) {
|
57958
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
57959
|
+
const scopeProps = useScope(overrideScopes);
|
57960
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
57961
|
+
return { ...nextScopes2, ...currentScope };
|
57962
|
+
}, {});
|
57963
|
+
return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
57964
|
+
};
|
57965
|
+
};
|
57966
|
+
createScope.scopeName = baseScope.scopeName;
|
57967
|
+
return createScope;
|
57968
|
+
}
|
57969
|
+
}
|
57970
|
+
});
|
57971
|
+
|
57972
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
57973
|
+
var require_dist48 = __commonJS({
|
57974
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
57975
|
+
"use strict";
|
57976
|
+
var __create2 = Object.create;
|
57977
|
+
var __defProp2 = Object.defineProperty;
|
57978
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57979
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57980
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57981
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57982
|
+
var __export2 = (target, all) => {
|
57983
|
+
for (var name in all)
|
57984
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57985
|
+
};
|
57986
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57987
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57988
|
+
for (let key of __getOwnPropNames2(from2))
|
57989
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57990
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57991
|
+
}
|
57992
|
+
return to2;
|
57993
|
+
};
|
57994
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57995
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57996
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57997
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57998
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57999
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58000
|
+
mod
|
58001
|
+
));
|
58002
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58003
|
+
var index_exports = {};
|
58004
|
+
__export2(index_exports, {
|
58005
|
+
useLayoutEffect: () => useLayoutEffect2
|
58006
|
+
});
|
58007
|
+
module.exports = __toCommonJS2(index_exports);
|
58008
|
+
var React3 = __toESM2(require_react());
|
58009
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
58010
|
+
};
|
58011
|
+
}
|
58012
|
+
});
|
58013
|
+
|
58014
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.js
|
58015
|
+
var require_dist49 = __commonJS({
|
58016
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.js"(exports, module) {
|
58017
|
+
"use strict";
|
58018
|
+
var __create2 = Object.create;
|
58019
|
+
var __defProp2 = Object.defineProperty;
|
58020
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58021
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58022
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58023
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58024
|
+
var __export2 = (target, all) => {
|
58025
|
+
for (var name in all)
|
58026
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58027
|
+
};
|
58028
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58029
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58030
|
+
for (let key of __getOwnPropNames2(from2))
|
58031
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58032
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58033
|
+
}
|
58034
|
+
return to2;
|
58035
|
+
};
|
58036
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58037
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58038
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58039
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58040
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58041
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58042
|
+
mod
|
58043
|
+
));
|
58044
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58045
|
+
var index_exports = {};
|
58046
|
+
__export2(index_exports, {
|
58047
|
+
useId: () => useId
|
58048
|
+
});
|
58049
|
+
module.exports = __toCommonJS2(index_exports);
|
58050
|
+
var React3 = __toESM2(require_react());
|
58051
|
+
var import_react_use_layout_effect = require_dist48();
|
58052
|
+
var useReactId = React3[" useId ".trim().toString()] || (() => void 0);
|
58053
|
+
var count = 0;
|
58054
|
+
function useId(deterministicId) {
|
58055
|
+
const [id, setId] = React3.useState(useReactId());
|
58056
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
58057
|
+
if (!deterministicId)
|
58058
|
+
setId((reactId) => reactId ?? String(count++));
|
58059
|
+
}, [deterministicId]);
|
58060
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
58061
|
+
}
|
58062
|
+
}
|
58063
|
+
});
|
58064
|
+
|
58065
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
58066
|
+
var require_dist50 = __commonJS({
|
58067
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
58068
|
+
"use strict";
|
58069
|
+
var __create2 = Object.create;
|
58070
|
+
var __defProp2 = Object.defineProperty;
|
58071
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58072
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58073
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58074
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58075
|
+
var __export2 = (target, all) => {
|
58076
|
+
for (var name in all)
|
58077
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58078
|
+
};
|
58079
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58080
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58081
|
+
for (let key of __getOwnPropNames2(from2))
|
58082
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58083
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58084
|
+
}
|
58085
|
+
return to2;
|
58086
|
+
};
|
58087
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58088
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58089
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58090
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58091
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58092
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58093
|
+
mod
|
58094
|
+
));
|
58095
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58096
|
+
var index_exports = {};
|
58097
|
+
__export2(index_exports, {
|
58098
|
+
useLayoutEffect: () => useLayoutEffect2
|
58099
|
+
});
|
58100
|
+
module.exports = __toCommonJS2(index_exports);
|
58101
|
+
var React3 = __toESM2(require_react());
|
58102
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
58103
|
+
};
|
58104
|
+
}
|
58105
|
+
});
|
58106
|
+
|
58107
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.js
|
58108
|
+
var require_dist51 = __commonJS({
|
58109
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.js"(exports, module) {
|
58110
|
+
"use strict";
|
58111
|
+
var __create2 = Object.create;
|
58112
|
+
var __defProp2 = Object.defineProperty;
|
58113
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58114
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58115
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58116
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58117
|
+
var __export2 = (target, all) => {
|
58118
|
+
for (var name in all)
|
58119
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58120
|
+
};
|
58121
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58122
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58123
|
+
for (let key of __getOwnPropNames2(from2))
|
58124
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58125
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58126
|
+
}
|
58127
|
+
return to2;
|
58128
|
+
};
|
58129
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58130
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58131
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58132
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58133
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58134
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58135
|
+
mod
|
58136
|
+
));
|
58137
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58138
|
+
var index_exports = {};
|
58139
|
+
__export2(index_exports, {
|
58140
|
+
useControllableState: () => useControllableState,
|
58141
|
+
useControllableStateReducer: () => useControllableStateReducer
|
58142
|
+
});
|
58143
|
+
module.exports = __toCommonJS2(index_exports);
|
58144
|
+
var React3 = __toESM2(require_react());
|
58145
|
+
var import_react_use_layout_effect = require_dist50();
|
58146
|
+
var useInsertionEffect = React3[" useInsertionEffect ".trim().toString()] || import_react_use_layout_effect.useLayoutEffect;
|
58147
|
+
function useControllableState({
|
58148
|
+
prop,
|
58149
|
+
defaultProp,
|
58150
|
+
onChange = () => {
|
58151
|
+
},
|
58152
|
+
caller
|
58153
|
+
}) {
|
58154
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
58155
|
+
defaultProp,
|
58156
|
+
onChange
|
58157
|
+
});
|
58158
|
+
const isControlled = prop !== void 0;
|
58159
|
+
const value = isControlled ? prop : uncontrolledProp;
|
58160
|
+
if (true) {
|
58161
|
+
const isControlledRef = React3.useRef(prop !== void 0);
|
58162
|
+
React3.useEffect(() => {
|
58163
|
+
const wasControlled = isControlledRef.current;
|
58164
|
+
if (wasControlled !== isControlled) {
|
58165
|
+
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
58166
|
+
const to2 = isControlled ? "controlled" : "uncontrolled";
|
58167
|
+
console.warn(
|
58168
|
+
`${caller} is changing from ${from2} to ${to2}. 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.`
|
58169
|
+
);
|
58170
|
+
}
|
58171
|
+
isControlledRef.current = isControlled;
|
58172
|
+
}, [isControlled, caller]);
|
58173
|
+
}
|
58174
|
+
const setValue = React3.useCallback(
|
58175
|
+
(nextValue) => {
|
58176
|
+
if (isControlled) {
|
58177
|
+
const value2 = isFunction2(nextValue) ? nextValue(prop) : nextValue;
|
58178
|
+
if (value2 !== prop) {
|
58179
|
+
onChangeRef.current?.(value2);
|
58180
|
+
}
|
58181
|
+
} else {
|
58182
|
+
setUncontrolledProp(nextValue);
|
58183
|
+
}
|
58184
|
+
},
|
58185
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
58186
|
+
);
|
58187
|
+
return [value, setValue];
|
58188
|
+
}
|
58189
|
+
function useUncontrolledState({
|
58190
|
+
defaultProp,
|
58191
|
+
onChange
|
58192
|
+
}) {
|
58193
|
+
const [value, setValue] = React3.useState(defaultProp);
|
58194
|
+
const prevValueRef = React3.useRef(value);
|
58195
|
+
const onChangeRef = React3.useRef(onChange);
|
58196
|
+
useInsertionEffect(() => {
|
58197
|
+
onChangeRef.current = onChange;
|
58198
|
+
}, [onChange]);
|
58199
|
+
React3.useEffect(() => {
|
58200
|
+
if (prevValueRef.current !== value) {
|
58201
|
+
onChangeRef.current?.(value);
|
58202
|
+
prevValueRef.current = value;
|
58203
|
+
}
|
58204
|
+
}, [value, prevValueRef]);
|
58205
|
+
return [value, setValue, onChangeRef];
|
58206
|
+
}
|
58207
|
+
function isFunction2(value) {
|
58208
|
+
return typeof value === "function";
|
58209
|
+
}
|
58210
|
+
var React22 = __toESM2(require_react());
|
58211
|
+
var import_react_use_effect_event = require_dist32();
|
58212
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
58213
|
+
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
58214
|
+
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
|
58215
|
+
const isControlled = controlledState !== void 0;
|
58216
|
+
const onChange = (0, import_react_use_effect_event.useEffectEvent)(onChangeProp);
|
58217
|
+
if (true) {
|
58218
|
+
const isControlledRef = React22.useRef(controlledState !== void 0);
|
58219
|
+
React22.useEffect(() => {
|
58220
|
+
const wasControlled = isControlledRef.current;
|
58221
|
+
if (wasControlled !== isControlled) {
|
58222
|
+
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
58223
|
+
const to2 = isControlled ? "controlled" : "uncontrolled";
|
58224
|
+
console.warn(
|
58225
|
+
`${caller} is changing from ${from2} to ${to2}. 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.`
|
58226
|
+
);
|
58227
|
+
}
|
58228
|
+
isControlledRef.current = isControlled;
|
58229
|
+
}, [isControlled, caller]);
|
58230
|
+
}
|
58231
|
+
const args = [{ ...initialArg, state: defaultProp }];
|
58232
|
+
if (init) {
|
58233
|
+
args.push(init);
|
58234
|
+
}
|
58235
|
+
const [internalState, dispatch] = React22.useReducer(
|
58236
|
+
(state2, action) => {
|
58237
|
+
if (action.type === SYNC_STATE) {
|
58238
|
+
return { ...state2, state: action.state };
|
58239
|
+
}
|
58240
|
+
const next = reducer(state2, action);
|
58241
|
+
if (isControlled && !Object.is(next.state, state2.state)) {
|
58242
|
+
onChange(next.state);
|
58243
|
+
}
|
58244
|
+
return next;
|
58245
|
+
},
|
58246
|
+
...args
|
58247
|
+
);
|
58248
|
+
const uncontrolledState = internalState.state;
|
58249
|
+
const prevValueRef = React22.useRef(uncontrolledState);
|
58250
|
+
React22.useEffect(() => {
|
58251
|
+
if (prevValueRef.current !== uncontrolledState) {
|
58252
|
+
prevValueRef.current = uncontrolledState;
|
58253
|
+
if (!isControlled) {
|
58254
|
+
onChange(uncontrolledState);
|
58255
|
+
}
|
58256
|
+
}
|
58257
|
+
}, [onChange, uncontrolledState, prevValueRef, isControlled]);
|
58258
|
+
const state = React22.useMemo(() => {
|
58259
|
+
const isControlled2 = controlledState !== void 0;
|
58260
|
+
if (isControlled2) {
|
58261
|
+
return { ...internalState, state: controlledState };
|
58262
|
+
}
|
58263
|
+
return internalState;
|
58264
|
+
}, [internalState, controlledState]);
|
58265
|
+
React22.useEffect(() => {
|
58266
|
+
if (isControlled && !Object.is(controlledState, internalState.state)) {
|
58267
|
+
dispatch({ type: SYNC_STATE, state: controlledState });
|
58268
|
+
}
|
58269
|
+
}, [controlledState, internalState.state, isControlled]);
|
58270
|
+
return [state, dispatch];
|
58271
|
+
}
|
58272
|
+
}
|
58273
|
+
});
|
58274
|
+
|
58275
|
+
// ../core/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.js
|
58276
|
+
var require_dist52 = __commonJS({
|
58277
|
+
"../core/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.js"(exports, module) {
|
58278
|
+
"use strict";
|
58279
|
+
var __create2 = Object.create;
|
58280
|
+
var __defProp2 = Object.defineProperty;
|
58281
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58282
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58283
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58284
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58285
|
+
var __export2 = (target, all) => {
|
58286
|
+
for (var name in all)
|
58287
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58288
|
+
};
|
58289
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58290
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58291
|
+
for (let key of __getOwnPropNames2(from2))
|
58292
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58293
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58294
|
+
}
|
58295
|
+
return to2;
|
58296
|
+
};
|
58297
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58298
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58299
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58300
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58301
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58302
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58303
|
+
mod
|
58304
|
+
));
|
58305
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58306
|
+
var index_exports = {};
|
58307
|
+
__export2(index_exports, {
|
58308
|
+
composeRefs: () => composeRefs,
|
58309
|
+
useComposedRefs: () => useComposedRefs
|
58310
|
+
});
|
58311
|
+
module.exports = __toCommonJS2(index_exports);
|
58312
|
+
var React3 = __toESM2(require_react());
|
58313
|
+
function setRef(ref, value) {
|
58314
|
+
if (typeof ref === "function") {
|
58315
|
+
return ref(value);
|
58316
|
+
} else if (ref !== null && ref !== void 0) {
|
58317
|
+
ref.current = value;
|
58318
|
+
}
|
58319
|
+
}
|
58320
|
+
function composeRefs(...refs) {
|
58321
|
+
return (node) => {
|
58322
|
+
let hasCleanup = false;
|
58323
|
+
const cleanups = refs.map((ref) => {
|
58324
|
+
const cleanup = setRef(ref, node);
|
58325
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
58326
|
+
hasCleanup = true;
|
58327
|
+
}
|
58328
|
+
return cleanup;
|
58329
|
+
});
|
58330
|
+
if (hasCleanup) {
|
58331
|
+
return () => {
|
58332
|
+
for (let i = 0; i < cleanups.length; i++) {
|
58333
|
+
const cleanup = cleanups[i];
|
58334
|
+
if (typeof cleanup == "function") {
|
58335
|
+
cleanup();
|
58336
|
+
} else {
|
58337
|
+
setRef(refs[i], null);
|
58338
|
+
}
|
58339
|
+
}
|
58340
|
+
};
|
58341
|
+
}
|
58342
|
+
};
|
58343
|
+
}
|
58344
|
+
function useComposedRefs(...refs) {
|
58345
|
+
return React3.useCallback(composeRefs(...refs), refs);
|
58346
|
+
}
|
58347
|
+
}
|
58348
|
+
});
|
58349
|
+
|
58350
|
+
// ../core/node_modules/@radix-ui/react-slot/dist/index.js
|
58351
|
+
var require_dist53 = __commonJS({
|
58352
|
+
"../core/node_modules/@radix-ui/react-slot/dist/index.js"(exports, module) {
|
58353
|
+
"use strict";
|
58354
|
+
"use client";
|
58355
|
+
var __create2 = Object.create;
|
58356
|
+
var __defProp2 = Object.defineProperty;
|
58357
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58358
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58359
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58360
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58361
|
+
var __export2 = (target, all) => {
|
58362
|
+
for (var name in all)
|
58363
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58364
|
+
};
|
58365
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58366
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58367
|
+
for (let key of __getOwnPropNames2(from2))
|
58368
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58369
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58370
|
+
}
|
58371
|
+
return to2;
|
58372
|
+
};
|
58373
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58374
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58375
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58376
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58377
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58378
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58379
|
+
mod
|
58380
|
+
));
|
58381
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58382
|
+
var index_exports = {};
|
58383
|
+
__export2(index_exports, {
|
58384
|
+
Root: () => Slot,
|
58385
|
+
Slot: () => Slot,
|
58386
|
+
Slottable: () => Slottable,
|
58387
|
+
createSlot: () => createSlot,
|
58388
|
+
createSlottable: () => createSlottable
|
58389
|
+
});
|
58390
|
+
module.exports = __toCommonJS2(index_exports);
|
58391
|
+
var React3 = __toESM2(require_react());
|
58392
|
+
var import_react_compose_refs = require_dist52();
|
58393
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
58394
|
+
// @__NO_SIDE_EFFECTS__
|
58395
|
+
function createSlot(ownerName) {
|
58396
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
58397
|
+
const Slot2 = React3.forwardRef((props, forwardedRef) => {
|
58398
|
+
const { children, ...slotProps } = props;
|
58399
|
+
const childrenArray = React3.Children.toArray(children);
|
58400
|
+
const slottable = childrenArray.find(isSlottable);
|
58401
|
+
if (slottable) {
|
58402
|
+
const newElement = slottable.props.children;
|
58403
|
+
const newChildren = childrenArray.map((child) => {
|
58404
|
+
if (child === slottable) {
|
58405
|
+
if (React3.Children.count(newElement) > 1)
|
58406
|
+
return React3.Children.only(null);
|
58407
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
58408
|
+
} else {
|
58409
|
+
return child;
|
58410
|
+
}
|
58411
|
+
});
|
58412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
58413
|
+
}
|
58414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
58415
|
+
});
|
58416
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
58417
|
+
return Slot2;
|
58418
|
+
}
|
58419
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
58420
|
+
// @__NO_SIDE_EFFECTS__
|
58421
|
+
function createSlotClone(ownerName) {
|
58422
|
+
const SlotClone = React3.forwardRef((props, forwardedRef) => {
|
58423
|
+
const { children, ...slotProps } = props;
|
58424
|
+
const childrenRef = React3.isValidElement(children) ? getElementRef(children) : void 0;
|
58425
|
+
const ref = (0, import_react_compose_refs.useComposedRefs)(childrenRef, forwardedRef);
|
58426
|
+
if (React3.isValidElement(children)) {
|
58427
|
+
const props2 = mergeProps(slotProps, children.props);
|
58428
|
+
if (children.type !== React3.Fragment) {
|
58429
|
+
props2.ref = ref;
|
58430
|
+
}
|
58431
|
+
return React3.cloneElement(children, props2);
|
58432
|
+
}
|
58433
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
58434
|
+
});
|
58435
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
58436
|
+
return SlotClone;
|
58437
|
+
}
|
58438
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
58439
|
+
// @__NO_SIDE_EFFECTS__
|
58440
|
+
function createSlottable(ownerName) {
|
58441
|
+
const Slottable2 = ({ children }) => {
|
58442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
|
58443
|
+
};
|
58444
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
58445
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
58446
|
+
return Slottable2;
|
58447
|
+
}
|
58448
|
+
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
58449
|
+
function isSlottable(child) {
|
58450
|
+
return React3.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
58451
|
+
}
|
58452
|
+
function mergeProps(slotProps, childProps) {
|
58453
|
+
const overrideProps = { ...childProps };
|
58454
|
+
for (const propName in childProps) {
|
58455
|
+
const slotPropValue = slotProps[propName];
|
58456
|
+
const childPropValue = childProps[propName];
|
58457
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
58458
|
+
if (isHandler) {
|
58459
|
+
if (slotPropValue && childPropValue) {
|
58460
|
+
overrideProps[propName] = (...args) => {
|
58461
|
+
const result2 = childPropValue(...args);
|
58462
|
+
slotPropValue(...args);
|
58463
|
+
return result2;
|
58464
|
+
};
|
58465
|
+
} else if (slotPropValue) {
|
58466
|
+
overrideProps[propName] = slotPropValue;
|
58467
|
+
}
|
58468
|
+
} else if (propName === "style") {
|
58469
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
58470
|
+
} else if (propName === "className") {
|
58471
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
58472
|
+
}
|
58473
|
+
}
|
58474
|
+
return { ...slotProps, ...overrideProps };
|
58475
|
+
}
|
58476
|
+
function getElementRef(element) {
|
58477
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
58478
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
58479
|
+
if (mayWarn) {
|
58480
|
+
return element.ref;
|
58481
|
+
}
|
58482
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
58483
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
58484
|
+
if (mayWarn) {
|
58485
|
+
return element.props.ref;
|
58486
|
+
}
|
58487
|
+
return element.props.ref || element.ref;
|
58488
|
+
}
|
58489
|
+
}
|
58490
|
+
});
|
58491
|
+
|
58492
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js
|
58493
|
+
var require_dist54 = __commonJS({
|
58494
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js"(exports, module) {
|
58495
|
+
"use strict";
|
58496
|
+
var __create2 = Object.create;
|
58497
|
+
var __defProp2 = Object.defineProperty;
|
58498
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58499
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58500
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58501
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58502
|
+
var __export2 = (target, all) => {
|
58503
|
+
for (var name in all)
|
58504
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58505
|
+
};
|
58506
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58507
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58508
|
+
for (let key of __getOwnPropNames2(from2))
|
58509
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58510
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58511
|
+
}
|
58512
|
+
return to2;
|
58513
|
+
};
|
58514
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58515
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58516
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58517
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58518
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58519
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58520
|
+
mod
|
58521
|
+
));
|
58522
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58523
|
+
var index_exports = {};
|
58524
|
+
__export2(index_exports, {
|
58525
|
+
Primitive: () => Primitive,
|
58526
|
+
Root: () => Root,
|
58527
|
+
dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
|
58528
|
+
});
|
58529
|
+
module.exports = __toCommonJS2(index_exports);
|
58530
|
+
var React3 = __toESM2(require_react());
|
58531
|
+
var ReactDOM2 = __toESM2(require_react_dom());
|
58532
|
+
var import_react_slot = require_dist53();
|
58533
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
58534
|
+
var NODES = [
|
58535
|
+
"a",
|
58536
|
+
"button",
|
58537
|
+
"div",
|
58538
|
+
"form",
|
58539
|
+
"h2",
|
58540
|
+
"h3",
|
58541
|
+
"img",
|
58542
|
+
"input",
|
58543
|
+
"label",
|
58544
|
+
"li",
|
58545
|
+
"nav",
|
58546
|
+
"ol",
|
58547
|
+
"p",
|
58548
|
+
"select",
|
58549
|
+
"span",
|
58550
|
+
"svg",
|
58551
|
+
"ul"
|
58552
|
+
];
|
58553
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
58554
|
+
const Slot = (0, import_react_slot.createSlot)(`Primitive.${node}`);
|
58555
|
+
const Node2 = React3.forwardRef((props, forwardedRef) => {
|
58556
|
+
const { asChild, ...primitiveProps } = props;
|
58557
|
+
const Comp = asChild ? Slot : node;
|
58558
|
+
if (typeof window !== "undefined") {
|
58559
|
+
window[Symbol.for("radix-ui")] = true;
|
58560
|
+
}
|
58561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
58562
|
+
});
|
58563
|
+
Node2.displayName = `Primitive.${node}`;
|
58564
|
+
return { ...primitive, [node]: Node2 };
|
58565
|
+
}, {});
|
58566
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
58567
|
+
if (target)
|
58568
|
+
ReactDOM2.flushSync(() => target.dispatchEvent(event));
|
58569
|
+
}
|
58570
|
+
var Root = Primitive;
|
58571
|
+
}
|
58572
|
+
});
|
58573
|
+
|
58574
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
58575
|
+
var require_dist55 = __commonJS({
|
58576
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.js"(exports, module) {
|
58577
|
+
"use strict";
|
58578
|
+
var __create2 = Object.create;
|
58579
|
+
var __defProp2 = Object.defineProperty;
|
58580
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58581
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58582
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58583
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58584
|
+
var __export2 = (target, all) => {
|
58585
|
+
for (var name in all)
|
58586
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58587
|
+
};
|
58588
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58589
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58590
|
+
for (let key of __getOwnPropNames2(from2))
|
58591
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58592
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58593
|
+
}
|
58594
|
+
return to2;
|
58595
|
+
};
|
58596
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58597
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58598
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58599
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58600
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58601
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58602
|
+
mod
|
58603
|
+
));
|
58604
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58605
|
+
var index_exports = {};
|
58606
|
+
__export2(index_exports, {
|
58607
|
+
useCallbackRef: () => useCallbackRef
|
58608
|
+
});
|
58609
|
+
module.exports = __toCommonJS2(index_exports);
|
58610
|
+
var React3 = __toESM2(require_react());
|
58611
|
+
function useCallbackRef(callback2) {
|
58612
|
+
const callbackRef = React3.useRef(callback2);
|
58613
|
+
React3.useEffect(() => {
|
58614
|
+
callbackRef.current = callback2;
|
58615
|
+
});
|
58616
|
+
return React3.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
58617
|
+
}
|
58618
|
+
}
|
58619
|
+
});
|
58620
|
+
|
58621
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js
|
58622
|
+
var require_dist56 = __commonJS({
|
58623
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js"(exports, module) {
|
58624
|
+
"use strict";
|
58625
|
+
var __create2 = Object.create;
|
58626
|
+
var __defProp2 = Object.defineProperty;
|
58627
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58628
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58629
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58630
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58631
|
+
var __export2 = (target, all) => {
|
58632
|
+
for (var name in all)
|
58633
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58634
|
+
};
|
58635
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58636
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58637
|
+
for (let key of __getOwnPropNames2(from2))
|
58638
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58639
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58640
|
+
}
|
58641
|
+
return to2;
|
58642
|
+
};
|
58643
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58644
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58645
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58646
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58647
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58648
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58649
|
+
mod
|
58650
|
+
));
|
58651
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58652
|
+
var index_exports = {};
|
58653
|
+
__export2(index_exports, {
|
58654
|
+
useEscapeKeydown: () => useEscapeKeydown
|
58655
|
+
});
|
58656
|
+
module.exports = __toCommonJS2(index_exports);
|
58657
|
+
var React3 = __toESM2(require_react());
|
58658
|
+
var import_react_use_callback_ref = require_dist55();
|
58659
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
58660
|
+
const onEscapeKeyDown = (0, import_react_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
|
58661
|
+
React3.useEffect(() => {
|
58662
|
+
const handleKeyDown = (event) => {
|
58663
|
+
if (event.key === "Escape") {
|
58664
|
+
onEscapeKeyDown(event);
|
58665
|
+
}
|
58666
|
+
};
|
58667
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
58668
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
58669
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
58670
|
+
}
|
58671
|
+
}
|
58672
|
+
});
|
58673
|
+
|
58674
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js
|
58675
|
+
var require_dist57 = __commonJS({
|
58676
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js"(exports, module) {
|
58677
|
+
"use strict";
|
58678
|
+
"use client";
|
58679
|
+
var __create2 = Object.create;
|
58680
|
+
var __defProp2 = Object.defineProperty;
|
58681
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58682
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58683
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58684
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58685
|
+
var __export2 = (target, all) => {
|
58686
|
+
for (var name in all)
|
58687
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58688
|
+
};
|
58689
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58690
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58691
|
+
for (let key of __getOwnPropNames2(from2))
|
58692
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58693
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58694
|
+
}
|
58695
|
+
return to2;
|
58696
|
+
};
|
58697
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58698
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58699
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58700
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58701
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58702
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58703
|
+
mod
|
58704
|
+
));
|
58705
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58706
|
+
var index_exports = {};
|
58707
|
+
__export2(index_exports, {
|
58708
|
+
Branch: () => Branch,
|
58709
|
+
DismissableLayer: () => DismissableLayer,
|
58710
|
+
DismissableLayerBranch: () => DismissableLayerBranch,
|
58711
|
+
Root: () => Root
|
58712
|
+
});
|
58713
|
+
module.exports = __toCommonJS2(index_exports);
|
58714
|
+
var React3 = __toESM2(require_react());
|
58715
|
+
var import_primitive = require_dist45();
|
58716
|
+
var import_react_primitive = require_dist54();
|
58717
|
+
var import_react_compose_refs = require_dist46();
|
58718
|
+
var import_react_use_callback_ref = require_dist55();
|
58719
|
+
var import_react_use_escape_keydown = require_dist56();
|
58720
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
58721
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
58722
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
58723
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
58724
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
58725
|
+
var originalBodyPointerEvents;
|
58726
|
+
var DismissableLayerContext = React3.createContext({
|
58727
|
+
layers: /* @__PURE__ */ new Set(),
|
58728
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
58729
|
+
branches: /* @__PURE__ */ new Set()
|
58730
|
+
});
|
58731
|
+
var DismissableLayer = React3.forwardRef(
|
58732
|
+
(props, forwardedRef) => {
|
58733
|
+
const {
|
58734
|
+
disableOutsidePointerEvents = false,
|
58735
|
+
onEscapeKeyDown,
|
58736
|
+
onPointerDownOutside,
|
58737
|
+
onFocusOutside,
|
58738
|
+
onInteractOutside,
|
58739
|
+
onDismiss,
|
58740
|
+
...layerProps
|
58741
|
+
} = props;
|
58742
|
+
const context = React3.useContext(DismissableLayerContext);
|
58743
|
+
const [node, setNode] = React3.useState(null);
|
58744
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
58745
|
+
const [, force] = React3.useState({});
|
58746
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node2) => setNode(node2));
|
58747
|
+
const layers = Array.from(context.layers);
|
58748
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
58749
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
58750
|
+
const index3 = node ? layers.indexOf(node) : -1;
|
58751
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
58752
|
+
const isPointerEventsEnabled = index3 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
58753
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
58754
|
+
const target = event.target;
|
58755
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
58756
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch)
|
58757
|
+
return;
|
58758
|
+
onPointerDownOutside?.(event);
|
58759
|
+
onInteractOutside?.(event);
|
58760
|
+
if (!event.defaultPrevented)
|
58761
|
+
onDismiss?.();
|
58762
|
+
}, ownerDocument);
|
58763
|
+
const focusOutside = useFocusOutside((event) => {
|
58764
|
+
const target = event.target;
|
58765
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
58766
|
+
if (isFocusInBranch)
|
58767
|
+
return;
|
58768
|
+
onFocusOutside?.(event);
|
58769
|
+
onInteractOutside?.(event);
|
58770
|
+
if (!event.defaultPrevented)
|
58771
|
+
onDismiss?.();
|
58772
|
+
}, ownerDocument);
|
58773
|
+
(0, import_react_use_escape_keydown.useEscapeKeydown)((event) => {
|
58774
|
+
const isHighestLayer = index3 === context.layers.size - 1;
|
58775
|
+
if (!isHighestLayer)
|
58776
|
+
return;
|
58777
|
+
onEscapeKeyDown?.(event);
|
58778
|
+
if (!event.defaultPrevented && onDismiss) {
|
58779
|
+
event.preventDefault();
|
58780
|
+
onDismiss();
|
58781
|
+
}
|
58782
|
+
}, ownerDocument);
|
58783
|
+
React3.useEffect(() => {
|
58784
|
+
if (!node)
|
58785
|
+
return;
|
58786
|
+
if (disableOutsidePointerEvents) {
|
58787
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
58788
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
58789
|
+
ownerDocument.body.style.pointerEvents = "none";
|
58790
|
+
}
|
58791
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
58792
|
+
}
|
58793
|
+
context.layers.add(node);
|
58794
|
+
dispatchUpdate();
|
58795
|
+
return () => {
|
58796
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
58797
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
58798
|
+
}
|
58799
|
+
};
|
58800
|
+
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
58801
|
+
React3.useEffect(() => {
|
58802
|
+
return () => {
|
58803
|
+
if (!node)
|
58804
|
+
return;
|
58805
|
+
context.layers.delete(node);
|
58806
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
58807
|
+
dispatchUpdate();
|
58808
|
+
};
|
58809
|
+
}, [node, context]);
|
58810
|
+
React3.useEffect(() => {
|
58811
|
+
const handleUpdate = () => force({});
|
58812
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
58813
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
58814
|
+
}, []);
|
58815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
58816
|
+
import_react_primitive.Primitive.div,
|
58817
|
+
{
|
58818
|
+
...layerProps,
|
58819
|
+
ref: composedRefs,
|
58820
|
+
style: {
|
58821
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
58822
|
+
...props.style
|
58823
|
+
},
|
58824
|
+
onFocusCapture: (0, import_primitive.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),
|
58825
|
+
onBlurCapture: (0, import_primitive.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),
|
58826
|
+
onPointerDownCapture: (0, import_primitive.composeEventHandlers)(
|
58827
|
+
props.onPointerDownCapture,
|
58828
|
+
pointerDownOutside.onPointerDownCapture
|
58829
|
+
)
|
58830
|
+
}
|
58831
|
+
);
|
58832
|
+
}
|
58833
|
+
);
|
58834
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
58835
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
58836
|
+
var DismissableLayerBranch = React3.forwardRef((props, forwardedRef) => {
|
58837
|
+
const context = React3.useContext(DismissableLayerContext);
|
58838
|
+
const ref = React3.useRef(null);
|
58839
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
|
58840
|
+
React3.useEffect(() => {
|
58841
|
+
const node = ref.current;
|
58842
|
+
if (node) {
|
58843
|
+
context.branches.add(node);
|
58844
|
+
return () => {
|
58845
|
+
context.branches.delete(node);
|
58846
|
+
};
|
58847
|
+
}
|
58848
|
+
}, [context.branches]);
|
58849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
|
58850
|
+
});
|
58851
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
58852
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
58853
|
+
const handlePointerDownOutside = (0, import_react_use_callback_ref.useCallbackRef)(onPointerDownOutside);
|
58854
|
+
const isPointerInsideReactTreeRef = React3.useRef(false);
|
58855
|
+
const handleClickRef = React3.useRef(() => {
|
58856
|
+
});
|
58857
|
+
React3.useEffect(() => {
|
58858
|
+
const handlePointerDown = (event) => {
|
58859
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
58860
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
58861
|
+
handleAndDispatchCustomEvent(
|
58862
|
+
POINTER_DOWN_OUTSIDE,
|
58863
|
+
handlePointerDownOutside,
|
58864
|
+
eventDetail,
|
58865
|
+
{ discrete: true }
|
58866
|
+
);
|
58867
|
+
};
|
58868
|
+
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
58869
|
+
const eventDetail = { originalEvent: event };
|
58870
|
+
if (event.pointerType === "touch") {
|
58871
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58872
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
58873
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
58874
|
+
} else {
|
58875
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
58876
|
+
}
|
58877
|
+
} else {
|
58878
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58879
|
+
}
|
58880
|
+
isPointerInsideReactTreeRef.current = false;
|
58881
|
+
};
|
58882
|
+
const timerId = window.setTimeout(() => {
|
58883
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
58884
|
+
}, 0);
|
58885
|
+
return () => {
|
58886
|
+
window.clearTimeout(timerId);
|
58887
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
58888
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58889
|
+
};
|
58890
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
58891
|
+
return {
|
58892
|
+
// ensures we check React component tree (not just DOM tree)
|
58893
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
58894
|
+
};
|
58895
|
+
}
|
58896
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
58897
|
+
const handleFocusOutside = (0, import_react_use_callback_ref.useCallbackRef)(onFocusOutside);
|
58898
|
+
const isFocusInsideReactTreeRef = React3.useRef(false);
|
58899
|
+
React3.useEffect(() => {
|
58900
|
+
const handleFocus = (event) => {
|
58901
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
58902
|
+
const eventDetail = { originalEvent: event };
|
58903
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
58904
|
+
discrete: false
|
58905
|
+
});
|
58906
|
+
}
|
58907
|
+
};
|
58908
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
58909
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
58910
|
+
}, [ownerDocument, handleFocusOutside]);
|
58911
|
+
return {
|
58912
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
58913
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
58914
|
+
};
|
58915
|
+
}
|
58916
|
+
function dispatchUpdate() {
|
58917
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
58918
|
+
document.dispatchEvent(event);
|
58919
|
+
}
|
58920
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
58921
|
+
const target = detail.originalEvent.target;
|
58922
|
+
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
58923
|
+
if (handler)
|
58924
|
+
target.addEventListener(name, handler, { once: true });
|
58925
|
+
if (discrete) {
|
58926
|
+
(0, import_react_primitive.dispatchDiscreteCustomEvent)(target, event);
|
58927
|
+
} else {
|
58928
|
+
target.dispatchEvent(event);
|
58929
|
+
}
|
58930
|
+
}
|
58931
|
+
var Root = DismissableLayer;
|
58932
|
+
var Branch = DismissableLayerBranch;
|
58933
|
+
}
|
58934
|
+
});
|
58935
|
+
|
58936
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
58937
|
+
var require_dist58 = __commonJS({
|
58938
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.js"(exports, module) {
|
58939
|
+
"use strict";
|
58940
|
+
var __create2 = Object.create;
|
58941
|
+
var __defProp2 = Object.defineProperty;
|
58942
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58943
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58944
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58945
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58946
|
+
var __export2 = (target, all) => {
|
58947
|
+
for (var name in all)
|
58948
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58949
|
+
};
|
58950
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58951
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58952
|
+
for (let key of __getOwnPropNames2(from2))
|
58953
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58954
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58955
|
+
}
|
58956
|
+
return to2;
|
58957
|
+
};
|
58958
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58959
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58960
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58961
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58962
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58963
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58964
|
+
mod
|
58965
|
+
));
|
58966
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58967
|
+
var index_exports = {};
|
58968
|
+
__export2(index_exports, {
|
58969
|
+
useCallbackRef: () => useCallbackRef
|
58970
|
+
});
|
58971
|
+
module.exports = __toCommonJS2(index_exports);
|
58972
|
+
var React3 = __toESM2(require_react());
|
58973
|
+
function useCallbackRef(callback2) {
|
58974
|
+
const callbackRef = React3.useRef(callback2);
|
58975
|
+
React3.useEffect(() => {
|
58976
|
+
callbackRef.current = callback2;
|
58977
|
+
});
|
58978
|
+
return React3.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
58979
|
+
}
|
58980
|
+
}
|
58981
|
+
});
|
58982
|
+
|
58983
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js
|
58984
|
+
var require_dist59 = __commonJS({
|
58985
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js"(exports, module) {
|
58986
|
+
"use strict";
|
58987
|
+
"use client";
|
58988
|
+
var __create2 = Object.create;
|
58989
|
+
var __defProp2 = Object.defineProperty;
|
58990
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58991
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58992
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58993
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58994
|
+
var __export2 = (target, all) => {
|
58995
|
+
for (var name in all)
|
58996
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58997
|
+
};
|
58998
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58999
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59000
|
+
for (let key of __getOwnPropNames2(from2))
|
59001
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59002
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59003
|
+
}
|
59004
|
+
return to2;
|
59005
|
+
};
|
59006
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59007
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59008
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59009
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59010
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59011
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59012
|
+
mod
|
59013
|
+
));
|
59014
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59015
|
+
var index_exports = {};
|
59016
|
+
__export2(index_exports, {
|
59017
|
+
FocusScope: () => FocusScope,
|
59018
|
+
Root: () => Root
|
59019
|
+
});
|
59020
|
+
module.exports = __toCommonJS2(index_exports);
|
59021
|
+
var React3 = __toESM2(require_react());
|
59022
|
+
var import_react_compose_refs = require_dist46();
|
59023
|
+
var import_react_primitive = require_dist54();
|
59024
|
+
var import_react_use_callback_ref = require_dist58();
|
59025
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
59026
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
59027
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
59028
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
59029
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
59030
|
+
var FocusScope = React3.forwardRef((props, forwardedRef) => {
|
59031
|
+
const {
|
59032
|
+
loop = false,
|
59033
|
+
trapped = false,
|
59034
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
59035
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
59036
|
+
...scopeProps
|
59037
|
+
} = props;
|
59038
|
+
const [container, setContainer] = React3.useState(null);
|
59039
|
+
const onMountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onMountAutoFocusProp);
|
59040
|
+
const onUnmountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onUnmountAutoFocusProp);
|
59041
|
+
const lastFocusedElementRef = React3.useRef(null);
|
59042
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContainer(node));
|
59043
|
+
const focusScope = React3.useRef({
|
59044
|
+
paused: false,
|
59045
|
+
pause() {
|
59046
|
+
this.paused = true;
|
59047
|
+
},
|
59048
|
+
resume() {
|
59049
|
+
this.paused = false;
|
59050
|
+
}
|
59051
|
+
}).current;
|
59052
|
+
React3.useEffect(() => {
|
59053
|
+
if (trapped) {
|
59054
|
+
let handleFocusIn2 = function(event) {
|
59055
|
+
if (focusScope.paused || !container)
|
59056
|
+
return;
|
59057
|
+
const target = event.target;
|
59058
|
+
if (container.contains(target)) {
|
59059
|
+
lastFocusedElementRef.current = target;
|
59060
|
+
} else {
|
59061
|
+
focus(lastFocusedElementRef.current, { select: true });
|
59062
|
+
}
|
59063
|
+
}, handleFocusOut2 = function(event) {
|
59064
|
+
if (focusScope.paused || !container)
|
59065
|
+
return;
|
59066
|
+
const relatedTarget = event.relatedTarget;
|
59067
|
+
if (relatedTarget === null)
|
59068
|
+
return;
|
59069
|
+
if (!container.contains(relatedTarget)) {
|
59070
|
+
focus(lastFocusedElementRef.current, { select: true });
|
59071
|
+
}
|
59072
|
+
}, handleMutations2 = function(mutations) {
|
59073
|
+
const focusedElement = document.activeElement;
|
59074
|
+
if (focusedElement !== document.body)
|
59075
|
+
return;
|
59076
|
+
for (const mutation of mutations) {
|
59077
|
+
if (mutation.removedNodes.length > 0)
|
59078
|
+
focus(container);
|
59079
|
+
}
|
59080
|
+
};
|
59081
|
+
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
59082
|
+
document.addEventListener("focusin", handleFocusIn2);
|
59083
|
+
document.addEventListener("focusout", handleFocusOut2);
|
59084
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
59085
|
+
if (container)
|
59086
|
+
mutationObserver.observe(container, { childList: true, subtree: true });
|
59087
|
+
return () => {
|
59088
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
59089
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
59090
|
+
mutationObserver.disconnect();
|
59091
|
+
};
|
59092
|
+
}
|
59093
|
+
}, [trapped, container, focusScope.paused]);
|
59094
|
+
React3.useEffect(() => {
|
59095
|
+
if (container) {
|
59096
|
+
focusScopesStack.add(focusScope);
|
59097
|
+
const previouslyFocusedElement = document.activeElement;
|
59098
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
59099
|
+
if (!hasFocusedCandidate) {
|
59100
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
59101
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
59102
|
+
container.dispatchEvent(mountEvent);
|
59103
|
+
if (!mountEvent.defaultPrevented) {
|
59104
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
59105
|
+
if (document.activeElement === previouslyFocusedElement) {
|
59106
|
+
focus(container);
|
59107
|
+
}
|
59108
|
+
}
|
59109
|
+
}
|
59110
|
+
return () => {
|
59111
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
59112
|
+
setTimeout(() => {
|
59113
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
59114
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
59115
|
+
container.dispatchEvent(unmountEvent);
|
59116
|
+
if (!unmountEvent.defaultPrevented) {
|
59117
|
+
focus(previouslyFocusedElement ?? document.body, { select: true });
|
59118
|
+
}
|
59119
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
59120
|
+
focusScopesStack.remove(focusScope);
|
59121
|
+
}, 0);
|
59122
|
+
};
|
59123
|
+
}
|
59124
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
59125
|
+
const handleKeyDown = React3.useCallback(
|
59126
|
+
(event) => {
|
59127
|
+
if (!loop && !trapped)
|
59128
|
+
return;
|
59129
|
+
if (focusScope.paused)
|
59130
|
+
return;
|
59131
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
59132
|
+
const focusedElement = document.activeElement;
|
59133
|
+
if (isTabKey && focusedElement) {
|
59134
|
+
const container2 = event.currentTarget;
|
59135
|
+
const [first, last] = getTabbableEdges(container2);
|
59136
|
+
const hasTabbableElementsInside = first && last;
|
59137
|
+
if (!hasTabbableElementsInside) {
|
59138
|
+
if (focusedElement === container2)
|
59139
|
+
event.preventDefault();
|
59140
|
+
} else {
|
59141
|
+
if (!event.shiftKey && focusedElement === last) {
|
59142
|
+
event.preventDefault();
|
59143
|
+
if (loop)
|
59144
|
+
focus(first, { select: true });
|
59145
|
+
} else if (event.shiftKey && focusedElement === first) {
|
59146
|
+
event.preventDefault();
|
59147
|
+
if (loop)
|
59148
|
+
focus(last, { select: true });
|
59149
|
+
}
|
59150
|
+
}
|
59151
|
+
}
|
59152
|
+
},
|
59153
|
+
[loop, trapped, focusScope.paused]
|
59154
|
+
);
|
59155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
59156
|
+
});
|
59157
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
59158
|
+
function focusFirst(candidates, { select = false } = {}) {
|
59159
|
+
const previouslyFocusedElement = document.activeElement;
|
59160
|
+
for (const candidate of candidates) {
|
59161
|
+
focus(candidate, { select });
|
59162
|
+
if (document.activeElement !== previouslyFocusedElement)
|
59163
|
+
return;
|
59164
|
+
}
|
59165
|
+
}
|
59166
|
+
function getTabbableEdges(container) {
|
59167
|
+
const candidates = getTabbableCandidates(container);
|
59168
|
+
const first = findVisible(candidates, container);
|
59169
|
+
const last = findVisible(candidates.reverse(), container);
|
59170
|
+
return [first, last];
|
59171
|
+
}
|
59172
|
+
function getTabbableCandidates(container) {
|
59173
|
+
const nodes = [];
|
59174
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
59175
|
+
acceptNode: (node) => {
|
59176
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
59177
|
+
if (node.disabled || node.hidden || isHiddenInput)
|
59178
|
+
return NodeFilter.FILTER_SKIP;
|
59179
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
59180
|
+
}
|
59181
|
+
});
|
59182
|
+
while (walker.nextNode())
|
59183
|
+
nodes.push(walker.currentNode);
|
59184
|
+
return nodes;
|
59185
|
+
}
|
59186
|
+
function findVisible(elements2, container) {
|
59187
|
+
for (const element of elements2) {
|
59188
|
+
if (!isHidden(element, { upTo: container }))
|
59189
|
+
return element;
|
59190
|
+
}
|
59191
|
+
}
|
59192
|
+
function isHidden(node, { upTo }) {
|
59193
|
+
if (getComputedStyle(node).visibility === "hidden")
|
59194
|
+
return true;
|
59195
|
+
while (node) {
|
59196
|
+
if (upTo !== void 0 && node === upTo)
|
59197
|
+
return false;
|
59198
|
+
if (getComputedStyle(node).display === "none")
|
59199
|
+
return true;
|
59200
|
+
node = node.parentElement;
|
59201
|
+
}
|
59202
|
+
return false;
|
59203
|
+
}
|
59204
|
+
function isSelectableInput(element) {
|
59205
|
+
return element instanceof HTMLInputElement && "select" in element;
|
59206
|
+
}
|
59207
|
+
function focus(element, { select = false } = {}) {
|
59208
|
+
if (element && element.focus) {
|
59209
|
+
const previouslyFocusedElement = document.activeElement;
|
59210
|
+
element.focus({ preventScroll: true });
|
59211
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
59212
|
+
element.select();
|
59213
|
+
}
|
59214
|
+
}
|
59215
|
+
var focusScopesStack = createFocusScopesStack();
|
59216
|
+
function createFocusScopesStack() {
|
59217
|
+
let stack = [];
|
59218
|
+
return {
|
59219
|
+
add(focusScope) {
|
59220
|
+
const activeFocusScope = stack[0];
|
59221
|
+
if (focusScope !== activeFocusScope) {
|
59222
|
+
activeFocusScope?.pause();
|
59223
|
+
}
|
59224
|
+
stack = arrayRemove(stack, focusScope);
|
59225
|
+
stack.unshift(focusScope);
|
59226
|
+
},
|
59227
|
+
remove(focusScope) {
|
59228
|
+
stack = arrayRemove(stack, focusScope);
|
59229
|
+
stack[0]?.resume();
|
59230
|
+
}
|
59231
|
+
};
|
59232
|
+
}
|
59233
|
+
function arrayRemove(array, item) {
|
59234
|
+
const updatedArray = [...array];
|
59235
|
+
const index3 = updatedArray.indexOf(item);
|
59236
|
+
if (index3 !== -1) {
|
59237
|
+
updatedArray.splice(index3, 1);
|
59238
|
+
}
|
59239
|
+
return updatedArray;
|
59240
|
+
}
|
59241
|
+
function removeLinks(items) {
|
59242
|
+
return items.filter((item) => item.tagName !== "A");
|
59243
|
+
}
|
59244
|
+
var Root = FocusScope;
|
59245
|
+
}
|
59246
|
+
});
|
59247
|
+
|
59248
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
59249
|
+
var require_dist60 = __commonJS({
|
59250
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
59251
|
+
"use strict";
|
59252
|
+
var __create2 = Object.create;
|
59253
|
+
var __defProp2 = Object.defineProperty;
|
59254
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59255
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59256
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59257
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59258
|
+
var __export2 = (target, all) => {
|
59259
|
+
for (var name in all)
|
59260
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59261
|
+
};
|
59262
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59263
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59264
|
+
for (let key of __getOwnPropNames2(from2))
|
59265
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59266
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59267
|
+
}
|
59268
|
+
return to2;
|
59269
|
+
};
|
59270
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59271
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59272
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59273
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59274
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59275
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59276
|
+
mod
|
59277
|
+
));
|
59278
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59279
|
+
var index_exports = {};
|
59280
|
+
__export2(index_exports, {
|
59281
|
+
useLayoutEffect: () => useLayoutEffect2
|
59282
|
+
});
|
59283
|
+
module.exports = __toCommonJS2(index_exports);
|
59284
|
+
var React3 = __toESM2(require_react());
|
59285
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
59286
|
+
};
|
59287
|
+
}
|
59288
|
+
});
|
59289
|
+
|
59290
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js
|
59291
|
+
var require_dist61 = __commonJS({
|
59292
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js"(exports, module) {
|
59293
|
+
"use strict";
|
59294
|
+
"use client";
|
59295
|
+
var __create2 = Object.create;
|
59296
|
+
var __defProp2 = Object.defineProperty;
|
59297
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59298
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59299
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59300
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59301
|
+
var __export2 = (target, all) => {
|
59302
|
+
for (var name in all)
|
59303
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59304
|
+
};
|
59305
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59306
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59307
|
+
for (let key of __getOwnPropNames2(from2))
|
59308
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59309
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59310
|
+
}
|
59311
|
+
return to2;
|
59312
|
+
};
|
59313
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59314
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59315
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59316
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59317
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59318
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59319
|
+
mod
|
59320
|
+
));
|
59321
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59322
|
+
var index_exports = {};
|
59323
|
+
__export2(index_exports, {
|
59324
|
+
Portal: () => Portal,
|
59325
|
+
Root: () => Root
|
59326
|
+
});
|
59327
|
+
module.exports = __toCommonJS2(index_exports);
|
59328
|
+
var React3 = __toESM2(require_react());
|
59329
|
+
var import_react_dom = __toESM2(require_react_dom());
|
59330
|
+
var import_react_primitive = require_dist54();
|
59331
|
+
var import_react_use_layout_effect = require_dist60();
|
59332
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
59333
|
+
var PORTAL_NAME = "Portal";
|
59334
|
+
var Portal = React3.forwardRef((props, forwardedRef) => {
|
59335
|
+
const { container: containerProp, ...portalProps } = props;
|
59336
|
+
const [mounted, setMounted] = React3.useState(false);
|
59337
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
59338
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
59339
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
59340
|
+
});
|
59341
|
+
Portal.displayName = PORTAL_NAME;
|
59342
|
+
var Root = Portal;
|
59343
|
+
}
|
59344
|
+
});
|
59345
|
+
|
59346
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
59347
|
+
var require_dist62 = __commonJS({
|
59348
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
59349
|
+
"use strict";
|
59350
|
+
var __create2 = Object.create;
|
59351
|
+
var __defProp2 = Object.defineProperty;
|
59352
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59353
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59354
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59355
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59356
|
+
var __export2 = (target, all) => {
|
59357
|
+
for (var name in all)
|
59358
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59359
|
+
};
|
59360
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59361
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59362
|
+
for (let key of __getOwnPropNames2(from2))
|
59363
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59364
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59365
|
+
}
|
59366
|
+
return to2;
|
59367
|
+
};
|
59368
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59369
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59370
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59371
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59372
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59373
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59374
|
+
mod
|
59375
|
+
));
|
59376
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59377
|
+
var index_exports = {};
|
59378
|
+
__export2(index_exports, {
|
59379
|
+
useLayoutEffect: () => useLayoutEffect2
|
59380
|
+
});
|
59381
|
+
module.exports = __toCommonJS2(index_exports);
|
59382
|
+
var React3 = __toESM2(require_react());
|
59383
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
59384
|
+
};
|
59385
|
+
}
|
59386
|
+
});
|
59387
|
+
|
59388
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js
|
59389
|
+
var require_dist63 = __commonJS({
|
59390
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js"(exports, module) {
|
59391
|
+
"use strict";
|
59392
|
+
"use client";
|
59393
|
+
var __create2 = Object.create;
|
59394
|
+
var __defProp2 = Object.defineProperty;
|
59395
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59396
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59397
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59398
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59399
|
+
var __export2 = (target, all) => {
|
59400
|
+
for (var name in all)
|
59401
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59402
|
+
};
|
59403
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59404
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59405
|
+
for (let key of __getOwnPropNames2(from2))
|
59406
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59407
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59408
|
+
}
|
59409
|
+
return to2;
|
59410
|
+
};
|
59411
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59412
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59413
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59414
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59415
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59416
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59417
|
+
mod
|
59418
|
+
));
|
59419
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59420
|
+
var index_exports = {};
|
59421
|
+
__export2(index_exports, {
|
59422
|
+
Presence: () => Presence,
|
59423
|
+
Root: () => Root
|
59424
|
+
});
|
59425
|
+
module.exports = __toCommonJS2(index_exports);
|
59426
|
+
var React22 = __toESM2(require_react());
|
59427
|
+
var import_react_compose_refs = require_dist46();
|
59428
|
+
var import_react_use_layout_effect = require_dist62();
|
59429
|
+
var React3 = __toESM2(require_react());
|
59430
|
+
function useStateMachine(initialState, machine) {
|
59431
|
+
return React3.useReducer((state, event) => {
|
59432
|
+
const nextState = machine[state][event];
|
59433
|
+
return nextState ?? state;
|
59434
|
+
}, initialState);
|
59435
|
+
}
|
59436
|
+
var Presence = (props) => {
|
59437
|
+
const { present, children } = props;
|
59438
|
+
const presence = usePresence(present);
|
59439
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
|
59440
|
+
const ref = (0, import_react_compose_refs.useComposedRefs)(presence.ref, getElementRef(child));
|
59441
|
+
const forceMount = typeof children === "function";
|
59442
|
+
return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
|
59443
|
+
};
|
59444
|
+
Presence.displayName = "Presence";
|
59445
|
+
function usePresence(present) {
|
59446
|
+
const [node, setNode] = React22.useState();
|
59447
|
+
const stylesRef = React22.useRef(null);
|
59448
|
+
const prevPresentRef = React22.useRef(present);
|
59449
|
+
const prevAnimationNameRef = React22.useRef("none");
|
59450
|
+
const initialState = present ? "mounted" : "unmounted";
|
59451
|
+
const [state, send] = useStateMachine(initialState, {
|
59452
|
+
mounted: {
|
59453
|
+
UNMOUNT: "unmounted",
|
59454
|
+
ANIMATION_OUT: "unmountSuspended"
|
59455
|
+
},
|
59456
|
+
unmountSuspended: {
|
59457
|
+
MOUNT: "mounted",
|
59458
|
+
ANIMATION_END: "unmounted"
|
59459
|
+
},
|
59460
|
+
unmounted: {
|
59461
|
+
MOUNT: "mounted"
|
59462
|
+
}
|
59463
|
+
});
|
59464
|
+
React22.useEffect(() => {
|
59465
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
59466
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
59467
|
+
}, [state]);
|
59468
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
59469
|
+
const styles = stylesRef.current;
|
59470
|
+
const wasPresent = prevPresentRef.current;
|
59471
|
+
const hasPresentChanged = wasPresent !== present;
|
59472
|
+
if (hasPresentChanged) {
|
59473
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
59474
|
+
const currentAnimationName = getAnimationName(styles);
|
59475
|
+
if (present) {
|
59476
|
+
send("MOUNT");
|
59477
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
59478
|
+
send("UNMOUNT");
|
59479
|
+
} else {
|
59480
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
59481
|
+
if (wasPresent && isAnimating) {
|
59482
|
+
send("ANIMATION_OUT");
|
59483
|
+
} else {
|
59484
|
+
send("UNMOUNT");
|
59485
|
+
}
|
59486
|
+
}
|
59487
|
+
prevPresentRef.current = present;
|
59488
|
+
}
|
59489
|
+
}, [present, send]);
|
59490
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
59491
|
+
if (node) {
|
59492
|
+
let timeoutId;
|
59493
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
59494
|
+
const handleAnimationEnd = (event) => {
|
59495
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
59496
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
59497
|
+
if (event.target === node && isCurrentAnimation) {
|
59498
|
+
send("ANIMATION_END");
|
59499
|
+
if (!prevPresentRef.current) {
|
59500
|
+
const currentFillMode = node.style.animationFillMode;
|
59501
|
+
node.style.animationFillMode = "forwards";
|
59502
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
59503
|
+
if (node.style.animationFillMode === "forwards") {
|
59504
|
+
node.style.animationFillMode = currentFillMode;
|
59505
|
+
}
|
59506
|
+
});
|
59507
|
+
}
|
59508
|
+
}
|
59509
|
+
};
|
59510
|
+
const handleAnimationStart = (event) => {
|
59511
|
+
if (event.target === node) {
|
59512
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
59513
|
+
}
|
59514
|
+
};
|
59515
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
59516
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
59517
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
59518
|
+
return () => {
|
59519
|
+
ownerWindow.clearTimeout(timeoutId);
|
59520
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
59521
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
59522
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
59523
|
+
};
|
59524
|
+
} else {
|
59525
|
+
send("ANIMATION_END");
|
59526
|
+
}
|
59527
|
+
}, [node, send]);
|
59528
|
+
return {
|
59529
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
59530
|
+
ref: React22.useCallback((node2) => {
|
59531
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
59532
|
+
setNode(node2);
|
59533
|
+
}, [])
|
59534
|
+
};
|
59535
|
+
}
|
59536
|
+
function getAnimationName(styles) {
|
59537
|
+
return styles?.animationName || "none";
|
59538
|
+
}
|
59539
|
+
function getElementRef(element) {
|
59540
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
59541
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
59542
|
+
if (mayWarn) {
|
59543
|
+
return element.ref;
|
59544
|
+
}
|
59545
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
59546
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
59547
|
+
if (mayWarn) {
|
59548
|
+
return element.props.ref;
|
59549
|
+
}
|
59550
|
+
return element.props.ref || element.ref;
|
59551
|
+
}
|
59552
|
+
var Root = Presence;
|
59553
|
+
}
|
59554
|
+
});
|
59555
|
+
|
59556
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js
|
59557
|
+
var require_dist64 = __commonJS({
|
59558
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js"(exports, module) {
|
59559
|
+
"use strict";
|
59560
|
+
"use client";
|
59561
|
+
var __create2 = Object.create;
|
59562
|
+
var __defProp2 = Object.defineProperty;
|
59563
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59564
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59565
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59566
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59567
|
+
var __export2 = (target, all) => {
|
59568
|
+
for (var name in all)
|
59569
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59570
|
+
};
|
59571
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59572
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59573
|
+
for (let key of __getOwnPropNames2(from2))
|
59574
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59575
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59576
|
+
}
|
59577
|
+
return to2;
|
59578
|
+
};
|
59579
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59580
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59581
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59582
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59583
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59584
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59585
|
+
mod
|
59586
|
+
));
|
59587
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59588
|
+
var index_exports = {};
|
59589
|
+
__export2(index_exports, {
|
59590
|
+
FocusGuards: () => FocusGuards,
|
59591
|
+
Root: () => Root,
|
59592
|
+
useFocusGuards: () => useFocusGuards
|
59593
|
+
});
|
59594
|
+
module.exports = __toCommonJS2(index_exports);
|
59595
|
+
var React3 = __toESM2(require_react());
|
59596
|
+
var count = 0;
|
59597
|
+
function FocusGuards(props) {
|
59598
|
+
useFocusGuards();
|
59599
|
+
return props.children;
|
59600
|
+
}
|
59601
|
+
function useFocusGuards() {
|
59602
|
+
React3.useEffect(() => {
|
59603
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
59604
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
59605
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
59606
|
+
count++;
|
59607
|
+
return () => {
|
59608
|
+
if (count === 1) {
|
59609
|
+
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
59610
|
+
}
|
59611
|
+
count--;
|
59612
|
+
};
|
59613
|
+
}, []);
|
59614
|
+
}
|
59615
|
+
function createFocusGuard() {
|
59616
|
+
const element = document.createElement("span");
|
59617
|
+
element.setAttribute("data-radix-focus-guard", "");
|
59618
|
+
element.tabIndex = 0;
|
59619
|
+
element.style.outline = "none";
|
59620
|
+
element.style.opacity = "0";
|
59621
|
+
element.style.position = "fixed";
|
59622
|
+
element.style.pointerEvents = "none";
|
59623
|
+
return element;
|
59624
|
+
}
|
59625
|
+
var Root = FocusGuards;
|
59626
|
+
}
|
59627
|
+
});
|
59628
|
+
|
59629
|
+
// ../core/node_modules/@radix-ui/react-dialog/dist/index.js
|
59630
|
+
var require_dist65 = __commonJS({
|
59631
|
+
"../core/node_modules/@radix-ui/react-dialog/dist/index.js"(exports, module) {
|
59632
|
+
"use strict";
|
59633
|
+
"use client";
|
59634
|
+
var __create2 = Object.create;
|
59635
|
+
var __defProp2 = Object.defineProperty;
|
59636
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59637
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59638
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59639
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59640
|
+
var __export2 = (target, all) => {
|
59641
|
+
for (var name in all)
|
59642
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59643
|
+
};
|
59644
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59645
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59646
|
+
for (let key of __getOwnPropNames2(from2))
|
59647
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59648
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59649
|
+
}
|
59650
|
+
return to2;
|
59651
|
+
};
|
59652
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59653
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59654
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59655
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59656
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59657
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59658
|
+
mod
|
59659
|
+
));
|
59660
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59661
|
+
var index_exports = {};
|
59662
|
+
__export2(index_exports, {
|
59663
|
+
Close: () => Close,
|
59664
|
+
Content: () => Content,
|
59665
|
+
Description: () => Description,
|
59666
|
+
Dialog: () => Dialog,
|
59667
|
+
DialogClose: () => DialogClose,
|
59668
|
+
DialogContent: () => DialogContent,
|
59669
|
+
DialogDescription: () => DialogDescription,
|
59670
|
+
DialogOverlay: () => DialogOverlay,
|
59671
|
+
DialogPortal: () => DialogPortal,
|
59672
|
+
DialogTitle: () => DialogTitle,
|
59673
|
+
DialogTrigger: () => DialogTrigger,
|
59674
|
+
Overlay: () => Overlay,
|
59675
|
+
Portal: () => Portal,
|
59676
|
+
Root: () => Root,
|
59677
|
+
Title: () => Title2,
|
59678
|
+
Trigger: () => Trigger,
|
59679
|
+
WarningProvider: () => WarningProvider,
|
59680
|
+
createDialogScope: () => createDialogScope
|
59681
|
+
});
|
59682
|
+
module.exports = __toCommonJS2(index_exports);
|
59683
|
+
var React3 = __toESM2(require_react());
|
59684
|
+
var import_primitive = require_dist45();
|
59685
|
+
var import_react_compose_refs = require_dist46();
|
59686
|
+
var import_react_context = require_dist47();
|
59687
|
+
var import_react_id = require_dist49();
|
59688
|
+
var import_react_use_controllable_state = require_dist51();
|
59689
|
+
var import_react_dismissable_layer = require_dist57();
|
59690
|
+
var import_react_focus_scope = require_dist59();
|
59691
|
+
var import_react_portal = require_dist61();
|
59692
|
+
var import_react_presence = require_dist63();
|
59693
|
+
var import_react_primitive = require_dist54();
|
59694
|
+
var import_react_focus_guards = require_dist64();
|
59695
|
+
var import_react_remove_scroll = require_es57();
|
59696
|
+
var import_aria_hidden = require_es5();
|
59697
|
+
var import_react_slot = require_dist53();
|
59698
|
+
var import_jsx_runtime45 = require_jsx_runtime();
|
59699
|
+
var DIALOG_NAME = "Dialog";
|
59700
|
+
var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME);
|
59701
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
59702
|
+
var Dialog = (props) => {
|
59703
|
+
const {
|
59704
|
+
__scopeDialog,
|
59705
|
+
children,
|
59706
|
+
open: openProp,
|
59707
|
+
defaultOpen,
|
59708
|
+
onOpenChange,
|
59709
|
+
modal = true
|
59710
|
+
} = props;
|
59711
|
+
const triggerRef = React3.useRef(null);
|
59712
|
+
const contentRef = React3.useRef(null);
|
59713
|
+
const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({
|
59714
|
+
prop: openProp,
|
59715
|
+
defaultProp: defaultOpen ?? false,
|
59716
|
+
onChange: onOpenChange,
|
59717
|
+
caller: DIALOG_NAME
|
59718
|
+
});
|
59719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59720
|
+
DialogProvider,
|
59721
|
+
{
|
59722
|
+
scope: __scopeDialog,
|
59723
|
+
triggerRef,
|
59724
|
+
contentRef,
|
59725
|
+
contentId: (0, import_react_id.useId)(),
|
59726
|
+
titleId: (0, import_react_id.useId)(),
|
59727
|
+
descriptionId: (0, import_react_id.useId)(),
|
59728
|
+
open,
|
59729
|
+
onOpenChange: setOpen,
|
59730
|
+
onOpenToggle: React3.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
59731
|
+
modal,
|
59732
|
+
children
|
59733
|
+
}
|
59734
|
+
);
|
59735
|
+
};
|
59736
|
+
Dialog.displayName = DIALOG_NAME;
|
59737
|
+
var TRIGGER_NAME = "DialogTrigger";
|
59738
|
+
var DialogTrigger = React3.forwardRef(
|
59739
|
+
(props, forwardedRef) => {
|
59740
|
+
const { __scopeDialog, ...triggerProps } = props;
|
59741
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
59742
|
+
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
59743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59744
|
+
import_react_primitive.Primitive.button,
|
59745
|
+
{
|
59746
|
+
type: "button",
|
59747
|
+
"aria-haspopup": "dialog",
|
59748
|
+
"aria-expanded": context.open,
|
59749
|
+
"aria-controls": context.contentId,
|
59750
|
+
"data-state": getState(context.open),
|
59751
|
+
...triggerProps,
|
59752
|
+
ref: composedTriggerRef,
|
59753
|
+
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle)
|
59754
|
+
}
|
59755
|
+
);
|
59756
|
+
}
|
59757
|
+
);
|
59758
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
59759
|
+
var PORTAL_NAME = "DialogPortal";
|
59760
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
59761
|
+
forceMount: void 0
|
59762
|
+
});
|
59763
|
+
var DialogPortal = (props) => {
|
59764
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
59765
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
59766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React3.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) });
|
59767
|
+
};
|
59768
|
+
DialogPortal.displayName = PORTAL_NAME;
|
59769
|
+
var OVERLAY_NAME = "DialogOverlay";
|
59770
|
+
var DialogOverlay = React3.forwardRef(
|
59771
|
+
(props, forwardedRef) => {
|
59772
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
59773
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
59774
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
59775
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
59776
|
+
}
|
59777
|
+
);
|
59778
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
59779
|
+
var Slot = (0, import_react_slot.createSlot)("DialogOverlay.RemoveScroll");
|
59780
|
+
var DialogOverlayImpl = React3.forwardRef(
|
59781
|
+
(props, forwardedRef) => {
|
59782
|
+
const { __scopeDialog, ...overlayProps } = props;
|
59783
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
59784
|
+
return (
|
59785
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
59786
|
+
// ie. when `Overlay` and `Content` are siblings
|
59787
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59788
|
+
import_react_primitive.Primitive.div,
|
59789
|
+
{
|
59790
|
+
"data-state": getState(context.open),
|
59791
|
+
...overlayProps,
|
59792
|
+
ref: forwardedRef,
|
59793
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
59794
|
+
}
|
59795
|
+
) })
|
59796
|
+
);
|
59797
|
+
}
|
59798
|
+
);
|
59799
|
+
var CONTENT_NAME = "DialogContent";
|
59800
|
+
var DialogContent = React3.forwardRef(
|
59801
|
+
(props, forwardedRef) => {
|
59802
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
59803
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
59804
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
59806
|
+
}
|
59807
|
+
);
|
59808
|
+
DialogContent.displayName = CONTENT_NAME;
|
59809
|
+
var DialogContentModal = React3.forwardRef(
|
59810
|
+
(props, forwardedRef) => {
|
59811
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59812
|
+
const contentRef = React3.useRef(null);
|
59813
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
59814
|
+
React3.useEffect(() => {
|
59815
|
+
const content = contentRef.current;
|
59816
|
+
if (content)
|
59817
|
+
return (0, import_aria_hidden.hideOthers)(content);
|
59818
|
+
}, []);
|
59819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59820
|
+
DialogContentImpl,
|
59821
|
+
{
|
59822
|
+
...props,
|
59823
|
+
ref: composedRefs,
|
59824
|
+
trapFocus: context.open,
|
59825
|
+
disableOutsidePointerEvents: true,
|
59826
|
+
onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
59827
|
+
event.preventDefault();
|
59828
|
+
context.triggerRef.current?.focus();
|
59829
|
+
}),
|
59830
|
+
onPointerDownOutside: (0, import_primitive.composeEventHandlers)(props.onPointerDownOutside, (event) => {
|
59831
|
+
const originalEvent = event.detail.originalEvent;
|
59832
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
59833
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
59834
|
+
if (isRightClick)
|
59835
|
+
event.preventDefault();
|
59836
|
+
}),
|
59837
|
+
onFocusOutside: (0, import_primitive.composeEventHandlers)(
|
59838
|
+
props.onFocusOutside,
|
59839
|
+
(event) => event.preventDefault()
|
59840
|
+
)
|
59841
|
+
}
|
59842
|
+
);
|
59843
|
+
}
|
59844
|
+
);
|
59845
|
+
var DialogContentNonModal = React3.forwardRef(
|
59846
|
+
(props, forwardedRef) => {
|
59847
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59848
|
+
const hasInteractedOutsideRef = React3.useRef(false);
|
59849
|
+
const hasPointerDownOutsideRef = React3.useRef(false);
|
59850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59851
|
+
DialogContentImpl,
|
59852
|
+
{
|
59853
|
+
...props,
|
59854
|
+
ref: forwardedRef,
|
59855
|
+
trapFocus: false,
|
59856
|
+
disableOutsidePointerEvents: false,
|
59857
|
+
onCloseAutoFocus: (event) => {
|
59858
|
+
props.onCloseAutoFocus?.(event);
|
59859
|
+
if (!event.defaultPrevented) {
|
59860
|
+
if (!hasInteractedOutsideRef.current)
|
59861
|
+
context.triggerRef.current?.focus();
|
59862
|
+
event.preventDefault();
|
59863
|
+
}
|
59864
|
+
hasInteractedOutsideRef.current = false;
|
59865
|
+
hasPointerDownOutsideRef.current = false;
|
59866
|
+
},
|
59867
|
+
onInteractOutside: (event) => {
|
59868
|
+
props.onInteractOutside?.(event);
|
59869
|
+
if (!event.defaultPrevented) {
|
59870
|
+
hasInteractedOutsideRef.current = true;
|
59871
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
59872
|
+
hasPointerDownOutsideRef.current = true;
|
59873
|
+
}
|
59874
|
+
}
|
59875
|
+
const target = event.target;
|
59876
|
+
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
59877
|
+
if (targetIsTrigger)
|
59878
|
+
event.preventDefault();
|
59879
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
59880
|
+
event.preventDefault();
|
59881
|
+
}
|
59882
|
+
}
|
59883
|
+
}
|
59884
|
+
);
|
59885
|
+
}
|
59886
|
+
);
|
59887
|
+
var DialogContentImpl = React3.forwardRef(
|
59888
|
+
(props, forwardedRef) => {
|
59889
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
59890
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
59891
|
+
const contentRef = React3.useRef(null);
|
59892
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
59893
|
+
(0, import_react_focus_guards.useFocusGuards)();
|
59894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
59895
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59896
|
+
import_react_focus_scope.FocusScope,
|
59897
|
+
{
|
59898
|
+
asChild: true,
|
59899
|
+
loop: true,
|
59900
|
+
trapped: trapFocus,
|
59901
|
+
onMountAutoFocus: onOpenAutoFocus,
|
59902
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
59903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59904
|
+
import_react_dismissable_layer.DismissableLayer,
|
59905
|
+
{
|
59906
|
+
role: "dialog",
|
59907
|
+
id: context.contentId,
|
59908
|
+
"aria-describedby": context.descriptionId,
|
59909
|
+
"aria-labelledby": context.titleId,
|
59910
|
+
"data-state": getState(context.open),
|
59911
|
+
...contentProps,
|
59912
|
+
ref: composedRefs,
|
59913
|
+
onDismiss: () => context.onOpenChange(false)
|
59914
|
+
}
|
59915
|
+
)
|
59916
|
+
}
|
59917
|
+
),
|
59918
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
59919
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TitleWarning, { titleId: context.titleId }),
|
59920
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
59921
|
+
] })
|
59922
|
+
] });
|
59923
|
+
}
|
59924
|
+
);
|
59925
|
+
var TITLE_NAME = "DialogTitle";
|
59926
|
+
var DialogTitle = React3.forwardRef(
|
59927
|
+
(props, forwardedRef) => {
|
59928
|
+
const { __scopeDialog, ...titleProps } = props;
|
59929
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
59930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
59931
|
+
}
|
59932
|
+
);
|
59933
|
+
DialogTitle.displayName = TITLE_NAME;
|
59934
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
59935
|
+
var DialogDescription = React3.forwardRef(
|
59936
|
+
(props, forwardedRef) => {
|
59937
|
+
const { __scopeDialog, ...descriptionProps } = props;
|
59938
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
59939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
59940
|
+
}
|
59941
|
+
);
|
59942
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
59943
|
+
var CLOSE_NAME = "DialogClose";
|
59944
|
+
var DialogClose = React3.forwardRef(
|
59945
|
+
(props, forwardedRef) => {
|
59946
|
+
const { __scopeDialog, ...closeProps } = props;
|
59947
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
59948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
59949
|
+
import_react_primitive.Primitive.button,
|
59950
|
+
{
|
59951
|
+
type: "button",
|
59952
|
+
...closeProps,
|
59953
|
+
ref: forwardedRef,
|
59954
|
+
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => context.onOpenChange(false))
|
59955
|
+
}
|
59956
|
+
);
|
59957
|
+
}
|
59958
|
+
);
|
59959
|
+
DialogClose.displayName = CLOSE_NAME;
|
59960
|
+
function getState(open) {
|
59961
|
+
return open ? "open" : "closed";
|
59962
|
+
}
|
59963
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
59964
|
+
var [WarningProvider, useWarningContext] = (0, import_react_context.createContext)(TITLE_WARNING_NAME, {
|
59965
|
+
contentName: CONTENT_NAME,
|
59966
|
+
titleName: TITLE_NAME,
|
59967
|
+
docsSlug: "dialog"
|
59968
|
+
});
|
59969
|
+
var TitleWarning = ({ titleId }) => {
|
59970
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
59971
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
59972
|
+
|
59973
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
59974
|
+
|
59975
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
59976
|
+
React3.useEffect(() => {
|
59977
|
+
if (titleId) {
|
59978
|
+
const hasTitle = document.getElementById(titleId);
|
59979
|
+
if (!hasTitle)
|
59980
|
+
console.error(MESSAGE);
|
59981
|
+
}
|
59982
|
+
}, [MESSAGE, titleId]);
|
59983
|
+
return null;
|
59984
|
+
};
|
59985
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
59986
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
59987
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
59988
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
59989
|
+
React3.useEffect(() => {
|
59990
|
+
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
59991
|
+
if (descriptionId && describedById) {
|
59992
|
+
const hasDescription = document.getElementById(descriptionId);
|
59993
|
+
if (!hasDescription)
|
59994
|
+
console.warn(MESSAGE);
|
59995
|
+
}
|
59996
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
59997
|
+
return null;
|
59998
|
+
};
|
59999
|
+
var Root = Dialog;
|
60000
|
+
var Trigger = DialogTrigger;
|
60001
|
+
var Portal = DialogPortal;
|
60002
|
+
var Overlay = DialogOverlay;
|
60003
|
+
var Content = DialogContent;
|
60004
|
+
var Title2 = DialogTitle;
|
60005
|
+
var Description = DialogDescription;
|
60006
|
+
var Close = DialogClose;
|
60007
|
+
}
|
60008
|
+
});
|
60009
|
+
|
57740
60010
|
// ../core/lib/client/jsx/shadcn-ui/dialog.js
|
57741
60011
|
var require_dialog = __commonJS({
|
57742
60012
|
"../core/lib/client/jsx/shadcn-ui/dialog.js"(exports) {
|
@@ -57787,7 +60057,7 @@ var require_dialog = __commonJS({
|
|
57787
60057
|
exports.DialogTrigger = DialogTrigger;
|
57788
60058
|
var jsx_runtime_1 = require_jsx_runtime();
|
57789
60059
|
var React3 = __importStar2(require_react());
|
57790
|
-
var DialogPrimitive = __importStar2(
|
60060
|
+
var DialogPrimitive = __importStar2(require_dist65());
|
57791
60061
|
var lucide_react_1 = require_lucide_react();
|
57792
60062
|
var tailwind_merge_1 = require_bundle_cjs();
|
57793
60063
|
function Dialog({ ...props }) {
|
@@ -57829,6 +60099,38 @@ var require_dialog = __commonJS({
|
|
57829
60099
|
var require_command = __commonJS({
|
57830
60100
|
"../core/lib/client/jsx/shadcn-ui/command.js"(exports) {
|
57831
60101
|
"use strict";
|
60102
|
+
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
60103
|
+
if (k2 === void 0)
|
60104
|
+
k2 = k;
|
60105
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
60106
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
60107
|
+
desc = { enumerable: true, get: function() {
|
60108
|
+
return m[k];
|
60109
|
+
} };
|
60110
|
+
}
|
60111
|
+
Object.defineProperty(o, k2, desc);
|
60112
|
+
} : function(o, m, k, k2) {
|
60113
|
+
if (k2 === void 0)
|
60114
|
+
k2 = k;
|
60115
|
+
o[k2] = m[k];
|
60116
|
+
});
|
60117
|
+
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
60118
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
60119
|
+
} : function(o, v) {
|
60120
|
+
o["default"] = v;
|
60121
|
+
});
|
60122
|
+
var __importStar2 = exports && exports.__importStar || function(mod) {
|
60123
|
+
if (mod && mod.__esModule)
|
60124
|
+
return mod;
|
60125
|
+
var result2 = {};
|
60126
|
+
if (mod != null) {
|
60127
|
+
for (var k in mod)
|
60128
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
60129
|
+
__createBinding2(result2, mod, k);
|
60130
|
+
}
|
60131
|
+
__setModuleDefault2(result2, mod);
|
60132
|
+
return result2;
|
60133
|
+
};
|
57832
60134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
57833
60135
|
exports.Command = Command2;
|
57834
60136
|
exports.CommandDialog = CommandDialog2;
|
@@ -57839,11 +60141,14 @@ var require_command = __commonJS({
|
|
57839
60141
|
exports.CommandItem = CommandItem2;
|
57840
60142
|
exports.CommandShortcut = CommandShortcut;
|
57841
60143
|
exports.CommandSeparator = CommandSeparator2;
|
60144
|
+
exports.SearchInput = SearchInput;
|
57842
60145
|
var jsx_runtime_1 = require_jsx_runtime();
|
60146
|
+
var React3 = __importStar2(require_react());
|
57843
60147
|
var cmdk_1 = require_dist44();
|
57844
60148
|
var lucide_react_1 = require_lucide_react();
|
57845
60149
|
var tailwind_merge_1 = require_bundle_cjs();
|
57846
60150
|
var dialog_1 = require_dialog();
|
60151
|
+
var input_1 = require_input();
|
57847
60152
|
function Command2({ className, ...props }) {
|
57848
60153
|
return (0, jsx_runtime_1.jsx)(cmdk_1.Command, { "data-slot": "command", className: (0, tailwind_merge_1.twMerge)("bg-white text-gray-900 dark:bg-gray-800 dark:text-white flex h-full w-full flex-col overflow-hidden rounded-lg", className), ...props });
|
57849
60154
|
}
|
@@ -57851,7 +60156,11 @@ var require_command = __commonJS({
|
|
57851
60156
|
return (0, jsx_runtime_1.jsxs)(dialog_1.Dialog, { ...props, children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { className: "sr-only", children: [(0, jsx_runtime_1.jsx)(dialog_1.DialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { children: description })] }), (0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { className: "overflow-hidden p-0", children: (0, jsx_runtime_1.jsx)(Command2, { className: "[&_[cmdk-group-heading]]:text-gray-500 dark:[&_[cmdk-group-heading]]:text-gray-400 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })] });
|
57852
60157
|
}
|
57853
60158
|
function CommandInput2({ className, ...props }) {
|
57854
|
-
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex h-8 items-center gap-2 border-b border-gray-200 dark:border-gray-600 px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, tailwind_merge_1.twMerge)("placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-
|
60159
|
+
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex h-8 items-center gap-2 border-b border-gray-200 dark:border-gray-600 px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, tailwind_merge_1.twMerge)("placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-8 w-full rounded-md border-b border-gray-200 dark:border-gray-700 bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] });
|
60160
|
+
}
|
60161
|
+
function SearchInput({ className, ...props }) {
|
60162
|
+
const [focused, setFocused] = React3.useState(false);
|
60163
|
+
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "search-input-wrapper", className: (0, tailwind_merge_1.twMerge)("flex h-8 items-center gap-2 border border-gray-200 dark:border-gray-700 rounded-md px-2", focused && "border-blue-500 dark:border-blue-500", className), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(input_1.Input, { type: "text", onFocus: () => setFocused(true), onBlur: () => setFocused(false), "data-slot": "search-input", className: (0, tailwind_merge_1.twMerge)("border-none placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-full w-full px-0 bg-transparent text-base font-normal outline-hidden disabled:cursor-not-allowed disabled:opacity-50"), ...props })] });
|
57855
60164
|
}
|
57856
60165
|
function CommandList2({ className, ...props }) {
|
57857
60166
|
return (0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { "data-slot": "command-list", className: (0, tailwind_merge_1.twMerge)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props });
|
@@ -58427,7 +60736,7 @@ var require_utilities_cjs_development = __commonJS({
|
|
58427
60736
|
});
|
58428
60737
|
|
58429
60738
|
// ../../node_modules/@dnd-kit/utilities/dist/index.js
|
58430
|
-
var
|
60739
|
+
var require_dist66 = __commonJS({
|
58431
60740
|
"../../node_modules/@dnd-kit/utilities/dist/index.js"(exports, module) {
|
58432
60741
|
"use strict";
|
58433
60742
|
if (false) {
|
@@ -58508,7 +60817,7 @@ var require_accessibility_cjs_development = __commonJS({
|
|
58508
60817
|
});
|
58509
60818
|
|
58510
60819
|
// ../../node_modules/@dnd-kit/accessibility/dist/index.js
|
58511
|
-
var
|
60820
|
+
var require_dist67 = __commonJS({
|
58512
60821
|
"../../node_modules/@dnd-kit/accessibility/dist/index.js"(exports, module) {
|
58513
60822
|
"use strict";
|
58514
60823
|
if (false) {
|
@@ -58530,8 +60839,8 @@ var require_core_cjs_development = __commonJS({
|
|
58530
60839
|
var React3 = require_react();
|
58531
60840
|
var React__default = _interopDefault(React3);
|
58532
60841
|
var reactDom = require_react_dom();
|
58533
|
-
var utilities =
|
58534
|
-
var accessibility =
|
60842
|
+
var utilities = require_dist66();
|
60843
|
+
var accessibility = require_dist67();
|
58535
60844
|
var DndMonitorContext = /* @__PURE__ */ React3.createContext(null);
|
58536
60845
|
function useDndMonitor(listener) {
|
58537
60846
|
const registerListener = React3.useContext(DndMonitorContext);
|
@@ -62019,7 +64328,7 @@ var require_core_cjs_development = __commonJS({
|
|
62019
64328
|
});
|
62020
64329
|
|
62021
64330
|
// ../../node_modules/@dnd-kit/core/dist/index.js
|
62022
|
-
var
|
64331
|
+
var require_dist68 = __commonJS({
|
62023
64332
|
"../../node_modules/@dnd-kit/core/dist/index.js"(exports, module) {
|
62024
64333
|
"use strict";
|
62025
64334
|
if (false) {
|
@@ -62040,8 +64349,8 @@ var require_sortable_cjs_development = __commonJS({
|
|
62040
64349
|
}
|
62041
64350
|
var React3 = require_react();
|
62042
64351
|
var React__default = _interopDefault(React3);
|
62043
|
-
var core =
|
62044
|
-
var utilities =
|
64352
|
+
var core = require_dist68();
|
64353
|
+
var utilities = require_dist66();
|
62045
64354
|
function arrayMove(array, from2, to2) {
|
62046
64355
|
const newArray = array.slice();
|
62047
64356
|
newArray.splice(to2 < 0 ? newArray.length + to2 : to2, 0, newArray.splice(from2, 1)[0]);
|
@@ -62732,7 +65041,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
62732
65041
|
});
|
62733
65042
|
|
62734
65043
|
// ../../node_modules/@dnd-kit/sortable/dist/index.js
|
62735
|
-
var
|
65044
|
+
var require_dist69 = __commonJS({
|
62736
65045
|
"../../node_modules/@dnd-kit/sortable/dist/index.js"(exports, module) {
|
62737
65046
|
"use strict";
|
62738
65047
|
if (false) {
|
@@ -62765,9 +65074,9 @@ var require_advanced_stream_mapping = __commonJS({
|
|
62765
65074
|
var util_1 = require_util();
|
62766
65075
|
var language_selector_1 = require_language_selector();
|
62767
65076
|
var react_2 = __importDefault2(require_react());
|
62768
|
-
var utilities_1 =
|
62769
|
-
var core_1 =
|
62770
|
-
var sortable_1 =
|
65077
|
+
var utilities_1 = require_dist66();
|
65078
|
+
var core_1 = require_dist68();
|
65079
|
+
var sortable_1 = require_dist69();
|
62771
65080
|
var lucide_react_2 = require_lucide_react();
|
62772
65081
|
var util_2 = require_util();
|
62773
65082
|
function advancedStreamMappingEditor(defaultValue, data) {
|
@@ -67716,22 +70025,22 @@ var require_FaLayerGroup = __commonJS({
|
|
67716
70025
|
}
|
67717
70026
|
});
|
67718
70027
|
|
67719
|
-
// ../../node_modules/@react-icons/all-files/fa/
|
67720
|
-
var
|
67721
|
-
"../../node_modules/@react-icons/all-files/fa/
|
70028
|
+
// ../../node_modules/@react-icons/all-files/fa/FaImage.js
|
70029
|
+
var require_FaImage = __commonJS({
|
70030
|
+
"../../node_modules/@react-icons/all-files/fa/FaImage.js"(exports, module) {
|
67722
70031
|
var GenIcon = require_cjs().GenIcon;
|
67723
|
-
module.exports.
|
67724
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "
|
70032
|
+
module.exports.FaImage = function FaImage3(props) {
|
70033
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z" } }] })(props);
|
67725
70034
|
};
|
67726
70035
|
}
|
67727
70036
|
});
|
67728
70037
|
|
67729
|
-
// ../../node_modules/@react-icons/all-files/fa/
|
67730
|
-
var
|
67731
|
-
"../../node_modules/@react-icons/all-files/fa/
|
70038
|
+
// ../../node_modules/@react-icons/all-files/fa/FaPlayCircle.js
|
70039
|
+
var require_FaPlayCircle = __commonJS({
|
70040
|
+
"../../node_modules/@react-icons/all-files/fa/FaPlayCircle.js"(exports, module) {
|
67732
70041
|
var GenIcon = require_cjs().GenIcon;
|
67733
|
-
module.exports.
|
67734
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "
|
70042
|
+
module.exports.FaPlayCircle = function FaPlayCircle2(props) {
|
70043
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 512 512" }, "child": [{ "tag": "path", "attr": { "d": "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z" } }] })(props);
|
67735
70044
|
};
|
67736
70045
|
}
|
67737
70046
|
});
|
@@ -90655,9 +92964,94 @@ function assertUnreachable17(_) {
|
|
90655
92964
|
throw new Error("Didn't expect to get here");
|
90656
92965
|
}
|
90657
92966
|
|
92967
|
+
// build/processor.gate/info.js
|
92968
|
+
var import_FaImage = __toESM(require_FaImage());
|
92969
|
+
|
92970
|
+
// build/processor.gate/inline-view.js
|
92971
|
+
var import_jsx_runtime36 = __toESM(require_jsx_runtime());
|
92972
|
+
function InlineView13({ state, config, sendCommand }) {
|
92973
|
+
function onStatusChanged(selected) {
|
92974
|
+
if (selected) {
|
92975
|
+
sendCommand({ type: "open" });
|
92976
|
+
} else {
|
92977
|
+
sendCommand({ type: "close" });
|
92978
|
+
}
|
92979
|
+
}
|
92980
|
+
return (0, import_jsx_runtime36.jsx)("div", { id: `browser-overlay-${config.id}`, children: (0, import_jsx_runtime36.jsxs)("div", { className: "w-64 grid grid-cols-[min-content,1fr] gap-2", children: [(0, import_jsx_runtime36.jsx)("div", { children: state.status == "open" ? "Open" : "Closed" }), (0, import_jsx_runtime36.jsx)("div", { children: (0, import_jsx_runtime36.jsxs)("label", { className: "inline-flex items-center cursor-pointer", children: [(0, import_jsx_runtime36.jsx)("input", { type: "checkbox", checked: state.status == "open", onChange: (e) => onStatusChanged(e.target.checked), className: "sr-only peer" }), (0, import_jsx_runtime36.jsx)("div", { className: "relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600" })] }) })] }) });
|
92981
|
+
}
|
92982
|
+
var inline_view_default13 = InlineView13;
|
92983
|
+
|
92984
|
+
// build/processor.gate/info.js
|
92985
|
+
function info_default27({ defineComponent, All }) {
|
92986
|
+
return defineComponent({
|
92987
|
+
identifier: "processor.gate",
|
92988
|
+
category: "processor",
|
92989
|
+
name: "Gate",
|
92990
|
+
description: "Can be used to disable/enable parts of a workflow by acting as a gate for all subscribed streams",
|
92991
|
+
icon: import_FaImage.FaImage,
|
92992
|
+
subscription: {
|
92993
|
+
accepts: {
|
92994
|
+
type: "dynamic-streams",
|
92995
|
+
mode: "any",
|
92996
|
+
makeProgram: false,
|
92997
|
+
streams: () => {
|
92998
|
+
return All.map((m) => ({ media: m }));
|
92999
|
+
}
|
93000
|
+
},
|
93001
|
+
produces: {
|
93002
|
+
type: "dynamic-streams",
|
93003
|
+
streams: (_, i) => {
|
93004
|
+
return i.map((i2) => ({
|
93005
|
+
...i2
|
93006
|
+
}));
|
93007
|
+
}
|
93008
|
+
}
|
93009
|
+
},
|
93010
|
+
display: (desc) => {
|
93011
|
+
return {
|
93012
|
+
initalStatus: desc.config.initialStatus
|
93013
|
+
};
|
93014
|
+
},
|
93015
|
+
runtime: {
|
93016
|
+
inline: inline_view_default13,
|
93017
|
+
initialState: () => ({
|
93018
|
+
status: "closed"
|
93019
|
+
}),
|
93020
|
+
handleEvent: (ev, state) => {
|
93021
|
+
const evType = ev.type;
|
93022
|
+
switch (evType) {
|
93023
|
+
case "status-changed":
|
93024
|
+
return { ...state, status: ev.status };
|
93025
|
+
default:
|
93026
|
+
assertUnreachable18(evType);
|
93027
|
+
}
|
93028
|
+
}
|
93029
|
+
},
|
93030
|
+
configForm: {
|
93031
|
+
form: {
|
93032
|
+
initialStatus: {
|
93033
|
+
help: "The initial state of this gate on start-up",
|
93034
|
+
hint: {
|
93035
|
+
type: "select",
|
93036
|
+
optional: true,
|
93037
|
+
options: [
|
93038
|
+
{ value: "closed", display: "Closed" },
|
93039
|
+
{ value: "open", display: "Open" }
|
93040
|
+
]
|
93041
|
+
}
|
93042
|
+
},
|
93043
|
+
notes: { help: "Notes about this component", hint: { type: "text", optional: true } }
|
93044
|
+
}
|
93045
|
+
}
|
93046
|
+
});
|
93047
|
+
}
|
93048
|
+
function assertUnreachable18(_) {
|
93049
|
+
throw new Error("Didn't expect to get here");
|
93050
|
+
}
|
93051
|
+
|
90658
93052
|
// build/processor.makeProgram/info.js
|
90659
93053
|
var import_FaPlayCircle = __toESM(require_FaPlayCircle());
|
90660
|
-
function
|
93054
|
+
function info_default28({ defineComponent, All, validation: { Z } }) {
|
90661
93055
|
return defineComponent({
|
90662
93056
|
identifier: "processor.makeProgram",
|
90663
93057
|
category: "processor",
|
@@ -90774,7 +93168,7 @@ function getStreamKeyMapping(componentId, rows, columns) {
|
|
90774
93168
|
audioStreamKeys
|
90775
93169
|
};
|
90776
93170
|
}
|
90777
|
-
function
|
93171
|
+
function info_default29({ defineComponent, validation: { Z } }) {
|
90778
93172
|
return defineComponent({
|
90779
93173
|
identifier: "processor.multiview",
|
90780
93174
|
name: "Multiview",
|
@@ -90877,7 +93271,7 @@ function info_default28({ defineComponent, validation: { Z } }) {
|
|
90877
93271
|
var import_config6 = __toESM(require_config());
|
90878
93272
|
|
90879
93273
|
// build/processor.onscreenGraphic/image-selection.js
|
90880
|
-
var
|
93274
|
+
var import_jsx_runtime37 = __toESM(require_jsx_runtime());
|
90881
93275
|
var import_react7 = __toESM(require_react());
|
90882
93276
|
function GraphicSelection(props) {
|
90883
93277
|
const [loading, setLoading] = (0, import_react7.useState)(true);
|
@@ -90901,13 +93295,13 @@ function GraphicSelection(props) {
|
|
90901
93295
|
}, [props.urls?.staticUrl?.toString()]);
|
90902
93296
|
const [graphcs, setGraphics] = (0, import_react7.useState)([]);
|
90903
93297
|
if (loading) {
|
90904
|
-
return (0,
|
93298
|
+
return (0, import_jsx_runtime37.jsx)("div", { children: "Loading.." });
|
90905
93299
|
}
|
90906
93300
|
if (graphcs.length == 0) {
|
90907
|
-
return (0,
|
93301
|
+
return (0, import_jsx_runtime37.jsx)("div", { children: "No graphics loaded" });
|
90908
93302
|
}
|
90909
|
-
return (0,
|
90910
|
-
return (0,
|
93303
|
+
return (0, import_jsx_runtime37.jsx)("div", { children: (0, import_jsx_runtime37.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime37.jsx)("option", { value: "", children: "---" }, "empty"), graphcs.map((o, i) => {
|
93304
|
+
return (0, import_jsx_runtime37.jsx)("option", { value: o, children: o }, i);
|
90911
93305
|
})] }) });
|
90912
93306
|
function myOnChange(e) {
|
90913
93307
|
props.onChanged(e.target.value);
|
@@ -90916,7 +93310,7 @@ function GraphicSelection(props) {
|
|
90916
93310
|
var image_selection_default = GraphicSelection;
|
90917
93311
|
|
90918
93312
|
// build/processor.onscreenGraphic/summary-view.js
|
90919
|
-
var
|
93313
|
+
var import_jsx_runtime38 = __toESM(require_jsx_runtime());
|
90920
93314
|
var import_react8 = __toESM(require_react());
|
90921
93315
|
function SummaryView9({ state, sendCommand, urls }) {
|
90922
93316
|
const [graphic, setGraphic] = (0, import_react8.useState)(state.activeGraphic?.file);
|
@@ -91053,7 +93447,7 @@ function SummaryView9({ state, sendCommand, urls }) {
|
|
91053
93447
|
const buttonClass = "mt-2 mb-5 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800";
|
91054
93448
|
const deleteButtonClass = "mt-2 text-white w-full justify-center bg-red-600 hover:bg-red-700 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-700 dark:hover:bg-red-800 dark:focus:ring-red-900";
|
91055
93449
|
const fileInputClass = "block w-full text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400";
|
91056
|
-
return (0,
|
93450
|
+
return (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-3", children: [(0, import_jsx_runtime38.jsx)("h2", { className: "text-xl font-bold text-gray-900 dark:text-white", children: "Controls" }), (0, import_jsx_runtime38.jsxs)("div", { children: [(0, import_jsx_runtime38.jsx)("label", { htmlFor: "select-graphic", className: "block text-gray-900 dark:text-white mb-1", children: "Source" }), (0, import_jsx_runtime38.jsxs)("select", { id: "select-graphic", className: "w-full node-editor-select-input", value: graphic || "", onChange: (e) => setGraphic(e.target.value || void 0), children: [(0, import_jsx_runtime38.jsx)("option", { value: "", children: "---" }), graphics.map((s) => (0, import_jsx_runtime38.jsx)("option", { value: s, children: s }, s))] })] }), graphic && (0, import_jsx_runtime38.jsxs)("div", { children: [(0, import_jsx_runtime38.jsx)("label", { htmlFor: "select-position", className: "block text-gray-900 dark:text-white mb-1", children: "Graphic position" }), (0, import_jsx_runtime38.jsx)(PositionSelector, { initialPosition: position, onChange: setPosition, graphicChanged, ...state })] }), (0, import_jsx_runtime38.jsx)("button", { type: "button", className: `${buttonClass} ${!stateChanged ? "opacity-50 cursor-not-allowed" : ""}`, onClick: () => sendCommand({ type: "change-graphic", file: graphic, position }), disabled: !stateChanged, children: "Commit" }), !showFileInput && !uploadStatus.success && (0, import_jsx_runtime38.jsx)("button", { type: "button", className: buttonClass, onClick: () => setShowFileInput(true), style: { marginBottom: "1rem" }, children: "Upload Graphic" }), showFileInput && (0, import_jsx_runtime38.jsxs)("form", { style: { display: "block", marginBottom: "1rem" }, children: [(0, import_jsx_runtime38.jsx)("input", { type: "file", id: "file", name: "filename", onChange: onFileChange, className: fileInputClass }), showUploadButton && (0, import_jsx_runtime38.jsx)("button", { type: "button", className: buttonClass, onClick: uploadFile, children: "Upload" })] }), (0, import_jsx_runtime38.jsx)("button", { type: "button", className: deleteButtonClass, onClick: () => setShowDeleteDropdown(!showDeleteDropdown), style: { marginBottom: "1rem" }, children: showDeleteDropdown ? "Hide Delete Options" : "Delete Graphics" }), showDeleteDropdown && (0, import_jsx_runtime38.jsxs)("div", { className: "mt-2 p-2 bg-gray-100 dark:bg-gray-800 rounded-lg", children: [(0, import_jsx_runtime38.jsx)("h3", { className: "text-lg font-semibold mb-2 text-gray-900 dark:text-white", children: "Select Graphic to Delete" }), (0, import_jsx_runtime38.jsxs)("select", { className: "w-full mb-2 node-editor-select-input", value: graphicToDelete, onChange: (e) => setGraphicToDelete(e.target.value), children: [(0, import_jsx_runtime38.jsx)("option", { value: "", children: " Select a graphic" }), graphics.map((graphicName) => (0, import_jsx_runtime38.jsx)("option", { value: graphicName, children: graphicName }, graphicName))] }), (0, import_jsx_runtime38.jsx)("button", { onClick: deleteBug, disabled: !graphicToDelete, className: `${deleteButtonClass} ${!graphicToDelete ? "opacity-50 cursor-not-allowed" : ""}`, children: "Delete Selected Graphic" })] }), uploadStatus.message && (0, import_jsx_runtime38.jsx)("div", { className: `mt-2 text-center ${uploadStatus.success ? "text-green-600" : "text-red-600"}`, children: uploadStatus.message })] });
|
91057
93451
|
}
|
91058
93452
|
function fromLocalPosition(pos) {
|
91059
93453
|
if (pos.type === "named")
|
@@ -91062,7 +93456,7 @@ function fromLocalPosition(pos) {
|
|
91062
93456
|
return { type: pos.type, x: pos.x, y: pos.y };
|
91063
93457
|
if (pos.type === "percentage")
|
91064
93458
|
return { type: pos.type, x: pos.x, y: pos.y };
|
91065
|
-
|
93459
|
+
assertUnreachable19(pos);
|
91066
93460
|
}
|
91067
93461
|
function convertPosition(givenPosition, currentVideo, currentGraphic) {
|
91068
93462
|
if (!givenPosition)
|
@@ -91080,7 +93474,7 @@ function convertPosition(givenPosition, currentVideo, currentGraphic) {
|
|
91080
93474
|
} else if (givenPosition.position === "center") {
|
91081
93475
|
xy = { x: 50, y: 50 };
|
91082
93476
|
} else {
|
91083
|
-
|
93477
|
+
assertUnreachable19(givenPosition.position);
|
91084
93478
|
}
|
91085
93479
|
return { ...givenPosition, ...xy, xPct: xy.x, yPct: xy.y };
|
91086
93480
|
}
|
@@ -91168,7 +93562,7 @@ var PositionSelector = ({ initialPosition: givenPosition = { type: "named", posi
|
|
91168
93562
|
window.removeEventListener("mouseup", handleMouseUp);
|
91169
93563
|
};
|
91170
93564
|
}, [isDragging]);
|
91171
|
-
return (0,
|
93565
|
+
return (0, import_jsx_runtime38.jsxs)("div", { className: "relative w-full max-w-lg mx-auto mt-4 mb-8", children: [(0, import_jsx_runtime38.jsxs)("div", { className: "mb-4 flex items-center gap-2", children: [(0, import_jsx_runtime38.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Position Type:" }), (0, import_jsx_runtime38.jsxs)("select", { value: position.type, onChange: (e) => {
|
91172
93566
|
const newType = e.target.value;
|
91173
93567
|
if (newType === "named") {
|
91174
93568
|
setPosition(convertPos({ type: "named", position: "topleft" }));
|
@@ -91176,12 +93570,12 @@ var PositionSelector = ({ initialPosition: givenPosition = { type: "named", posi
|
|
91176
93570
|
setPositionUnit("%");
|
91177
93571
|
setPosition({ ...convertPos(position), type: "percentage" });
|
91178
93572
|
}
|
91179
|
-
}, className: "node-editor-select-input", children: [(0,
|
93573
|
+
}, className: "node-editor-select-input", children: [(0, import_jsx_runtime38.jsx)("option", { value: "coordinate", children: "Custom Position" }), (0, import_jsx_runtime38.jsx)("option", { value: "named", children: "Preset Position" })] })] }), position.type === "named" ? (0, import_jsx_runtime38.jsx)("div", { className: "mb-4", children: (0, import_jsx_runtime38.jsxs)("select", { value: position.position, onChange: (e) => {
|
91180
93574
|
setPosition(convertPos({
|
91181
93575
|
type: "named",
|
91182
93576
|
position: e.target.value
|
91183
93577
|
}));
|
91184
|
-
}, className: "w-full node-editor-select-input", children: [(0,
|
93578
|
+
}, className: "w-full node-editor-select-input", children: [(0, import_jsx_runtime38.jsx)("option", { value: "topleft", children: "Top Left" }), (0, import_jsx_runtime38.jsx)("option", { value: "topright", children: "Top Right" }), (0, import_jsx_runtime38.jsx)("option", { value: "bottomleft", children: "Bottom Left" }), (0, import_jsx_runtime38.jsx)("option", { value: "bottomright", children: "Bottom Right" }), (0, import_jsx_runtime38.jsx)("option", { value: "center", children: "Centered" })] }) }) : (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [(0, import_jsx_runtime38.jsxs)("div", { className: "mb-4 flex items-center gap-2", children: [(0, import_jsx_runtime38.jsx)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Position Unit:" }), (0, import_jsx_runtime38.jsxs)("select", { value: positionUnit, onChange: (e) => {
|
91185
93579
|
setPositionUnit(e.target.value);
|
91186
93580
|
if (e.target.value === "px" && position.type !== "coordinate" && currentVideo && currentGraphic) {
|
91187
93581
|
const { width: videoWidth, height: videoHeight } = currentVideo;
|
@@ -91206,18 +93600,18 @@ var PositionSelector = ({ initialPosition: givenPosition = { type: "named", posi
|
|
91206
93600
|
yStr: void 0
|
91207
93601
|
});
|
91208
93602
|
}
|
91209
|
-
}, className: "node-editor-select-input", children: [(0,
|
93603
|
+
}, className: "node-editor-select-input", children: [(0, import_jsx_runtime38.jsx)("option", { value: "px", children: "Pixels" }), (0, import_jsx_runtime38.jsx)("option", { value: "%", children: "Percentage" })] })] }), (0, import_jsx_runtime38.jsxs)("div", { className: "relative bg-gray-200 dark:bg-gray-700 rounded-lg", style: {
|
91210
93604
|
width: "100%",
|
91211
93605
|
userSelect: "none",
|
91212
93606
|
aspectRatio: currentVideo ? `${currentVideo.width} / ${currentVideo.height}` : `3 / 2`
|
91213
|
-
}, ref: previewAreaRef, children: [(0,
|
93607
|
+
}, ref: previewAreaRef, children: [(0, import_jsx_runtime38.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-gray-500 dark:text-gray-400", children: [(0, import_jsx_runtime38.jsx)("span", { children: currentVideo ? "Video Preview Area" : "Video Dimensions Unknown" }), " ", currentVideo ? (0, import_jsx_runtime38.jsxs)("span", { children: [currentVideo.width, "x", currentVideo.height, "px"] }) : ""] }), (0, import_jsx_runtime38.jsx)("div", { className: `absolute cursor-move ${currentGraphic && !graphicChanged ? "" : "p-2"} rounded-lg bg-primary-500 bg-opacity-50 hover:bg-opacity-75 transition-colors
|
91214
93608
|
${isDragging ? "bg-opacity-75" : ""}`, style: {
|
91215
93609
|
left: `${position.xPct}%`,
|
91216
93610
|
top: `${position.yPct}%`,
|
91217
93611
|
transform: `translate(-${position.xPct}%, -${position.yPct}%)`,
|
91218
93612
|
aspectRatio: currentGraphic && !graphicChanged ? `${currentGraphic.width} / ${currentGraphic.height}` : `1`,
|
91219
93613
|
width: currentGraphic && currentVideo && !graphicChanged ? currentGraphic.width / currentVideo.width * 100 + "%" : void 0
|
91220
|
-
}, onMouseDown: handleMouseDown, ref: previewTargetRef, children: (0,
|
93614
|
+
}, onMouseDown: handleMouseDown, ref: previewTargetRef, children: (0, import_jsx_runtime38.jsx)("svg", { className: `${currentGraphic && !graphicChanged ? "w-full h-full" : "w-6 h-6"} text-white`, "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: (0, import_jsx_runtime38.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 6v12m-6-6h12m-6-6 1.5 1.5M12 6l-1.5 1.5m1.5 10.5L10.5 16.5M12 18l1.5-1.5M6 12l1.5-1.5M7.5 13.5 6 12m12 0-1.5-1.5M16.5 13.5 18 12" }) }) })] }), (0, import_jsx_runtime38.jsxs)("div", { className: "mt-2 text-sm text-gray-600 dark:text-gray-300 text-center", children: ["Position:", " ", position.type === "percentage" ? `${position.xPct.toFixed(1)}%, ${position.yPct.toFixed(1)}%` : `${Math.round(position.x)}px, ${Math.round(position.y)}px`] }), (0, import_jsx_runtime38.jsxs)("div", { className: "mt-2 flex gap-4", children: [(0, import_jsx_runtime38.jsxs)("div", { children: [(0, import_jsx_runtime38.jsxs)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: ["X Position ", positionUnit] }), (0, import_jsx_runtime38.jsx)("input", { type: "number", step: positionUnit === "%" ? "0.1" : "1", value: position.xStr ?? (positionUnit === "%" ? position.xPct.toFixed(1) : Math.round(position.x)), onChange: (e) => {
|
91221
93615
|
const newX = Number(e.target.value);
|
91222
93616
|
setPosition(convertPos({
|
91223
93617
|
type: positionUnit === "%" ? "percentage" : "coordinate",
|
@@ -91226,7 +93620,7 @@ var PositionSelector = ({ initialPosition: givenPosition = { type: "named", posi
|
|
91226
93620
|
y: position.y,
|
91227
93621
|
yStr: position.yStr
|
91228
93622
|
}));
|
91229
|
-
}, className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600" })] }), (0,
|
93623
|
+
}, className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm dark:bg-gray-700 dark:border-gray-600" })] }), (0, import_jsx_runtime38.jsxs)("div", { children: [(0, import_jsx_runtime38.jsxs)("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: ["Y Position ", positionUnit] }), (0, import_jsx_runtime38.jsx)("input", { type: "number", step: positionUnit === "%" ? "0.1" : "1", value: position.yStr ?? (positionUnit === "%" ? position.yPct.toFixed(1) : Math.round(position.y)), onChange: (e) => {
|
91230
93624
|
const newY = Number(e.target.value);
|
91231
93625
|
setPosition(convertPos({
|
91232
93626
|
type: positionUnit === "%" ? "percentage" : "coordinate",
|
@@ -91240,20 +93634,20 @@ var PositionSelector = ({ initialPosition: givenPosition = { type: "named", posi
|
|
91240
93634
|
function clamp2(min2, num, max2) {
|
91241
93635
|
return num < min2 ? min2 : num > max2 ? max2 : num;
|
91242
93636
|
}
|
91243
|
-
function
|
93637
|
+
function assertUnreachable19(_) {
|
91244
93638
|
throw new Error("Didn't expect to get here");
|
91245
93639
|
}
|
91246
93640
|
var summary_view_default9 = SummaryView9;
|
91247
93641
|
|
91248
93642
|
// build/processor.onscreenGraphic/info.js
|
91249
|
-
var
|
91250
|
-
function
|
93643
|
+
var import_FaImage2 = __toESM(require_FaImage());
|
93644
|
+
function info_default30({ defineComponent }) {
|
91251
93645
|
return defineComponent({
|
91252
93646
|
identifier: "processor.onscreenGraphic",
|
91253
93647
|
category: "processor",
|
91254
93648
|
name: "Onscreen Graphic",
|
91255
93649
|
description: "Overlay graphics onto a video",
|
91256
|
-
icon:
|
93650
|
+
icon: import_FaImage2.FaImage,
|
91257
93651
|
subscription: {
|
91258
93652
|
// Only accept a single video stream
|
91259
93653
|
accepts: {
|
@@ -91286,7 +93680,7 @@ function info_default29({ defineComponent }) {
|
|
91286
93680
|
case "graphic-loaded":
|
91287
93681
|
return { ...state, currentGraphic: ev.currentGraphic };
|
91288
93682
|
default:
|
91289
|
-
|
93683
|
+
assertUnreachable20(evType);
|
91290
93684
|
}
|
91291
93685
|
}
|
91292
93686
|
},
|
@@ -91322,12 +93716,12 @@ function info_default29({ defineComponent }) {
|
|
91322
93716
|
}
|
91323
93717
|
});
|
91324
93718
|
}
|
91325
|
-
function
|
93719
|
+
function assertUnreachable20(_) {
|
91326
93720
|
throw new Error("Didn't expect to get here");
|
91327
93721
|
}
|
91328
93722
|
|
91329
93723
|
// build/processor.smartSingleMediaSwitch/source-selection.js
|
91330
|
-
var
|
93724
|
+
var import_jsx_runtime39 = __toESM(require_jsx_runtime());
|
91331
93725
|
var import_react9 = __toESM(require_react());
|
91332
93726
|
function OrderInput(props) {
|
91333
93727
|
(0, import_react9.useEffect)(() => {
|
@@ -91335,10 +93729,10 @@ function OrderInput(props) {
|
|
91335
93729
|
}, [props.defaultValue]);
|
91336
93730
|
const [value, setValue] = (0, import_react9.useState)(props.defaultValue ?? []);
|
91337
93731
|
if (value.length == 0) {
|
91338
|
-
return (0,
|
93732
|
+
return (0, import_jsx_runtime39.jsx)("p", { className: "node-editor-helper-text", children: "Sources will appear here when subscriptions have been added to this node" });
|
91339
93733
|
} else {
|
91340
|
-
return (0,
|
91341
|
-
return (0,
|
93734
|
+
return (0, import_jsx_runtime39.jsx)("div", { id: props.id, children: (0, import_jsx_runtime39.jsx)("ul", { children: value.map((v, ix) => {
|
93735
|
+
return (0, import_jsx_runtime39.jsxs)("li", { className: "flex", children: [(0, import_jsx_runtime39.jsx)("span", { className: "node-editor-label flex-grow", children: v.displayName }), ix == 0 ? (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, {}) : (0, import_jsx_runtime39.jsx)("svg", { onClick: moveUp(ix), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18" }) }), ix == value.length - 1 ? (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, {}) : (0, import_jsx_runtime39.jsx)("svg", { onClick: moveDown(ix), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3" }) })] }, ix);
|
91342
93736
|
}) }) });
|
91343
93737
|
}
|
91344
93738
|
function moveUp(ix) {
|
@@ -91363,18 +93757,18 @@ function OrderInput(props) {
|
|
91363
93757
|
var source_selection_default = OrderInput;
|
91364
93758
|
|
91365
93759
|
// build/processor.smartSingleMediaSwitch/inline-view.js
|
91366
|
-
var
|
93760
|
+
var import_jsx_runtime40 = __toESM(require_jsx_runtime());
|
91367
93761
|
var activeClasses = "active text-green-500 dark:text-green-300";
|
91368
93762
|
var availableClasses = "available text-green-500 dark:text-green-300";
|
91369
93763
|
var inactiveClasses = "inactive text-orange-500 dark:text-orange-300";
|
91370
|
-
function
|
91371
|
-
return (0,
|
93764
|
+
function InlineView14({ state, config }) {
|
93765
|
+
return (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [(0, import_jsx_runtime40.jsx)("h5", { children: "Sources" }), (0, import_jsx_runtime40.jsxs)("ul", { children: [config.sources.map((s, i) => state.activeSource == i ? (0, import_jsx_runtime40.jsxs)("li", { className: activeClasses, children: [s.displayName, " <--"] }, i) : state.availableSources.includes(i) ? (0, import_jsx_runtime40.jsxs)("li", { className: availableClasses, children: [s.displayName, " (available)"] }, i) : (0, import_jsx_runtime40.jsxs)("li", { className: inactiveClasses, children: [s.displayName, " (inactive)"] }, i)), (0, import_jsx_runtime40.jsx)("li", { className: state.activeSource < 0 ? activeClasses : availableClasses, children: "fallback" }, "fallback")] })] });
|
91372
93766
|
}
|
91373
|
-
var
|
93767
|
+
var inline_view_default14 = InlineView14;
|
91374
93768
|
|
91375
93769
|
// build/processor.smartSingleMediaSwitch/info.js
|
91376
93770
|
var import_FaSlidersH = __toESM(require_FaSlidersH());
|
91377
|
-
function
|
93771
|
+
function info_default31({ defineComponent, All, common: { Resolutions, FrameRates }, streamMatchesFilter }) {
|
91378
93772
|
function patchConfigFromSubscription(cfg, sub) {
|
91379
93773
|
const potentiallyNewSources = sub.expectedStreams;
|
91380
93774
|
potentiallyNewSources.forEach((s) => {
|
@@ -91459,12 +93853,12 @@ function info_default30({ defineComponent, All, common: { Resolutions, FrameRate
|
|
91459
93853
|
state.availableSources.splice(state.availableSources.indexOf(ev.sourceIndex), 1);
|
91460
93854
|
return { ...state };
|
91461
93855
|
default:
|
91462
|
-
|
93856
|
+
assertUnreachable21(evType);
|
91463
93857
|
}
|
91464
93858
|
},
|
91465
|
-
inline:
|
91466
|
-
summary:
|
91467
|
-
fullscreen:
|
93859
|
+
inline: inline_view_default14,
|
93860
|
+
summary: inline_view_default14,
|
93861
|
+
fullscreen: inline_view_default14
|
91468
93862
|
},
|
91469
93863
|
configForm: {
|
91470
93864
|
form: {
|
@@ -91511,12 +93905,12 @@ function info_default30({ defineComponent, All, common: { Resolutions, FrameRate
|
|
91511
93905
|
}
|
91512
93906
|
});
|
91513
93907
|
}
|
91514
|
-
function
|
93908
|
+
function assertUnreachable21(_) {
|
91515
93909
|
throw new Error("Didn't expect to get here");
|
91516
93910
|
}
|
91517
93911
|
|
91518
93912
|
// build/processor.smartSourceSwitch/source-selection.js
|
91519
|
-
var
|
93913
|
+
var import_jsx_runtime41 = __toESM(require_jsx_runtime());
|
91520
93914
|
var import_react10 = __toESM(require_react());
|
91521
93915
|
function OrderInput2(props) {
|
91522
93916
|
(0, import_react10.useEffect)(() => {
|
@@ -91524,10 +93918,10 @@ function OrderInput2(props) {
|
|
91524
93918
|
}, [props.defaultValue]);
|
91525
93919
|
const [value, setValue] = (0, import_react10.useState)(props.defaultValue ?? []);
|
91526
93920
|
if (value.length == 0) {
|
91527
|
-
return (0,
|
93921
|
+
return (0, import_jsx_runtime41.jsx)("p", { className: "node-editor-helper-text", children: "Sources will appear here when subscriptions have been added to this node" });
|
91528
93922
|
} else {
|
91529
|
-
return (0,
|
91530
|
-
return (0,
|
93923
|
+
return (0, import_jsx_runtime41.jsx)("div", { id: props.id, children: (0, import_jsx_runtime41.jsx)("ul", { children: value.map((v, ix) => {
|
93924
|
+
return (0, import_jsx_runtime41.jsxs)("li", { className: "flex", children: [(0, import_jsx_runtime41.jsx)("span", { className: "node-editor-label flex-grow", children: v }), ix == 0 ? (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, {}) : (0, import_jsx_runtime41.jsx)("svg", { onClick: moveUp(ix), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime41.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18" }) }), ix == value.length - 1 ? (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, {}) : (0, import_jsx_runtime41.jsx)("svg", { onClick: moveDown(ix), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime41.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3" }) })] }, v);
|
91531
93925
|
}) }) });
|
91532
93926
|
}
|
91533
93927
|
function moveUp(ix) {
|
@@ -91552,18 +93946,18 @@ function OrderInput2(props) {
|
|
91552
93946
|
var source_selection_default2 = OrderInput2;
|
91553
93947
|
|
91554
93948
|
// build/processor.smartSourceSwitch/inline-view.js
|
91555
|
-
var
|
93949
|
+
var import_jsx_runtime42 = __toESM(require_jsx_runtime());
|
91556
93950
|
var activeClasses2 = "active text-green-500 dark:text-green-300";
|
91557
93951
|
var availableClasses2 = "available text-green-500 dark:text-green-300";
|
91558
93952
|
var inactiveClasses2 = "inactive text-orange-500 dark:text-orange-300";
|
91559
|
-
function
|
91560
|
-
return (0,
|
93953
|
+
function InlineView15({ state, config }) {
|
93954
|
+
return (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [(0, import_jsx_runtime42.jsx)("h5", { children: "Sources" }), (0, import_jsx_runtime42.jsxs)("ul", { children: [config.sources.map((s, i) => state.activeSource == s ? (0, import_jsx_runtime42.jsxs)("li", { className: activeClasses2, children: [s, " <--"] }, i) : state.availableSources.includes(s) ? (0, import_jsx_runtime42.jsxs)("li", { className: availableClasses2, children: [s, " (available)"] }, i) : (0, import_jsx_runtime42.jsxs)("li", { className: inactiveClasses2, children: [s, " (inactive)"] }, i)), (0, import_jsx_runtime42.jsx)("li", { className: state.activeSource == "fallback" ? activeClasses2 : availableClasses2, children: "fallback" }, "fallback")] })] });
|
91561
93955
|
}
|
91562
|
-
var
|
93956
|
+
var inline_view_default15 = InlineView15;
|
91563
93957
|
|
91564
93958
|
// build/processor.smartSourceSwitch/info.js
|
91565
93959
|
var import_FaSlidersH2 = __toESM(require_FaSlidersH());
|
91566
|
-
function
|
93960
|
+
function info_default32({ defineComponent, Av, common: { Resolutions, FrameRates } }) {
|
91567
93961
|
function patchConfigFromSubscription(cfg, sub) {
|
91568
93962
|
const potentiallyNewSources = sub.expectedStreams.map((s) => s.sourceName).filter((s) => !!s);
|
91569
93963
|
potentiallyNewSources.forEach((s) => {
|
@@ -91660,12 +94054,12 @@ function info_default31({ defineComponent, Av, common: { Resolutions, FrameRates
|
|
91660
94054
|
state.availableSources.splice(state.availableSources.indexOf(ev.source), 1);
|
91661
94055
|
return { ...state };
|
91662
94056
|
default:
|
91663
|
-
|
94057
|
+
assertUnreachable22(evType);
|
91664
94058
|
}
|
91665
94059
|
},
|
91666
|
-
inline:
|
91667
|
-
summary:
|
91668
|
-
fullscreen:
|
94060
|
+
inline: inline_view_default15,
|
94061
|
+
summary: inline_view_default15,
|
94062
|
+
fullscreen: inline_view_default15
|
91669
94063
|
},
|
91670
94064
|
configForm: {
|
91671
94065
|
form: {
|
@@ -91712,13 +94106,13 @@ function info_default31({ defineComponent, Av, common: { Resolutions, FrameRates
|
|
91712
94106
|
}
|
91713
94107
|
});
|
91714
94108
|
}
|
91715
|
-
function
|
94109
|
+
function assertUnreachable22(_) {
|
91716
94110
|
throw new Error("Didn't expect to get here");
|
91717
94111
|
}
|
91718
94112
|
|
91719
94113
|
// build/processor.streamKeyOverride/info.js
|
91720
94114
|
var import_FaKey = __toESM(require_FaKey());
|
91721
|
-
function
|
94115
|
+
function info_default33({ defineComponent, All, validation: { Z } }) {
|
91722
94116
|
return defineComponent({
|
91723
94117
|
identifier: "processor.streamKeyOverride",
|
91724
94118
|
category: "processor",
|
@@ -91812,7 +94206,7 @@ function info_default32({ defineComponent, All, validation: { Z } }) {
|
|
91812
94206
|
|
91813
94207
|
// build/processor.videoDecoder/info.js
|
91814
94208
|
var import_FaFileVideo = __toESM(require_FaFileVideo());
|
91815
|
-
function
|
94209
|
+
function info_default34({ defineComponent }) {
|
91816
94210
|
return defineComponent({
|
91817
94211
|
identifier: "processor.videoDecoder",
|
91818
94212
|
category: "processor",
|
@@ -91859,7 +94253,7 @@ function info_default33({ defineComponent }) {
|
|
91859
94253
|
}
|
91860
94254
|
|
91861
94255
|
// build/util.stats.latency/inline-view.js
|
91862
|
-
var
|
94256
|
+
var import_jsx_runtime43 = __toESM(require_jsx_runtime());
|
91863
94257
|
var import_react11 = __toESM(require_react());
|
91864
94258
|
|
91865
94259
|
// ../../node_modules/chart.js/auto/auto.js
|
@@ -91867,7 +94261,7 @@ Chart.register(...registerables);
|
|
91867
94261
|
var auto_default = Chart;
|
91868
94262
|
|
91869
94263
|
// build/util.stats.latency/inline-view.js
|
91870
|
-
function
|
94264
|
+
function InlineView16({ state, config: _2 }) {
|
91871
94265
|
const chartContainer = (0, import_react11.useRef)(null);
|
91872
94266
|
const [chartControl, setChartControl] = (0, import_react11.useState)(void 0);
|
91873
94267
|
function makeDataSet(key, color2, values) {
|
@@ -91929,19 +94323,19 @@ function InlineView15({ state, config: _2 }) {
|
|
91929
94323
|
return;
|
91930
94324
|
chartControl.data = makeData(state);
|
91931
94325
|
}, [state]);
|
91932
|
-
return (0,
|
94326
|
+
return (0, import_jsx_runtime43.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime43.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
91933
94327
|
}
|
91934
|
-
var
|
94328
|
+
var inline_view_default16 = InlineView16;
|
91935
94329
|
|
91936
94330
|
// build/util.stats.latency/source-node-selection.js
|
91937
|
-
var
|
94331
|
+
var import_jsx_runtime44 = __toESM(require_jsx_runtime());
|
91938
94332
|
function SourceNodeSelection(props) {
|
91939
|
-
return (0,
|
94333
|
+
return (0, import_jsx_runtime44.jsx)("div", { children: (0, import_jsx_runtime44.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime44.jsx)("option", { value: "", children: "---" }, "empty"), Object.values(props.latestDocument.components).map((o, i) => {
|
91940
94334
|
if (o.id == props.id)
|
91941
|
-
return (0,
|
94335
|
+
return (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, {});
|
91942
94336
|
if (o.info.category === "output")
|
91943
94337
|
return;
|
91944
|
-
return (0,
|
94338
|
+
return (0, import_jsx_runtime44.jsx)("option", { value: o.id, children: o.config.displayName }, i);
|
91945
94339
|
})] }) });
|
91946
94340
|
function myOnChange(e) {
|
91947
94341
|
props.onChanged(e.target.value);
|
@@ -91951,7 +94345,7 @@ var source_node_selection_default = SourceNodeSelection;
|
|
91951
94345
|
|
91952
94346
|
// build/util.stats.latency/info.js
|
91953
94347
|
var import_FaClock = __toESM(require_FaClock());
|
91954
|
-
function
|
94348
|
+
function info_default35(R) {
|
91955
94349
|
const { defineComponent } = R;
|
91956
94350
|
return defineComponent({
|
91957
94351
|
identifier: "util.stats.latency",
|
@@ -91981,11 +94375,11 @@ function info_default34(R) {
|
|
91981
94375
|
break;
|
91982
94376
|
}
|
91983
94377
|
default:
|
91984
|
-
|
94378
|
+
assertUnreachable23(evType);
|
91985
94379
|
}
|
91986
94380
|
return { ...state };
|
91987
94381
|
},
|
91988
|
-
inline:
|
94382
|
+
inline: inline_view_default16
|
91989
94383
|
},
|
91990
94384
|
configForm: {
|
91991
94385
|
form: {
|
@@ -92036,7 +94430,7 @@ function info_default34(R) {
|
|
92036
94430
|
}
|
92037
94431
|
});
|
92038
94432
|
}
|
92039
|
-
function
|
94433
|
+
function assertUnreachable23(_) {
|
92040
94434
|
throw new Error("Didn't expect to get here");
|
92041
94435
|
}
|
92042
94436
|
|
@@ -92088,6 +94482,7 @@ AllComponents.push((r) => info_default31(r));
|
|
92088
94482
|
AllComponents.push((r) => info_default32(r));
|
92089
94483
|
AllComponents.push((r) => info_default33(r));
|
92090
94484
|
AllComponents.push((r) => info_default34(r));
|
94485
|
+
AllComponents.push((r) => info_default35(r));
|
92091
94486
|
export {
|
92092
94487
|
getNodeInfo as default
|
92093
94488
|
};
|