@norskvideo/norsk-studio 1.27.0-2025-03-21-8f677d4f → 1.27.0-2025-03-23-1dbee9e6

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/ui/index.js CHANGED
@@ -1097,7 +1097,7 @@ var require_react_development = __commonJS({
1097
1097
  }
1098
1098
  return dispatcher.useContext(Context7);
1099
1099
  }
1100
- function useState36(initialState7) {
1100
+ function useState37(initialState7) {
1101
1101
  var dispatcher = resolveDispatcher();
1102
1102
  return dispatcher.useState(initialState7);
1103
1103
  }
@@ -1900,7 +1900,7 @@ var require_react_development = __commonJS({
1900
1900
  exports.useMemo = useMemo12;
1901
1901
  exports.useReducer = useReducer9;
1902
1902
  exports.useRef = useRef19;
1903
- exports.useState = useState36;
1903
+ exports.useState = useState37;
1904
1904
  exports.useSyncExternalStore = useSyncExternalStore;
1905
1905
  exports.useTransition = useTransition;
1906
1906
  exports.version = ReactVersion;
@@ -171634,7 +171634,7 @@ var require_deep_equal = __commonJS({
171634
171634
  }
171635
171635
  return true;
171636
171636
  }
171637
- module.exports = function deepEqual4(a2, b2, opts) {
171637
+ module.exports = function deepEqual5(a2, b2, opts) {
171638
171638
  return internalDeepEqual(a2, b2, opts, getSideChannel());
171639
171639
  };
171640
171640
  }
@@ -171728,6 +171728,46 @@ function displayNodeId(id, document2) {
171728
171728
  function assertUnreachable(_2) {
171729
171729
  throw new Error("Didn't expect to get here");
171730
171730
  }
171731
+ function streamMatchesExpected(s3, expectedStreams) {
171732
+ const matchingStream = expectedStreams.find((expected) => {
171733
+ if (expected.media !== s3.message.case)
171734
+ return false;
171735
+ if (expected.programNumber !== void 0 && s3.streamKey.programNumber !== expected.programNumber)
171736
+ return false;
171737
+ if (expected.streamId !== void 0 && s3.streamKey.streamId !== expected.streamId)
171738
+ return false;
171739
+ if (expected.renditionName !== void 0 && s3.streamKey.renditionName !== expected.renditionName)
171740
+ return false;
171741
+ if (expected.sourceName !== void 0 && s3.streamKey.sourceName !== expected.sourceName)
171742
+ return false;
171743
+ return true;
171744
+ });
171745
+ return !!matchingStream;
171746
+ }
171747
+ function shortStreamNameFromFilter(s3) {
171748
+ const components = [s3.media];
171749
+ if (s3.sourceName)
171750
+ components.push(s3.sourceName.toString());
171751
+ else if (s3.programNumber)
171752
+ components.push(s3.programNumber.toString());
171753
+ else if (s3.streamId)
171754
+ components.push(s3.streamId.toString());
171755
+ else if (s3.renditionName)
171756
+ components.push(s3.renditionName.toString());
171757
+ return components.join("-");
171758
+ }
171759
+ function streamNameFromDefinition(s3) {
171760
+ const components = [s3.media];
171761
+ if (s3.sourceName)
171762
+ components.push(s3.sourceName.toString());
171763
+ if (s3.programNumber)
171764
+ components.push(s3.programNumber.toString());
171765
+ if (s3.streamId)
171766
+ components.push(s3.streamId.toString());
171767
+ if (s3.renditionName)
171768
+ components.push(s3.renditionName.toString());
171769
+ return components.join("-");
171770
+ }
171731
171771
 
171732
171772
  // build/client/client/jsx/icons.js
171733
171773
  var import_jsx_runtime = __toESM(require_jsx_runtime());
@@ -212681,209 +212721,10 @@ var registerables = [
212681
212721
  var import_client4 = __toESM(require_client());
212682
212722
 
212683
212723
  // build/client/client/jsx/selected.js
212684
- var import_jsx_runtime144 = __toESM(require_jsx_runtime());
212724
+ var import_jsx_runtime143 = __toESM(require_jsx_runtime());
212685
212725
 
212686
212726
  // build/client/client/jsx/selected-connection.js
212687
- var import_jsx_runtime121 = __toESM(require_jsx_runtime());
212688
-
212689
- // build/client/client/jsx/connection-editor.js
212690
212727
  var import_jsx_runtime120 = __toESM(require_jsx_runtime());
212691
- var import_react84 = __toESM(require_react());
212692
- function ConnectionEditor(props) {
212693
- return (0, import_jsx_runtime120.jsx)(ConnectionEditorImpl, { ...props });
212694
- }
212695
- function deriveAvailableModes(source, dest) {
212696
- const acceptType = dest.subscription.accepts?.type;
212697
- const produceType = source.subscription.produces?.type;
212698
- if (!acceptType || !produceType) {
212699
- throw new Error("Node doesn't support subscriptions");
212700
- }
212701
- switch (produceType) {
212702
- case "simple-stream":
212703
- return ["take-first-stream"];
212704
- case "dynamic-streams":
212705
- return ["take-first-stream", "take-specific-streams", "take-all-streams"];
212706
- default:
212707
- assertUnreachable(produceType);
212708
- }
212709
- }
212710
- function ConnectionEditorImpl(props) {
212711
- const sourceNodeInfo = props.connection.sourceNode.info;
212712
- const destNodeInfo = props.connection.destinationNode.info;
212713
- const sourceNodeInputs = props.connection.sourceNode.subscriptions.flatMap((s3) => s3.expectedStreams);
212714
- const latest = props.connection.subscription.streams;
212715
- const availableStreams = outputStreamComponents(sourceNodeInfo.subscription.produces, props.connection.sourceNode.config, sourceNodeInputs);
212716
- const availableMedia = outputMedia(sourceNodeInfo.subscription.produces, props.connection.sourceNode.config, sourceNodeInputs);
212717
- const defaultStreamSelection = latest.type == "take-specific-streams" ? latest.filter : [];
212718
- const availableModes = deriveAvailableModes(sourceNodeInfo, destNodeInfo);
212719
- const allowedMedia = inputMedia(destNodeInfo.subscription.accepts, props.connection.destinationNode.config);
212720
- const [mode, setMode] = (0, import_react84.useState)(availableModes.includes(latest.type) ? latest.type : availableModes[0]);
212721
- const dynamicStreamsMode = destNodeInfo.subscription.accepts?.type == "dynamic-streams" ? destNodeInfo.subscription.accepts.mode : void 0;
212722
- const inputStreamsGroupingKey = sourceNodeInfo.subscription?.produces?.type == "dynamic-streams" ? sourceNodeInfo.subscription?.produces.groupBy : void 0;
212723
- const groupingKey = dynamicStreamsMode && typeof dynamicStreamsMode != "string" ? dynamicStreamsMode.groupBy : inputStreamsGroupingKey;
212724
- const availableGroups = groupingKey ? [...new Set(availableStreams.map((s3) => s3[groupingKey]?.toString())).values()].filter((s3) => !!s3) : [];
212725
- const [simpleStreamSelection, setSimpleStreamSelection] = (0, import_react84.useState)(true);
212726
- const [streamSelection, setStreamSelection] = (0, import_react84.useState)(defaultStreamSelection);
212727
- const defaultMediaSelection = {
212728
- audio: false,
212729
- video: false,
212730
- subtitle: false,
212731
- playlist: false,
212732
- ancillary: false
212733
- };
212734
- if (latest.type == "take-all-streams" || latest.type == "take-first-stream") {
212735
- const selectedMedia = latest.filter.map((f) => f.media);
212736
- for (const k2 in defaultMediaSelection) {
212737
- if (selectedMedia.includes(k2))
212738
- defaultMediaSelection[k2] = true;
212739
- }
212740
- }
212741
- const [mediaSelection, setMediaSelection] = (0, import_react84.useState)(defaultMediaSelection);
212742
- const [validationMessage, setValidationMessage] = (0, import_react84.useState)({
212743
- streams: void 0,
212744
- media: void 0
212745
- });
212746
- (0, import_react84.useEffect)(() => {
212747
- doValidation();
212748
- }, [mediaSelection, streamSelection]);
212749
- return (0, import_jsx_runtime120.jsx)("div", { className: "z-40 w-64 max-w-xs overflow-y-auto bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime120.jsxs)("div", { children: [(0, import_jsx_runtime120.jsxs)("div", { children: [(0, import_jsx_runtime120.jsx)("h4", { className: "mb-1.5 leading-none text-xl font-semibold text-gray-900 dark:text-white", children: "Edit Subscription" }), (0, import_jsx_runtime120.jsxs)("p", { className: "text-l text-gray-900 dark:text-white", children: ["Source: ", props.connection.sourceNode.id] }), (0, import_jsx_runtime120.jsxs)("p", { className: "text-l text-gray-900 dark:text-white", children: ["Destination: ", props.connection.destinationNode.id] })] }), (0, import_jsx_runtime120.jsxs)("button", { type: "button", onClick: props.onCancel, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-1 right-1 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime120.jsx)("span", { className: "sr-only", children: "Close menu" })] }), (0, import_jsx_runtime120.jsxs)("form", { noValidate: true, children: [(0, import_jsx_runtime120.jsx)("div", { className: "form-group", children: modeDropdown() }), (0, import_jsx_runtime120.jsx)("div", { className: "form-group", children: selectionInputs() }), (0, import_jsx_runtime120.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime120.jsx)("button", { type: "submit", onClick: onSubmit, className: "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", children: "Save" }), (0, import_jsx_runtime120.jsxs)("button", { type: "button", onClick: props.onCancel, className: "inline-flex w-full justify-center text-gray-500 items-center bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-primary-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600", children: [(0, import_jsx_runtime120.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 -ml-1 sm:mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime120.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }), "Cancel"] })] })] })] }) });
212750
- function doValidation() {
212751
- let isError = false;
212752
- const newValue = { media: void 0, streams: void 0 };
212753
- if (mode == "take-specific-streams" && streamSelection.length == 0) {
212754
- newValue.streams = "At least one stream must be selected";
212755
- isError = true;
212756
- }
212757
- setValidationMessage(newValue);
212758
- return !isError;
212759
- }
212760
- function onSubmit(e2) {
212761
- e2.preventDefault();
212762
- if (doValidation()) {
212763
- switch (mode) {
212764
- case "take-all-streams":
212765
- case "take-first-stream":
212766
- props.onSaved({
212767
- type: mode,
212768
- filter: Object.entries(mediaSelection).filter(([_2, v2]) => v2).map(([k2, _2]) => ({ media: k2 }))
212769
- });
212770
- break;
212771
- case "take-specific-streams":
212772
- props.onSaved({
212773
- type: mode,
212774
- filter: streamSelection
212775
- });
212776
- break;
212777
- default:
212778
- assertUnreachable(mode);
212779
- }
212780
- }
212781
- }
212782
- function onMultiStreamSelectChange(stream) {
212783
- return (checked) => {
212784
- if (!checked) {
212785
- const newValue = [...streamSelection];
212786
- const i3 = newValue.findIndex((v2) => {
212787
- if (streamMatchesFilter(stream, v2)) {
212788
- return true;
212789
- }
212790
- return false;
212791
- });
212792
- if (i3 >= 0) {
212793
- newValue.splice(i3, 1);
212794
- setStreamSelection(newValue);
212795
- }
212796
- } else {
212797
- const newValue = [...streamSelection];
212798
- newValue.push(stream);
212799
- setStreamSelection(newValue);
212800
- }
212801
- };
212802
- }
212803
- function onGroupSelectChange(group) {
212804
- return (checked) => {
212805
- if (!groupingKey)
212806
- return;
212807
- const withoutGroup = streamSelection.filter((s3) => s3[groupingKey] != group);
212808
- if (!checked) {
212809
- setStreamSelection(withoutGroup);
212810
- } else {
212811
- const newGroups = availableStreams.filter((s3) => s3[groupingKey] == group && allowedMedia.includes(s3.media));
212812
- const final = withoutGroup.concat(newGroups);
212813
- setStreamSelection(final);
212814
- }
212815
- };
212816
- }
212817
- function onMediaSelectChange(media) {
212818
- return (selected) => {
212819
- const updated = {
212820
- ...mediaSelection
212821
- };
212822
- updated[media] = selected;
212823
- setMediaSelection(updated);
212824
- };
212825
- }
212826
- function modeDropdown() {
212827
- if (availableModes.length === 1) {
212828
- return (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [(0, import_jsx_runtime120.jsxs)("legend", { className: "mt-4", children: ["Strategy: ", SubscriptionTypeInfo[mode]] }), (0, import_jsx_runtime120.jsx)("p", { className: "node-editor-helper-text mb-4 mt-2", children: SubscriptionTypeDescription[mode] })] });
212829
- } else {
212830
- return (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [(0, import_jsx_runtime120.jsx)("legend", { className: "mt-4", children: "Strategy" }), (0, import_jsx_runtime120.jsx)(Select, { id: "selection-mode", className: "node-editor-select-input", defaultValue: mode, onChange: (e2) => setMode(e2.target.value), children: availableModes.map((m2, i3) => {
212831
- return (0, import_jsx_runtime120.jsx)("option", { value: m2, children: SubscriptionTypeInfo[m2] }, i3);
212832
- }) }), (0, import_jsx_runtime120.jsx)("p", { className: "node-editor-helper-text mb-4 mt-2", children: SubscriptionTypeDescription[mode] })] });
212833
- }
212834
- }
212835
- function selectionInputs() {
212836
- switch (mode) {
212837
- case "take-all-streams":
212838
- case "take-first-stream":
212839
- return (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: mediaSelectionCheckboxes() });
212840
- case "take-specific-streams":
212841
- return groupingKey ? (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [(0, import_jsx_runtime120.jsx)(ToggleSwitch, { id: "simple-select", checked: simpleStreamSelection, onChange: (c2) => setSimpleStreamSelection(c2) }), (0, import_jsx_runtime120.jsx)(Label, { htmlFor: "simple-seledt", children: "Simple" }), simpleStreamSelection ? groupedStreamSelection() : multiStreamSelection()] }) : (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [" ", multiStreamSelection(), " "] });
212842
- default:
212843
- assertUnreachable(mode);
212844
- }
212845
- }
212846
- function maybeValidationMessage(message) {
212847
- return message ? (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime120.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime120.jsx)("div", { children: message })] }) }) : (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, {});
212848
- }
212849
- function mediaSelectionCheckboxes() {
212850
- return (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [(0, import_jsx_runtime120.jsx)("legend", { className: "mt-4", children: "Media Selection" }), (0, import_jsx_runtime120.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The media types that will be used from this node" }), availableMedia.map((media) => {
212851
- const used = mediaSelection[media];
212852
- const mediaEnabled = allowedMedia.includes(media);
212853
- return (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime120.jsx)(ToggleSwitch, { id: "accept", className: `ml-1 ${mediaEnabled ? "" : "opacity-10"}`, checked: used, disabled: !mediaEnabled, onChange: onMediaSelectChange(media) }), (0, import_jsx_runtime120.jsxs)(Label, { className: `${mediaEnabled ? "" : "opacity-10"}`, htmlFor: "accept", children: [media, " "] })] }, media);
212854
- }), maybeValidationMessage(validationMessage.media)] });
212855
- }
212856
- function groupedStreamSelection() {
212857
- if (!groupingKey)
212858
- return;
212859
- return (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: (0, import_jsx_runtime120.jsxs)("fieldset", { className: "flex max-w-md flex-col gap-4", children: [(0, import_jsx_runtime120.jsx)("legend", { className: "mt-4", children: "Stream Selection (simplified)" }), (0, import_jsx_runtime120.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The streams that will be used from this node" }), availableGroups.map((s3, i3) => {
212860
- const selectedStreams = streamSelection.filter((f) => f[groupingKey] == s3 && allowedMedia.includes(f.media));
212861
- const totalStreams = availableStreams.filter((f) => f[groupingKey] == s3 && allowedMedia.includes(f.media));
212862
- return (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime120.jsx)(ToggleSwitch, { id: `stream-${i3}`, name: "streams", value: i3, checked: selectedStreams.length > 0 && selectedStreams.length == totalStreams.length, onChange: onGroupSelectChange(s3) }), (0, import_jsx_runtime120.jsx)(Label, { htmlFor: `stream-${i3}`, children: s3 })] }, i3);
212863
- }), maybeValidationMessage(validationMessage.streams)] }) });
212864
- }
212865
- function multiStreamSelection() {
212866
- return (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: (0, import_jsx_runtime120.jsxs)("fieldset", { className: "flex max-w-md flex-col gap-4", children: [(0, import_jsx_runtime120.jsx)("legend", { className: "mt-4", children: "Stream Selection" }), (0, import_jsx_runtime120.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The streams that will be used from this node" }), availableStreams.map((s3, i3) => {
212867
- const mediaEnabled = allowedMedia.includes(s3.media);
212868
- return (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime120.jsx)(ToggleSwitch, { id: `stream-${i3}`, name: "streams", value: i3, checked: !!streamSelection.find((f) => streamMatchesFilter(s3, f)), disabled: !mediaEnabled, onChange: onMultiStreamSelectChange(s3) }), (0, import_jsx_runtime120.jsx)(Label, { htmlFor: `stream-${i3}`, children: streamNameFromDefinition(s3) })] }, i3);
212869
- }), maybeValidationMessage(validationMessage.streams)] }) });
212870
- }
212871
- }
212872
- function streamNameFromDefinition(s3) {
212873
- const components = [s3.media];
212874
- if (s3.sourceName)
212875
- components.push(s3.sourceName.toString());
212876
- if (s3.programNumber)
212877
- components.push(s3.programNumber.toString());
212878
- if (s3.streamId)
212879
- components.push(s3.streamId.toString());
212880
- if (s3.renditionName)
212881
- components.push(s3.renditionName.toString());
212882
- return components.join("-");
212883
- }
212884
- var connection_editor_default = ConnectionEditor;
212885
-
212886
- // build/client/client/jsx/selected-connection.js
212887
212728
  function SelectedConnection(props) {
212888
212729
  function onEditClick(e2) {
212889
212730
  e2.preventDefault();
@@ -212897,7 +212738,7 @@ function SelectedConnection(props) {
212897
212738
  e2.preventDefault();
212898
212739
  props.onClearSelection();
212899
212740
  }
212900
- return (0, import_jsx_runtime121.jsx)("div", { className: "z-40 w-64 max-w-xs overflow-y-auto bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime121.jsxs)("div", { children: [(0, import_jsx_runtime121.jsxs)("div", { children: [(0, import_jsx_runtime121.jsx)("h4", { className: "mb-1.5 leading-none text-xl font-semibold text-gray-900 dark:text-white", children: "Subscription" }), (0, import_jsx_runtime121.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime121.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime121.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(props.connection.sourceNode.id, props.toplevel) })] }), (0, import_jsx_runtime121.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime121.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Destination" }), (0, import_jsx_runtime121.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(props.connection.destinationNode.id, props.toplevel) })] })] }), (0, import_jsx_runtime121.jsxs)("button", { type: "button", onClick: onClearSelectionClick, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-1 right-1 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime121.jsx)("span", { className: "sr-only", children: "Close menu" })] }), (0, import_jsx_runtime121.jsx)(SubscriptionSummarySmall, { sourceNode: props.connection.sourceNode, subscription: props.connection.subscription }), (0, import_jsx_runtime121.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime121.jsxs)("button", { type: "button", onClick: onEditClick, className: "text-white w-full inline-flex items-center 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", children: [(0, import_jsx_runtime121.jsxs)("svg", { "aria-hidden": "true", className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [(0, import_jsx_runtime121.jsx)("path", { d: "M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" }), (0, import_jsx_runtime121.jsx)("path", { fillRule: "evenodd", d: "M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z", clipRule: "evenodd" })] }), "Edit"] }), (0, import_jsx_runtime121.jsxs)("button", { type: "button", onClick: onDeleteClick, className: "inline-flex w-full items-center text-white 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-500 dark:hover:bg-red-600 dark:focus:ring-red-900", children: [(0, import_jsx_runtime121.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 mr-1.5 -ml-1", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime121.jsx)("path", { fillRule: "evenodd", d: "M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z", clipRule: "evenodd" }) }), "Delete"] })] })] }) });
212741
+ return (0, import_jsx_runtime120.jsx)("div", { className: "z-40 w-64 max-w-xs overflow-y-auto bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime120.jsxs)("div", { children: [(0, import_jsx_runtime120.jsxs)("div", { children: [(0, import_jsx_runtime120.jsx)("h4", { className: "mb-1.5 leading-none text-xl font-semibold text-gray-900 dark:text-white", children: "Subscription" }), (0, import_jsx_runtime120.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime120.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime120.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(props.connection.sourceNode.id, props.toplevel) })] }), (0, import_jsx_runtime120.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime120.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Destination" }), (0, import_jsx_runtime120.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(props.connection.destinationNode.id, props.toplevel) })] })] }), (0, import_jsx_runtime120.jsxs)("button", { type: "button", onClick: onClearSelectionClick, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-1 right-1 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime120.jsx)("span", { className: "sr-only", children: "Close menu" })] }), (0, import_jsx_runtime120.jsx)(SubscriptionSummarySmall, { sourceNode: props.connection.sourceNode, subscription: props.connection.subscription }), (0, import_jsx_runtime120.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime120.jsxs)("button", { type: "button", onClick: onEditClick, className: "text-white w-full inline-flex items-center 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", children: [(0, import_jsx_runtime120.jsxs)("svg", { "aria-hidden": "true", className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [(0, import_jsx_runtime120.jsx)("path", { d: "M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" }), (0, import_jsx_runtime120.jsx)("path", { fillRule: "evenodd", d: "M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z", clipRule: "evenodd" })] }), "Edit"] }), (0, import_jsx_runtime120.jsxs)("button", { type: "button", onClick: onDeleteClick, className: "inline-flex w-full items-center text-white 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-500 dark:hover:bg-red-600 dark:focus:ring-red-900", children: [(0, import_jsx_runtime120.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 mr-1.5 -ml-1", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime120.jsx)("path", { fillRule: "evenodd", d: "M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z", clipRule: "evenodd" }) }), "Delete"] })] })] }) });
212901
212742
  }
212902
212743
  function SubscriptionSummarySmall(props) {
212903
212744
  const sourceNodeInfo = props.sourceNode.info;
@@ -212917,58 +212758,58 @@ function SubscriptionSummarySmall(props) {
212917
212758
  for (const m2 of subscriptionMedia(props.subscription)) {
212918
212759
  mediaSelection[m2] = true;
212919
212760
  }
212920
- return (0, import_jsx_runtime121.jsxs)("dl", { className: "cursor-pointer", children: [(0, import_jsx_runtime121.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime121.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Strategy" }), (0, import_jsx_runtime121.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: SubscriptionTypeInfo[mode] })] }), selectionInputs()] });
212761
+ return (0, import_jsx_runtime120.jsxs)("dl", { className: "cursor-pointer", children: [(0, import_jsx_runtime120.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime120.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Strategy" }), (0, import_jsx_runtime120.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: SubscriptionTypeInfo[mode] })] }), selectionInputs()] });
212921
212762
  function selectionInputs() {
212922
212763
  switch (mode) {
212923
212764
  case "take-all-streams":
212924
212765
  case "take-first-stream":
212925
- return (0, import_jsx_runtime121.jsx)(import_jsx_runtime121.Fragment, { children: mediaSelectionCheckboxes() });
212766
+ return (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: mediaSelectionCheckboxes() });
212926
212767
  case "take-specific-streams":
212927
- return (0, import_jsx_runtime121.jsx)(import_jsx_runtime121.Fragment, { children: multiStreamSelection() });
212768
+ return (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: multiStreamSelection() });
212928
212769
  default:
212929
212770
  assertUnreachable(mode);
212930
212771
  }
212931
212772
  }
212932
212773
  function mediaSelectionCheckboxes() {
212933
- return (0, import_jsx_runtime121.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime121.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Media Selection" }), (0, import_jsx_runtime121.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: Object.entries(mediaSelection).filter(([_2, u2]) => u2).map(([m2]) => m2).join(", ") })] });
212774
+ return (0, import_jsx_runtime120.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime120.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Media Selection" }), (0, import_jsx_runtime120.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: Object.entries(mediaSelection).filter(([_2, u2]) => u2).map(([m2]) => m2).join(", ") })] });
212934
212775
  }
212935
212776
  function multiStreamSelection() {
212936
- return (0, import_jsx_runtime121.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime121.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Stream Selection" }), (0, import_jsx_runtime121.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: availableStreams.filter((s3) => !!streamSelection.find((f) => streamMatchesFilter(s3, f))).map((s3) => `${streamNameFromDefinition(s3)}`).join(", ") })] });
212777
+ return (0, import_jsx_runtime120.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime120.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Stream Selection" }), (0, import_jsx_runtime120.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: availableStreams.filter((s3) => !!streamSelection.find((f) => streamMatchesFilter(s3, f))).map((s3) => `${streamNameFromDefinition(s3)}`).join(", ") })] });
212937
212778
  }
212938
212779
  }
212939
212780
  var selected_connection_default = SelectedConnection;
212940
212781
 
212941
212782
  // build/client/client/jsx/selected-node.js
212942
- var import_jsx_runtime143 = __toESM(require_jsx_runtime());
212943
- var import_react100 = __toESM(require_react());
212783
+ var import_jsx_runtime142 = __toESM(require_jsx_runtime());
212784
+ var import_react99 = __toESM(require_react());
212944
212785
 
212945
212786
  // ../../node_modules/highlight.js/es/index.js
212946
212787
  var import_lib5 = __toESM(require_lib(), 1);
212947
212788
  var es_default = import_lib5.default;
212948
212789
 
212949
212790
  // ../../node_modules/@uiw/react-json-view/esm/index.js
212950
- var import_react99 = __toESM(require_react());
212791
+ var import_react98 = __toESM(require_react());
212951
212792
 
212952
212793
  // ../../node_modules/@uiw/react-json-view/esm/store.js
212953
- var import_react91 = __toESM(require_react());
212794
+ var import_react90 = __toESM(require_react());
212954
212795
 
212955
212796
  // ../../node_modules/@uiw/react-json-view/esm/store/ShowTools.js
212956
- var import_react85 = __toESM(require_react());
212957
- var import_jsx_runtime122 = __toESM(require_jsx_runtime());
212797
+ var import_react84 = __toESM(require_react());
212798
+ var import_jsx_runtime121 = __toESM(require_jsx_runtime());
212958
212799
  var initialState = {};
212959
- var Context = /* @__PURE__ */ (0, import_react85.createContext)(initialState);
212800
+ var Context = /* @__PURE__ */ (0, import_react84.createContext)(initialState);
212960
212801
  var reducer = (state, action) => _extends({}, state, action);
212961
212802
  var useShowToolsStore = () => {
212962
- return (0, import_react85.useContext)(Context);
212803
+ return (0, import_react84.useContext)(Context);
212963
212804
  };
212964
- var DispatchShowTools = /* @__PURE__ */ (0, import_react85.createContext)(() => {
212805
+ var DispatchShowTools = /* @__PURE__ */ (0, import_react84.createContext)(() => {
212965
212806
  });
212966
212807
  DispatchShowTools.displayName = "JVR.DispatchShowTools";
212967
212808
  function useShowTools() {
212968
- return (0, import_react85.useReducer)(reducer, initialState);
212809
+ return (0, import_react84.useReducer)(reducer, initialState);
212969
212810
  }
212970
212811
  function useShowToolsDispatch() {
212971
- return (0, import_react85.useContext)(DispatchShowTools);
212812
+ return (0, import_react84.useContext)(DispatchShowTools);
212972
212813
  }
212973
212814
  var ShowTools = (_ref) => {
212974
212815
  var {
@@ -212976,9 +212817,9 @@ var ShowTools = (_ref) => {
212976
212817
  dispatch,
212977
212818
  children
212978
212819
  } = _ref;
212979
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Context.Provider, {
212820
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Context.Provider, {
212980
212821
  value: initial,
212981
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DispatchShowTools.Provider, {
212822
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(DispatchShowTools.Provider, {
212982
212823
  value: dispatch,
212983
212824
  children
212984
212825
  })
@@ -212987,22 +212828,22 @@ var ShowTools = (_ref) => {
212987
212828
  ShowTools.displayName = "JVR.ShowTools";
212988
212829
 
212989
212830
  // ../../node_modules/@uiw/react-json-view/esm/store/Expands.js
212990
- var import_react86 = __toESM(require_react());
212991
- var import_jsx_runtime123 = __toESM(require_jsx_runtime());
212831
+ var import_react85 = __toESM(require_react());
212832
+ var import_jsx_runtime122 = __toESM(require_jsx_runtime());
212992
212833
  var initialState2 = {};
212993
- var Context2 = /* @__PURE__ */ (0, import_react86.createContext)(initialState2);
212834
+ var Context2 = /* @__PURE__ */ (0, import_react85.createContext)(initialState2);
212994
212835
  var reducer2 = (state, action) => _extends({}, state, action);
212995
212836
  var useExpandsStore = () => {
212996
- return (0, import_react86.useContext)(Context2);
212837
+ return (0, import_react85.useContext)(Context2);
212997
212838
  };
212998
- var DispatchExpands = /* @__PURE__ */ (0, import_react86.createContext)(() => {
212839
+ var DispatchExpands = /* @__PURE__ */ (0, import_react85.createContext)(() => {
212999
212840
  });
213000
212841
  DispatchExpands.displayName = "JVR.DispatchExpands";
213001
212842
  function useExpands() {
213002
- return (0, import_react86.useReducer)(reducer2, initialState2);
212843
+ return (0, import_react85.useReducer)(reducer2, initialState2);
213003
212844
  }
213004
212845
  function useExpandsDispatch() {
213005
- return (0, import_react86.useContext)(DispatchExpands);
212846
+ return (0, import_react85.useContext)(DispatchExpands);
213006
212847
  }
213007
212848
  var Expands = (_ref) => {
213008
212849
  var {
@@ -213010,9 +212851,9 @@ var Expands = (_ref) => {
213010
212851
  dispatch,
213011
212852
  children
213012
212853
  } = _ref;
213013
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Context2.Provider, {
212854
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Context2.Provider, {
213014
212855
  value: initial,
213015
- children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DispatchExpands.Provider, {
212856
+ children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DispatchExpands.Provider, {
213016
212857
  value: dispatch,
213017
212858
  children
213018
212859
  })
@@ -213021,8 +212862,8 @@ var Expands = (_ref) => {
213021
212862
  Expands.displayName = "JVR.Expands";
213022
212863
 
213023
212864
  // ../../node_modules/@uiw/react-json-view/esm/store/Types.js
213024
- var import_react87 = __toESM(require_react());
213025
- var import_jsx_runtime124 = __toESM(require_jsx_runtime());
212865
+ var import_react86 = __toESM(require_react());
212866
+ var import_jsx_runtime123 = __toESM(require_jsx_runtime());
213026
212867
  var initialState3 = {
213027
212868
  Str: {
213028
212869
  as: "span",
@@ -213144,19 +212985,19 @@ var initialState3 = {
213144
212985
  children: "date"
213145
212986
  }
213146
212987
  };
213147
- var Context3 = /* @__PURE__ */ (0, import_react87.createContext)(initialState3);
212988
+ var Context3 = /* @__PURE__ */ (0, import_react86.createContext)(initialState3);
213148
212989
  var reducer3 = (state, action) => _extends({}, state, action);
213149
212990
  var useTypesStore = () => {
213150
- return (0, import_react87.useContext)(Context3);
212991
+ return (0, import_react86.useContext)(Context3);
213151
212992
  };
213152
- var DispatchTypes = /* @__PURE__ */ (0, import_react87.createContext)(() => {
212993
+ var DispatchTypes = /* @__PURE__ */ (0, import_react86.createContext)(() => {
213153
212994
  });
213154
212995
  DispatchTypes.displayName = "JVR.DispatchTypes";
213155
212996
  function useTypes() {
213156
- return (0, import_react87.useReducer)(reducer3, initialState3);
212997
+ return (0, import_react86.useReducer)(reducer3, initialState3);
213157
212998
  }
213158
212999
  function useTypesDispatch() {
213159
- return (0, import_react87.useContext)(DispatchTypes);
213000
+ return (0, import_react86.useContext)(DispatchTypes);
213160
213001
  }
213161
213002
  function Types(_ref) {
213162
213003
  var {
@@ -213164,9 +213005,9 @@ function Types(_ref) {
213164
213005
  dispatch,
213165
213006
  children
213166
213007
  } = _ref;
213167
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Context3.Provider, {
213008
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Context3.Provider, {
213168
213009
  value: initial,
213169
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DispatchTypes.Provider, {
213010
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DispatchTypes.Provider, {
213170
213011
  value: dispatch,
213171
213012
  children
213172
213013
  })
@@ -213175,11 +213016,11 @@ function Types(_ref) {
213175
213016
  Types.displayName = "JVR.Types";
213176
213017
 
213177
213018
  // ../../node_modules/@uiw/react-json-view/esm/store/Symbols.js
213178
- var import_react89 = __toESM(require_react());
213019
+ var import_react88 = __toESM(require_react());
213179
213020
 
213180
213021
  // ../../node_modules/@uiw/react-json-view/esm/arrow/TriangleArrow.js
213181
- var import_react88 = __toESM(require_react());
213182
- var import_jsx_runtime125 = __toESM(require_jsx_runtime());
213022
+ var import_react87 = __toESM(require_react());
213023
+ var import_jsx_runtime124 = __toESM(require_jsx_runtime());
213183
213024
  var _excluded3 = ["style"];
213184
213025
  function TriangleArrow(props) {
213185
213026
  var {
@@ -213192,12 +213033,12 @@ function TriangleArrow(props) {
213192
213033
  userSelect: "none",
213193
213034
  display: "inline-flex"
213194
213035
  }, style);
213195
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("svg", _extends({
213036
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("svg", _extends({
213196
213037
  viewBox: "0 0 24 24",
213197
213038
  fill: "var(--w-rjv-arrow-color, currentColor)",
213198
213039
  style: defaultStyle
213199
213040
  }, reset, {
213200
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("path", {
213041
+ children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("path", {
213201
213042
  d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
213202
213043
  })
213203
213044
  }));
@@ -213205,7 +213046,7 @@ function TriangleArrow(props) {
213205
213046
  TriangleArrow.displayName = "JVR.TriangleArrow";
213206
213047
 
213207
213048
  // ../../node_modules/@uiw/react-json-view/esm/store/Symbols.js
213208
- var import_jsx_runtime126 = __toESM(require_jsx_runtime());
213049
+ var import_jsx_runtime125 = __toESM(require_jsx_runtime());
213209
213050
  var initialState4 = {
213210
213051
  Arrow: {
213211
213052
  as: "span",
@@ -213214,7 +213055,7 @@ var initialState4 = {
213214
213055
  transform: "rotate(0deg)",
213215
213056
  transition: "all 0.3s"
213216
213057
  },
213217
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TriangleArrow, {})
213058
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(TriangleArrow, {})
213218
213059
  },
213219
213060
  Colon: {
213220
213061
  as: "span",
@@ -213275,19 +213116,19 @@ var initialState4 = {
213275
213116
  children: "}"
213276
213117
  }
213277
213118
  };
213278
- var Context4 = /* @__PURE__ */ (0, import_react89.createContext)(initialState4);
213119
+ var Context4 = /* @__PURE__ */ (0, import_react88.createContext)(initialState4);
213279
213120
  var reducer4 = (state, action) => _extends({}, state, action);
213280
213121
  var useSymbolsStore = () => {
213281
- return (0, import_react89.useContext)(Context4);
213122
+ return (0, import_react88.useContext)(Context4);
213282
213123
  };
213283
- var DispatchSymbols = /* @__PURE__ */ (0, import_react89.createContext)(() => {
213124
+ var DispatchSymbols = /* @__PURE__ */ (0, import_react88.createContext)(() => {
213284
213125
  });
213285
213126
  DispatchSymbols.displayName = "JVR.DispatchSymbols";
213286
213127
  function useSymbols() {
213287
- return (0, import_react89.useReducer)(reducer4, initialState4);
213128
+ return (0, import_react88.useReducer)(reducer4, initialState4);
213288
213129
  }
213289
213130
  function useSymbolsDispatch() {
213290
- return (0, import_react89.useContext)(DispatchSymbols);
213131
+ return (0, import_react88.useContext)(DispatchSymbols);
213291
213132
  }
213292
213133
  var Symbols = (_ref) => {
213293
213134
  var {
@@ -213295,9 +213136,9 @@ var Symbols = (_ref) => {
213295
213136
  dispatch,
213296
213137
  children
213297
213138
  } = _ref;
213298
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Context4.Provider, {
213139
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Context4.Provider, {
213299
213140
  value: initial,
213300
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DispatchSymbols.Provider, {
213141
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DispatchSymbols.Provider, {
213301
213142
  value: dispatch,
213302
213143
  children
213303
213144
  })
@@ -213306,8 +213147,8 @@ var Symbols = (_ref) => {
213306
213147
  Symbols.displayName = "JVR.Symbols";
213307
213148
 
213308
213149
  // ../../node_modules/@uiw/react-json-view/esm/store/Section.js
213309
- var import_react90 = __toESM(require_react());
213310
- var import_jsx_runtime127 = __toESM(require_jsx_runtime());
213150
+ var import_react89 = __toESM(require_react());
213151
+ var import_jsx_runtime126 = __toESM(require_jsx_runtime());
213311
213152
  var initialState5 = {
213312
213153
  Copied: {
213313
213154
  className: "w-rjv-copied",
@@ -213354,19 +213195,19 @@ var initialState5 = {
213354
213195
  className: "w-rjv-object-key"
213355
213196
  }
213356
213197
  };
213357
- var Context5 = /* @__PURE__ */ (0, import_react90.createContext)(initialState5);
213198
+ var Context5 = /* @__PURE__ */ (0, import_react89.createContext)(initialState5);
213358
213199
  var reducer5 = (state, action) => _extends({}, state, action);
213359
213200
  var useSectionStore = () => {
213360
- return (0, import_react90.useContext)(Context5);
213201
+ return (0, import_react89.useContext)(Context5);
213361
213202
  };
213362
- var DispatchSection = /* @__PURE__ */ (0, import_react90.createContext)(() => {
213203
+ var DispatchSection = /* @__PURE__ */ (0, import_react89.createContext)(() => {
213363
213204
  });
213364
213205
  DispatchSection.displayName = "JVR.DispatchSection";
213365
213206
  function useSection() {
213366
- return (0, import_react90.useReducer)(reducer5, initialState5);
213207
+ return (0, import_react89.useReducer)(reducer5, initialState5);
213367
213208
  }
213368
213209
  function useSectionDispatch() {
213369
- return (0, import_react90.useContext)(DispatchSection);
213210
+ return (0, import_react89.useContext)(DispatchSection);
213370
213211
  }
213371
213212
  var Section = (_ref) => {
213372
213213
  var {
@@ -213374,9 +213215,9 @@ var Section = (_ref) => {
213374
213215
  dispatch,
213375
213216
  children
213376
213217
  } = _ref;
213377
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Context5.Provider, {
213218
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Context5.Provider, {
213378
213219
  value: initial,
213379
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DispatchSection.Provider, {
213220
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DispatchSection.Provider, {
213380
213221
  value: dispatch,
213381
213222
  children
213382
213223
  })
@@ -213385,21 +213226,21 @@ var Section = (_ref) => {
213385
213226
  Section.displayName = "JVR.Section";
213386
213227
 
213387
213228
  // ../../node_modules/@uiw/react-json-view/esm/store.js
213388
- var import_jsx_runtime128 = __toESM(require_jsx_runtime());
213229
+ var import_jsx_runtime127 = __toESM(require_jsx_runtime());
213389
213230
  var initialState6 = {
213390
213231
  objectSortKeys: false,
213391
213232
  indentWidth: 15
213392
213233
  };
213393
- var Context6 = /* @__PURE__ */ (0, import_react91.createContext)(initialState6);
213234
+ var Context6 = /* @__PURE__ */ (0, import_react90.createContext)(initialState6);
213394
213235
  Context6.displayName = "JVR.Context";
213395
- var DispatchContext = /* @__PURE__ */ (0, import_react91.createContext)(() => {
213236
+ var DispatchContext = /* @__PURE__ */ (0, import_react90.createContext)(() => {
213396
213237
  });
213397
213238
  DispatchContext.displayName = "JVR.DispatchContext";
213398
213239
  function reducer6(state, action) {
213399
213240
  return _extends({}, state, action);
213400
213241
  }
213401
213242
  var useStore = () => {
213402
- return (0, import_react91.useContext)(Context6);
213243
+ return (0, import_react90.useContext)(Context6);
213403
213244
  };
213404
213245
  var Provider = (_ref) => {
213405
213246
  var {
@@ -213407,30 +213248,30 @@ var Provider = (_ref) => {
213407
213248
  initialState: init,
213408
213249
  initialTypes
213409
213250
  } = _ref;
213410
- var [state, dispatch] = (0, import_react91.useReducer)(reducer6, Object.assign({}, initialState6, init));
213251
+ var [state, dispatch] = (0, import_react90.useReducer)(reducer6, Object.assign({}, initialState6, init));
213411
213252
  var [showTools, showToolsDispatch] = useShowTools();
213412
213253
  var [expands, expandsDispatch] = useExpands();
213413
213254
  var [types, typesDispatch] = useTypes();
213414
213255
  var [symbols, symbolsDispatch] = useSymbols();
213415
213256
  var [section, sectionDispatch] = useSection();
213416
- (0, import_react91.useEffect)(() => dispatch(_extends({}, init)), [init]);
213417
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Context6.Provider, {
213257
+ (0, import_react90.useEffect)(() => dispatch(_extends({}, init)), [init]);
213258
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Context6.Provider, {
213418
213259
  value: state,
213419
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DispatchContext.Provider, {
213260
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DispatchContext.Provider, {
213420
213261
  value: dispatch,
213421
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ShowTools, {
213262
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ShowTools, {
213422
213263
  initial: showTools,
213423
213264
  dispatch: showToolsDispatch,
213424
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Expands, {
213265
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Expands, {
213425
213266
  initial: expands,
213426
213267
  dispatch: expandsDispatch,
213427
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Types, {
213268
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Types, {
213428
213269
  initial: _extends({}, types, initialTypes),
213429
213270
  dispatch: typesDispatch,
213430
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Symbols, {
213271
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Symbols, {
213431
213272
  initial: symbols,
213432
213273
  dispatch: symbolsDispatch,
213433
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Section, {
213274
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Section, {
213434
213275
  initial: section,
213435
213276
  dispatch: sectionDispatch,
213436
213277
  children
@@ -213445,7 +213286,7 @@ var Provider = (_ref) => {
213445
213286
  Provider.displayName = "JVR.Provider";
213446
213287
 
213447
213288
  // ../../node_modules/@uiw/react-json-view/esm/Container.js
213448
- var import_react98 = __toESM(require_react());
213289
+ var import_react97 = __toESM(require_react());
213449
213290
 
213450
213291
  // ../../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js
213451
213292
  function _objectDestructuringEmpty(t3) {
@@ -213453,7 +213294,7 @@ function _objectDestructuringEmpty(t3) {
213453
213294
  }
213454
213295
 
213455
213296
  // ../../node_modules/@uiw/react-json-view/esm/symbol/index.js
213456
- var import_jsx_runtime129 = __toESM(require_jsx_runtime());
213297
+ var import_jsx_runtime128 = __toESM(require_jsx_runtime());
213457
213298
  var _excluded4 = ["isNumber", "value", "parentValue", "keyName", "keys"];
213458
213299
  var _excluded22 = ["as", "render"];
213459
213300
  var _excluded32 = ["as", "render"];
@@ -213489,7 +213330,7 @@ var Quote = (props) => {
213489
213330
  };
213490
213331
  var child = render2 && typeof render2 === "function" && render2(elmProps, result);
213491
213332
  if (child) return child;
213492
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Elm, _extends({}, elmProps));
213333
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Elm, _extends({}, elmProps));
213493
213334
  };
213494
213335
  Quote.displayName = "JVR.Quote";
213495
213336
  var ValueQuote = (props) => {
@@ -213505,7 +213346,7 @@ var ValueQuote = (props) => {
213505
213346
  var elmProps = _extends({}, other, reset);
213506
213347
  var child = render2 && typeof render2 === "function" && render2(elmProps, {});
213507
213348
  if (child) return child;
213508
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Elm, _extends({}, elmProps));
213349
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Elm, _extends({}, elmProps));
213509
213350
  };
213510
213351
  ValueQuote.displayName = "JVR.ValueQuote";
213511
213352
  var Colon = (props) => {
@@ -213530,7 +213371,7 @@ var Colon = (props) => {
213530
213371
  keys: keys || (keyName ? [keyName] : [])
213531
213372
  });
213532
213373
  if (child) return child;
213533
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Elm, _extends({}, reset));
213374
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Elm, _extends({}, reset));
213534
213375
  };
213535
213376
  Colon.displayName = "JVR.Colon";
213536
213377
  var Arrow = (props) => {
@@ -213566,7 +213407,7 @@ var Arrow = (props) => {
213566
213407
  };
213567
213408
  var child = isRender && render2(elmProps, result);
213568
213409
  if (child) return child;
213569
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Elm, _extends({}, reset, {
213410
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Elm, _extends({}, reset, {
213570
213411
  style: _extends({}, style, resetStyle)
213571
213412
  }));
213572
213413
  };
@@ -213597,7 +213438,7 @@ var BracketsOpen = (props) => {
213597
213438
  var BracketsLeftComp = as || "span";
213598
213439
  var _child = _render && typeof _render === "function" && _render(reset, result);
213599
213440
  if (_child) return _child;
213600
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BracketsLeftComp, _extends({}, reset));
213441
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(BracketsLeftComp, _extends({}, reset));
213601
213442
  }
213602
213443
  var {
213603
213444
  as: elm,
@@ -213606,7 +213447,7 @@ var BracketsOpen = (props) => {
213606
213447
  var BraceLeftComp = elm || "span";
213607
213448
  var child = render2 && typeof render2 === "function" && render2(resetProps, result);
213608
213449
  if (child) return child;
213609
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BraceLeftComp, _extends({}, resetProps));
213450
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(BraceLeftComp, _extends({}, resetProps));
213610
213451
  };
213611
213452
  BracketsOpen.displayName = "JVR.BracketsOpen";
213612
213453
  var BracketsClose = (props) => {
@@ -213637,7 +213478,7 @@ var BracketsClose = (props) => {
213637
213478
  var BracketsRightComp = as || "span";
213638
213479
  var _child2 = _render2 && typeof _render2 === "function" && _render2(_reset, result);
213639
213480
  if (_child2) return _child2;
213640
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BracketsRightComp, _extends({}, _reset));
213481
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(BracketsRightComp, _extends({}, _reset));
213641
213482
  }
213642
213483
  var {
213643
213484
  as: elm,
@@ -213646,12 +213487,12 @@ var BracketsClose = (props) => {
213646
213487
  var BraceRightComp = elm || "span";
213647
213488
  var child = render2 && typeof render2 === "function" && render2(reset, result);
213648
213489
  if (child) return child;
213649
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BraceRightComp, _extends({}, reset));
213490
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(BraceRightComp, _extends({}, reset));
213650
213491
  };
213651
213492
  BracketsClose.displayName = "JVR.BracketsClose";
213652
213493
 
213653
213494
  // ../../node_modules/@uiw/react-json-view/esm/comps/NestedClose.js
213654
- var import_jsx_runtime130 = __toESM(require_jsx_runtime());
213495
+ var import_jsx_runtime129 = __toESM(require_jsx_runtime());
213655
213496
  var NestedClose = (props) => {
213656
213497
  var _expands$expandKey;
213657
213498
  var {
@@ -213683,9 +213524,9 @@ var NestedClose = (props) => {
213683
213524
  var style = {
213684
213525
  paddingLeft: 4
213685
213526
  };
213686
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", {
213527
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", {
213687
213528
  style,
213688
- children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(BracketsClose, {
213529
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BracketsClose, {
213689
213530
  isBrackets: isArray2 || isMySet,
213690
213531
  isVisiable: true
213691
213532
  })
@@ -213694,11 +213535,11 @@ var NestedClose = (props) => {
213694
213535
  NestedClose.displayName = "JVR.NestedClose";
213695
213536
 
213696
213537
  // ../../node_modules/@uiw/react-json-view/esm/comps/KeyValues.js
213697
- var import_react97 = __toESM(require_react());
213538
+ var import_react96 = __toESM(require_react());
213698
213539
 
213699
213540
  // ../../node_modules/@uiw/react-json-view/esm/types/index.js
213700
- var import_react92 = __toESM(require_react());
213701
- var import_jsx_runtime131 = __toESM(require_jsx_runtime());
213541
+ var import_react91 = __toESM(require_react());
213542
+ var import_jsx_runtime130 = __toESM(require_jsx_runtime());
213702
213543
  var _excluded10 = ["as", "render"];
213703
213544
  var _excluded23 = ["as", "render"];
213704
213545
  var _excluded33 = ["as", "render"];
@@ -213747,7 +213588,7 @@ var SetComp = (_ref) => {
213747
213588
  });
213748
213589
  if (type) return type;
213749
213590
  var Elm = as || "span";
213750
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Elm, _extends({}, reset));
213591
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Elm, _extends({}, reset));
213751
213592
  };
213752
213593
  SetComp.displayName = "JVR.SetComp";
213753
213594
  var MapComp = (_ref2) => {
@@ -213773,7 +213614,7 @@ var MapComp = (_ref2) => {
213773
213614
  });
213774
213615
  if (type) return type;
213775
213616
  var Elm = as || "span";
213776
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Elm, _extends({}, reset));
213617
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Elm, _extends({}, reset));
213777
213618
  };
213778
213619
  MapComp.displayName = "JVR.MapComp";
213779
213620
  var defalutStyle = {
@@ -213797,8 +213638,8 @@ var TypeString = (_ref3) => {
213797
213638
  render: render2
213798
213639
  } = Str, reset = _objectWithoutPropertiesLoose(Str, _excluded33);
213799
213640
  var childrenStr = children;
213800
- var [shorten, setShorten] = (0, import_react92.useState)(length && childrenStr.length > length);
213801
- (0, import_react92.useEffect)(() => setShorten(length && childrenStr.length > length), [length]);
213641
+ var [shorten, setShorten] = (0, import_react91.useState)(length && childrenStr.length > length);
213642
+ (0, import_react91.useEffect)(() => setShorten(length && childrenStr.length > length), [length]);
213802
213643
  var Comp = as || "span";
213803
213644
  var style = _extends({}, defalutStyle, Str.style || {});
213804
213645
  if (length > 0) {
@@ -213828,14 +213669,14 @@ var TypeString = (_ref3) => {
213828
213669
  value: children,
213829
213670
  keyName
213830
213671
  });
213831
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213832
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213672
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213673
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213833
213674
  style
213834
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213835
- children: [/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ValueQuote, {}), /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213675
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213676
+ children: [/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ValueQuote, {}), /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213836
213677
  className: "w-rjv-value",
213837
213678
  children: text
213838
- })), /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ValueQuote, {})]
213679
+ })), /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ValueQuote, {})]
213839
213680
  })]
213840
213681
  });
213841
213682
  };
@@ -213871,10 +213712,10 @@ var TypeTrue = (_ref4) => {
213871
213712
  value: children,
213872
213713
  keyName
213873
213714
  });
213874
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213875
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213715
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213716
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213876
213717
  style
213877
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213718
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213878
213719
  className: "w-rjv-value",
213879
213720
  children: children == null ? void 0 : children.toString()
213880
213721
  }))]
@@ -213912,10 +213753,10 @@ var TypeFalse = (_ref5) => {
213912
213753
  value: children,
213913
213754
  keyName
213914
213755
  });
213915
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213916
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213756
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213757
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213917
213758
  style
213918
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213759
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213919
213760
  className: "w-rjv-value",
213920
213761
  children: children == null ? void 0 : children.toString()
213921
213762
  }))]
@@ -213953,10 +213794,10 @@ var TypeFloat = (_ref6) => {
213953
213794
  value: children,
213954
213795
  keyName
213955
213796
  });
213956
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213957
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213797
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213798
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213958
213799
  style
213959
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213800
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213960
213801
  className: "w-rjv-value",
213961
213802
  children: children == null ? void 0 : children.toString()
213962
213803
  }))]
@@ -213994,10 +213835,10 @@ var TypeInt = (_ref7) => {
213994
213835
  value: children,
213995
213836
  keyName
213996
213837
  });
213997
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
213998
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213838
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213839
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
213999
213840
  style
214000
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213841
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214001
213842
  className: "w-rjv-value",
214002
213843
  children: children == null ? void 0 : children.toString()
214003
213844
  }))]
@@ -214035,10 +213876,10 @@ var TypeBigint = (_ref8) => {
214035
213876
  value: children,
214036
213877
  keyName
214037
213878
  });
214038
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214039
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213879
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213880
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214040
213881
  style
214041
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213882
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214042
213883
  className: "w-rjv-value",
214043
213884
  children: bigIntToString(children == null ? void 0 : children.toString())
214044
213885
  }))]
@@ -214076,15 +213917,15 @@ var TypeUrl = (_ref9) => {
214076
213917
  value: children,
214077
213918
  keyName
214078
213919
  });
214079
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214080
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213920
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213921
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214081
213922
  style
214082
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("a", _extends({
213923
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("a", _extends({
214083
213924
  href: children == null ? void 0 : children.href,
214084
213925
  target: "_blank"
214085
213926
  }, reset, {
214086
213927
  className: "w-rjv-value",
214087
- children: [/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ValueQuote, {}), children == null ? void 0 : children.href, /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ValueQuote, {})]
213928
+ children: [/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ValueQuote, {}), children == null ? void 0 : children.href, /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ValueQuote, {})]
214088
213929
  }))]
214089
213930
  });
214090
213931
  };
@@ -214121,10 +213962,10 @@ var TypeDate = (_ref10) => {
214121
213962
  value: children,
214122
213963
  keyName
214123
213964
  });
214124
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214125
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213965
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
213966
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214126
213967
  style
214127
- }))), child || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
213968
+ }))), child || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214128
213969
  className: "w-rjv-value",
214129
213970
  children: childStr
214130
213971
  }))]
@@ -214162,8 +214003,8 @@ var TypeUndefined = (_ref11) => {
214162
214003
  value: children,
214163
214004
  keyName
214164
214005
  });
214165
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214166
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
214006
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
214007
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214167
214008
  style
214168
214009
  }))), child]
214169
214010
  });
@@ -214200,8 +214041,8 @@ var TypeNull = (_ref12) => {
214200
214041
  value: children,
214201
214042
  keyName
214202
214043
  });
214203
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214204
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
214044
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
214045
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214205
214046
  style
214206
214047
  }))), child]
214207
214048
  });
@@ -214238,8 +214079,8 @@ var TypeNan = (_ref13) => {
214238
214079
  value: children,
214239
214080
  keyName
214240
214081
  });
214241
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_react92.Fragment, {
214242
- children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Comp, _extends({}, reset, {
214082
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react91.Fragment, {
214083
+ children: [displayDataTypes && (type || /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Comp, _extends({}, reset, {
214243
214084
  style
214244
214085
  }))), child]
214245
214086
  });
@@ -214247,7 +214088,7 @@ var TypeNan = (_ref13) => {
214247
214088
  TypeNan.displayName = "JVR.TypeNan";
214248
214089
 
214249
214090
  // ../../node_modules/@uiw/react-json-view/esm/comps/Value.js
214250
- var import_jsx_runtime132 = __toESM(require_jsx_runtime());
214091
+ var import_jsx_runtime131 = __toESM(require_jsx_runtime());
214251
214092
  var isFloat = (n3) => Number(n3) === n3 && n3 % 1 !== 0 || isNaN(n3);
214252
214093
  var Value = (props) => {
214253
214094
  var {
@@ -214258,54 +214099,54 @@ var Value = (props) => {
214258
214099
  keyName
214259
214100
  };
214260
214101
  if (value instanceof URL) {
214261
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeUrl, _extends({}, reset, {
214102
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeUrl, _extends({}, reset, {
214262
214103
  children: value
214263
214104
  }));
214264
214105
  }
214265
214106
  if (typeof value === "string") {
214266
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeString, _extends({}, reset, {
214107
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeString, _extends({}, reset, {
214267
214108
  children: value
214268
214109
  }));
214269
214110
  }
214270
214111
  if (value === true) {
214271
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeTrue, _extends({}, reset, {
214112
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeTrue, _extends({}, reset, {
214272
214113
  children: value
214273
214114
  }));
214274
214115
  }
214275
214116
  if (value === false) {
214276
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeFalse, _extends({}, reset, {
214117
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeFalse, _extends({}, reset, {
214277
214118
  children: value
214278
214119
  }));
214279
214120
  }
214280
214121
  if (value === null) {
214281
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeNull, _extends({}, reset, {
214122
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeNull, _extends({}, reset, {
214282
214123
  children: value
214283
214124
  }));
214284
214125
  }
214285
214126
  if (value === void 0) {
214286
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeUndefined, _extends({}, reset, {
214127
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeUndefined, _extends({}, reset, {
214287
214128
  children: value
214288
214129
  }));
214289
214130
  }
214290
214131
  if (value instanceof Date) {
214291
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeDate, _extends({}, reset, {
214132
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeDate, _extends({}, reset, {
214292
214133
  children: value
214293
214134
  }));
214294
214135
  }
214295
214136
  if (typeof value === "number" && isNaN(value)) {
214296
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeNan, _extends({}, reset, {
214137
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeNan, _extends({}, reset, {
214297
214138
  children: value
214298
214139
  }));
214299
214140
  } else if (typeof value === "number" && isFloat(value)) {
214300
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeFloat, _extends({}, reset, {
214141
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeFloat, _extends({}, reset, {
214301
214142
  children: value
214302
214143
  }));
214303
214144
  } else if (typeof value === "bigint") {
214304
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeBigint, _extends({}, reset, {
214145
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeBigint, _extends({}, reset, {
214305
214146
  children: value
214306
214147
  }));
214307
214148
  } else if (typeof value === "number") {
214308
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TypeInt, _extends({}, reset, {
214149
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TypeInt, _extends({}, reset, {
214309
214150
  children: value
214310
214151
  }));
214311
214152
  }
@@ -214314,7 +214155,7 @@ var Value = (props) => {
214314
214155
  Value.displayName = "JVR.Value";
214315
214156
 
214316
214157
  // ../../node_modules/@uiw/react-json-view/esm/utils/useRender.js
214317
- var import_react93 = __toESM(require_react());
214158
+ var import_react92 = __toESM(require_react());
214318
214159
  function useSymbolsRender(currentProps, props, key) {
214319
214160
  var dispatch = useSymbolsDispatch();
214320
214161
  var cls = [currentProps.className, props.className].filter(Boolean).join(" ");
@@ -214323,7 +214164,7 @@ function useSymbolsRender(currentProps, props, key) {
214323
214164
  style: _extends({}, currentProps.style, props.style),
214324
214165
  children: props.children || currentProps.children
214325
214166
  });
214326
- (0, import_react93.useEffect)(() => dispatch({
214167
+ (0, import_react92.useEffect)(() => dispatch({
214327
214168
  [key]: reset
214328
214169
  }), [props]);
214329
214170
  }
@@ -214335,7 +214176,7 @@ function useTypesRender(currentProps, props, key) {
214335
214176
  style: _extends({}, currentProps.style, props.style),
214336
214177
  children: props.children || currentProps.children
214337
214178
  });
214338
- (0, import_react93.useEffect)(() => dispatch({
214179
+ (0, import_react92.useEffect)(() => dispatch({
214339
214180
  [key]: reset
214340
214181
  }), [props]);
214341
214182
  }
@@ -214347,13 +214188,13 @@ function useSectionRender(currentProps, props, key) {
214347
214188
  style: _extends({}, currentProps.style, props.style),
214348
214189
  children: props.children || currentProps.children
214349
214190
  });
214350
- (0, import_react93.useEffect)(() => dispatch({
214191
+ (0, import_react92.useEffect)(() => dispatch({
214351
214192
  [key]: reset
214352
214193
  }), [props]);
214353
214194
  }
214354
214195
 
214355
214196
  // ../../node_modules/@uiw/react-json-view/esm/section/KeyName.js
214356
- var import_jsx_runtime133 = __toESM(require_jsx_runtime());
214197
+ var import_jsx_runtime132 = __toESM(require_jsx_runtime());
214357
214198
  var _excluded14 = ["as", "render"];
214358
214199
  var KeyName = (props) => {
214359
214200
  var {
@@ -214393,14 +214234,14 @@ var KeyNameComp = (props) => {
214393
214234
  keys: keys || (keyName ? [keyName] : [])
214394
214235
  });
214395
214236
  if (child) return child;
214396
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Elm, _extends({}, reset, {
214237
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Elm, _extends({}, reset, {
214397
214238
  children
214398
214239
  }));
214399
214240
  };
214400
214241
  KeyNameComp.displayName = "JVR.KeyNameComp";
214401
214242
 
214402
214243
  // ../../node_modules/@uiw/react-json-view/esm/section/Row.js
214403
- var import_jsx_runtime134 = __toESM(require_jsx_runtime());
214244
+ var import_jsx_runtime133 = __toESM(require_jsx_runtime());
214404
214245
  var _excluded15 = ["children", "value", "parentValue", "keyName", "keys"];
214405
214246
  var _excluded24 = ["as", "render", "children"];
214406
214247
  var Row = (props) => {
@@ -214436,17 +214277,17 @@ var RowComp = (props) => {
214436
214277
  keys
214437
214278
  });
214438
214279
  if (child) return child;
214439
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Elm, _extends({}, other, reset, {
214280
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Elm, _extends({}, other, reset, {
214440
214281
  children
214441
214282
  }));
214442
214283
  };
214443
214284
  RowComp.displayName = "JVR.RowComp";
214444
214285
 
214445
214286
  // ../../node_modules/@uiw/react-json-view/esm/utils/useHighlight.js
214446
- var import_react94 = __toESM(require_react());
214287
+ var import_react93 = __toESM(require_react());
214447
214288
  function usePrevious(value) {
214448
- var ref = (0, import_react94.useRef)();
214449
- (0, import_react94.useEffect)(() => {
214289
+ var ref = (0, import_react93.useRef)();
214290
+ (0, import_react93.useEffect)(() => {
214450
214291
  ref.current = value;
214451
214292
  });
214452
214293
  return ref.current;
@@ -214458,7 +214299,7 @@ function useHighlight(_ref) {
214458
214299
  highlightContainer
214459
214300
  } = _ref;
214460
214301
  var prevValue = usePrevious(value);
214461
- var isHighlight = (0, import_react94.useMemo)(() => {
214302
+ var isHighlight = (0, import_react93.useMemo)(() => {
214462
214303
  if (!highlightUpdates || prevValue === void 0) return false;
214463
214304
  if (typeof value !== typeof prevValue) {
214464
214305
  return true;
@@ -214477,7 +214318,7 @@ function useHighlight(_ref) {
214477
214318
  return true;
214478
214319
  }
214479
214320
  }, [highlightUpdates, value]);
214480
- (0, import_react94.useEffect)(() => {
214321
+ (0, import_react93.useEffect)(() => {
214481
214322
  if (highlightContainer && highlightContainer.current && isHighlight && "animate" in highlightContainer.current) {
214482
214323
  highlightContainer.current.animate([{
214483
214324
  backgroundColor: "var(--w-rjv-update-color, #ebcb8b)"
@@ -214492,8 +214333,8 @@ function useHighlight(_ref) {
214492
214333
  }
214493
214334
 
214494
214335
  // ../../node_modules/@uiw/react-json-view/esm/comps/Copied.js
214495
- var import_react95 = __toESM(require_react());
214496
- var import_jsx_runtime135 = __toESM(require_jsx_runtime());
214336
+ var import_react94 = __toESM(require_react());
214337
+ var import_jsx_runtime134 = __toESM(require_jsx_runtime());
214497
214338
  var _excluded16 = ["keyName", "value", "parentValue", "expandKey", "keys"];
214498
214339
  var _excluded25 = ["as", "render"];
214499
214340
  var Copied = (props) => {
@@ -214510,7 +214351,7 @@ var Copied = (props) => {
214510
214351
  } = useStore();
214511
214352
  var showTools = useShowToolsStore();
214512
214353
  var isShowTools = showTools[expandKey];
214513
- var [copied, setCopied] = (0, import_react95.useState)(false);
214354
+ var [copied, setCopied] = (0, import_react94.useState)(false);
214514
214355
  var {
214515
214356
  Copied: Comp = {}
214516
214357
  } = useSectionStore();
@@ -214582,18 +214423,18 @@ var Copied = (props) => {
214582
214423
  });
214583
214424
  if (child) return child;
214584
214425
  if (copied) {
214585
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("svg", _extends({
214426
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("svg", _extends({
214586
214427
  viewBox: "0 0 32 36"
214587
214428
  }, elmProps, {
214588
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("path", {
214429
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("path", {
214589
214430
  d: "M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"
214590
214431
  })
214591
214432
  }));
214592
214433
  }
214593
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("svg", _extends({
214434
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("svg", _extends({
214594
214435
  viewBox: "0 0 32 36"
214595
214436
  }, elmProps, {
214596
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("path", {
214437
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("path", {
214597
214438
  d: "M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"
214598
214439
  })
214599
214440
  }));
@@ -214601,9 +214442,9 @@ var Copied = (props) => {
214601
214442
  Copied.displayName = "JVR.Copied";
214602
214443
 
214603
214444
  // ../../node_modules/@uiw/react-json-view/esm/comps/useIdCompat.js
214604
- var import_react96 = __toESM(require_react());
214445
+ var import_react95 = __toESM(require_react());
214605
214446
  function useIdCompat() {
214606
- var idRef = (0, import_react96.useRef)(null);
214447
+ var idRef = (0, import_react95.useRef)(null);
214607
214448
  if (idRef.current === null) {
214608
214449
  idRef.current = "custom-id-" + Math.random().toString(36).substr(2, 9);
214609
214450
  }
@@ -214611,7 +214452,7 @@ function useIdCompat() {
214611
214452
  }
214612
214453
 
214613
214454
  // ../../node_modules/@uiw/react-json-view/esm/comps/KeyValues.js
214614
- var import_jsx_runtime136 = __toESM(require_jsx_runtime());
214455
+ var import_jsx_runtime135 = __toESM(require_jsx_runtime());
214615
214456
  var KeyValues = (props) => {
214616
214457
  var _expands$expandKey;
214617
214458
  var {
@@ -214657,12 +214498,12 @@ var KeyValues = (props) => {
214657
214498
  paddingLeft: indentWidth,
214658
214499
  marginLeft: 6
214659
214500
  };
214660
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", {
214501
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", {
214661
214502
  className: "w-rjv-wrap",
214662
214503
  style,
214663
214504
  children: entries.map((_ref5, idx) => {
214664
214505
  var [key, val] = _ref5;
214665
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KeyValuesItem, {
214506
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(KeyValuesItem, {
214666
214507
  parentValue: value,
214667
214508
  keyName: key,
214668
214509
  keys: [...keys, key],
@@ -214684,7 +214525,7 @@ var KayName = (props) => {
214684
214525
  highlightUpdates
214685
214526
  } = useStore();
214686
214527
  var isNumber3 = typeof keyName === "number";
214687
- var highlightContainer = (0, import_react97.useRef)(null);
214528
+ var highlightContainer = (0, import_react96.useRef)(null);
214688
214529
  useHighlight({
214689
214530
  value,
214690
214531
  highlightUpdates,
@@ -214696,19 +214537,19 @@ var KayName = (props) => {
214696
214537
  keys,
214697
214538
  parentValue
214698
214539
  };
214699
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_react97.Fragment, {
214700
- children: [/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("span", {
214540
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_react96.Fragment, {
214541
+ children: [/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("span", {
214701
214542
  ref: highlightContainer,
214702
- children: [/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Quote, _extends({
214543
+ children: [/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Quote, _extends({
214703
214544
  isNumber: isNumber3,
214704
214545
  "data-placement": "left"
214705
- }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KeyNameComp, _extends({}, compProps, {
214546
+ }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(KeyNameComp, _extends({}, compProps, {
214706
214547
  children: keyName
214707
- })), /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Quote, _extends({
214548
+ })), /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Quote, _extends({
214708
214549
  isNumber: isNumber3,
214709
214550
  "data-placement": "right"
214710
214551
  }, compProps))]
214711
- }), /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Colon, _extends({}, compProps))]
214552
+ }), /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Colon, _extends({}, compProps))]
214712
214553
  });
214713
214554
  };
214714
214555
  KayName.displayName = "JVR.KayName";
@@ -214731,7 +214572,7 @@ var KeyValuesItem = (props) => {
214731
214572
  var isNested = isMyObject || isMyArray || isMySet || isMyMap;
214732
214573
  if (isNested) {
214733
214574
  var myValue = isMySet ? Array.from(value) : isMyMap ? Object.fromEntries(value) : value;
214734
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Container, {
214575
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Container, {
214735
214576
  keyName,
214736
214577
  value: myValue,
214737
214578
  parentValue,
@@ -214748,22 +214589,22 @@ var KeyValuesItem = (props) => {
214748
214589
  [subkeyid]: false
214749
214590
  })
214750
214591
  };
214751
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(RowComp, _extends({
214592
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(RowComp, _extends({
214752
214593
  className: "w-rjv-line",
214753
214594
  value,
214754
214595
  keyName,
214755
214596
  keys,
214756
214597
  parentValue
214757
214598
  }, reset, {
214758
- children: [/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(KayName, {
214599
+ children: [/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(KayName, {
214759
214600
  keyName,
214760
214601
  value,
214761
214602
  keys,
214762
214603
  parentValue
214763
- }), /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Value, {
214604
+ }), /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Value, {
214764
214605
  keyName,
214765
214606
  value
214766
- }), /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Copied, {
214607
+ }), /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Copied, {
214767
214608
  keyName,
214768
214609
  value,
214769
214610
  keys,
@@ -214775,7 +214616,7 @@ var KeyValuesItem = (props) => {
214775
214616
  KeyValuesItem.displayName = "JVR.KeyValuesItem";
214776
214617
 
214777
214618
  // ../../node_modules/@uiw/react-json-view/esm/section/CountInfoExtra.js
214778
- var import_jsx_runtime137 = __toESM(require_jsx_runtime());
214619
+ var import_jsx_runtime136 = __toESM(require_jsx_runtime());
214779
214620
  var _excluded17 = ["value", "keyName"];
214780
214621
  var _excluded26 = ["as", "render"];
214781
214622
  var CountInfoExtra = (props) => {
@@ -214807,12 +214648,12 @@ var CountInfoExtraComps = (props) => {
214807
214648
  keyName
214808
214649
  });
214809
214650
  if (child) return child;
214810
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Elm, _extends({}, elmProps));
214651
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Elm, _extends({}, elmProps));
214811
214652
  };
214812
214653
  CountInfoExtraComps.displayName = "JVR.CountInfoExtraComps";
214813
214654
 
214814
214655
  // ../../node_modules/@uiw/react-json-view/esm/section/CountInfo.js
214815
- var import_jsx_runtime138 = __toESM(require_jsx_runtime());
214656
+ var import_jsx_runtime137 = __toESM(require_jsx_runtime());
214816
214657
  var _excluded18 = ["value", "keyName"];
214817
214658
  var _excluded27 = ["as", "render"];
214818
214659
  var CountInfo = (props) => {
@@ -214854,12 +214695,12 @@ var CountInfoComp = (props) => {
214854
214695
  keyName
214855
214696
  });
214856
214697
  if (child) return child;
214857
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Elm, _extends({}, elmProps));
214698
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Elm, _extends({}, elmProps));
214858
214699
  };
214859
214700
  CountInfoComp.displayName = "JVR.CountInfoComp";
214860
214701
 
214861
214702
  // ../../node_modules/@uiw/react-json-view/esm/section/Ellipsis.js
214862
- var import_jsx_runtime139 = __toESM(require_jsx_runtime());
214703
+ var import_jsx_runtime138 = __toESM(require_jsx_runtime());
214863
214704
  var _excluded19 = ["as", "render"];
214864
214705
  var Ellipsis = (props) => {
214865
214706
  var {
@@ -214891,12 +214732,12 @@ var EllipsisComp = (_ref) => {
214891
214732
  });
214892
214733
  if (child) return child;
214893
214734
  if (!isExpanded || typeof value === "object" && Object.keys(value).length == 0) return null;
214894
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Elm, _extends({}, reset));
214735
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Elm, _extends({}, reset));
214895
214736
  };
214896
214737
  EllipsisComp.displayName = "JVR.EllipsisComp";
214897
214738
 
214898
214739
  // ../../node_modules/@uiw/react-json-view/esm/comps/NestedOpen.js
214899
- var import_jsx_runtime140 = __toESM(require_jsx_runtime());
214740
+ var import_jsx_runtime139 = __toESM(require_jsx_runtime());
214900
214741
  var NestedOpen = (props) => {
214901
214742
  var _expands$expandKey;
214902
214743
  var {
@@ -214962,32 +214803,32 @@ var NestedOpen = (props) => {
214962
214803
  keys,
214963
214804
  parentValue
214964
214805
  };
214965
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("span", _extends({}, reset, {
214966
- children: [showArrow && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Arrow, _extends({
214806
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", _extends({}, reset, {
214807
+ children: [showArrow && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Arrow, _extends({
214967
214808
  style: arrowStyle,
214968
214809
  expandKey
214969
- }, compProps)), (keyName || typeof keyName === "number") && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(KayName, _extends({}, compProps)), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(SetComp, {
214810
+ }, compProps)), (keyName || typeof keyName === "number") && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(KayName, _extends({}, compProps)), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(SetComp, {
214970
214811
  value: initialValue,
214971
214812
  keyName
214972
- }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(MapComp, {
214813
+ }), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(MapComp, {
214973
214814
  value: initialValue,
214974
214815
  keyName
214975
- }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(BracketsOpen, _extends({
214816
+ }), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(BracketsOpen, _extends({
214976
214817
  isBrackets: isArray2 || isMySet
214977
- }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(EllipsisComp, {
214818
+ }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(EllipsisComp, {
214978
214819
  keyName,
214979
214820
  value,
214980
214821
  isExpanded
214981
- }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(BracketsClose, _extends({
214822
+ }), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(BracketsClose, _extends({
214982
214823
  isVisiable: isExpanded || !showArrow,
214983
214824
  isBrackets: isArray2 || isMySet
214984
- }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CountInfoComp, {
214825
+ }, compProps)), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(CountInfoComp, {
214985
214826
  value,
214986
214827
  keyName
214987
- }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(CountInfoExtraComps, {
214828
+ }), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(CountInfoExtraComps, {
214988
214829
  value,
214989
214830
  keyName
214990
- }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Copied, {
214831
+ }), /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Copied, {
214991
214832
  keyName,
214992
214833
  value,
214993
214834
  expandKey,
@@ -214999,9 +214840,9 @@ var NestedOpen = (props) => {
214999
214840
  NestedOpen.displayName = "JVR.NestedOpen";
215000
214841
 
215001
214842
  // ../../node_modules/@uiw/react-json-view/esm/Container.js
215002
- var import_jsx_runtime141 = __toESM(require_jsx_runtime());
214843
+ var import_jsx_runtime140 = __toESM(require_jsx_runtime());
215003
214844
  var _excluded20 = ["className", "children", "parentValue", "keyid", "level", "value", "initialValue", "keys", "keyName"];
215004
- var Container = /* @__PURE__ */ (0, import_react98.forwardRef)((props, ref) => {
214845
+ var Container = /* @__PURE__ */ (0, import_react97.forwardRef)((props, ref) => {
215005
214846
  var {
215006
214847
  className = "",
215007
214848
  parentValue,
@@ -215022,11 +214863,11 @@ var Container = /* @__PURE__ */ (0, import_react98.forwardRef)((props, ref) => {
215022
214863
  [subkeyid]: false
215023
214864
  })
215024
214865
  };
215025
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", _extends({
214866
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", _extends({
215026
214867
  className: defaultClassNames,
215027
214868
  ref
215028
214869
  }, elmProps, reset, {
215029
- children: [/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(NestedOpen, {
214870
+ children: [/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(NestedOpen, {
215030
214871
  expandKey: subkeyid,
215031
214872
  value,
215032
214873
  level,
@@ -215034,14 +214875,14 @@ var Container = /* @__PURE__ */ (0, import_react98.forwardRef)((props, ref) => {
215034
214875
  parentValue,
215035
214876
  keyName,
215036
214877
  initialValue
215037
- }), /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(KeyValues, {
214878
+ }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(KeyValues, {
215038
214879
  expandKey: subkeyid,
215039
214880
  value,
215040
214881
  level,
215041
214882
  keys,
215042
214883
  parentValue,
215043
214884
  keyName
215044
- }), /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(NestedClose, {
214885
+ }), /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(NestedClose, {
215045
214886
  expandKey: subkeyid,
215046
214887
  value,
215047
214888
  level,
@@ -215272,9 +215113,9 @@ var Copied2 = (props) => {
215272
215113
  Copied2.displayName = "JVR.Copied";
215273
215114
 
215274
215115
  // ../../node_modules/@uiw/react-json-view/esm/index.js
215275
- var import_jsx_runtime142 = __toESM(require_jsx_runtime());
215116
+ var import_jsx_runtime141 = __toESM(require_jsx_runtime());
215276
215117
  var _excluded21 = ["className", "style", "value", "children", "collapsed", "shouldExpandNodeInitially", "indentWidth", "displayObjectSize", "shortenTextAfterLength", "highlightUpdates", "enableClipboard", "displayDataTypes", "objectSortKeys", "onExpand", "onCopied"];
215277
- var JsonView = /* @__PURE__ */ (0, import_react99.forwardRef)((props, ref) => {
215118
+ var JsonView = /* @__PURE__ */ (0, import_react98.forwardRef)((props, ref) => {
215278
215119
  var {
215279
215120
  className = "",
215280
215121
  style,
@@ -215300,7 +215141,7 @@ var JsonView = /* @__PURE__ */ (0, import_react99.forwardRef)((props, ref) => {
215300
215141
  fontSize: 13
215301
215142
  }, style);
215302
215143
  var cls = ["w-json-view-container", "w-rjv", className].filter(Boolean).join(" ");
215303
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Provider, {
215144
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(Provider, {
215304
215145
  initialState: {
215305
215146
  value,
215306
215147
  objectSortKeys,
@@ -215317,7 +215158,7 @@ var JsonView = /* @__PURE__ */ (0, import_react99.forwardRef)((props, ref) => {
215317
215158
  initialTypes: {
215318
215159
  displayDataTypes
215319
215160
  },
215320
- children: [/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Container, _extends({
215161
+ children: [/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Container, _extends({
215321
215162
  value
215322
215163
  }, elmProps, {
215323
215164
  ref,
@@ -215417,15 +215258,48 @@ var githubDarkTheme = {
215417
215258
  };
215418
215259
 
215419
215260
  // build/client/client/jsx/selected-node.js
215261
+ var import_deep_equal = __toESM(require_deep_equal());
215420
215262
  function SelectedNode(props) {
215421
- const { isDarkMode } = (0, import_react100.useContext)(GlobalContext);
215263
+ const { isDarkMode } = (0, import_react99.useContext)(GlobalContext);
215422
215264
  const urls = {
215423
215265
  instanceUrl: instanceApiUrl(props.node.description.id, props.env),
215424
215266
  staticUrl: staticApiUrl(props.node.description.info.identifier, props.env)
215425
215267
  };
215426
- (0, import_react100.useEffect)(() => {
215268
+ (0, import_react99.useEffect)(() => {
215427
215269
  es_default.highlightAll();
215428
215270
  }, []);
215271
+ const [metrics, setMetrics] = (0, import_react99.useState)({});
215272
+ async function gatherMetrics() {
215273
+ const relevantSources = props.node.description.subscriptions.map((s3) => s3.source);
215274
+ const newMetrics = {};
215275
+ await Promise.all(relevantSources.map(async (id) => {
215276
+ const baseUrl2 = instanceApiUrl(id, props.env);
215277
+ const metricsUrl = `${baseUrl2}/metrics`;
215278
+ const request = await fetch(metricsUrl);
215279
+ if (request.status == 200) {
215280
+ const json = await request.json();
215281
+ newMetrics[id] = json;
215282
+ } else {
215283
+ newMetrics[id] = [];
215284
+ }
215285
+ }));
215286
+ console.log("calling setMetrics");
215287
+ setMetrics(newMetrics);
215288
+ }
215289
+ (0, import_react99.useEffect)(() => {
215290
+ let timerRef = void 0;
215291
+ if (props.isLive) {
215292
+ void gatherMetrics();
215293
+ timerRef = window.setInterval(() => {
215294
+ void gatherMetrics();
215295
+ }, 5e3);
215296
+ }
215297
+ return () => {
215298
+ if (timerRef !== void 0) {
215299
+ clearInterval(timerRef);
215300
+ }
215301
+ };
215302
+ }, [props.isLive]);
215429
215303
  function onEditClick(e2) {
215430
215304
  e2.preventDefault();
215431
215305
  props.onEdit(props.node);
@@ -215439,69 +215313,53 @@ function SelectedNode(props) {
215439
215313
  props.onClearSelection();
215440
215314
  }
215441
215315
  function render_error(e2, i3) {
215442
- return (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime143.jsx)("div", { children: e2.message })] }, i3);
215316
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime142.jsx)("div", { children: e2.message })] }, i3);
215443
215317
  }
215444
215318
  function render_warning(e2, i3) {
215445
- return (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300", role: "alert", children: [info(), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime143.jsx)("div", { children: e2.message })] }, i3);
215319
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300", role: "alert", children: [info(), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime142.jsx)("div", { children: e2.message })] }, i3);
215446
215320
  }
215447
- return (0, import_jsx_runtime143.jsxs)("div", { id: `selected-node-${props.node.description.id}`, className: "w-full max-w-sm bg-white dark:bg-gray-800", children: [(0, import_jsx_runtime143.jsxs)("div", { children: [(0, import_jsx_runtime143.jsxs)("h4", { className: "flex items-center justify-between mb-1.5 leading-none text-xl font-extrabold text-gray-900 dark:text-white", children: [(0, import_jsx_runtime143.jsx)("span", { children: props.node.description.config.displayName }), (0, import_jsx_runtime143.jsxs)("button", { type: "button", onClick: onClearSelectionClick, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Close menu" })] })] }), (0, import_jsx_runtime143.jsxs)("p", { className: "mb-5 font-semibold text-gray-800 dark:text-gray-200", children: [(0, import_jsx_runtime143.jsx)("span", { className: "fold-bold", children: "Type" }), ": ", props.node.description.info.name, " ", (0, import_jsx_runtime143.jsxs)("a", { target: "_blank", href: componentDocs(props.node.description.info.identifier, props.env).toString(), children: [(0, import_jsx_runtime143.jsx)("svg", { className: "inline w-6 h-6 text-gray-800 dark:text-white", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: (0, import_jsx_runtime143.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.529 9.988a2.502 2.502 0 1 1 5 .191A2.441 2.441 0 0 1 12 12.582V14m-.01 3.008H12M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Docs" })] })] })] }), (0, import_jsx_runtime143.jsxs)("dl", { children: [props.isLive ? (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {}) : (0, import_jsx_runtime143.jsxs)("div", { className: "flex justify-center mt-2 mb-5 space-x-4 w-full", children: [(0, import_jsx_runtime143.jsxs)("button", { type: "button", onClick: onEditClick, className: "text-white w-full inline-flex items-center 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", children: [(0, import_jsx_runtime143.jsxs)("svg", { "aria-hidden": "true", className: "mr-1 -ml-1 w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [(0, import_jsx_runtime143.jsx)("path", { d: "M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" }), (0, import_jsx_runtime143.jsx)("path", { fillRule: "evenodd", d: "M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z", clipRule: "evenodd" })] }), "Edit"] }), (0, import_jsx_runtime143.jsxs)("button", { type: "button", onClick: onDeleteClick, className: "inline-flex w-full items-center text-white 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-500 dark:hover:bg-red-600 dark:focus:ring-red-900", children: [(0, import_jsx_runtime143.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 mr-1.5 -ml-1", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime143.jsx)("path", { fillRule: "evenodd", d: "M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z", clipRule: "evenodd" }) }), "Delete"] })] }), !props.isLive && (props.node.errors.length > 0 || props.node.warnings.length > 0) ? (0, import_jsx_runtime143.jsxs)("div", { className: "mb-5", children: [(0, import_jsx_runtime143.jsx)("div", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "This component has some problems that need fixing" }), props.node.errors.length > 0 && (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, { children: props.node.errors.map((e2, i3) => render_error(e2, i3)) }), props.node.warnings.length > 0 && (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, { children: props.node.warnings.map((w2, i3) => render_warning(w2, i3)) })] }) : (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {}), props.isLive && props?.liveState?.runtimeState && props.node.description.info.runtime?.summary && urls ? (0, import_jsx_runtime143.jsx)(import_react100.Suspense, { fallback: (0, import_jsx_runtime143.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime143.jsx)(props.node.description.info.runtime.summary, { state: props.liveState.runtimeState, config: props.liveState.config, sendCommand: props.sendCommand, urls }) }) : (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [(0, import_jsx_runtime143.jsx)("dt", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "JSON Config" }), (0, import_jsx_runtime143.jsx)("dd", { children: (0, import_jsx_runtime143.jsx)(esm_default, { value: props.node.description.config, shortenTextAfterLength: 0, highlightUpdates: false, collapsed: 1, enableClipboard: false, displayDataTypes: false, displayObjectSize: false, indentWidth: 10, style: isDarkMode ? githubDarkTheme : githubLightTheme, className: "p-1 rounded-md" }) })] }), props.isLive && props.liveState && Object.keys(props.liveState.alerts).length > 0 ? (0, import_jsx_runtime143.jsxs)("div", { className: "mb-2", children: [(0, import_jsx_runtime143.jsx)("div", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "This component has raised some alerts" }), Object.values(props.liveState.alerts).filter((f) => f.level == "error").map((error2, i3) => {
215448
- return (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime143.jsx)("div", { children: error2.message })] }, i3);
215321
+ return (0, import_jsx_runtime142.jsxs)("div", { id: `selected-node-${props.node.description.id}`, className: "w-full max-w-sm bg-white dark:bg-gray-800", children: [(0, import_jsx_runtime142.jsxs)("div", { children: [(0, import_jsx_runtime142.jsxs)("h4", { className: "flex items-center justify-between mb-1.5 leading-none text-xl font-extrabold text-gray-900 dark:text-white", children: [(0, import_jsx_runtime142.jsx)("span", { children: props.node.description.config.displayName }), (0, import_jsx_runtime142.jsxs)("button", { type: "button", onClick: onClearSelectionClick, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Close menu" })] })] }), (0, import_jsx_runtime142.jsxs)("p", { className: "mb-5 font-semibold text-gray-800 dark:text-gray-200", children: [(0, import_jsx_runtime142.jsx)("span", { className: "fold-bold", children: "Type" }), ": ", props.node.description.info.name, " ", (0, import_jsx_runtime142.jsxs)("a", { target: "_blank", href: componentDocs(props.node.description.info.identifier, props.env).toString(), children: [(0, import_jsx_runtime142.jsx)("svg", { className: "inline w-6 h-6 text-gray-800 dark:text-white", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: (0, import_jsx_runtime142.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.529 9.988a2.502 2.502 0 1 1 5 .191A2.441 2.441 0 0 1 12 12.582V14m-.01 3.008H12M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Docs" })] })] })] }), (0, import_jsx_runtime142.jsxs)("dl", { children: [props.isLive ? (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, {}) : (0, import_jsx_runtime142.jsxs)("div", { className: "flex justify-center mt-2 mb-5 space-x-4 w-full", children: [(0, import_jsx_runtime142.jsxs)("button", { type: "button", onClick: onEditClick, className: "text-white w-full inline-flex items-center 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", children: [(0, import_jsx_runtime142.jsxs)("svg", { "aria-hidden": "true", className: "mr-1 -ml-1 w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [(0, import_jsx_runtime142.jsx)("path", { d: "M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z" }), (0, import_jsx_runtime142.jsx)("path", { fillRule: "evenodd", d: "M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z", clipRule: "evenodd" })] }), "Edit"] }), (0, import_jsx_runtime142.jsxs)("button", { type: "button", onClick: onDeleteClick, className: "inline-flex w-full items-center text-white 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-500 dark:hover:bg-red-600 dark:focus:ring-red-900", children: [(0, import_jsx_runtime142.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 mr-1.5 -ml-1", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime142.jsx)("path", { fillRule: "evenodd", d: "M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z", clipRule: "evenodd" }) }), "Delete"] })] }), !props.isLive && (props.node.errors.length > 0 || props.node.warnings.length > 0) ? (0, import_jsx_runtime142.jsxs)("div", { className: "mb-5", children: [(0, import_jsx_runtime142.jsx)("div", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "This component has some problems that need fixing" }), props.node.errors.length > 0 && (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, { children: props.node.errors.map((e2, i3) => render_error(e2, i3)) }), props.node.warnings.length > 0 && (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, { children: props.node.warnings.map((w2, i3) => render_warning(w2, i3)) })] }) : (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, {}), props.isLive && props?.liveState?.runtimeState && props.node.description.info.runtime?.summary && urls ? (0, import_jsx_runtime142.jsx)(import_react99.Suspense, { fallback: (0, import_jsx_runtime142.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime142.jsx)(props.node.description.info.runtime.summary, { state: props.liveState.runtimeState, config: props.liveState.config, sendCommand: props.sendCommand, urls }) }) : (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("dt", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "JSON Config" }), (0, import_jsx_runtime142.jsx)("dd", { children: (0, import_jsx_runtime142.jsx)(esm_default, { value: props.node.description.config, shortenTextAfterLength: 0, highlightUpdates: false, collapsed: 1, enableClipboard: false, displayDataTypes: false, displayObjectSize: false, indentWidth: 10, style: isDarkMode ? githubDarkTheme : githubLightTheme, className: "p-1 rounded-md" }) })] }), props.isLive && props.liveState && Object.keys(props.liveState.alerts).length > 0 ? (0, import_jsx_runtime142.jsxs)("div", { className: "mb-2", children: [(0, import_jsx_runtime142.jsx)("div", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "This component has raised some alerts" }), Object.values(props.liveState.alerts).filter((f) => f.level == "error").map((error2, i3) => {
215322
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime142.jsx)("div", { children: error2.message })] }, i3);
215449
215323
  }), Object.values(props.liveState.alerts).filter((f) => f.level == "warning").map((warning, i3) => {
215450
- return (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300", role: "alert", children: [info(), (0, import_jsx_runtime143.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime143.jsx)("div", { children: warning.message })] }, i3);
215451
- })] }) : (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {}), props.node.description.subscriptions.length > 0 && (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [(0, import_jsx_runtime143.jsx)("dt", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "Subscriptions" }), (0, import_jsx_runtime143.jsx)("dd", { className: "mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400 divide-y divide-gray-50", children: props.node.description.subscriptions.map((s3, i3) => {
215324
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center text-sm text-yellow-800 rounded-lg bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300", role: "alert", children: [info(), (0, import_jsx_runtime142.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime142.jsx)("div", { children: warning.message })] }, i3);
215325
+ })] }) : (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, {}), props.node.description.subscriptions.length > 0 && (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("dt", { className: "mb-2 font-semibold leading-none text-gray-900 dark:text-white", children: "Inputs" }), (0, import_jsx_runtime142.jsx)("dd", { className: "mb-4 font-light text-gray-500 sm:mb-5 dark:text-gray-400 divide-y divide-gray-50", children: props.node.description.subscriptions.map((s3, i3) => {
215452
215326
  const sourceNode = props.toplevel.findNode(s3.source);
215453
215327
  const liveInputs = props.liveState?.inputs[s3.source] ?? [];
215454
215328
  if (!sourceNode) {
215455
215329
  console.log("Source node doesn't exist in document", s3.source);
215456
- return (0, import_jsx_runtime143.jsx)("span", { className: "badge badge-error mr-1", children: "Error" }, i3);
215330
+ return (0, import_jsx_runtime142.jsx)("span", { className: "badge badge-error mr-1", children: "Error" }, i3);
215457
215331
  }
215458
- if (liveInputs.length > 0) {
215459
- return (0, import_jsx_runtime143.jsxs)("div", { className: "py-4", children: [(0, import_jsx_runtime143.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime143.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime143.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(s3.source, props.toplevel) })] }), (0, import_jsx_runtime143.jsx)(LiveNodeSubscriptionSummary, { sourceNode, subscription: s3, liveInputs }, i3)] }, i3);
215332
+ if (props.isLive) {
215333
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "py-4 divide-y divide-gray-50", children: [(0, import_jsx_runtime142.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-4 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime142.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime142.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-3 sm:mt-0", children: displayNodeId(s3.source, props.toplevel) })] }), (0, import_jsx_runtime142.jsx)(LiveNodeSubscriptionSummary, { sourceNode, subscription: s3, liveInputs, metrics }, i3)] }, i3);
215460
215334
  } else {
215461
- return (0, import_jsx_runtime143.jsxs)("div", { className: "py-4 hover:bg-gray-50 dark:hover:bg-gray-900", onClick: (e2) => {
215335
+ return (0, import_jsx_runtime142.jsxs)("div", { className: "py-4 hover:bg-gray-50 dark:hover:bg-gray-900", onClick: (e2) => {
215462
215336
  e2.preventDefault();
215463
215337
  props.onSubscriptionSelect(s3.source);
215464
- }, onMouseEnter: () => props.onSubscriptionHighlightStart(s3.source), onMouseLeave: () => props.onSubscriptionHighlightStop(s3.source), children: [(0, import_jsx_runtime143.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime143.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime143.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(s3.source, props.toplevel) })] }), (0, import_jsx_runtime143.jsx)(SubscriptionSummarySmall, { sourceNode, subscription: s3 }, i3)] }, i3);
215338
+ }, onMouseEnter: () => props.onSubscriptionHighlightStart(s3.source), onMouseLeave: () => props.onSubscriptionHighlightStop(s3.source), children: [(0, import_jsx_runtime142.jsxs)("div", { className: "px-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0", children: [(0, import_jsx_runtime142.jsx)("dt", { className: "text-sm font-medium leading-6 text-gray-900 dark:text-white", children: "Source" }), (0, import_jsx_runtime142.jsx)("dd", { className: "mt-1 text-sm leading-6 text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: displayNodeId(s3.source, props.toplevel) })] }), (0, import_jsx_runtime142.jsx)(SubscriptionSummarySmall, { sourceNode, subscription: s3 }, i3)] }, i3);
215465
215339
  }
215466
215340
  }) })] })] })] });
215467
215341
  }
215468
215342
  function LiveNodeSubscriptionSummary(props) {
215469
215343
  const { liveInputs } = props;
215470
- return (0, import_jsx_runtime143.jsx)("div", { className: "px-4 sm:grid sm:grid-cols-4 sm:gap-4 sm:px-0", children: liveInputs.map((i3) => {
215471
- return (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [(0, import_jsx_runtime143.jsx)("div", { className: "text-sm font-sm text-gray-900 dark:text-white", children: i3.message.case }), (0, import_jsx_runtime143.jsxs)("div", { className: "mt-0 text-sm text-gray-700 dark:text-white sm:col-span-1 sm:mt-0", children: [i3.streamKey.streamId, "-", i3.streamKey.sourceName] }), (0, import_jsx_runtime143.jsx)("div", { className: "mt-0 text-sm text-gray-700 dark:text-white sm:col-span-2 sm:mt-0", children: (() => {
215472
- const messageCase = i3.message.case;
215473
- switch (messageCase) {
215474
- case "video":
215475
- return (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [i3.message.value.codec, ": ", i3.message.value.width, "x", i3.message.value.height] });
215476
- case "audio":
215477
- return (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [i3.message.value.channelLayout, "@", i3.message.value.bitrate] });
215478
- case "ancillary":
215479
- return (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {});
215480
- case "subtitle":
215481
- return (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {});
215482
- case "playlist":
215483
- return (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {});
215484
- case void 0:
215485
- return (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {});
215486
- default:
215487
- assertUnreachable(messageCase);
215488
- }
215489
- })() })] });
215344
+ return (0, import_jsx_runtime142.jsx)("div", { className: "px-4 sm:grid sm:grid-cols-4 sm:gap-4 sm:px-0", children: props.subscription.expectedStreams.map((stream) => {
215345
+ const i3 = liveInputs.find((i4) => streamMatchesExpected(i4, [stream]));
215346
+ const frameCountMetric = props.metrics[props.subscription.source]?.find((v2) => v2.name == "norsk_frame_count" && v2.streamKey && i3?.streamKey && (0, import_deep_equal.default)(v2.streamKey, i3.streamKey));
215347
+ return (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("div", { className: "sm:col-span-1 text-sm font-sm text-gray-900 dark:text-white pr-10 border-r", children: shortStreamNameFromFilter(stream) }), (0, import_jsx_runtime142.jsxs)("div", { className: "mt-0 text-sm text-gray-700 dark:text-white sm:col-span-3 sm:mt-0", children: [i3 ? (0, import_jsx_runtime142.jsx)("div", { className: "dark:text-green-300 text-green:300", children: "Active" }) : (0, import_jsx_runtime142.jsx)("div", { className: "dark:text-red-300 text-red-300", children: "Inactive" }), i3?.message.case == "video" ? (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("div", { className: "sm:col-span-1" }), (0, import_jsx_runtime142.jsxs)("div", { className: "sm:col-span-3 sm:grid sm:grid-cols-2", children: [(0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Frames" }), (0, import_jsx_runtime142.jsx)("dd", { className: "", children: frameCountMetric?.history.at(-1) }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Codec" }), (0, import_jsx_runtime142.jsx)("dd", { className: "", children: frameCountMetric?.labels["codec"] }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Resolution" }), (0, import_jsx_runtime142.jsx)("dd", { className: "", children: frameCountMetric?.labels["width"] + "x" + frameCountMetric?.labels["height"] }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "FrameRate" }), (0, import_jsx_runtime142.jsx)("dd", { className: "", children: frameCountMetric?.labels["frameRate"] })] })] }) : i3?.message.case == "audio" ? (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("div", { className: "sm:col-span-1" }), (0, import_jsx_runtime142.jsxs)("div", { className: "sm:col-span-3 sm:grid sm:grid-cols-2", children: [(0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Frames" }), (0, import_jsx_runtime142.jsx)("dd", { children: frameCountMetric?.history.at(-1) }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Codec" }), (0, import_jsx_runtime142.jsx)("dd", { children: frameCountMetric?.labels["codec"] }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "SampleRate" }), (0, import_jsx_runtime142.jsx)("dd", { children: frameCountMetric?.labels["sampleRate"] }), (0, import_jsx_runtime142.jsx)("dt", { className: "", children: "Channels" }), (0, import_jsx_runtime142.jsx)("dd", { children: frameCountMetric?.labels["channelLayout"] })] })] }) : i3?.message.case == "subtitle" ? (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [(0, import_jsx_runtime142.jsx)("div", { className: "sm:col-span-1" }), (0, import_jsx_runtime142.jsxs)("div", { className: "sm:col-span-3", children: ["Frames: ", frameCountMetric?.history.at(-1)] })] }) : (0, import_jsx_runtime142.jsx)(import_jsx_runtime142.Fragment, {})] })] });
215490
215348
  }) });
215491
215349
  }
215492
215350
  var selected_node_default = SelectedNode;
215493
215351
 
215494
215352
  // build/client/client/jsx/selected.js
215495
215353
  function SelectedNodes(props) {
215496
- return (0, import_jsx_runtime144.jsxs)("ul", { className: "w-full", children: [props.components.map((n3) => (0, import_jsx_runtime144.jsx)(selected_node_default, { library: props.library, env: props.env, node: n3, toplevel: props.toplevel, onEdit: props.onNodeEdit, onDelete: props.onNodeDelete, onClearSelection: props.onClearSelection, onSubscriptionHighlightStart: (s3) => props.onSubscriptionHighlightStart(n3.description.id, s3), onSubscriptionHighlightStop: (s3) => props.onSubscriptionHighlightStop(n3.description.id, s3), onSubscriptionSelect: (s3) => props.onSubscriptionSelected(n3.description.id, s3), isLive: !!props.liveState, liveState: props.liveState?.[n3.description.id], sendCommand: (c2) => props.sendCommand(n3.description.id, c2) }, `node-${n3.description.id}`)), props.liveState ? (0, import_jsx_runtime144.jsx)(import_jsx_runtime144.Fragment, {}) : props.connections.map((info2, i3) => (0, import_jsx_runtime144.jsx)(selected_connection_default, { library: props.library, toplevel: props.toplevel, connection: info2, onEdit: props.onConnectionEdit, onDelete: props.onConnectionDelete, onClearSelection: props.onClearSelection }, `{connection-${i3}`))] });
215354
+ return (0, import_jsx_runtime143.jsxs)("ul", { className: "w-full", children: [props.components.map((n3) => (0, import_jsx_runtime143.jsx)(selected_node_default, { library: props.library, env: props.env, node: n3, toplevel: props.toplevel, onEdit: props.onNodeEdit, onDelete: props.onNodeDelete, onClearSelection: props.onClearSelection, onSubscriptionHighlightStart: (s3) => props.onSubscriptionHighlightStart(n3.description.id, s3), onSubscriptionHighlightStop: (s3) => props.onSubscriptionHighlightStop(n3.description.id, s3), onSubscriptionSelect: (s3) => props.onSubscriptionSelected(n3.description.id, s3), isLive: !!props.liveState, liveState: props.liveState?.[n3.description.id], sendCommand: (c2) => props.sendCommand(n3.description.id, c2) }, `node-${n3.description.id}`)), props.liveState ? (0, import_jsx_runtime143.jsx)(import_jsx_runtime143.Fragment, {}) : props.connections.map((info2, i3) => (0, import_jsx_runtime143.jsx)(selected_connection_default, { library: props.library, toplevel: props.toplevel, connection: info2, onEdit: props.onConnectionEdit, onDelete: props.onConnectionDelete, onClearSelection: props.onClearSelection }, `{connection-${i3}`))] });
215497
215355
  }
215498
215356
  var selected_default = SelectedNodes;
215499
215357
 
215500
215358
  // build/client/client/jsx/toolbox.js
215501
- var import_jsx_runtime146 = __toESM(require_jsx_runtime());
215359
+ var import_jsx_runtime145 = __toESM(require_jsx_runtime());
215502
215360
 
215503
215361
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
215504
- var import_react102 = __toESM(require_react());
215362
+ var import_react101 = __toESM(require_react());
215505
215363
 
215506
215364
  // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
215507
215365
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -215510,7 +215368,7 @@ var mergeClasses = (...classes) => classes.filter((className, index7, array) =>
215510
215368
  }).join(" ").trim();
215511
215369
 
215512
215370
  // ../../node_modules/lucide-react/dist/esm/Icon.js
215513
- var import_react101 = __toESM(require_react());
215371
+ var import_react100 = __toESM(require_react());
215514
215372
 
215515
215373
  // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
215516
215374
  var defaultAttributes = {
@@ -215526,7 +215384,7 @@ var defaultAttributes = {
215526
215384
  };
215527
215385
 
215528
215386
  // ../../node_modules/lucide-react/dist/esm/Icon.js
215529
- var Icon = (0, import_react101.forwardRef)(
215387
+ var Icon = (0, import_react100.forwardRef)(
215530
215388
  ({
215531
215389
  color: color2 = "currentColor",
215532
215390
  size: size4 = 24,
@@ -215537,7 +215395,7 @@ var Icon = (0, import_react101.forwardRef)(
215537
215395
  iconNode,
215538
215396
  ...rest
215539
215397
  }, ref) => {
215540
- return (0, import_react101.createElement)(
215398
+ return (0, import_react100.createElement)(
215541
215399
  "svg",
215542
215400
  {
215543
215401
  ref,
@@ -215550,7 +215408,7 @@ var Icon = (0, import_react101.forwardRef)(
215550
215408
  ...rest
215551
215409
  },
215552
215410
  [
215553
- ...iconNode.map(([tag, attrs]) => (0, import_react101.createElement)(tag, attrs)),
215411
+ ...iconNode.map(([tag, attrs]) => (0, import_react100.createElement)(tag, attrs)),
215554
215412
  ...Array.isArray(children) ? children : [children]
215555
215413
  ]
215556
215414
  );
@@ -215559,8 +215417,8 @@ var Icon = (0, import_react101.forwardRef)(
215559
215417
 
215560
215418
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
215561
215419
  var createLucideIcon = (iconName, iconNode) => {
215562
- const Component = (0, import_react102.forwardRef)(
215563
- ({ className, ...props }, ref) => (0, import_react102.createElement)(Icon, {
215420
+ const Component = (0, import_react101.forwardRef)(
215421
+ ({ className, ...props }, ref) => (0, import_react101.createElement)(Icon, {
215564
215422
  ref,
215565
215423
  iconNode,
215566
215424
  className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
@@ -215589,12 +215447,12 @@ var __iconNode = [
215589
215447
  var SquareDashed = createLucideIcon("SquareDashed", __iconNode);
215590
215448
 
215591
215449
  // build/client/client/jsx/upstream/Accordion.js
215592
- var import_jsx_runtime145 = __toESM(require_jsx_runtime());
215593
- var import_react103 = __toESM(require_react());
215450
+ var import_jsx_runtime144 = __toESM(require_jsx_runtime());
215451
+ var import_react102 = __toESM(require_react());
215594
215452
  var AccordionComponent2 = ({ alwaysOpen = false, arrowIcon = HiChevronDown, children, flush = false, collapseAll = false, className, theme: customTheme = {}, ...props }) => {
215595
- const [isOpen, setOpen] = (0, import_react103.useState)(collapseAll ? -1 : 0);
215596
- const panels = (0, import_react103.useMemo)(() => import_react103.Children.map(children, (child, i3) => {
215597
- return (0, import_react103.cloneElement)(child, {
215453
+ const [isOpen, setOpen] = (0, import_react102.useState)(collapseAll ? -1 : 0);
215454
+ const panels = (0, import_react102.useMemo)(() => import_react102.Children.map(children, (child, i3) => {
215455
+ return (0, import_react102.cloneElement)(child, {
215598
215456
  alwaysOpen: child.props.alwaysOpen ?? alwaysOpen,
215599
215457
  arrowIcon: child.props.arrowIcon ?? arrowIcon,
215600
215458
  flush: child.props.flush ?? flush,
@@ -215603,7 +215461,7 @@ var AccordionComponent2 = ({ alwaysOpen = false, arrowIcon = HiChevronDown, chil
215603
215461
  });
215604
215462
  }), [alwaysOpen, arrowIcon, children, flush, isOpen]);
215605
215463
  const newTheme = mergeDeep2(cloneDeep2(theme).accordion.root, customTheme);
215606
- return (0, import_jsx_runtime145.jsx)("div", { className: twMerge(newTheme.base, newTheme.flush[flush ? "on" : "off"], className), "data-testid": "flowbite-accordion", ...props, children: panels });
215464
+ return (0, import_jsx_runtime144.jsx)("div", { className: twMerge(newTheme.base, newTheme.flush[flush ? "on" : "off"], className), "data-testid": "flowbite-accordion", ...props, children: panels });
215607
215465
  };
215608
215466
  AccordionComponent2.displayName = "Accordion";
215609
215467
  AccordionPanel.displayName = "Accordion.Panel";
@@ -215650,12 +215508,12 @@ function Toolbox(props) {
215650
215508
  const classNamesRoot = "-mt-4";
215651
215509
  const themeTitle = { open: { on: "text-gray-800 dark:text-white", off: "text-gray-800 dark:text-white" } };
215652
215510
  const themeContent = { base: "bg-transparent" };
215653
- return (0, import_jsx_runtime146.jsx)(Accordion2, { flush: true, id: toolboxId, alwaysOpen: true, className: classNamesRoot, children: props.toolGroups.map((toolGroup, _idx) => {
215654
- return (0, import_jsx_runtime146.jsxs)(Accordion2.Panel, { isOpen: true, children: [(0, import_jsx_runtime146.jsx)(Accordion2.Title, { theme: themeTitle, children: toolGroup.title }), (0, import_jsx_runtime146.jsx)(Accordion2.Content, { theme: themeContent, children: (0, import_jsx_runtime146.jsx)("div", { className: "py-5 border-none border-gray-200 dark:border-gray-700 grid grid-cols-2 gap-3", children: toolGroup.tools.map((tool) => (0, import_jsx_runtime146.jsx)(ToolboxItem, { name: tool.name, tool, onDragStart: props.onDragStart }, tool.type)) }) })] }, toolGroup.title);
215511
+ return (0, import_jsx_runtime145.jsx)(Accordion2, { flush: true, id: toolboxId, alwaysOpen: true, className: classNamesRoot, children: props.toolGroups.map((toolGroup, _idx) => {
215512
+ return (0, import_jsx_runtime145.jsxs)(Accordion2.Panel, { isOpen: true, children: [(0, import_jsx_runtime145.jsx)(Accordion2.Title, { theme: themeTitle, children: toolGroup.title }), (0, import_jsx_runtime145.jsx)(Accordion2.Content, { theme: themeContent, children: (0, import_jsx_runtime145.jsx)("div", { className: "py-5 border-none border-gray-200 dark:border-gray-700 grid grid-cols-2 gap-3", children: toolGroup.tools.map((tool) => (0, import_jsx_runtime145.jsx)(ToolboxItem, { name: tool.name, tool, onDragStart: props.onDragStart }, tool.type)) }) })] }, toolGroup.title);
215655
215513
  }) });
215656
215514
  }
215657
215515
  function ToolboxItem({ name, tool, onDragStart }) {
215658
- return (0, import_jsx_runtime146.jsxs)("div", { className: "p-2 w-full h-20 flex flex-col items-center rounded-lg border border-1 border-gray-200 dark:border-gray-600 group transition-all cursor-grab bg-gray-50 hover:bg-gray-100 dark:hover:bg-gray-600/10 dark:bg-transparent hover:scale-[103%] duration-200 drop-shadow hover:drop-shadow-md", draggable: "true", onDragStart: onItemDragStart(tool, onDragStart), children: [(0, import_jsx_runtime146.jsx)("div", { className: "flex justify-center items-center bg-blue h-8 w-8 p-1 group-hover:bg-blue-500 border border-1 border-gray-200 dark:border-gray-600 group-hover:border-transparent transition-all bg-transparent rounded", children: (0, import_jsx_runtime146.jsx)(SquareDashed, { size: 48, className: "text-black group-hover:text-white transition-colors dark:text-white" }) }), (0, import_jsx_runtime146.jsx)("div", { className: "font-bold text-center text-xs my-auto text-gray-500 dark:text-gray-400", children: name })] });
215516
+ return (0, import_jsx_runtime145.jsxs)("div", { className: "p-2 w-full h-20 flex flex-col items-center rounded-lg border border-1 border-gray-200 dark:border-gray-600 group transition-all cursor-grab bg-gray-50 hover:bg-gray-100 dark:hover:bg-gray-600/10 dark:bg-transparent hover:scale-[103%] duration-200 drop-shadow hover:drop-shadow-md", draggable: "true", onDragStart: onItemDragStart(tool, onDragStart), children: [(0, import_jsx_runtime145.jsx)("div", { className: "flex justify-center items-center bg-blue h-8 w-8 p-1 group-hover:bg-blue-500 border border-1 border-gray-200 dark:border-gray-600 group-hover:border-transparent transition-all bg-transparent rounded", children: (0, import_jsx_runtime145.jsx)(SquareDashed, { size: 48, className: "text-black group-hover:text-white transition-colors dark:text-white" }) }), (0, import_jsx_runtime145.jsx)("div", { className: "font-bold text-center text-xs my-auto text-gray-500 dark:text-gray-400", children: name })] });
215659
215517
  }
215660
215518
  function onItemDragStart(tool, cb) {
215661
215519
  return () => {
@@ -215664,11 +215522,11 @@ function onItemDragStart(tool, cb) {
215664
215522
  }
215665
215523
 
215666
215524
  // build/client/client/jsx/node-editor.js
215667
- var import_jsx_runtime147 = __toESM(require_jsx_runtime());
215668
- var import_react105 = __toESM(require_react());
215525
+ var import_jsx_runtime146 = __toESM(require_jsx_runtime());
215526
+ var import_react104 = __toESM(require_react());
215669
215527
 
215670
215528
  // ../../node_modules/react-hook-form/dist/index.esm.mjs
215671
- var import_react104 = __toESM(require_react(), 1);
215529
+ var import_react103 = __toESM(require_react(), 1);
215672
215530
  var isCheckBoxInput = (element) => element.type === "checkbox";
215673
215531
  var isDateObject = (value) => value instanceof Date;
215674
215532
  var isNullOrUndefined = (value) => value == null;
@@ -215759,7 +215617,7 @@ var INPUT_VALIDATION_RULES = {
215759
215617
  required: "required",
215760
215618
  validate: "validate"
215761
215619
  };
215762
- var HookFormContext = import_react104.default.createContext(null);
215620
+ var HookFormContext = import_react103.default.createContext(null);
215763
215621
  var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
215764
215622
  const result = {
215765
215623
  defaultValues: control._defaultValues
@@ -215786,9 +215644,9 @@ var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, is
215786
215644
  };
215787
215645
  var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value];
215788
215646
  function useSubscribe(props) {
215789
- const _props = import_react104.default.useRef(props);
215647
+ const _props = import_react103.default.useRef(props);
215790
215648
  _props.current = props;
215791
- import_react104.default.useEffect(() => {
215649
+ import_react103.default.useEffect(() => {
215792
215650
  const subscription = !props.disabled && _props.current.subject && _props.current.subject.subscribe({
215793
215651
  next: _props.current.next
215794
215652
  });
@@ -216112,7 +215970,7 @@ var createSubject = () => {
216112
215970
  };
216113
215971
  };
216114
215972
  var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
216115
- function deepEqual2(object1, object2) {
215973
+ function deepEqual3(object1, object2) {
216116
215974
  if (isPrimitive(object1) || isPrimitive(object2)) {
216117
215975
  return object1 === object2;
216118
215976
  }
@@ -216131,7 +215989,7 @@ function deepEqual2(object1, object2) {
216131
215989
  }
216132
215990
  if (key !== "ref") {
216133
215991
  const val2 = object2[key];
216134
- if (isDateObject(val1) && isDateObject(val2) || isObject4(val1) && isObject4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual2(val1, val2) : val1 !== val2) {
215992
+ if (isDateObject(val1) && isDateObject(val2) || isObject4(val1) && isObject4(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual3(val1, val2) : val1 !== val2) {
216135
215993
  return false;
216136
215994
  }
216137
215995
  }
@@ -216174,7 +216032,7 @@ function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues
216174
216032
  getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
216175
216033
  }
216176
216034
  } else {
216177
- dirtyFieldsFromValues[key] = !deepEqual2(data[key], formValues[key]);
216035
+ dirtyFieldsFromValues[key] = !deepEqual3(data[key], formValues[key]);
216178
216036
  }
216179
216037
  }
216180
216038
  }
@@ -216407,7 +216265,7 @@ function createFormControl(props = {}) {
216407
216265
  _formState.isDirty = output.isDirty = _getDirty();
216408
216266
  shouldUpdateField = isPreviousDirty !== output.isDirty;
216409
216267
  }
216410
- const isCurrentFieldPristine = disabledField || deepEqual2(get(_defaultValues, name), fieldValue);
216268
+ const isCurrentFieldPristine = disabledField || deepEqual3(get(_defaultValues, name), fieldValue);
216411
216269
  isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));
216412
216270
  isCurrentFieldPristine || disabledField ? unset(_formState.dirtyFields, name) : set2(_formState.dirtyFields, name, true);
216413
216271
  output.dirtyFields = _formState.dirtyFields;
@@ -216436,7 +216294,7 @@ function createFormControl(props = {}) {
216436
216294
  delayErrorCallback = null;
216437
216295
  error2 ? set2(_formState.errors, name, error2) : unset(_formState.errors, name);
216438
216296
  }
216439
- if ((error2 ? !deepEqual2(previousFieldError, error2) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
216297
+ if ((error2 ? !deepEqual3(previousFieldError, error2) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) {
216440
216298
  const updatedFormState = {
216441
216299
  ...fieldState,
216442
216300
  ...shouldUpdateValid && isBoolean(isValid3) ? { isValid: isValid3 } : {},
@@ -216505,7 +216363,7 @@ function createFormControl(props = {}) {
216505
216363
  }
216506
216364
  _names.unMount = /* @__PURE__ */ new Set();
216507
216365
  };
216508
- const _getDirty = (name, data) => !_options.disabled && (name && data && set2(_formValues, name, data), !deepEqual2(getValues(), _defaultValues));
216366
+ const _getDirty = (name, data) => !_options.disabled && (name && data && set2(_formValues, name, data), !deepEqual3(getValues(), _defaultValues));
216509
216367
  const _getWatch = (names2, defaultValue, isGlobal) => generateWatchOutput(names2, _names, {
216510
216368
  ..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names2) ? { [names2]: defaultValue } : defaultValue
216511
216369
  }, isGlobal, defaultValue);
@@ -216584,7 +216442,7 @@ function createFormControl(props = {}) {
216584
216442
  const field = get(_fields, name);
216585
216443
  const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);
216586
216444
  const _updateIsFieldValueUpdated = (fieldValue) => {
216587
- isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual2(fieldValue, get(_formValues, name, fieldValue));
216445
+ isFieldValueUpdated = Number.isNaN(fieldValue) || isDateObject(fieldValue) && isNaN(fieldValue.getTime()) || deepEqual3(fieldValue, get(_formValues, name, fieldValue));
216588
216446
  };
216589
216447
  if (field) {
216590
216448
  let error2;
@@ -216960,7 +216818,7 @@ function createFormControl(props = {}) {
216960
216818
  _state.watch = !!_options.shouldUnregister;
216961
216819
  _subjects.state.next({
216962
216820
  submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0,
216963
- isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual2(formValues, _defaultValues)),
216821
+ isDirty: isEmptyResetValues ? false : keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual3(formValues, _defaultValues)),
216964
216822
  isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false,
216965
216823
  dirtyFields: isEmptyResetValues ? {} : keepStateOptions.keepDirtyValues ? keepStateOptions.keepDefaultValues && _formValues ? getDirtyFields(_defaultValues, _formValues) : _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : keepStateOptions.keepDirty ? _formState.dirtyFields : {},
216966
216824
  touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {},
@@ -217068,9 +216926,9 @@ function createFormControl(props = {}) {
217068
216926
  };
217069
216927
  }
217070
216928
  function useForm(props = {}) {
217071
- const _formControl = import_react104.default.useRef(void 0);
217072
- const _values = import_react104.default.useRef(void 0);
217073
- const [formState, updateFormState] = import_react104.default.useState({
216929
+ const _formControl = import_react103.default.useRef(void 0);
216930
+ const _values = import_react103.default.useRef(void 0);
216931
+ const [formState, updateFormState] = import_react103.default.useState({
217074
216932
  isDirty: false,
217075
216933
  isValidating: false,
217076
216934
  isLoading: isFunction2(props.defaultValues),
@@ -217102,8 +216960,8 @@ function useForm(props = {}) {
217102
216960
  }
217103
216961
  }
217104
216962
  });
217105
- import_react104.default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
217106
- import_react104.default.useEffect(() => {
216963
+ import_react103.default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
216964
+ import_react103.default.useEffect(() => {
217107
216965
  if (control._proxyFormState.isDirty) {
217108
216966
  const isDirty2 = control._getDirty();
217109
216967
  if (isDirty2 !== formState.isDirty) {
@@ -217113,8 +216971,8 @@ function useForm(props = {}) {
217113
216971
  }
217114
216972
  }
217115
216973
  }, [control, formState.isDirty]);
217116
- import_react104.default.useEffect(() => {
217117
- if (props.values && !deepEqual2(props.values, _values.current)) {
216974
+ import_react103.default.useEffect(() => {
216975
+ if (props.values && !deepEqual3(props.values, _values.current)) {
217118
216976
  control._reset(props.values, control._options.resetOptions);
217119
216977
  _values.current = props.values;
217120
216978
  updateFormState((state) => ({ ...state }));
@@ -217122,12 +216980,12 @@ function useForm(props = {}) {
217122
216980
  control._resetDefaultValues();
217123
216981
  }
217124
216982
  }, [props.values, control]);
217125
- import_react104.default.useEffect(() => {
216983
+ import_react103.default.useEffect(() => {
217126
216984
  if (props.errors) {
217127
216985
  control._setErrors(props.errors);
217128
216986
  }
217129
216987
  }, [props.errors, control]);
217130
- import_react104.default.useEffect(() => {
216988
+ import_react103.default.useEffect(() => {
217131
216989
  if (!control._state.mount) {
217132
216990
  control._updateValid();
217133
216991
  control._state.mount = true;
@@ -217138,7 +216996,7 @@ function useForm(props = {}) {
217138
216996
  }
217139
216997
  control._removeUnmounted();
217140
216998
  });
217141
- import_react104.default.useEffect(() => {
216999
+ import_react103.default.useEffect(() => {
217142
217000
  props.shouldUnregister && control._subjects.values.next({
217143
217001
  values: control._getWatch()
217144
217002
  });
@@ -217219,8 +217077,8 @@ var t2 = function(o3, t3, s3) {
217219
217077
  };
217220
217078
 
217221
217079
  // build/client/client/jsx/node-editor.js
217222
- var import_react106 = __toESM(require_react());
217223
- var import_deep_equal = __toESM(require_deep_equal());
217080
+ var import_react105 = __toESM(require_react());
217081
+ var import_deep_equal2 = __toESM(require_deep_equal());
217224
217082
  var node_editor_default = NodeEditor2;
217225
217083
  function NodeEditor2({ form, target, description, env, isNewNode, onSave, onCancel }) {
217226
217084
  const displayName = {
@@ -217239,7 +217097,7 @@ function NodeEditor2({ form, target, description, env, isNewNode, onSave, onCanc
217239
217097
  ...target.config,
217240
217098
  displayName: target.config.displayName == "" ? getDisplayName(target.type, description) : target.config.displayName
217241
217099
  };
217242
- return (0, import_jsx_runtime147.jsxs)("div", { id: "top-level-form", children: [(0, import_jsx_runtime147.jsxs)("h5", { className: "flex items-center justify-between text-lg font-semibold text-gray-500 uppercase dark:text-gray-400", children: [(0, import_jsx_runtime147.jsxs)("span", { children: [isNewNode ? "Create" : "Update", " Node", " "] }), (0, import_jsx_runtime147.jsxs)("button", { type: "button", onClick: onCancel, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime147.jsx)("span", { className: "sr-only", children: "Close menu" })] })] }), (0, import_jsx_runtime147.jsxs)("p", { className: "font-semibold text-gray-800 dark:text-gray-200", children: [(0, import_jsx_runtime147.jsx)("span", { className: "fold-bold", children: "Type" }), ": ", target.info.name] }), (0, import_jsx_runtime147.jsx)("p", { className: "mb-6", children: (0, import_jsx_runtime147.jsxs)("a", { target: "_blank", href: componentDocs(target.info.identifier, env).toString(), children: [(0, import_jsx_runtime147.jsx)("svg", { className: "inline align-bottom ml-2 mr-2 w-5 h-5 text-gray-800 dark:text-white", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: (0, import_jsx_runtime147.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.529 9.988a2.502 2.502 0 1 1 5 .191A2.441 2.441 0 0 1 12 12.582V14m-.01 3.008H12M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }), (0, import_jsx_runtime147.jsx)("span", { className: "text-sm", children: "Documentation" })] }) }), (0, import_jsx_runtime147.jsx)(Form, { defaultValue: actualValues, node: target, latest: description, env, form: moreForm, onCancel, onSave: addIdThenSave })] });
217100
+ return (0, import_jsx_runtime146.jsxs)("div", { id: "top-level-form", children: [(0, import_jsx_runtime146.jsxs)("h5", { className: "flex items-center justify-between text-lg font-semibold text-gray-500 uppercase dark:text-gray-400", children: [(0, import_jsx_runtime146.jsxs)("span", { children: [isNewNode ? "Create" : "Update", " Node", " "] }), (0, import_jsx_runtime146.jsxs)("button", { type: "button", onClick: onCancel, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime146.jsx)("span", { className: "sr-only", children: "Close menu" })] })] }), (0, import_jsx_runtime146.jsxs)("p", { className: "font-semibold text-gray-800 dark:text-gray-200", children: [(0, import_jsx_runtime146.jsx)("span", { className: "fold-bold", children: "Type" }), ": ", target.info.name] }), (0, import_jsx_runtime146.jsx)("p", { className: "mb-6", children: (0, import_jsx_runtime146.jsxs)("a", { target: "_blank", href: componentDocs(target.info.identifier, env).toString(), children: [(0, import_jsx_runtime146.jsx)("svg", { className: "inline align-bottom ml-2 mr-2 w-5 h-5 text-gray-800 dark:text-white", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: (0, import_jsx_runtime146.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9.529 9.988a2.502 2.502 0 1 1 5 .191A2.441 2.441 0 0 1 12 12.582V14m-.01 3.008H12M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }), (0, import_jsx_runtime146.jsx)("span", { className: "text-sm", children: "Documentation" })] }) }), (0, import_jsx_runtime146.jsx)(Form, { defaultValue: actualValues, node: target, latest: description, env, form: moreForm, onCancel, onSave: addIdThenSave })] });
217243
217101
  function addIdThenSave(formValues) {
217244
217102
  formValues["id"] = getNextId(target.id, formValues["displayName"], description);
217245
217103
  onSave({ config: formValues });
@@ -217351,7 +217209,7 @@ function Form(props) {
217351
217209
  function onSave(config) {
217352
217210
  props.onSave(config);
217353
217211
  }
217354
- return (0, import_jsx_runtime147.jsx)(NodeEditorImpl, { form: props.form, schema: objectType(validation), initialValues, latest: props.latest, env: props.env, node: props.node, onSave, onCancel: props.onCancel });
217212
+ return (0, import_jsx_runtime146.jsx)(NodeEditorImpl, { form: props.form, schema: objectType(validation), initialValues, latest: props.latest, env: props.env, node: props.node, onSave, onCancel: props.onCancel });
217355
217213
  }
217356
217214
  function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, latest, env }) {
217357
217215
  const { handleSubmit, register, resetField, setValue, setError, getValues, watch, formState: { errors } } = useForm({
@@ -217360,7 +217218,7 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217360
217218
  const urls = node && {
217361
217219
  staticUrl: staticApiUrl(node.type, env)
217362
217220
  };
217363
- const [focusedElement, setFocusedElement] = (0, import_react106.useState)();
217221
+ const [focusedElement, setFocusedElement] = (0, import_react105.useState)();
217364
217222
  function validationClass(name) {
217365
217223
  const entry = errors[name];
217366
217224
  if (entry) {
@@ -217370,9 +217228,9 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217370
217228
  }
217371
217229
  function maybe_render_error(key) {
217372
217230
  if (errors[key]) {
217373
- return (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime147.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime147.jsx)("div", { children: (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: errors[key]?.message || "" }) })] });
217231
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime146.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime146.jsx)("div", { children: (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, { children: errors[key]?.message || "" }) })] });
217374
217232
  } else {
217375
- return (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {});
217233
+ return (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {});
217376
217234
  }
217377
217235
  }
217378
217236
  function onElementExpand(name) {
@@ -217386,7 +217244,7 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217386
217244
  onSave(values);
217387
217245
  }, console.error)();
217388
217246
  }
217389
- return (0, import_jsx_runtime147.jsx)("div", { id: nodeEditorId, className: "z-40 w-full max-w-xs overflow-visible bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime147.jsxs)("div", { children: [Object.entries(form).map(([name, e2], i3) => {
217247
+ return (0, import_jsx_runtime146.jsx)("div", { id: nodeEditorId, className: "z-40 w-full max-w-xs overflow-visible bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime146.jsxs)("div", { children: [Object.entries(form).map(([name, e2], i3) => {
217390
217248
  const entry = e2;
217391
217249
  const entryHint = entry.hint;
217392
217250
  let elementProps;
@@ -217418,14 +217276,14 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217418
217276
  case "multiselect":
217419
217277
  register(name);
217420
217278
  elementProps = register(name + "_json");
217421
- (0, import_react106.useEffect)(() => {
217279
+ (0, import_react105.useEffect)(() => {
217422
217280
  setValue(name, initialValues[name]);
217423
217281
  }, [initialValues[name]]);
217424
217282
  break;
217425
217283
  case "select":
217426
217284
  register(name);
217427
217285
  elementProps = register(name + "_json");
217428
- (0, import_react106.useEffect)(() => {
217286
+ (0, import_react105.useEffect)(() => {
217429
217287
  setValue(name, initialValues[name]);
217430
217288
  }, [initialValues[name]]);
217431
217289
  break;
@@ -217449,30 +217307,30 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217449
217307
  assertUnreachable(type);
217450
217308
  }
217451
217309
  if (focusedElement && name !== focusedElement)
217452
- return (0, import_jsx_runtime147.jsx)("span", {}, i3);
217310
+ return (0, import_jsx_runtime146.jsx)("span", {}, i3);
217453
217311
  switch (type) {
217454
217312
  case "text":
217455
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("input", { defaultValue: initialValues[name], className: `form-control${validationClass(name)} node-editor-text-input`, id: name, ...elementProps }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217313
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("input", { defaultValue: initialValues[name], className: `form-control${validationClass(name)} node-editor-text-input`, id: name, ...elementProps }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217456
217314
  case "constant":
217457
217315
  setValue(name, initialValues[name], { shouldDirty: false });
217458
- return (0, import_jsx_runtime147.jsx)("input", { defaultValue: initialValues[name], type: "hidden", id: name, ...elementProps }, i3);
217316
+ return (0, import_jsx_runtime146.jsx)("input", { defaultValue: initialValues[name], type: "hidden", id: name, ...elementProps }, i3);
217459
217317
  case "numeric":
217460
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("input", { defaultValue: initialValues[name], type: "number", step: entryHint.step, className: `form-control${validationClass(name)} node-editor-numeric-input`, id: name, ...elementProps }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217318
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("input", { defaultValue: initialValues[name], type: "number", step: entryHint.step, className: `form-control${validationClass(name)} node-editor-numeric-input`, id: name, ...elementProps }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217461
217319
  case "list":
217462
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)(ListInput, { defaultValue: initialValues[name], id: name, validation: entryHint.validation ?? anyType(), onInvalid: () => setError(name, {}), onValid: (v2) => {
217320
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)(ListInput, { defaultValue: initialValues[name], id: name, validation: entryHint.validation ?? anyType(), onInvalid: () => setError(name, {}), onValid: (v2) => {
217463
217321
  resetField(name);
217464
217322
  setValue(name, v2);
217465
- } }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217323
+ } }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217466
217324
  case "custom":
217467
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime147.jsx)(import_react105.Suspense, { fallback: (0, import_jsx_runtime147.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime147.jsx)(entryHint.component, { latestDocument: latest, id: name, defaultValue: initialValues[name], latest: getValues(), urls, onChanged: (v2) => {
217325
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime146.jsx)(import_react104.Suspense, { fallback: (0, import_jsx_runtime146.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime146.jsx)(entryHint.component, { latestDocument: latest, id: name, defaultValue: initialValues[name], latest: getValues(), urls, onChanged: (v2) => {
217468
217326
  resetField(name);
217469
217327
  setValue(name, v2);
217470
217328
  } }) }), maybe_render_error(name)] }, i3);
217471
217329
  case "custom-form":
217472
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), focusedElement == name ? (0, import_jsx_runtime147.jsx)(entryHint.form, { latestDocument: latest, id: name, defaultValue: getValues()[name] ?? initialValues[name], latest: getValues(), urls, onCancel: () => setFocusedElement(void 0), onChanged: (v2) => {
217330
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), focusedElement == name ? (0, import_jsx_runtime146.jsx)(entryHint.form, { latestDocument: latest, id: name, defaultValue: getValues()[name] ?? initialValues[name], latest: getValues(), urls, onCancel: () => setFocusedElement(void 0), onChanged: (v2) => {
217473
217331
  setValue(name, v2);
217474
217332
  setFocusedElement(void 0);
217475
- } }) : (0, import_jsx_runtime147.jsxs)("div", { className: "flex mb-2 border-dotted border-gray-500 border-1 p-2", children: [(0, import_jsx_runtime147.jsx)("span", { className: "flex-grow text-sm", children: entryHint.view(getValues()[name] ?? initialValues[name], getValues()) }), (0, import_jsx_runtime147.jsx)("a", { onClick: () => setFocusedElement(name), href: "#", className: "shrink text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm", children: (0, import_jsx_runtime147.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-6 h-6", children: (0, import_jsx_runtime147.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" }) }) })] })] }, i3);
217333
+ } }) : (0, import_jsx_runtime146.jsxs)("div", { className: "flex mb-2 border-dotted border-gray-500 border-1 p-2", children: [(0, import_jsx_runtime146.jsx)("span", { className: "flex-grow text-sm", children: entryHint.view(getValues()[name] ?? initialValues[name], getValues()) }), (0, import_jsx_runtime146.jsx)("a", { onClick: () => setFocusedElement(name), href: "#", className: "shrink text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm", children: (0, import_jsx_runtime146.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-6 h-6", children: (0, import_jsx_runtime146.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" }) }) })] })] }, i3);
217476
217334
  case "multiselect": {
217477
217335
  const { onChange, onBlur: _2, ...p } = elementProps;
217478
217336
  const myOnChange = (e3) => {
@@ -217487,10 +217345,10 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217487
217345
  void onChange(e3);
217488
217346
  };
217489
217347
  const initial = initialValues[name].map((j2) => JSON.stringify(j2));
217490
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("select", { multiple: true, defaultValue: initial, className: `form-control${validationClass(name)} node-editor-select-input`, id: name, onChange: myOnChange, onBlur: myOnChange, ...p, children: entryHint.options.map((o3, i4) => {
217348
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("select", { multiple: true, defaultValue: initial, className: `form-control${validationClass(name)} node-editor-select-input`, id: name, onChange: myOnChange, onBlur: myOnChange, ...p, children: entryHint.options.map((o3, i4) => {
217491
217349
  const val = JSON.stringify(o3.value);
217492
- return (0, import_jsx_runtime147.jsx)("option", { value: val, children: o3.display }, i4);
217493
- }) }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217350
+ return (0, import_jsx_runtime146.jsx)("option", { value: val, children: o3.display }, i4);
217351
+ }) }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217494
217352
  }
217495
217353
  case "select": {
217496
217354
  const { onChange, onBlur: _2, ...p } = elementProps;
@@ -217504,27 +217362,27 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217504
217362
  setValue(name + "_json", e3.target.value);
217505
217363
  void onChange(e3);
217506
217364
  };
217507
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsxs)("select", { defaultValue: JSON.stringify(initialValues[name]), className: `form-control${validationClass(name)} node-editor-select-input`, id: name, onChange: myOnChange, onBlur: myOnChange, ...p, children: [entryHint.optional ? (0, import_jsx_runtime147.jsx)("option", { value: JSON.stringify(null), children: "---" }) : (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {}), entryHint.options.map((o3, i4) => (0, import_jsx_runtime147.jsx)("option", { value: JSON.stringify(o3.value), children: o3.display }, i4))] }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217365
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsxs)("select", { defaultValue: JSON.stringify(initialValues[name]), className: `form-control${validationClass(name)} node-editor-select-input`, id: name, onChange: myOnChange, onBlur: myOnChange, ...p, children: [entryHint.optional ? (0, import_jsx_runtime146.jsx)("option", { value: JSON.stringify(null), children: "---" }) : (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {}), entryHint.options.map((o3, i4) => (0, import_jsx_runtime146.jsx)("option", { value: JSON.stringify(o3.value), children: o3.display }, i4))] }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217508
217366
  }
217509
217367
  case "boolean": {
217510
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("input", { type: "checkbox", defaultChecked: initialValues[name], className: `form-control${validationClass(name)}`, id: name, ...elementProps }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217368
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("input", { type: "checkbox", defaultChecked: initialValues[name], className: `form-control${validationClass(name)}`, id: name, ...elementProps }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), maybe_render_error(name)] }, i3);
217511
217369
  }
217512
217370
  case "form-list": {
217513
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime147.jsx)(FormList, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), newForm: entryHint.newForm, node, latest, env, form: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217371
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime146.jsx)(FormList, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), newForm: entryHint.newForm, node, latest, env, form: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217514
217372
  setValue(name, v2);
217515
217373
  }, view: entryHint.view }), maybe_render_error(name)] }, i3);
217516
217374
  }
217517
217375
  case "form-list-pick":
217518
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime147.jsx)(FormList, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), node, latest, env, discriminatedForm: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217376
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime146.jsx)(FormList, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), node, latest, env, discriminatedForm: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217519
217377
  setValue(name, v2);
217520
217378
  }, view: entryHint.view }), maybe_render_error(name)] }, i3);
217521
217379
  case "form-item":
217522
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime147.jsx)(FormItem, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), node, latest, env, form: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217380
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)(Label, { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime146.jsx)(FormItem, { id: name, defaultValue: initialValues[name], onExpand: () => onElementExpand(name), node, latest, env, form: entryHint.form, onContract: () => onElementContract(name), onChange: (v2) => {
217523
217381
  setValue(name, v2);
217524
217382
  }, view: entryHint.view }), maybe_render_error(name)] }, i3);
217525
217383
  case "form-pick": {
217526
217384
  const { onChange, onBlur: _2, ...p } = elementProps;
217527
- const [formRefreshes, refreshForm] = (0, import_react105.useReducer)((i4) => i4 + 1, 0);
217385
+ const [formRefreshes, refreshForm] = (0, import_react104.useReducer)((i4) => i4 + 1, 0);
217528
217386
  const myOnChange = (e3) => {
217529
217387
  const newVariant = e3.target.value;
217530
217388
  if (newVariant !== variantHint) {
@@ -217537,27 +217395,27 @@ function NodeEditorImpl({ form, schema, onSave, onCancel, initialValues, node, l
217537
217395
  };
217538
217396
  const currentValue = watch(name) ?? initialValues[name] ?? {};
217539
217397
  const variantHint = entryHint.form.match(currentValue) ?? entryHint.form.options[0].key;
217540
- return (0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime147.jsx)("select", { defaultValue: variantHint, className: `form-control node-editor-select-input`, onChange: myOnChange, onBlur: myOnChange, id: name + "_variant", ...p, children: entryHint.form.options.map(({ key, display }) => (0, import_jsx_runtime147.jsx)("option", { value: key, children: display }, key)) }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime147.jsx)(FormItem, { id: name, defaultValue: currentValue, defaultEditing: focusedElement === name, onExpand: () => onElementExpand(name), node, latest, env, form: entryHint.form.pick(variantHint), onContract: () => onElementContract(name), onChange: (v2) => setValue(name, v2), view: entryHint.view }, formRefreshes), maybe_render_error(name)] }, i3);
217398
+ return (0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { htmlFor: name, className: "node-editor-label", children: name }), (0, import_jsx_runtime146.jsx)("select", { defaultValue: variantHint, className: `form-control node-editor-select-input`, onChange: myOnChange, onBlur: myOnChange, id: name + "_variant", ...p, children: entryHint.form.options.map(({ key, display }) => (0, import_jsx_runtime146.jsx)("option", { value: key, children: display }, key)) }), (0, import_jsx_runtime146.jsx)("p", { className: "node-editor-helper-text", children: entry.help }), (0, import_jsx_runtime146.jsx)(FormItem, { id: name, defaultValue: currentValue, defaultEditing: focusedElement === name, onExpand: () => onElementExpand(name), node, latest, env, form: entryHint.form.pick(variantHint), onContract: () => onElementContract(name), onChange: (v2) => setValue(name, v2), view: entryHint.view }, formRefreshes), maybe_render_error(name)] }, i3);
217541
217399
  }
217542
217400
  default:
217543
217401
  return assertUnreachable(entryHint);
217544
217402
  }
217545
- }), focusedElement ? (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {}) : (0, import_jsx_runtime147.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime147.jsx)("button", { id: "btn-form-save", type: "button", onClick: onSaveRequest, className: "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", children: "Save" }), (0, import_jsx_runtime147.jsxs)("button", { id: "btn-form-cancel", type: "button", onClick: onCancel, className: "inline-flex w-full justify-center text-gray-500 items-center bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-primary-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600", children: [(0, import_jsx_runtime147.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 -ml-1 sm:mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime147.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }), "Cancel"] })] })] }) });
217403
+ }), focusedElement ? (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {}) : (0, import_jsx_runtime146.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime146.jsx)("button", { id: "btn-form-save", type: "button", onClick: onSaveRequest, className: "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", children: "Save" }), (0, import_jsx_runtime146.jsxs)("button", { id: "btn-form-cancel", type: "button", onClick: onCancel, className: "inline-flex w-full justify-center text-gray-500 items-center bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-primary-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600", children: [(0, import_jsx_runtime146.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 -ml-1 sm:mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime146.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }), "Cancel"] })] })] }) });
217546
217404
  }
217547
217405
  function FormList(props) {
217548
- const [selectedItem, setSelectedItem] = (0, import_react106.useState)();
217549
- const [value, setValue] = (0, import_react106.useState)(props.defaultValue ?? []);
217550
- (0, import_react106.useEffect)(() => {
217406
+ const [selectedItem, setSelectedItem] = (0, import_react105.useState)();
217407
+ const [value, setValue] = (0, import_react105.useState)(props.defaultValue ?? []);
217408
+ (0, import_react105.useEffect)(() => {
217551
217409
  props.onChange(value);
217552
217410
  }, []);
217553
- const addButton = (0, import_jsx_runtime147.jsx)("a", { href: "#", className: "float-right text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline", onClick: onAdd, children: "Add" });
217411
+ const addButton = (0, import_jsx_runtime146.jsx)("a", { href: "#", className: "float-right text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline", onClick: onAdd, children: "Add" });
217554
217412
  if (!selectedItem) {
217555
- return (0, import_jsx_runtime147.jsx)("div", { className: "border-dotted border-gray-500 border-1 p-2", children: value.length == 0 ? (0, import_jsx_runtime147.jsxs)("div", { className: "text-sm", children: ["None", addButton] }) : (0, import_jsx_runtime147.jsx)("div", { className: "", children: value.map((v2, i3) => (0, import_jsx_runtime147.jsx)("div", { children: (0, import_jsx_runtime147.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-1 text-sm", children: [(0, import_jsx_runtime147.jsx)("div", { className: "col-span-1", children: (0, import_jsx_runtime147.jsx)(import_react105.Suspense, { fallback: (0, import_jsx_runtime147.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime147.jsx)(props.view, { ...v2 }) }) }), (0, import_jsx_runtime147.jsxs)("div", { className: "col-span-1 pb-2", children: [(0, import_jsx_runtime147.jsx)("a", { onClick: () => onEdit(i3), href: "#", className: "text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm italic", children: "Edit" }), " / ", (0, import_jsx_runtime147.jsx)("a", { onClick: () => onDelete(i3), href: "#", className: "text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm italic", children: "Remove" }), i3 === value.length - 1 ? addButton : null] })] }) }, i3)) }) });
217413
+ return (0, import_jsx_runtime146.jsx)("div", { className: "border-dotted border-gray-500 border-1 p-2", children: value.length == 0 ? (0, import_jsx_runtime146.jsxs)("div", { className: "text-sm", children: ["None", addButton] }) : (0, import_jsx_runtime146.jsx)("div", { className: "", children: value.map((v2, i3) => (0, import_jsx_runtime146.jsx)("div", { children: (0, import_jsx_runtime146.jsxs)("div", { className: "grid grid-flow-row-dense grid-cols-1 text-sm", children: [(0, import_jsx_runtime146.jsx)("div", { className: "col-span-1", children: (0, import_jsx_runtime146.jsx)(import_react104.Suspense, { fallback: (0, import_jsx_runtime146.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime146.jsx)(props.view, { ...v2 }) }) }), (0, import_jsx_runtime146.jsxs)("div", { className: "col-span-1 pb-2", children: [(0, import_jsx_runtime146.jsx)("a", { onClick: () => onEdit(i3), href: "#", className: "text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm italic", children: "Edit" }), " / ", (0, import_jsx_runtime146.jsx)("a", { onClick: () => onDelete(i3), href: "#", className: "text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm italic", children: "Remove" }), i3 === value.length - 1 ? addButton : null] })] }) }, i3)) }) });
217556
217414
  }
217557
217415
  if (props.discriminatedForm) {
217558
- return (0, import_jsx_runtime147.jsx)(DiscriminatedForm, { ...props, defaultValue: selectedItem.value, discriminatedForm: props.discriminatedForm, onCancel, onSave });
217416
+ return (0, import_jsx_runtime146.jsx)(DiscriminatedForm, { ...props, defaultValue: selectedItem.value, discriminatedForm: props.discriminatedForm, onCancel, onSave });
217559
217417
  }
217560
- return props.form ? (0, import_jsx_runtime147.jsx)(Form, { defaultValue: selectedItem.value, form: selectedItem.index === void 0 && props.newForm ? props.newForm.form : props.form, onCancel, onSave, node: props.node, latest: props.latest, env: props.env }) : (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {});
217418
+ return props.form ? (0, import_jsx_runtime146.jsx)(Form, { defaultValue: selectedItem.value, form: selectedItem.index === void 0 && props.newForm ? props.newForm.form : props.form, onCancel, onSave, node: props.node, latest: props.latest, env: props.env }) : (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, {});
217561
217419
  function onAdd() {
217562
217420
  const newForm = props.discriminatedForm ? props.discriminatedForm.pick(props.discriminatedForm.options[0].key) : props.newForm ? props.newForm : props.form ? props.form : {};
217563
217421
  const newValue = buildDefaults(newForm, {}, props.node, props.latest).initialValues;
@@ -217606,12 +217464,12 @@ function FormList(props) {
217606
217464
  }
217607
217465
  }
217608
217466
  function FormItem(props) {
217609
- const [editing, setEditing] = (0, import_react106.useState)(props.defaultEditing ?? false);
217610
- const [value, setValue] = (0, import_react106.useState)(props.defaultValue ?? []);
217611
- (0, import_react106.useEffect)(() => {
217467
+ const [editing, setEditing] = (0, import_react105.useState)(props.defaultEditing ?? false);
217468
+ const [value, setValue] = (0, import_react105.useState)(props.defaultValue ?? []);
217469
+ (0, import_react105.useEffect)(() => {
217612
217470
  props.onChange(value);
217613
217471
  }, []);
217614
- return editing ? (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: (0, import_jsx_runtime147.jsx)(Form, { defaultValue: value, form: props.form, onCancel, onSave, latest: props.latest, env: props.env, node: props.node }) }) : (0, import_jsx_runtime147.jsxs)("div", { className: "flex mb-2 border-dotted border-gray-500 border-1 p-2", children: [(0, import_jsx_runtime147.jsx)("span", { className: "flex-grow text-sm", children: (0, import_jsx_runtime147.jsx)(import_react105.Suspense, { fallback: (0, import_jsx_runtime147.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime147.jsx)(props.view, { ...value }) }) }), (0, import_jsx_runtime147.jsx)("a", { onClick: () => onEdit(), href: "#", className: "shrink text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm", children: (0, import_jsx_runtime147.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-6 h-6", children: (0, import_jsx_runtime147.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" }) }) })] });
217472
+ return editing ? (0, import_jsx_runtime146.jsx)(import_jsx_runtime146.Fragment, { children: (0, import_jsx_runtime146.jsx)(Form, { defaultValue: value, form: props.form, onCancel, onSave, latest: props.latest, env: props.env, node: props.node }) }) : (0, import_jsx_runtime146.jsxs)("div", { className: "flex mb-2 border-dotted border-gray-500 border-1 p-2", children: [(0, import_jsx_runtime146.jsx)("span", { className: "flex-grow text-sm", children: (0, import_jsx_runtime146.jsx)(import_react104.Suspense, { fallback: (0, import_jsx_runtime146.jsx)("div", { children: "..." }), children: (0, import_jsx_runtime146.jsx)(props.view, { ...value }) }) }), (0, import_jsx_runtime146.jsx)("a", { onClick: () => onEdit(), href: "#", className: "shrink text-blue-600 dark:hover:text-white hover:text-gray-900 hover:underline text-sm", children: (0, import_jsx_runtime146.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-6 h-6", children: (0, import_jsx_runtime146.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" }) }) })] });
217615
217473
  function onEdit() {
217616
217474
  setEditing(true);
217617
217475
  props.onExpand();
@@ -217631,29 +217489,29 @@ function FormItem(props) {
217631
217489
  }
217632
217490
  }
217633
217491
  function DiscriminatedForm(props) {
217634
- const [defaultValue, setDefault] = (0, import_react106.useState)(props.defaultValue);
217635
- const [discriminator, setDiscriminator] = (0, import_react106.useState)(props.defaultValue ? props.discriminatedForm.match(props.defaultValue) : props.discriminatedForm.options[0].key);
217492
+ const [defaultValue, setDefault] = (0, import_react105.useState)(props.defaultValue);
217493
+ const [discriminator, setDiscriminator] = (0, import_react105.useState)(props.defaultValue ? props.discriminatedForm.match(props.defaultValue) : props.discriminatedForm.options[0].key);
217636
217494
  const onChange = (e2) => {
217637
217495
  const disc = e2.target.value;
217638
217496
  setDiscriminator(disc);
217639
217497
  const newValue = buildDefaults(props.discriminatedForm.pick(disc), {}, props.node, props.latest);
217640
217498
  setDefault(newValue);
217641
217499
  };
217642
- return (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [(0, import_jsx_runtime147.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime147.jsx)("label", { className: "node-editor-label", children: "Select an option" }), (0, import_jsx_runtime147.jsx)("select", { defaultValue: discriminator, className: "form-control node-editor-select-input", onChange, children: props.discriminatedForm.options.map((o3, i3) => (0, import_jsx_runtime147.jsx)("option", { value: o3.key, children: o3.display }, i3)) })] }), (0, import_jsx_runtime147.jsx)(Form, { defaultValue, form: props.discriminatedForm.pick(discriminator), onCancel: props.onCancel, onSave: props.onSave, node: props.node, latest: props.latest, env: props.env }, discriminator)] });
217500
+ return (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [(0, import_jsx_runtime146.jsxs)("div", { className: "form-group", children: [(0, import_jsx_runtime146.jsx)("label", { className: "node-editor-label", children: "Select an option" }), (0, import_jsx_runtime146.jsx)("select", { defaultValue: discriminator, className: "form-control node-editor-select-input", onChange, children: props.discriminatedForm.options.map((o3, i3) => (0, import_jsx_runtime146.jsx)("option", { value: o3.key, children: o3.display }, i3)) })] }), (0, import_jsx_runtime146.jsx)(Form, { defaultValue, form: props.discriminatedForm.pick(discriminator), onCancel: props.onCancel, onSave: props.onSave, node: props.node, latest: props.latest, env: props.env }, discriminator)] });
217643
217501
  }
217644
217502
  function ListInput(props) {
217645
- const [value, setValue] = (0, import_react106.useState)(props.defaultValue ?? []);
217646
- const [validation, setValidation] = (0, import_react106.useState)(props.validation.safeParse(value));
217647
- (0, import_react106.useEffect)(() => {
217503
+ const [value, setValue] = (0, import_react105.useState)(props.defaultValue ?? []);
217504
+ const [validation, setValidation] = (0, import_react105.useState)(props.validation.safeParse(value));
217505
+ (0, import_react105.useEffect)(() => {
217648
217506
  if (props.defaultValue)
217649
217507
  runValidation(props.defaultValue);
217650
217508
  }, []);
217651
- const [focusedItem, setFocusedItem] = (0, import_react106.useState)(void 0);
217652
- (0, import_react106.useEffect)(() => {
217509
+ const [focusedItem, setFocusedItem] = (0, import_react105.useState)(void 0);
217510
+ (0, import_react105.useEffect)(() => {
217653
217511
  }, [focusedItem]);
217654
- return (0, import_jsx_runtime147.jsxs)("div", { id: props.id, children: [value.map((item, i3) => {
217655
- return (0, import_jsx_runtime147.jsxs)("div", { children: [" ", (0, import_jsx_runtime147.jsx)("input", { onChange: onExistingChange(i3), onBlur: onExistingBlur, autoFocus: i3 == focusedItem, className: `form-control${validation.success ? "" : " is-invalid"} node-editor-text-input`, defaultValue: item })] }, i3);
217656
- }), validation.success == false && (0, import_jsx_runtime147.jsx)("div", { className: "invalid-feedback", children: validation.error.message }), (0, import_jsx_runtime147.jsx)("input", { onChange: onNewChange, className: "form-control node-editor-text-input", value: "" }, value.length)] });
217512
+ return (0, import_jsx_runtime146.jsxs)("div", { id: props.id, children: [value.map((item, i3) => {
217513
+ return (0, import_jsx_runtime146.jsxs)("div", { children: [" ", (0, import_jsx_runtime146.jsx)("input", { onChange: onExistingChange(i3), onBlur: onExistingBlur, autoFocus: i3 == focusedItem, className: `form-control${validation.success ? "" : " is-invalid"} node-editor-text-input`, defaultValue: item })] }, i3);
217514
+ }), validation.success == false && (0, import_jsx_runtime146.jsx)("div", { className: "invalid-feedback", children: validation.error.message }), (0, import_jsx_runtime146.jsx)("input", { onChange: onNewChange, className: "form-control node-editor-text-input", value: "" }, value.length)] });
217657
217515
  function onNewChange(e2) {
217658
217516
  const newValue = value.concat([e2.currentTarget.value]);
217659
217517
  setValue(newValue);
@@ -217691,7 +217549,7 @@ function SelectValidation(name, hint) {
217691
217549
  return true;
217692
217550
  }
217693
217551
  if (hint.options.find((v22) => {
217694
- return (0, import_deep_equal.default)(v22.value, v2);
217552
+ return (0, import_deep_equal2.default)(v22.value, v2);
217695
217553
  }))
217696
217554
  return true;
217697
217555
  return false;
@@ -217715,6 +217573,191 @@ function getDisplayName(type, _description, _x) {
217715
217573
  return name;
217716
217574
  }
217717
217575
 
217576
+ // build/client/client/jsx/connection-editor.js
217577
+ var import_jsx_runtime147 = __toESM(require_jsx_runtime());
217578
+ var import_react106 = __toESM(require_react());
217579
+ function ConnectionEditor(props) {
217580
+ return (0, import_jsx_runtime147.jsx)(ConnectionEditorImpl, { ...props });
217581
+ }
217582
+ function deriveAvailableModes(source, dest) {
217583
+ const acceptType = dest.subscription.accepts?.type;
217584
+ const produceType = source.subscription.produces?.type;
217585
+ if (!acceptType || !produceType) {
217586
+ throw new Error("Node doesn't support subscriptions");
217587
+ }
217588
+ switch (produceType) {
217589
+ case "simple-stream":
217590
+ return ["take-first-stream"];
217591
+ case "dynamic-streams":
217592
+ return ["take-first-stream", "take-specific-streams", "take-all-streams"];
217593
+ default:
217594
+ assertUnreachable(produceType);
217595
+ }
217596
+ }
217597
+ function ConnectionEditorImpl(props) {
217598
+ const sourceNodeInfo = props.connection.sourceNode.info;
217599
+ const destNodeInfo = props.connection.destinationNode.info;
217600
+ const sourceNodeInputs = props.connection.sourceNode.subscriptions.flatMap((s3) => s3.expectedStreams);
217601
+ const latest = props.connection.subscription.streams;
217602
+ const availableStreams = outputStreamComponents(sourceNodeInfo.subscription.produces, props.connection.sourceNode.config, sourceNodeInputs);
217603
+ const availableMedia = outputMedia(sourceNodeInfo.subscription.produces, props.connection.sourceNode.config, sourceNodeInputs);
217604
+ const defaultStreamSelection = latest.type == "take-specific-streams" ? latest.filter : [];
217605
+ const availableModes = deriveAvailableModes(sourceNodeInfo, destNodeInfo);
217606
+ const allowedMedia = inputMedia(destNodeInfo.subscription.accepts, props.connection.destinationNode.config);
217607
+ const [mode, setMode] = (0, import_react106.useState)(availableModes.includes(latest.type) ? latest.type : availableModes[0]);
217608
+ const dynamicStreamsMode = destNodeInfo.subscription.accepts?.type == "dynamic-streams" ? destNodeInfo.subscription.accepts.mode : void 0;
217609
+ const inputStreamsGroupingKey = sourceNodeInfo.subscription?.produces?.type == "dynamic-streams" ? sourceNodeInfo.subscription?.produces.groupBy : void 0;
217610
+ const groupingKey = dynamicStreamsMode && typeof dynamicStreamsMode != "string" ? dynamicStreamsMode.groupBy : inputStreamsGroupingKey;
217611
+ const availableGroups = groupingKey ? [...new Set(availableStreams.map((s3) => s3[groupingKey]?.toString())).values()].filter((s3) => !!s3) : [];
217612
+ const [simpleStreamSelection, setSimpleStreamSelection] = (0, import_react106.useState)(true);
217613
+ const [streamSelection, setStreamSelection] = (0, import_react106.useState)(defaultStreamSelection);
217614
+ const defaultMediaSelection = {
217615
+ audio: false,
217616
+ video: false,
217617
+ subtitle: false,
217618
+ playlist: false,
217619
+ ancillary: false
217620
+ };
217621
+ if (latest.type == "take-all-streams" || latest.type == "take-first-stream") {
217622
+ const selectedMedia = latest.filter.map((f) => f.media);
217623
+ for (const k2 in defaultMediaSelection) {
217624
+ if (selectedMedia.includes(k2))
217625
+ defaultMediaSelection[k2] = true;
217626
+ }
217627
+ }
217628
+ const [mediaSelection, setMediaSelection] = (0, import_react106.useState)(defaultMediaSelection);
217629
+ const [validationMessage, setValidationMessage] = (0, import_react106.useState)({
217630
+ streams: void 0,
217631
+ media: void 0
217632
+ });
217633
+ (0, import_react106.useEffect)(() => {
217634
+ doValidation();
217635
+ }, [mediaSelection, streamSelection]);
217636
+ return (0, import_jsx_runtime147.jsx)("div", { className: "z-40 w-64 max-w-xs overflow-y-auto bg-white dark:bg-gray-800", tabIndex: -1, children: (0, import_jsx_runtime147.jsxs)("div", { children: [(0, import_jsx_runtime147.jsxs)("div", { children: [(0, import_jsx_runtime147.jsx)("h4", { className: "mb-1.5 leading-none text-xl font-semibold text-gray-900 dark:text-white", children: "Edit Subscription" }), (0, import_jsx_runtime147.jsxs)("p", { className: "text-l text-gray-900 dark:text-white", children: ["Source: ", props.connection.sourceNode.id] }), (0, import_jsx_runtime147.jsxs)("p", { className: "text-l text-gray-900 dark:text-white", children: ["Destination: ", props.connection.destinationNode.id] })] }), (0, import_jsx_runtime147.jsxs)("button", { type: "button", onClick: props.onCancel, className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-1 right-1 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [cross(), (0, import_jsx_runtime147.jsx)("span", { className: "sr-only", children: "Close menu" })] }), (0, import_jsx_runtime147.jsxs)("form", { noValidate: true, children: [(0, import_jsx_runtime147.jsx)("div", { className: "form-group", children: modeDropdown() }), (0, import_jsx_runtime147.jsx)("div", { className: "form-group", children: selectionInputs() }), (0, import_jsx_runtime147.jsxs)("div", { className: "flex justify-center w-full mt-2 pb-4 space-x-4", children: [(0, import_jsx_runtime147.jsx)("button", { type: "submit", onClick: onSubmit, className: "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", children: "Save" }), (0, import_jsx_runtime147.jsxs)("button", { type: "button", onClick: props.onCancel, className: "inline-flex w-full justify-center text-gray-500 items-center bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-primary-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600", children: [(0, import_jsx_runtime147.jsx)("svg", { "aria-hidden": "true", className: "w-5 h-5 -ml-1 sm:mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, import_jsx_runtime147.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) }), "Cancel"] })] })] })] }) });
217637
+ function doValidation() {
217638
+ let isError = false;
217639
+ const newValue = { media: void 0, streams: void 0 };
217640
+ if (mode == "take-specific-streams" && streamSelection.length == 0) {
217641
+ newValue.streams = "At least one stream must be selected";
217642
+ isError = true;
217643
+ }
217644
+ setValidationMessage(newValue);
217645
+ return !isError;
217646
+ }
217647
+ function onSubmit(e2) {
217648
+ e2.preventDefault();
217649
+ if (doValidation()) {
217650
+ switch (mode) {
217651
+ case "take-all-streams":
217652
+ case "take-first-stream":
217653
+ props.onSaved({
217654
+ type: mode,
217655
+ filter: Object.entries(mediaSelection).filter(([_2, v2]) => v2).map(([k2, _2]) => ({ media: k2 }))
217656
+ });
217657
+ break;
217658
+ case "take-specific-streams":
217659
+ props.onSaved({
217660
+ type: mode,
217661
+ filter: streamSelection
217662
+ });
217663
+ break;
217664
+ default:
217665
+ assertUnreachable(mode);
217666
+ }
217667
+ }
217668
+ }
217669
+ function onMultiStreamSelectChange(stream) {
217670
+ return (checked) => {
217671
+ if (!checked) {
217672
+ const newValue = [...streamSelection];
217673
+ const i3 = newValue.findIndex((v2) => {
217674
+ if (streamMatchesFilter(stream, v2)) {
217675
+ return true;
217676
+ }
217677
+ return false;
217678
+ });
217679
+ if (i3 >= 0) {
217680
+ newValue.splice(i3, 1);
217681
+ setStreamSelection(newValue);
217682
+ }
217683
+ } else {
217684
+ const newValue = [...streamSelection];
217685
+ newValue.push(stream);
217686
+ setStreamSelection(newValue);
217687
+ }
217688
+ };
217689
+ }
217690
+ function onGroupSelectChange(group) {
217691
+ return (checked) => {
217692
+ if (!groupingKey)
217693
+ return;
217694
+ const withoutGroup = streamSelection.filter((s3) => s3[groupingKey] != group);
217695
+ if (!checked) {
217696
+ setStreamSelection(withoutGroup);
217697
+ } else {
217698
+ const newGroups = availableStreams.filter((s3) => s3[groupingKey] == group && allowedMedia.includes(s3.media));
217699
+ const final = withoutGroup.concat(newGroups);
217700
+ setStreamSelection(final);
217701
+ }
217702
+ };
217703
+ }
217704
+ function onMediaSelectChange(media) {
217705
+ return (selected) => {
217706
+ const updated = {
217707
+ ...mediaSelection
217708
+ };
217709
+ updated[media] = selected;
217710
+ setMediaSelection(updated);
217711
+ };
217712
+ }
217713
+ function modeDropdown() {
217714
+ if (availableModes.length === 1) {
217715
+ return (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [(0, import_jsx_runtime147.jsxs)("legend", { className: "mt-4", children: ["Strategy: ", SubscriptionTypeInfo[mode]] }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text mb-4 mt-2", children: SubscriptionTypeDescription[mode] })] });
217716
+ } else {
217717
+ return (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [(0, import_jsx_runtime147.jsx)("legend", { className: "mt-4", children: "Strategy" }), (0, import_jsx_runtime147.jsx)(Select, { id: "selection-mode", className: "node-editor-select-input", defaultValue: mode, onChange: (e2) => setMode(e2.target.value), children: availableModes.map((m2, i3) => {
217718
+ return (0, import_jsx_runtime147.jsx)("option", { value: m2, children: SubscriptionTypeInfo[m2] }, i3);
217719
+ }) }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text mb-4 mt-2", children: SubscriptionTypeDescription[mode] })] });
217720
+ }
217721
+ }
217722
+ function selectionInputs() {
217723
+ switch (mode) {
217724
+ case "take-all-streams":
217725
+ case "take-first-stream":
217726
+ return (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: mediaSelectionCheckboxes() });
217727
+ case "take-specific-streams":
217728
+ return groupingKey ? (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [(0, import_jsx_runtime147.jsx)(ToggleSwitch, { id: "simple-select", checked: simpleStreamSelection, onChange: (c2) => setSimpleStreamSelection(c2) }), (0, import_jsx_runtime147.jsx)(Label, { htmlFor: "simple-seledt", children: "Simple" }), simpleStreamSelection ? groupedStreamSelection() : multiStreamSelection()] }) : (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [" ", multiStreamSelection(), " "] });
217729
+ default:
217730
+ assertUnreachable(mode);
217731
+ }
217732
+ }
217733
+ function maybeValidationMessage(message) {
217734
+ return message ? (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400", role: "alert", children: [info(), (0, import_jsx_runtime147.jsx)("span", { className: "sr-only", children: "Info" }), (0, import_jsx_runtime147.jsx)("div", { children: message })] }) }) : (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {});
217735
+ }
217736
+ function mediaSelectionCheckboxes() {
217737
+ return (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [(0, import_jsx_runtime147.jsx)("legend", { className: "mt-4", children: "Media Selection" }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The media types that will be used from this node" }), availableMedia.map((media) => {
217738
+ const used = mediaSelection[media];
217739
+ const mediaEnabled = allowedMedia.includes(media);
217740
+ return (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime147.jsx)(ToggleSwitch, { id: "accept", className: `ml-1 ${mediaEnabled ? "" : "opacity-10"}`, checked: used, disabled: !mediaEnabled, onChange: onMediaSelectChange(media) }), (0, import_jsx_runtime147.jsxs)(Label, { className: `${mediaEnabled ? "" : "opacity-10"}`, htmlFor: "accept", children: [media, " "] })] }, media);
217741
+ }), maybeValidationMessage(validationMessage.media)] });
217742
+ }
217743
+ function groupedStreamSelection() {
217744
+ if (!groupingKey)
217745
+ return;
217746
+ return (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: (0, import_jsx_runtime147.jsxs)("fieldset", { className: "flex max-w-md flex-col gap-4", children: [(0, import_jsx_runtime147.jsx)("legend", { className: "mt-4", children: "Stream Selection (simplified)" }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The streams that will be used from this node" }), availableGroups.map((s3, i3) => {
217747
+ const selectedStreams = streamSelection.filter((f) => f[groupingKey] == s3 && allowedMedia.includes(f.media));
217748
+ const totalStreams = availableStreams.filter((f) => f[groupingKey] == s3 && allowedMedia.includes(f.media));
217749
+ return (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime147.jsx)(ToggleSwitch, { id: `stream-${i3}`, name: "streams", value: i3, checked: selectedStreams.length > 0 && selectedStreams.length == totalStreams.length, onChange: onGroupSelectChange(s3) }), (0, import_jsx_runtime147.jsx)(Label, { htmlFor: `stream-${i3}`, children: s3 })] }, i3);
217750
+ }), maybeValidationMessage(validationMessage.streams)] }) });
217751
+ }
217752
+ function multiStreamSelection() {
217753
+ return (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, { children: (0, import_jsx_runtime147.jsxs)("fieldset", { className: "flex max-w-md flex-col gap-4", children: [(0, import_jsx_runtime147.jsx)("legend", { className: "mt-4", children: "Stream Selection" }), (0, import_jsx_runtime147.jsx)("p", { className: "node-editor-helper-text mb-4", children: "The streams that will be used from this node" }), availableStreams.map((s3, i3) => {
217754
+ const mediaEnabled = allowedMedia.includes(s3.media);
217755
+ return (0, import_jsx_runtime147.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime147.jsx)(ToggleSwitch, { id: `stream-${i3}`, name: "streams", value: i3, checked: !!streamSelection.find((f) => streamMatchesFilter(s3, f)), disabled: !mediaEnabled, onChange: onMultiStreamSelectChange(s3) }), (0, import_jsx_runtime147.jsx)(Label, { htmlFor: `stream-${i3}`, children: streamNameFromDefinition(s3) })] }, i3);
217756
+ }), maybeValidationMessage(validationMessage.streams)] }) });
217757
+ }
217758
+ }
217759
+ var connection_editor_default = ConnectionEditor;
217760
+
217718
217761
  // build/client/client/tools.js
217719
217762
  var import_react108 = __toESM(require_react());
217720
217763