@storybook/addon-docs 10.0.0-beta.1 → 10.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/blocks.js CHANGED
@@ -4,10 +4,7 @@ import {
4
4
  getControlSetterButtonId,
5
5
  pickBy,
6
6
  uniq
7
- } from "./_browser-chunks/chunk-67KILNXL.js";
8
- import {
9
- tocbot_default
10
- } from "./_browser-chunks/chunk-TQ5Q4DDG.js";
7
+ } from "./_browser-chunks/chunk-ZK6NW3SW.js";
11
8
  import {
12
9
  EmptyBlock,
13
10
  Source,
@@ -47,10 +44,10 @@ var require_memoizerific = __commonJS({
47
44
  }
48
45
  })(function() {
49
46
  var define2, module2, exports2;
50
- return (/* @__PURE__ */ __name(function e2(t2, n2, r2) {
47
+ return (/* @__PURE__ */ __name(function e2(t, n2, r2) {
51
48
  function s2(o3, u2) {
52
49
  if (!n2[o3]) {
53
- if (!t2[o3]) {
50
+ if (!t[o3]) {
54
51
  var a2 = typeof __require == "function" && __require;
55
52
  if (!u2 && a2) return a2(o3, true);
56
53
  if (i2) return i2(o3, true);
@@ -58,10 +55,10 @@ var require_memoizerific = __commonJS({
58
55
  throw f2.code = "MODULE_NOT_FOUND", f2;
59
56
  }
60
57
  var l2 = n2[o3] = { exports: {} };
61
- t2[o3][0].call(l2.exports, function(e3) {
62
- var n3 = t2[o3][1][e3];
58
+ t[o3][0].call(l2.exports, function(e3) {
59
+ var n3 = t[o3][1][e3];
63
60
  return s2(n3 ? n3 : e3);
64
- }, l2, l2.exports, e2, t2, n2, r2);
61
+ }, l2, l2.exports, e2, t, n2, r2);
65
62
  }
66
63
  return n2[o3].exports;
67
64
  }
@@ -259,7 +256,7 @@ var require_memoizerific = __commonJS({
259
256
  });
260
257
 
261
258
  // src/blocks/components/ArgsTable/ArgsTable.tsx
262
- import React33 from "react";
259
+ import React34 from "react";
263
260
  import { once } from "storybook/internal/client-logger";
264
261
  import { IconButton as IconButton3, Link as Link3, ResetWrapper as ResetWrapper3 } from "storybook/internal/components";
265
262
  import { includeConditionalArg } from "storybook/internal/csf";
@@ -659,10 +656,108 @@ var DocsWrapper = styled.div(({ theme }) => ({
659
656
  var DocsPageWrapper = /* @__PURE__ */ __name(({ children, toc }) => React.createElement(DocsWrapper, { className: "sbdocs sbdocs-wrapper" }, toc, React.createElement(DocsContent, { className: "sbdocs sbdocs-content" }, children)), "DocsPageWrapper");
660
657
 
661
658
  // src/blocks/components/Preview.tsx
662
- import React5, { Children, useCallback, useState as useState2 } from "react";
659
+ import React6, { Children, useCallback, useContext as useContext2, useState as useState3 } from "react";
663
660
  import { ActionBar, Zoom } from "storybook/internal/components";
664
661
  import { styled as styled4 } from "storybook/theming";
665
662
 
663
+ // src/blocks/blocks/DocsContext.ts
664
+ import { createContext } from "react";
665
+ if (globalThis && globalThis.__DOCS_CONTEXT__ === void 0) {
666
+ globalThis.__DOCS_CONTEXT__ = createContext(null);
667
+ globalThis.__DOCS_CONTEXT__.displayName = "DocsContext";
668
+ }
669
+ var DocsContext = globalThis ? globalThis.__DOCS_CONTEXT__ : createContext(null);
670
+
671
+ // src/blocks/blocks/Story.tsx
672
+ import React2, { useContext } from "react";
673
+
674
+ // src/blocks/blocks/useStory.ts
675
+ import { useEffect, useState } from "react";
676
+ function useStory(storyId, context) {
677
+ const stories = useStories([storyId], context);
678
+ return stories && stories[0];
679
+ }
680
+ __name(useStory, "useStory");
681
+ function useStories(storyIds, context) {
682
+ const [storiesById, setStories] = useState({});
683
+ useEffect(() => {
684
+ Promise.all(
685
+ storyIds.map(async (storyId) => {
686
+ const story = await context.loadStory(storyId);
687
+ setStories(
688
+ (current) => current[storyId] === story ? current : { ...current, [storyId]: story }
689
+ );
690
+ })
691
+ );
692
+ });
693
+ return storyIds.map((storyId) => {
694
+ if (storiesById[storyId]) {
695
+ return storiesById[storyId];
696
+ }
697
+ try {
698
+ return context.storyById(storyId);
699
+ } catch (err) {
700
+ return void 0;
701
+ }
702
+ });
703
+ }
704
+ __name(useStories, "useStories");
705
+
706
+ // src/blocks/blocks/Story.tsx
707
+ var getStoryId = /* @__PURE__ */ __name((props, context) => {
708
+ const { of, meta } = props;
709
+ if ("of" in props && of === void 0) {
710
+ throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");
711
+ }
712
+ if (meta) {
713
+ context.referenceMeta(meta, false);
714
+ }
715
+ const resolved = context.resolveOf(of || "story", ["story"]);
716
+ return resolved.story.id;
717
+ }, "getStoryId");
718
+ var getStoryProps = /* @__PURE__ */ __name((props, story, context) => {
719
+ const { parameters = {} } = story || {};
720
+ const { docs = {} } = parameters;
721
+ const storyParameters = docs.story || {};
722
+ if (docs.disable) {
723
+ return null;
724
+ }
725
+ const inline = props.inline ?? storyParameters.inline ?? false;
726
+ if (inline) {
727
+ const height2 = props.height ?? storyParameters.height;
728
+ const autoplay = props.autoplay ?? storyParameters.autoplay ?? false;
729
+ return {
730
+ story,
731
+ inline: true,
732
+ height: height2,
733
+ autoplay,
734
+ forceInitialArgs: !!props.__forceInitialArgs,
735
+ primary: !!props.__primary,
736
+ renderStoryToElement: context.renderStoryToElement
737
+ };
738
+ }
739
+ const height = props.height ?? storyParameters.height ?? storyParameters.iframeHeight ?? "100px";
740
+ return {
741
+ story,
742
+ inline: false,
743
+ height,
744
+ primary: !!props.__primary
745
+ };
746
+ }, "getStoryProps");
747
+ var Story2 = /* @__PURE__ */ __name((props = { __forceInitialArgs: false, __primary: false }) => {
748
+ const context = useContext(DocsContext);
749
+ const storyId = getStoryId(props, context);
750
+ const story = useStory(storyId, context);
751
+ if (!story) {
752
+ return React2.createElement(StorySkeleton, null);
753
+ }
754
+ const storyProps = getStoryProps(props, story, context);
755
+ if (!storyProps) {
756
+ return null;
757
+ }
758
+ return React2.createElement(Story, { ...storyProps });
759
+ }, "Story");
760
+
666
761
  // src/blocks/components/BlockBackgroundStyles.tsx
667
762
  var getBlockBackgroundStyle = /* @__PURE__ */ __name((theme) => ({
668
763
  borderRadius: theme.appBorderRadius,
@@ -672,12 +767,12 @@ var getBlockBackgroundStyle = /* @__PURE__ */ __name((theme) => ({
672
767
  }), "getBlockBackgroundStyle");
673
768
 
674
769
  // src/blocks/components/Story.tsx
675
- import React3, { useEffect, useRef, useState } from "react";
770
+ import React4, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
676
771
  import { ErrorFormatter, Loader, getStoryHref } from "storybook/internal/components";
677
772
  import { styled as styled2 } from "storybook/theming";
678
773
 
679
774
  // src/blocks/components/IFrame.tsx
680
- import React2, { Component } from "react";
775
+ import React3, { Component } from "react";
681
776
  var { window: globalWindow } = globalThis;
682
777
  var _IFrame = class _IFrame extends Component {
683
778
  constructor() {
@@ -705,7 +800,7 @@ var _IFrame = class _IFrame extends Component {
705
800
  }
706
801
  render() {
707
802
  const { id, title, src, allowFullScreen, scale, ...rest } = this.props;
708
- return React2.createElement(
803
+ return React3.createElement(
709
804
  "iframe",
710
805
  {
711
806
  id,
@@ -722,8 +817,8 @@ __name(_IFrame, "IFrame");
722
817
  var IFrame = _IFrame;
723
818
 
724
819
  // src/blocks/components/ZoomContext.tsx
725
- import { createContext } from "react";
726
- var ZoomContext = createContext({
820
+ import { createContext as createContext2 } from "react";
821
+ var ZoomContext = createContext2({
727
822
  scale: 1
728
823
  });
729
824
 
@@ -733,10 +828,10 @@ var BASE_URL = PREVIEW_URL || "iframe.html";
733
828
  var storyBlockIdFromId = /* @__PURE__ */ __name(({ story, primary }) => `story--${story.id}${primary ? "--primary" : ""}`, "storyBlockIdFromId");
734
829
  var InlineStory = /* @__PURE__ */ __name((props) => {
735
830
  const storyRef = useRef();
736
- const [showLoader, setShowLoader] = useState(true);
737
- const [error, setError] = useState();
831
+ const [showLoader, setShowLoader] = useState2(true);
832
+ const [error, setError] = useState2();
738
833
  const { story, height, autoplay, forceInitialArgs, renderStoryToElement } = props;
739
- useEffect(() => {
834
+ useEffect2(() => {
740
835
  if (!(story && storyRef.current)) {
741
836
  return () => {
742
837
  };
@@ -759,14 +854,14 @@ var InlineStory = /* @__PURE__ */ __name((props) => {
759
854
  };
760
855
  }, [autoplay, renderStoryToElement, story]);
761
856
  if (error) {
762
- return React3.createElement("pre", null, React3.createElement(ErrorFormatter, { error }));
857
+ return React4.createElement("pre", null, React4.createElement(ErrorFormatter, { error }));
763
858
  }
764
- return React3.createElement(React3.Fragment, null, height ? React3.createElement("style", null, `#${storyBlockIdFromId(
859
+ return React4.createElement(React4.Fragment, null, height ? React4.createElement("style", null, `#${storyBlockIdFromId(
765
860
  props
766
- )} { min-height: ${height}; transform: translateZ(0); overflow: auto }`) : null, showLoader && React3.createElement(StorySkeleton, null), React3.createElement("div", { ref: storyRef, id: `${storyBlockIdFromId(props)}-inner`, "data-name": story.name }));
861
+ )} { min-height: ${height}; transform: translateZ(0); overflow: auto }`) : null, showLoader && React4.createElement(StorySkeleton, null), React4.createElement("div", { ref: storyRef, id: `${storyBlockIdFromId(props)}-inner`, "data-name": story.name }));
767
862
  }, "InlineStory");
768
- var IFrameStory = /* @__PURE__ */ __name(({ story, height = "500px" }) => React3.createElement("div", { style: { width: "100%", height } }, React3.createElement(ZoomContext.Consumer, null, ({ scale }) => {
769
- return React3.createElement(
863
+ var IFrameStory = /* @__PURE__ */ __name(({ story, height = "500px" }) => React4.createElement("div", { style: { width: "100%", height } }, React4.createElement(ZoomContext.Consumer, null, ({ scale }) => {
864
+ return React4.createElement(
770
865
  IFrame,
771
866
  {
772
867
  key: "iframe",
@@ -789,16 +884,16 @@ var ErrorMessage = styled2.strong(({ theme }) => ({
789
884
  var Story = /* @__PURE__ */ __name((props) => {
790
885
  const { inline, story } = props;
791
886
  if (inline && !props.autoplay && story.usesMount) {
792
- return React3.createElement(ErrorMessage, null, "This story mounts inside of play. Set", " ", React3.createElement("a", { href: "https://storybook.js.org/docs/api/doc-blocks/doc-block-story?ref=ui#autoplay" }, "autoplay"), " ", "to true to view this story.");
887
+ return React4.createElement(ErrorMessage, null, "This story mounts inside of play. Set", " ", React4.createElement("a", { href: "https://storybook.js.org/docs/api/doc-blocks/doc-block-story?ref=ui#autoplay" }, "autoplay"), " ", "to true to view this story.");
793
888
  }
794
- return React3.createElement("div", { id: storyBlockIdFromId(props), className: "sb-story sb-unstyled", "data-story-block": "true" }, inline ? React3.createElement(InlineStory, { ...props }) : React3.createElement(IFrameStory, { ...props }));
889
+ return React4.createElement("div", { id: storyBlockIdFromId(props), className: "sb-story sb-unstyled", "data-story-block": "true" }, inline ? React4.createElement(InlineStory, { ...props }) : React4.createElement(IFrameStory, { ...props }));
795
890
  }, "Story");
796
- var StorySkeleton = /* @__PURE__ */ __name(() => React3.createElement(Loader, null), "StorySkeleton");
891
+ var StorySkeleton = /* @__PURE__ */ __name(() => React4.createElement(Loader, null), "StorySkeleton");
797
892
 
798
893
  // src/blocks/components/Toolbar.tsx
799
- import React4 from "react";
800
- import { FlexBar, IconButton } from "storybook/internal/components";
801
- import { ZoomIcon, ZoomOutIcon, ZoomResetIcon } from "@storybook/icons";
894
+ import React5 from "react";
895
+ import { FlexBar, IconButton, getStoryHref as getStoryHref2 } from "storybook/internal/components";
896
+ import { ShareAltIcon, ZoomIcon, ZoomOutIcon, ZoomResetIcon } from "@storybook/icons";
802
897
  import { styled as styled3 } from "storybook/theming";
803
898
  var Bar = styled3(FlexBar)({
804
899
  position: "absolute",
@@ -827,7 +922,7 @@ var Toolbar = /* @__PURE__ */ __name(({
827
922
  zoom,
828
923
  resetZoom,
829
924
  ...rest
830
- }) => React4.createElement(Bar, { ...rest }, React4.createElement(Wrapper, { key: "left" }, isLoading ? [1, 2, 3].map((key) => React4.createElement(IconPlaceholder, { key })) : React4.createElement(React4.Fragment, null, React4.createElement(
925
+ }) => React5.createElement(Bar, { ...rest }, React5.createElement(Wrapper, { key: "left" }, isLoading ? [1, 2, 3].map((key) => React5.createElement(IconPlaceholder, { key })) : React5.createElement(React5.Fragment, null, React5.createElement(
831
926
  IconButton,
832
927
  {
833
928
  key: "zoomin",
@@ -837,8 +932,8 @@ var Toolbar = /* @__PURE__ */ __name(({
837
932
  },
838
933
  title: "Zoom in"
839
934
  },
840
- React4.createElement(ZoomIcon, null)
841
- ), React4.createElement(
935
+ React5.createElement(ZoomIcon, null)
936
+ ), React5.createElement(
842
937
  IconButton,
843
938
  {
844
939
  key: "zoomout",
@@ -848,8 +943,8 @@ var Toolbar = /* @__PURE__ */ __name(({
848
943
  },
849
944
  title: "Zoom out"
850
945
  },
851
- React4.createElement(ZoomOutIcon, null)
852
- ), React4.createElement(
946
+ React5.createElement(ZoomOutIcon, null)
947
+ ), React5.createElement(
853
948
  IconButton,
854
949
  {
855
950
  key: "zoomreset",
@@ -859,7 +954,16 @@ var Toolbar = /* @__PURE__ */ __name(({
859
954
  },
860
955
  title: "Reset zoom"
861
956
  },
862
- React4.createElement(ZoomResetIcon, null)
957
+ React5.createElement(ZoomResetIcon, null)
958
+ ))), isLoading ? React5.createElement(Wrapper, { key: "right" }, React5.createElement(IconPlaceholder, null)) : baseUrl && storyId && React5.createElement(Wrapper, { key: "right" }, React5.createElement(IconButton, { key: "opener", asChild: true }, React5.createElement(
959
+ "a",
960
+ {
961
+ href: getStoryHref2(baseUrl, storyId),
962
+ target: "_blank",
963
+ rel: "noopener noreferrer",
964
+ "aria-label": "Open canvas in new tab"
965
+ },
966
+ React5.createElement(ShareAltIcon, null)
863
967
  )))), "Toolbar");
864
968
 
865
969
  // src/blocks/components/Preview.tsx
@@ -937,7 +1041,7 @@ var getSource = /* @__PURE__ */ __name((withSource, expanded, setExpanded) => {
937
1041
  }
938
1042
  case expanded: {
939
1043
  return {
940
- source: React5.createElement(StyledSource, { ...withSource, dark: true }),
1044
+ source: React6.createElement(StyledSource, { ...withSource, dark: true }),
941
1045
  actionItem: {
942
1046
  title: "Hide code",
943
1047
  className: "docblock-code-toggle docblock-code-toggle--expanded",
@@ -947,7 +1051,7 @@ var getSource = /* @__PURE__ */ __name((withSource, expanded, setExpanded) => {
947
1051
  }
948
1052
  default: {
949
1053
  return {
950
- source: React5.createElement(StyledSource, { ...withSource, dark: true }),
1054
+ source: React6.createElement(StyledSource, { ...withSource, dark: true }),
951
1055
  actionItem: {
952
1056
  title: "Show code",
953
1057
  className: "docblock-code-toggle",
@@ -957,16 +1061,16 @@ var getSource = /* @__PURE__ */ __name((withSource, expanded, setExpanded) => {
957
1061
  }
958
1062
  }
959
1063
  }, "getSource");
960
- function getStoryId(children) {
1064
+ function getChildProps(children) {
961
1065
  if (Children.count(children) === 1) {
962
1066
  const elt = children;
963
1067
  if (elt.props) {
964
- return elt.props.id;
1068
+ return elt.props;
965
1069
  }
966
1070
  }
967
1071
  return null;
968
1072
  }
969
- __name(getStoryId, "getStoryId");
1073
+ __name(getChildProps, "getChildProps");
970
1074
  var PositionedToolbar = styled4(Toolbar)({
971
1075
  position: "absolute",
972
1076
  top: 0,
@@ -992,16 +1096,17 @@ var Preview = /* @__PURE__ */ __name(({
992
1096
  inline = false,
993
1097
  ...props
994
1098
  }) => {
995
- const [expanded, setExpanded] = useState2(isExpanded);
1099
+ const [expanded, setExpanded] = useState3(isExpanded);
996
1100
  const { source, actionItem } = getSource(withSource, expanded, setExpanded);
997
- const [scale, setScale] = useState2(1);
1101
+ const [scale, setScale] = useState3(1);
998
1102
  const previewClasses = [className].concat(["sbdocs", "sbdocs-preview", "sb-unstyled"]);
999
1103
  const defaultActionItems = withSource ? [actionItem] : [];
1000
- const [additionalActionItems, setAdditionalActionItems] = useState2(
1104
+ const [additionalActionItems, setAdditionalActionItems] = useState3(
1001
1105
  additionalActions ? [...additionalActions] : []
1002
1106
  );
1003
1107
  const actionItems = [...defaultActionItems, ...additionalActionItems];
1004
1108
  const { window: globalWindow4 } = globalThis;
1109
+ const context = useContext2(DocsContext);
1005
1110
  const copyToClipboard = useCallback(async (text) => {
1006
1111
  const { createCopyToClipboardFunction } = await import("storybook/internal/components");
1007
1112
  createCopyToClipboardFunction();
@@ -1031,25 +1136,26 @@ var Preview = /* @__PURE__ */ __name(({
1031
1136
  });
1032
1137
  }
1033
1138
  }, "onCopyCapture");
1034
- return React5.createElement(
1139
+ const childProps = getChildProps(children);
1140
+ return React6.createElement(
1035
1141
  PreviewContainer,
1036
1142
  {
1037
1143
  ...{ withSource, withToolbar },
1038
1144
  ...props,
1039
1145
  className: previewClasses.join(" ")
1040
1146
  },
1041
- withToolbar && React5.createElement(
1147
+ withToolbar && React6.createElement(
1042
1148
  PositionedToolbar,
1043
1149
  {
1044
1150
  isLoading,
1045
1151
  border: true,
1046
1152
  zoom: (z2) => setScale(scale * z2),
1047
1153
  resetZoom: () => setScale(1),
1048
- storyId: getStoryId(children),
1154
+ storyId: !isLoading && childProps ? getStoryId(childProps, context) : void 0,
1049
1155
  baseUrl: "./iframe.html"
1050
1156
  }
1051
1157
  ),
1052
- React5.createElement(ZoomContext.Provider, { value: { scale } }, React5.createElement(Relative, { className: "docs-story", onCopyCapture: withSource && onCopyCapture }, React5.createElement(
1158
+ React6.createElement(ZoomContext.Provider, { value: { scale } }, React6.createElement(Relative, { className: "docs-story", onCopyCapture: withSource && onCopyCapture }, React6.createElement(
1053
1159
  ChildrenContainer,
1054
1160
  {
1055
1161
  isColumn: isColumn || !Array.isArray(children),
@@ -1057,8 +1163,8 @@ var Preview = /* @__PURE__ */ __name(({
1057
1163
  layout,
1058
1164
  inline
1059
1165
  },
1060
- React5.createElement(Zoom.Element, { centered: layout === "centered", scale: inline ? scale : 1 }, Array.isArray(children) ? children.map((child, i2) => React5.createElement("div", { key: i2 }, child)) : React5.createElement("div", null, children))
1061
- ), React5.createElement(ActionBar, { actionItems }))),
1166
+ React6.createElement(Zoom.Element, { centered: layout === "centered", scale: inline ? scale : 1 }, Array.isArray(children) ? children.map((child, i2) => React6.createElement("div", { key: i2 }, child)) : React6.createElement("div", null, children))
1167
+ ), React6.createElement(ActionBar, { actionItems }))),
1062
1168
  withSource && expanded && source
1063
1169
  );
1064
1170
  }, "Preview");
@@ -1070,24 +1176,24 @@ var StyledPreview = styled4(Preview)(() => ({
1070
1176
  }));
1071
1177
 
1072
1178
  // src/blocks/components/ArgsTable/TabbedArgsTable.tsx
1073
- import React6 from "react";
1179
+ import React7 from "react";
1074
1180
  import { TabsState } from "storybook/internal/components";
1075
1181
  var TabbedArgsTable = /* @__PURE__ */ __name(({ tabs, ...props }) => {
1076
1182
  const entries = Object.entries(tabs);
1077
1183
  if (entries.length === 1) {
1078
- return React6.createElement(ArgsTable, { ...entries[0][1], ...props });
1184
+ return React7.createElement(ArgsTable, { ...entries[0][1], ...props });
1079
1185
  }
1080
- return React6.createElement(TabsState, null, entries.map((entry, index) => {
1186
+ return React7.createElement(TabsState, null, entries.map((entry, index) => {
1081
1187
  const [label, table] = entry;
1082
1188
  const id = `prop_table_div_${label}`;
1083
1189
  const Component4 = "div";
1084
1190
  const argsTableProps = index === 0 ? props : { sort: props.sort };
1085
- return React6.createElement(Component4, { key: id, id, title: label }, ({ active }) => active ? React6.createElement(ArgsTable, { key: `prop_table_${label}`, ...table, ...argsTableProps }) : null);
1191
+ return React7.createElement(Component4, { key: id, id, title: label }, ({ active }) => active ? React7.createElement(ArgsTable, { key: `prop_table_${label}`, ...table, ...argsTableProps }) : null);
1086
1192
  }));
1087
1193
  }, "TabbedArgsTable");
1088
1194
 
1089
1195
  // src/blocks/components/Typeset.tsx
1090
- import React7 from "react";
1196
+ import React8 from "react";
1091
1197
  import { withReset as withReset2 } from "storybook/internal/components";
1092
1198
  import { styled as styled5 } from "storybook/theming";
1093
1199
  var Label = styled5.div(({ theme }) => ({
@@ -1117,7 +1223,7 @@ var Typeset = /* @__PURE__ */ __name(({
1117
1223
  fontWeight,
1118
1224
  sampleText,
1119
1225
  ...props
1120
- }) => React7.createElement(Wrapper2, { ...props, className: "docblock-typeset sb-unstyled" }, fontSizes.map((size) => React7.createElement(TypeSpecimen, { key: size }, React7.createElement(Label, null, size), React7.createElement(
1226
+ }) => React8.createElement(Wrapper2, { ...props, className: "docblock-typeset sb-unstyled" }, fontSizes.map((size) => React8.createElement(TypeSpecimen, { key: size }, React8.createElement(Label, null, size), React8.createElement(
1121
1227
  Sample,
1122
1228
  {
1123
1229
  style: {
@@ -1131,7 +1237,7 @@ var Typeset = /* @__PURE__ */ __name(({
1131
1237
  )))), "Typeset");
1132
1238
 
1133
1239
  // src/blocks/components/ColorPalette.tsx
1134
- import React8 from "react";
1240
+ import React9 from "react";
1135
1241
  import { ResetWrapper } from "storybook/internal/components";
1136
1242
  import { styled as styled6 } from "storybook/theming";
1137
1243
  var ItemTitle = styled6.div(({ theme }) => ({
@@ -1230,16 +1336,16 @@ var List = styled6.div(({ theme }) => ({
1230
1336
  flexDirection: "column"
1231
1337
  }));
1232
1338
  function renderSwatch(color, index) {
1233
- return React8.createElement(Swatch, { key: `${color}-${index}`, title: color, background: color });
1339
+ return React9.createElement(Swatch, { key: `${color}-${index}`, title: color, background: color });
1234
1340
  }
1235
1341
  __name(renderSwatch, "renderSwatch");
1236
1342
  function renderSwatchLabel(color, index, colorDescription) {
1237
- return React8.createElement(SwatchLabel, { key: `${color}-${index}`, title: color }, React8.createElement("div", null, color, colorDescription && React8.createElement("span", null, colorDescription)));
1343
+ return React9.createElement(SwatchLabel, { key: `${color}-${index}`, title: color }, React9.createElement("div", null, color, colorDescription && React9.createElement("span", null, colorDescription)));
1238
1344
  }
1239
1345
  __name(renderSwatchLabel, "renderSwatchLabel");
1240
1346
  function renderSwatchSpecimen(colors) {
1241
1347
  if (Array.isArray(colors)) {
1242
- return React8.createElement(SwatchSpecimen, null, React8.createElement(SwatchColors, null, colors.map((color, index) => renderSwatch(color, index))), React8.createElement(SwatchLabels, null, colors.map((color, index) => renderSwatchLabel(color, index))));
1348
+ return React9.createElement(SwatchSpecimen, null, React9.createElement(SwatchColors, null, colors.map((color, index) => renderSwatch(color, index))), React9.createElement(SwatchLabels, null, colors.map((color, index) => renderSwatchLabel(color, index))));
1243
1349
  }
1244
1350
  const swatchElements = [];
1245
1351
  const labelElements = [];
@@ -1248,16 +1354,16 @@ function renderSwatchSpecimen(colors) {
1248
1354
  swatchElements.push(renderSwatch(colorValue, swatchElements.length));
1249
1355
  labelElements.push(renderSwatchLabel(colorKey, labelElements.length, colorValue));
1250
1356
  }
1251
- return React8.createElement(SwatchSpecimen, null, React8.createElement(SwatchColors, null, swatchElements), React8.createElement(SwatchLabels, null, labelElements));
1357
+ return React9.createElement(SwatchSpecimen, null, React9.createElement(SwatchColors, null, swatchElements), React9.createElement(SwatchLabels, null, labelElements));
1252
1358
  }
1253
1359
  __name(renderSwatchSpecimen, "renderSwatchSpecimen");
1254
1360
  var ColorItem = /* @__PURE__ */ __name(({ title, subtitle, colors }) => {
1255
- return React8.createElement(Item, null, React8.createElement(ItemDescription, null, React8.createElement(ItemTitle, null, title), React8.createElement(ItemSubtitle, null, subtitle)), React8.createElement(Swatches, null, renderSwatchSpecimen(colors)));
1361
+ return React9.createElement(Item, null, React9.createElement(ItemDescription, null, React9.createElement(ItemTitle, null, title), React9.createElement(ItemSubtitle, null, subtitle)), React9.createElement(Swatches, null, renderSwatchSpecimen(colors)));
1256
1362
  }, "ColorItem");
1257
- var ColorPalette = /* @__PURE__ */ __name(({ children, ...props }) => React8.createElement(ResetWrapper, null, React8.createElement(List, { ...props, className: "docblock-colorpalette sb-unstyled" }, React8.createElement(ListHeading, null, React8.createElement(ListName, null, "Name"), React8.createElement(ListSwatches, null, "Swatches")), children)), "ColorPalette");
1363
+ var ColorPalette = /* @__PURE__ */ __name(({ children, ...props }) => React9.createElement(ResetWrapper, null, React9.createElement(List, { ...props, className: "docblock-colorpalette sb-unstyled" }, React9.createElement(ListHeading, null, React9.createElement(ListName, null, "Name"), React9.createElement(ListSwatches, null, "Swatches")), children)), "ColorPalette");
1258
1364
 
1259
1365
  // src/blocks/components/IconGallery.tsx
1260
- import React9 from "react";
1366
+ import React10 from "react";
1261
1367
  import { ResetWrapper as ResetWrapper2 } from "storybook/internal/components";
1262
1368
  import { styled as styled7 } from "storybook/theming";
1263
1369
  var ItemLabel = styled7.div(({ theme }) => ({
@@ -1300,13 +1406,843 @@ var List2 = styled7.div({
1300
1406
  gridAutoFlow: "row dense",
1301
1407
  gridAutoRows: 50
1302
1408
  });
1303
- var IconItem = /* @__PURE__ */ __name(({ name, children }) => React9.createElement(Item2, null, React9.createElement(ItemSpecimen, null, children), React9.createElement(ItemLabel, null, name)), "IconItem");
1304
- var IconGallery = /* @__PURE__ */ __name(({ children, ...props }) => React9.createElement(ResetWrapper2, null, React9.createElement(List2, { ...props, className: "docblock-icongallery sb-unstyled" }, children)), "IconGallery");
1409
+ var IconItem = /* @__PURE__ */ __name(({ name, children }) => React10.createElement(Item2, null, React10.createElement(ItemSpecimen, null, children), React10.createElement(ItemLabel, null, name)), "IconItem");
1410
+ var IconGallery = /* @__PURE__ */ __name(({ children, ...props }) => React10.createElement(ResetWrapper2, null, React10.createElement(List2, { ...props, className: "docblock-icongallery sb-unstyled" }, children)), "IconGallery");
1305
1411
 
1306
1412
  // src/blocks/components/TableOfContents.tsx
1307
- import React10, { useEffect as useEffect2, useId } from "react";
1413
+ import React11, { useEffect as useEffect3, useId } from "react";
1308
1414
  import { NAVIGATE_URL } from "storybook/internal/core-events";
1309
1415
  import { styled as styled8 } from "storybook/theming";
1416
+
1417
+ // ../../node_modules/tocbot/src/js/build-html.js
1418
+ function build_html_default(options) {
1419
+ const forEach = [].forEach;
1420
+ const some = [].some;
1421
+ const body = typeof window !== "undefined" && document.body;
1422
+ const SPACE_CHAR = " ";
1423
+ let tocElement;
1424
+ let currentlyHighlighting = true;
1425
+ let eventCount = 0;
1426
+ function createEl(d2, container) {
1427
+ const link = container.appendChild(createLink(d2));
1428
+ if (d2.children.length) {
1429
+ const list = createList(d2.isCollapsed);
1430
+ d2.children.forEach((child) => {
1431
+ createEl(child, list);
1432
+ });
1433
+ link.appendChild(list);
1434
+ }
1435
+ }
1436
+ __name(createEl, "createEl");
1437
+ function render(parent, data) {
1438
+ const collapsed = false;
1439
+ const container = createList(collapsed);
1440
+ data.forEach((d2) => {
1441
+ createEl(d2, container);
1442
+ });
1443
+ tocElement = parent || tocElement;
1444
+ if (tocElement === null) {
1445
+ return;
1446
+ }
1447
+ if (tocElement.firstChild) {
1448
+ tocElement.removeChild(tocElement.firstChild);
1449
+ }
1450
+ if (data.length === 0) {
1451
+ return tocElement;
1452
+ }
1453
+ return tocElement.appendChild(container);
1454
+ }
1455
+ __name(render, "render");
1456
+ function createLink(data) {
1457
+ const item = document.createElement("li");
1458
+ const a2 = document.createElement("a");
1459
+ if (options.listItemClass) {
1460
+ item.setAttribute("class", options.listItemClass);
1461
+ }
1462
+ if (options.onClick) {
1463
+ a2.onclick = options.onClick;
1464
+ }
1465
+ if (options.includeTitleTags) {
1466
+ a2.setAttribute("title", data.textContent);
1467
+ }
1468
+ if (options.includeHtml && data.childNodes.length) {
1469
+ forEach.call(data.childNodes, (node) => {
1470
+ a2.appendChild(node.cloneNode(true));
1471
+ });
1472
+ } else {
1473
+ a2.textContent = data.textContent;
1474
+ }
1475
+ a2.setAttribute("href", `${options.basePath}#${data.id}`);
1476
+ a2.setAttribute(
1477
+ "class",
1478
+ `${options.linkClass + SPACE_CHAR}node-name--${data.nodeName}${SPACE_CHAR}${options.extraLinkClasses}`
1479
+ );
1480
+ item.appendChild(a2);
1481
+ return item;
1482
+ }
1483
+ __name(createLink, "createLink");
1484
+ function createList(isCollapsed) {
1485
+ const listElement = options.orderedList ? "ol" : "ul";
1486
+ const list = document.createElement(listElement);
1487
+ let classes = options.listClass + SPACE_CHAR + options.extraListClasses;
1488
+ if (isCollapsed) {
1489
+ classes = classes + SPACE_CHAR + options.collapsibleClass;
1490
+ classes = classes + SPACE_CHAR + options.isCollapsedClass;
1491
+ }
1492
+ list.setAttribute("class", classes);
1493
+ return list;
1494
+ }
1495
+ __name(createList, "createList");
1496
+ function updateFixedSidebarClass() {
1497
+ const scrollTop = getScrollTop();
1498
+ const posFixedEl = document.querySelector(options.positionFixedSelector);
1499
+ if (options.fixedSidebarOffset === "auto") {
1500
+ options.fixedSidebarOffset = tocElement.offsetTop;
1501
+ }
1502
+ if (scrollTop > options.fixedSidebarOffset) {
1503
+ if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {
1504
+ posFixedEl.className += SPACE_CHAR + options.positionFixedClass;
1505
+ }
1506
+ } else {
1507
+ posFixedEl.className = posFixedEl.className.replace(
1508
+ SPACE_CHAR + options.positionFixedClass,
1509
+ ""
1510
+ );
1511
+ }
1512
+ }
1513
+ __name(updateFixedSidebarClass, "updateFixedSidebarClass");
1514
+ function getHeadingTopPos(obj) {
1515
+ let position = 0;
1516
+ if (obj !== null) {
1517
+ position = obj.offsetTop;
1518
+ if (options.hasInnerContainers) {
1519
+ position += getHeadingTopPos(obj.offsetParent);
1520
+ }
1521
+ }
1522
+ return position;
1523
+ }
1524
+ __name(getHeadingTopPos, "getHeadingTopPos");
1525
+ function updateClassname(obj, className) {
1526
+ if (obj && obj.className !== className) {
1527
+ obj.className = className;
1528
+ }
1529
+ return obj;
1530
+ }
1531
+ __name(updateClassname, "updateClassname");
1532
+ function updateToc(headingsArray, event) {
1533
+ if (options.positionFixedSelector) {
1534
+ updateFixedSidebarClass();
1535
+ }
1536
+ const headings = headingsArray;
1537
+ const clickedHref = event?.target?.getAttribute ? event?.target?.getAttribute("href") : null;
1538
+ const isBottomMode = clickedHref && clickedHref.charAt(0) === "#" ? getIsHeaderBottomMode(clickedHref.replace("#", "")) : false;
1539
+ const shouldUpdate = currentlyHighlighting || isBottomMode;
1540
+ if (event && eventCount < 5) {
1541
+ eventCount++;
1542
+ }
1543
+ if (shouldUpdate && !!tocElement && headings.length > 0) {
1544
+ const topHeader = getTopHeader(headings);
1545
+ const oldActiveTocLink = tocElement.querySelector(
1546
+ `.${options.activeLinkClass}`
1547
+ );
1548
+ const topHeaderId = topHeader.id.replace(
1549
+ /([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,
1550
+ "\\$1"
1551
+ );
1552
+ const hashId = window.location.hash.replace("#", "");
1553
+ let activeId = topHeaderId;
1554
+ const isPageBottomMode = getIsPageBottomMode();
1555
+ if (clickedHref && isBottomMode) {
1556
+ activeId = clickedHref.replace("#", "");
1557
+ } else if (hashId && hashId !== topHeaderId && isPageBottomMode && (getIsHeaderBottomMode(topHeaderId) || eventCount <= 2)) {
1558
+ activeId = hashId;
1559
+ }
1560
+ const activeTocLink = tocElement.querySelector(
1561
+ `.${options.linkClass}[href="${options.basePath}#${activeId}"]`
1562
+ );
1563
+ if (oldActiveTocLink === activeTocLink) {
1564
+ return;
1565
+ }
1566
+ const tocLinks = tocElement.querySelectorAll(`.${options.linkClass}`);
1567
+ forEach.call(tocLinks, (tocLink) => {
1568
+ updateClassname(
1569
+ tocLink,
1570
+ tocLink.className.replace(SPACE_CHAR + options.activeLinkClass, "")
1571
+ );
1572
+ });
1573
+ const tocLis = tocElement.querySelectorAll(`.${options.listItemClass}`);
1574
+ forEach.call(tocLis, (tocLi) => {
1575
+ updateClassname(
1576
+ tocLi,
1577
+ tocLi.className.replace(SPACE_CHAR + options.activeListItemClass, "")
1578
+ );
1579
+ });
1580
+ if (activeTocLink && activeTocLink.className.indexOf(options.activeLinkClass) === -1) {
1581
+ activeTocLink.className += SPACE_CHAR + options.activeLinkClass;
1582
+ }
1583
+ const li = activeTocLink?.parentNode;
1584
+ if (li && li.className.indexOf(options.activeListItemClass) === -1) {
1585
+ li.className += SPACE_CHAR + options.activeListItemClass;
1586
+ }
1587
+ const tocLists = tocElement.querySelectorAll(
1588
+ `.${options.listClass}.${options.collapsibleClass}`
1589
+ );
1590
+ forEach.call(tocLists, (list) => {
1591
+ if (list.className.indexOf(options.isCollapsedClass) === -1) {
1592
+ list.className += SPACE_CHAR + options.isCollapsedClass;
1593
+ }
1594
+ });
1595
+ if (activeTocLink?.nextSibling && activeTocLink.nextSibling.className.indexOf(
1596
+ options.isCollapsedClass
1597
+ ) !== -1) {
1598
+ updateClassname(
1599
+ activeTocLink.nextSibling,
1600
+ activeTocLink.nextSibling.className.replace(
1601
+ SPACE_CHAR + options.isCollapsedClass,
1602
+ ""
1603
+ )
1604
+ );
1605
+ }
1606
+ removeCollapsedFromParents(activeTocLink?.parentNode.parentNode);
1607
+ }
1608
+ }
1609
+ __name(updateToc, "updateToc");
1610
+ function removeCollapsedFromParents(element) {
1611
+ if (element && element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {
1612
+ updateClassname(
1613
+ element,
1614
+ element.className.replace(SPACE_CHAR + options.isCollapsedClass, "")
1615
+ );
1616
+ return removeCollapsedFromParents(element.parentNode.parentNode);
1617
+ }
1618
+ return element;
1619
+ }
1620
+ __name(removeCollapsedFromParents, "removeCollapsedFromParents");
1621
+ function disableTocAnimation(event) {
1622
+ const target = event.target || event.srcElement;
1623
+ if (typeof target.className !== "string" || target.className.indexOf(options.linkClass) === -1) {
1624
+ return;
1625
+ }
1626
+ currentlyHighlighting = false;
1627
+ }
1628
+ __name(disableTocAnimation, "disableTocAnimation");
1629
+ function enableTocAnimation() {
1630
+ currentlyHighlighting = true;
1631
+ }
1632
+ __name(enableTocAnimation, "enableTocAnimation");
1633
+ function getCurrentlyHighlighting() {
1634
+ return currentlyHighlighting;
1635
+ }
1636
+ __name(getCurrentlyHighlighting, "getCurrentlyHighlighting");
1637
+ function getIsHeaderBottomMode(headerId) {
1638
+ const scrollEl = getScrollEl();
1639
+ const activeHeading = document?.getElementById(headerId);
1640
+ const isBottomMode = activeHeading.offsetTop > scrollEl.offsetHeight - scrollEl.clientHeight * 1.4 - options.bottomModeThreshold;
1641
+ return isBottomMode;
1642
+ }
1643
+ __name(getIsHeaderBottomMode, "getIsHeaderBottomMode");
1644
+ function getIsPageBottomMode() {
1645
+ const scrollEl = getScrollEl();
1646
+ const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;
1647
+ const isBottomMode = getScrollTop() + scrollEl.clientHeight > scrollEl.offsetHeight - options.bottomModeThreshold;
1648
+ return isScrollable && isBottomMode;
1649
+ }
1650
+ __name(getIsPageBottomMode, "getIsPageBottomMode");
1651
+ function getScrollEl() {
1652
+ let el;
1653
+ if (options.scrollContainer && document.querySelector(options.scrollContainer)) {
1654
+ el = document.querySelector(options.scrollContainer);
1655
+ } else {
1656
+ el = document.documentElement || body;
1657
+ }
1658
+ return el;
1659
+ }
1660
+ __name(getScrollEl, "getScrollEl");
1661
+ function getScrollTop() {
1662
+ const el = getScrollEl();
1663
+ return el?.scrollTop || 0;
1664
+ }
1665
+ __name(getScrollTop, "getScrollTop");
1666
+ function getTopHeader(headings, scrollTop = getScrollTop()) {
1667
+ let topHeader;
1668
+ some.call(headings, (heading, i2) => {
1669
+ if (getHeadingTopPos(heading) > scrollTop + options.headingsOffset + 10) {
1670
+ const index = i2 === 0 ? i2 : i2 - 1;
1671
+ topHeader = headings[index];
1672
+ return true;
1673
+ }
1674
+ if (i2 === headings.length - 1) {
1675
+ topHeader = headings[headings.length - 1];
1676
+ return true;
1677
+ }
1678
+ });
1679
+ return topHeader;
1680
+ }
1681
+ __name(getTopHeader, "getTopHeader");
1682
+ function updateUrlHashForHeader(headingsArray) {
1683
+ const scrollTop = getScrollTop();
1684
+ const topHeader = getTopHeader(headingsArray, scrollTop);
1685
+ const isPageBottomMode = getIsPageBottomMode();
1686
+ if ((!topHeader || scrollTop < 5) && !isPageBottomMode) {
1687
+ if (!(window.location.hash === "#" || window.location.hash === "")) {
1688
+ window.history.pushState(null, null, "#");
1689
+ }
1690
+ } else if (topHeader && !isPageBottomMode) {
1691
+ const newHash = `#${topHeader.id}`;
1692
+ if (window.location.hash !== newHash) {
1693
+ window.history.pushState(null, null, newHash);
1694
+ }
1695
+ }
1696
+ }
1697
+ __name(updateUrlHashForHeader, "updateUrlHashForHeader");
1698
+ return {
1699
+ enableTocAnimation,
1700
+ disableTocAnimation,
1701
+ render,
1702
+ updateToc,
1703
+ getCurrentlyHighlighting,
1704
+ getTopHeader,
1705
+ getScrollTop,
1706
+ updateUrlHashForHeader
1707
+ };
1708
+ }
1709
+ __name(build_html_default, "default");
1710
+
1711
+ // ../../node_modules/tocbot/src/js/default-options.js
1712
+ var default_options_default = {
1713
+ // Where to render the table of contents.
1714
+ tocSelector: ".js-toc",
1715
+ // Or, you can pass in a DOM node instead
1716
+ tocElement: null,
1717
+ // Where to grab the headings to build the table of contents.
1718
+ contentSelector: ".js-toc-content",
1719
+ // Or, you can pass in a DOM node instead
1720
+ contentElement: null,
1721
+ // Which headings to grab inside of the contentSelector element.
1722
+ headingSelector: "h1, h2, h3",
1723
+ // Headings that match the ignoreSelector will be skipped.
1724
+ ignoreSelector: ".js-toc-ignore",
1725
+ // For headings inside relative or absolute positioned
1726
+ // containers within content.
1727
+ hasInnerContainers: false,
1728
+ // Main class to add to links.
1729
+ linkClass: "toc-link",
1730
+ // Extra classes to add to links.
1731
+ extraLinkClasses: "",
1732
+ // Class to add to active links,
1733
+ // the link corresponding to the top most heading on the page.
1734
+ activeLinkClass: "is-active-link",
1735
+ // Main class to add to lists.
1736
+ listClass: "toc-list",
1737
+ // Extra classes to add to lists.
1738
+ extraListClasses: "",
1739
+ // Class that gets added when a list should be collapsed.
1740
+ isCollapsedClass: "is-collapsed",
1741
+ // Class that gets added when a list should be able
1742
+ // to be collapsed but isn't necessarily collapsed.
1743
+ collapsibleClass: "is-collapsible",
1744
+ // Class to add to list items.
1745
+ listItemClass: "toc-list-item",
1746
+ // Class to add to active list items.
1747
+ activeListItemClass: "is-active-li",
1748
+ // How many heading levels should not be collapsed.
1749
+ // For example, number 6 will show everything since
1750
+ // there are only 6 heading levels and number 0 will collapse them all.
1751
+ // The sections that are hidden will open
1752
+ // and close as you scroll to headings within them.
1753
+ collapseDepth: 0,
1754
+ // Smooth scrolling enabled.
1755
+ scrollSmooth: true,
1756
+ // Smooth scroll duration.
1757
+ scrollSmoothDuration: 420,
1758
+ // Smooth scroll offset.
1759
+ scrollSmoothOffset: 0,
1760
+ // Callback for scroll end.
1761
+ scrollEndCallback: /* @__PURE__ */ __name(function(e2) {
1762
+ }, "scrollEndCallback"),
1763
+ // Headings offset between the headings and the top of
1764
+ // the document (this is meant for minor adjustments).
1765
+ headingsOffset: 1,
1766
+ // Enable the URL hash to update with the proper heading ID as
1767
+ // a user scrolls the page.
1768
+ enableUrlHashUpdateOnScroll: false,
1769
+ // type of scroll handler to use. to make scroll event not too rapid.
1770
+ // Options are: "debounce" or "throttle"
1771
+ // when set auto , use debounce less than 333ms , other use throttle.
1772
+ // for ios browser can't use history.pushState() more than 100 times per 30 seconds reason
1773
+ scrollHandlerType: "auto",
1774
+ // scrollHandler delay in ms.
1775
+ scrollHandlerTimeout: 50,
1776
+ // Timeout between events firing to make sure it's
1777
+ // not too rapid (for performance reasons).
1778
+ throttleTimeout: 50,
1779
+ // Element to add the positionFixedClass to.
1780
+ positionFixedSelector: null,
1781
+ // Fixed position class to add to make sidebar fixed after scrolling
1782
+ // down past the fixedSidebarOffset.
1783
+ positionFixedClass: "is-position-fixed",
1784
+ // fixedSidebarOffset can be any number but by default is set
1785
+ // to auto which sets the fixedSidebarOffset to the sidebar
1786
+ // element's offsetTop from the top of the document on init.
1787
+ fixedSidebarOffset: "auto",
1788
+ // includeHtml can be set to true to include the HTML markup from the
1789
+ // heading node instead of just including the innerText.
1790
+ includeHtml: false,
1791
+ // includeTitleTags automatically sets the html title tag of the link
1792
+ // to match the title. This can be useful for SEO purposes or
1793
+ // when truncating titles.
1794
+ includeTitleTags: false,
1795
+ // onclick function to apply to all links in toc. will be called with
1796
+ // the event as the first parameter, and this can be used to stop,
1797
+ // propagation, prevent default or perform action
1798
+ onClick: /* @__PURE__ */ __name(function(e2) {
1799
+ }, "onClick"),
1800
+ // orderedList can be set to false to generate unordered lists (ul)
1801
+ // instead of ordered lists (ol)
1802
+ orderedList: true,
1803
+ // If there is a fixed article scroll container, set to calculate offset.
1804
+ scrollContainer: null,
1805
+ // prevent ToC DOM rendering if it's already rendered by an external system.
1806
+ skipRendering: false,
1807
+ // Optional callback to change heading labels.
1808
+ // For example it can be used to cut down and put ellipses on multiline headings you deem too long.
1809
+ // Called each time a heading is parsed. Expects a string and returns the modified label to display.
1810
+ // Additionally, the attribute `data-heading-label` may be used on a heading to specify
1811
+ // a shorter string to be used in the TOC.
1812
+ // function (string) => string
1813
+ headingLabelCallback: false,
1814
+ // ignore headings that are hidden in DOM
1815
+ ignoreHiddenElements: false,
1816
+ // Optional callback to modify properties of parsed headings.
1817
+ // The heading element is passed in node parameter and information
1818
+ // parsed by default parser is provided in obj parameter.
1819
+ // Function has to return the same or modified obj.
1820
+ // The heading will be excluded from TOC if nothing is returned.
1821
+ // function (object, HTMLElement) => object | void
1822
+ headingObjectCallback: null,
1823
+ // Set the base path, useful if you use a `base` tag in `head`.
1824
+ basePath: "",
1825
+ // Only takes affect when `tocSelector` is scrolling,
1826
+ // keep the toc scroll position in sync with the content.
1827
+ disableTocScrollSync: false,
1828
+ // If this is null then just use `tocElement` or `tocSelector` instead
1829
+ // assuming `disableTocScrollSync` is set to false. This allows for
1830
+ // scrolling an outer element (like a nav panel w/ search) containing the toc.
1831
+ // Please pass an element, not a selector here.
1832
+ tocScrollingWrapper: null,
1833
+ // Offset for the toc scroll (top) position when scrolling the page.
1834
+ // Only effective if `disableTocScrollSync` is false.
1835
+ tocScrollOffset: 30,
1836
+ // Threshold for when bottom mode should be enabled to handle
1837
+ // highlighting links that cannot be scrolled to.
1838
+ bottomModeThreshold: 30
1839
+ };
1840
+
1841
+ // ../../node_modules/tocbot/src/js/parse-content.js
1842
+ function parseContent(options) {
1843
+ const reduce = [].reduce;
1844
+ function getLastItem(array2) {
1845
+ return array2[array2.length - 1];
1846
+ }
1847
+ __name(getLastItem, "getLastItem");
1848
+ function getHeadingLevel(heading) {
1849
+ return +heading.nodeName.toUpperCase().replace("H", "");
1850
+ }
1851
+ __name(getHeadingLevel, "getHeadingLevel");
1852
+ function isHTMLElement(maybeElement) {
1853
+ try {
1854
+ return maybeElement instanceof window.HTMLElement || maybeElement instanceof window.parent.HTMLElement;
1855
+ } catch (e2) {
1856
+ return maybeElement instanceof window.HTMLElement;
1857
+ }
1858
+ }
1859
+ __name(isHTMLElement, "isHTMLElement");
1860
+ function getHeadingObject(heading) {
1861
+ if (!isHTMLElement(heading)) return heading;
1862
+ if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) {
1863
+ return null;
1864
+ }
1865
+ const headingLabel = heading.getAttribute("data-heading-label") || (options.headingLabelCallback ? String(options.headingLabelCallback(heading.innerText)) : (heading.innerText || heading.textContent).trim());
1866
+ const obj = {
1867
+ id: heading.id,
1868
+ children: [],
1869
+ nodeName: heading.nodeName,
1870
+ headingLevel: getHeadingLevel(heading),
1871
+ textContent: headingLabel
1872
+ };
1873
+ if (options.includeHtml) {
1874
+ obj.childNodes = heading.childNodes;
1875
+ }
1876
+ if (options.headingObjectCallback) {
1877
+ return options.headingObjectCallback(obj, heading);
1878
+ }
1879
+ return obj;
1880
+ }
1881
+ __name(getHeadingObject, "getHeadingObject");
1882
+ function addNode(node, nest) {
1883
+ const obj = getHeadingObject(node);
1884
+ const level = obj.headingLevel;
1885
+ let array2 = nest;
1886
+ let lastItem = getLastItem(array2);
1887
+ const lastItemLevel = lastItem ? lastItem.headingLevel : 0;
1888
+ let counter = level - lastItemLevel;
1889
+ while (counter > 0) {
1890
+ lastItem = getLastItem(array2);
1891
+ if (lastItem && level === lastItem.headingLevel) {
1892
+ break;
1893
+ } else if (lastItem && lastItem.children !== void 0) {
1894
+ array2 = lastItem.children;
1895
+ }
1896
+ counter--;
1897
+ }
1898
+ if (level >= options.collapseDepth) {
1899
+ obj.isCollapsed = true;
1900
+ }
1901
+ array2.push(obj);
1902
+ return array2;
1903
+ }
1904
+ __name(addNode, "addNode");
1905
+ function selectHeadings(contentElement, headingSelector) {
1906
+ let selectors = headingSelector;
1907
+ if (options.ignoreSelector) {
1908
+ selectors = headingSelector.split(",").map(/* @__PURE__ */ __name(function mapSelectors(selector) {
1909
+ return `${selector.trim()}:not(${options.ignoreSelector})`;
1910
+ }, "mapSelectors"));
1911
+ }
1912
+ try {
1913
+ return contentElement.querySelectorAll(selectors);
1914
+ } catch (e2) {
1915
+ console.warn(`Headers not found with selector: ${selectors}`);
1916
+ return null;
1917
+ }
1918
+ }
1919
+ __name(selectHeadings, "selectHeadings");
1920
+ function nestHeadingsArray(headingsArray) {
1921
+ return reduce.call(
1922
+ headingsArray,
1923
+ /* @__PURE__ */ __name(function reducer(prev, curr) {
1924
+ const currentHeading = getHeadingObject(curr);
1925
+ if (currentHeading) {
1926
+ addNode(currentHeading, prev.nest);
1927
+ }
1928
+ return prev;
1929
+ }, "reducer"),
1930
+ {
1931
+ nest: []
1932
+ }
1933
+ );
1934
+ }
1935
+ __name(nestHeadingsArray, "nestHeadingsArray");
1936
+ return {
1937
+ nestHeadingsArray,
1938
+ selectHeadings
1939
+ };
1940
+ }
1941
+ __name(parseContent, "parseContent");
1942
+
1943
+ // ../../node_modules/tocbot/src/js/scroll-smooth/index.js
1944
+ function initSmoothScrolling(options) {
1945
+ var duration = options.duration;
1946
+ var offset = options.offset;
1947
+ if (typeof window === "undefined" || typeof location === "undefined") return;
1948
+ var pageUrl = location.hash ? stripHash(location.href) : location.href;
1949
+ delegatedLinkHijacking();
1950
+ function delegatedLinkHijacking() {
1951
+ document.body.addEventListener("click", onClick, false);
1952
+ function onClick(e2) {
1953
+ if (!isInPageLink(e2.target) || e2.target.className.indexOf("no-smooth-scroll") > -1 || e2.target.href.charAt(e2.target.href.length - 2) === "#" && e2.target.href.charAt(e2.target.href.length - 1) === "!" || e2.target.className.indexOf(options.linkClass) === -1) {
1954
+ return;
1955
+ }
1956
+ jump(e2.target.hash, {
1957
+ duration,
1958
+ offset,
1959
+ callback: /* @__PURE__ */ __name(function() {
1960
+ setFocus(e2.target.hash);
1961
+ }, "callback")
1962
+ });
1963
+ }
1964
+ __name(onClick, "onClick");
1965
+ }
1966
+ __name(delegatedLinkHijacking, "delegatedLinkHijacking");
1967
+ function isInPageLink(n2) {
1968
+ return n2.tagName.toLowerCase() === "a" && (n2.hash.length > 0 || n2.href.charAt(n2.href.length - 1) === "#") && (stripHash(n2.href) === pageUrl || stripHash(n2.href) + "#" === pageUrl);
1969
+ }
1970
+ __name(isInPageLink, "isInPageLink");
1971
+ function stripHash(url) {
1972
+ return url.slice(0, url.lastIndexOf("#"));
1973
+ }
1974
+ __name(stripHash, "stripHash");
1975
+ function setFocus(hash) {
1976
+ var element = document.getElementById(hash.substring(1));
1977
+ if (element) {
1978
+ if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {
1979
+ element.tabIndex = -1;
1980
+ }
1981
+ element.focus();
1982
+ }
1983
+ }
1984
+ __name(setFocus, "setFocus");
1985
+ }
1986
+ __name(initSmoothScrolling, "initSmoothScrolling");
1987
+ function jump(target, options) {
1988
+ var start = window.pageYOffset;
1989
+ var opt = {
1990
+ duration: options.duration,
1991
+ offset: options.offset || 0,
1992
+ callback: options.callback,
1993
+ easing: options.easing || easeInOutQuad
1994
+ };
1995
+ var tgt = document.querySelector(
1996
+ '[id="' + decodeURI(target).split("#").join("") + '"]'
1997
+ ) || document.querySelector('[id="' + target.split("#").join("") + '"]');
1998
+ var distance = typeof target === "string" ? opt.offset + (target ? tgt && tgt.getBoundingClientRect().top || 0 : -(document.documentElement.scrollTop || document.body.scrollTop)) : target;
1999
+ var duration = typeof opt.duration === "function" ? opt.duration(distance) : opt.duration;
2000
+ var timeStart;
2001
+ var timeElapsed;
2002
+ requestAnimationFrame(function(time) {
2003
+ timeStart = time;
2004
+ loop(time);
2005
+ });
2006
+ function loop(time) {
2007
+ timeElapsed = time - timeStart;
2008
+ window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration));
2009
+ if (timeElapsed < duration) {
2010
+ requestAnimationFrame(loop);
2011
+ } else {
2012
+ end();
2013
+ }
2014
+ }
2015
+ __name(loop, "loop");
2016
+ function end() {
2017
+ window.scrollTo(0, start + distance);
2018
+ if (typeof opt.callback === "function") {
2019
+ opt.callback();
2020
+ }
2021
+ }
2022
+ __name(end, "end");
2023
+ function easeInOutQuad(t, b2, c2, d2) {
2024
+ t /= d2 / 2;
2025
+ if (t < 1) return c2 / 2 * t * t + b2;
2026
+ t--;
2027
+ return -c2 / 2 * (t * (t - 2) - 1) + b2;
2028
+ }
2029
+ __name(easeInOutQuad, "easeInOutQuad");
2030
+ }
2031
+ __name(jump, "jump");
2032
+
2033
+ // ../../node_modules/tocbot/src/js/update-toc-scroll.js
2034
+ function updateTocScroll(options) {
2035
+ const toc = options.tocScrollingWrapper || options.tocElement || document.querySelector(options.tocSelector);
2036
+ if (toc && toc.scrollHeight > toc.clientHeight) {
2037
+ const activeItem = toc.querySelector(`.${options.activeListItemClass}`);
2038
+ if (activeItem) {
2039
+ const eTop = activeItem.offsetTop;
2040
+ const scrollAmount = eTop - options.tocScrollOffset;
2041
+ toc.scrollTop = scrollAmount > 0 ? scrollAmount : 0;
2042
+ }
2043
+ }
2044
+ }
2045
+ __name(updateTocScroll, "updateTocScroll");
2046
+
2047
+ // ../../node_modules/tocbot/src/js/index-esm.js
2048
+ var _options = {};
2049
+ var _buildHtml;
2050
+ var _parseContent;
2051
+ var _headingsArray;
2052
+ var _scrollListener;
2053
+ var clickListener;
2054
+ function init(customOptions) {
2055
+ let hasInitialized = false;
2056
+ _options = extend(default_options_default, customOptions || {});
2057
+ if (_options.scrollSmooth) {
2058
+ _options.duration = _options.scrollSmoothDuration;
2059
+ _options.offset = _options.scrollSmoothOffset;
2060
+ initSmoothScrolling(_options);
2061
+ }
2062
+ _buildHtml = build_html_default(_options);
2063
+ _parseContent = parseContent(_options);
2064
+ destroy();
2065
+ const contentElement = getContentElement(_options);
2066
+ if (contentElement === null) {
2067
+ return;
2068
+ }
2069
+ const tocElement = getTocElement(_options);
2070
+ if (tocElement === null) {
2071
+ return;
2072
+ }
2073
+ _headingsArray = _parseContent.selectHeadings(
2074
+ contentElement,
2075
+ _options.headingSelector
2076
+ );
2077
+ if (_headingsArray === null) {
2078
+ return;
2079
+ }
2080
+ const nestedHeadingsObj = _parseContent.nestHeadingsArray(_headingsArray);
2081
+ const nestedHeadings = nestedHeadingsObj.nest;
2082
+ if (!_options.skipRendering) {
2083
+ _buildHtml.render(tocElement, nestedHeadings);
2084
+ } else {
2085
+ return this;
2086
+ }
2087
+ let isClick = false;
2088
+ const scrollHandlerTimeout = _options.scrollHandlerTimeout || _options.throttleTimeout;
2089
+ const scrollHandler = /* @__PURE__ */ __name((fn, delay) => getScrollHandler(fn, delay, _options.scrollHandlerType), "scrollHandler");
2090
+ _scrollListener = scrollHandler((e2) => {
2091
+ _buildHtml.updateToc(_headingsArray, e2);
2092
+ !_options.disableTocScrollSync && !isClick && updateTocScroll(_options);
2093
+ if (_options.enableUrlHashUpdateOnScroll && hasInitialized) {
2094
+ const enableUpdatingHash = _buildHtml.getCurrentlyHighlighting();
2095
+ enableUpdatingHash && _buildHtml.updateUrlHashForHeader(_headingsArray);
2096
+ }
2097
+ const isTop = e2?.target?.scrollingElement?.scrollTop === 0;
2098
+ if (e2 && (e2.eventPhase === 0 || e2.currentTarget === null) || isTop) {
2099
+ _buildHtml.updateToc(_headingsArray);
2100
+ _options.scrollEndCallback?.(e2);
2101
+ }
2102
+ }, scrollHandlerTimeout);
2103
+ if (!hasInitialized) {
2104
+ _scrollListener();
2105
+ hasInitialized = true;
2106
+ }
2107
+ window.onhashchange = window.onscrollend = (e2) => {
2108
+ _scrollListener(e2);
2109
+ };
2110
+ if (_options.scrollContainer && document.querySelector(_options.scrollContainer)) {
2111
+ document.querySelector(_options.scrollContainer).addEventListener("scroll", _scrollListener, false);
2112
+ document.querySelector(_options.scrollContainer).addEventListener("resize", _scrollListener, false);
2113
+ } else {
2114
+ document.addEventListener("scroll", _scrollListener, false);
2115
+ document.addEventListener("resize", _scrollListener, false);
2116
+ }
2117
+ let timeout = null;
2118
+ clickListener = throttle((event) => {
2119
+ isClick = true;
2120
+ if (_options.scrollSmooth) {
2121
+ _buildHtml.disableTocAnimation(event);
2122
+ }
2123
+ _buildHtml.updateToc(_headingsArray, event);
2124
+ timeout && clearTimeout(timeout);
2125
+ timeout = setTimeout(() => {
2126
+ _buildHtml.enableTocAnimation();
2127
+ }, _options.scrollSmoothDuration);
2128
+ setTimeout(() => {
2129
+ isClick = false;
2130
+ }, _options.scrollSmoothDuration + 100);
2131
+ }, _options.throttleTimeout);
2132
+ if (_options.scrollContainer && document.querySelector(_options.scrollContainer)) {
2133
+ document.querySelector(_options.scrollContainer).addEventListener("click", clickListener, false);
2134
+ } else {
2135
+ document.addEventListener("click", clickListener, false);
2136
+ }
2137
+ }
2138
+ __name(init, "init");
2139
+ function destroy() {
2140
+ const tocElement = getTocElement(_options);
2141
+ if (tocElement === null) {
2142
+ return;
2143
+ }
2144
+ if (!_options.skipRendering) {
2145
+ if (tocElement) {
2146
+ tocElement.innerHTML = "";
2147
+ }
2148
+ }
2149
+ if (_options.scrollContainer && document.querySelector(_options.scrollContainer)) {
2150
+ document.querySelector(_options.scrollContainer).removeEventListener("scroll", _scrollListener, false);
2151
+ document.querySelector(_options.scrollContainer).removeEventListener("resize", _scrollListener, false);
2152
+ if (_buildHtml) {
2153
+ document.querySelector(_options.scrollContainer).removeEventListener("click", clickListener, false);
2154
+ }
2155
+ } else {
2156
+ document.removeEventListener("scroll", _scrollListener, false);
2157
+ document.removeEventListener("resize", _scrollListener, false);
2158
+ if (_buildHtml) {
2159
+ document.removeEventListener("click", clickListener, false);
2160
+ }
2161
+ }
2162
+ }
2163
+ __name(destroy, "destroy");
2164
+ function refresh(customOptions) {
2165
+ destroy();
2166
+ init(customOptions || _options);
2167
+ }
2168
+ __name(refresh, "refresh");
2169
+ var hasOwnProp = Object.prototype.hasOwnProperty;
2170
+ function extend(...args) {
2171
+ const target = {};
2172
+ for (let i2 = 0; i2 < args.length; i2++) {
2173
+ const source = args[i2];
2174
+ for (const key in source) {
2175
+ if (hasOwnProp.call(source, key)) {
2176
+ target[key] = source[key];
2177
+ }
2178
+ }
2179
+ }
2180
+ return target;
2181
+ }
2182
+ __name(extend, "extend");
2183
+ function throttle(fn, threshold, scope) {
2184
+ threshold || (threshold = 250);
2185
+ let last;
2186
+ let deferTimer;
2187
+ return function(...args) {
2188
+ const context = scope || this;
2189
+ const now = +/* @__PURE__ */ new Date();
2190
+ if (last && now < last + threshold) {
2191
+ clearTimeout(deferTimer);
2192
+ deferTimer = setTimeout(() => {
2193
+ last = now;
2194
+ fn.apply(context, args);
2195
+ }, threshold);
2196
+ } else {
2197
+ last = now;
2198
+ fn.apply(context, args);
2199
+ }
2200
+ };
2201
+ }
2202
+ __name(throttle, "throttle");
2203
+ function debounce(func, wait) {
2204
+ let timeout;
2205
+ return (...args) => {
2206
+ clearTimeout(timeout);
2207
+ timeout = setTimeout(() => func.apply(this, args), wait);
2208
+ };
2209
+ }
2210
+ __name(debounce, "debounce");
2211
+ function getScrollHandler(func, timeout, type = "auto") {
2212
+ switch (type) {
2213
+ case "debounce":
2214
+ return debounce(func, timeout);
2215
+ case "throttle":
2216
+ return throttle(func, timeout);
2217
+ default:
2218
+ return timeout < 334 ? debounce(func, timeout) : throttle(func, timeout);
2219
+ }
2220
+ }
2221
+ __name(getScrollHandler, "getScrollHandler");
2222
+ function getContentElement(options) {
2223
+ try {
2224
+ return options.contentElement || document.querySelector(options.contentSelector);
2225
+ } catch (e2) {
2226
+ console.warn(`Contents element not found: ${options.contentSelector}`);
2227
+ return null;
2228
+ }
2229
+ }
2230
+ __name(getContentElement, "getContentElement");
2231
+ function getTocElement(options) {
2232
+ try {
2233
+ return options.tocElement || document.querySelector(options.tocSelector);
2234
+ } catch (e2) {
2235
+ console.warn(`TOC element not found: ${options.tocSelector}`);
2236
+ return null;
2237
+ }
2238
+ }
2239
+ __name(getTocElement, "getTocElement");
2240
+
2241
+ // ../../node_modules/tocbot/index.js
2242
+ var tocbot = { destroy, init, refresh };
2243
+ var tocbot_default = tocbot;
2244
+
2245
+ // src/blocks/components/TableOfContents.tsx
1310
2246
  var Aside = styled8.aside(() => ({
1311
2247
  width: "10rem",
1312
2248
  "@media (max-width: 768px)": {
@@ -1382,9 +2318,9 @@ var Heading = styled8.p(({ theme }) => ({
1382
2318
  }));
1383
2319
  var Title2 = /* @__PURE__ */ __name(({ headingId, title }) => {
1384
2320
  if (typeof title === "string" || !title) {
1385
- return React10.createElement(Heading, { as: "h2", id: headingId, className: title ? "" : "sb-sr-only" }, title || "Table of contents");
2321
+ return React11.createElement(Heading, { as: "h2", id: headingId, className: title ? "" : "sb-sr-only" }, title || "Table of contents");
1386
2322
  }
1387
- return React10.createElement("div", { id: headingId }, title);
2323
+ return React11.createElement("div", { id: headingId }, title);
1388
2324
  }, "Title");
1389
2325
  var TableOfContents = /* @__PURE__ */ __name(({
1390
2326
  title,
@@ -1396,7 +2332,7 @@ var TableOfContents = /* @__PURE__ */ __name(({
1396
2332
  channel,
1397
2333
  className
1398
2334
  }) => {
1399
- useEffect2(() => {
2335
+ useEffect3(() => {
1400
2336
  if (disable) {
1401
2337
  return () => {
1402
2338
  };
@@ -1429,463 +2365,482 @@ var TableOfContents = /* @__PURE__ */ __name(({
1429
2365
  };
1430
2366
  }, [channel, disable, ignoreSelector, contentsSelector, headingSelector, unsafeTocbotOptions]);
1431
2367
  const headingId = useId();
1432
- return React10.createElement(Aside, { className }, !disable ? React10.createElement(Nav, { "aria-labelledby": headingId }, React10.createElement(Title2, { headingId, title }), React10.createElement("div", { className: "toc-wrapper" })) : null);
2368
+ return React11.createElement(Aside, { className }, !disable ? React11.createElement(Nav, { "aria-labelledby": headingId }, React11.createElement(Title2, { headingId, title }), React11.createElement("div", { className: "toc-wrapper" })) : null);
1433
2369
  }, "TableOfContents");
1434
2370
 
1435
2371
  // src/blocks/components/ArgsTable/ArgRow.tsx
1436
- import React29, { useState as useState10 } from "react";
2372
+ import React30, { useState as useState11 } from "react";
1437
2373
  import { codeCommon as codeCommon3 } from "storybook/internal/components";
1438
2374
 
1439
2375
  // ../../node_modules/markdown-to-jsx/dist/index.modern.js
1440
2376
  import * as e from "react";
1441
- function t() {
1442
- return t = Object.assign ? Object.assign.bind() : function(e2) {
1443
- for (var t2 = 1; t2 < arguments.length; t2++) {
1444
- var n2 = arguments[t2];
1445
- for (var r2 in n2) Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
2377
+ function n() {
2378
+ return n = Object.assign ? Object.assign.bind() : function(e2) {
2379
+ for (var n2 = 1; n2 < arguments.length; n2++) {
2380
+ var r2 = arguments[n2];
2381
+ for (var t in r2) Object.prototype.hasOwnProperty.call(r2, t) && (e2[t] = r2[t]);
1446
2382
  }
1447
2383
  return e2;
1448
- }, t.apply(this, arguments);
2384
+ }, n.apply(this, arguments);
1449
2385
  }
1450
- __name(t, "t");
1451
- var n = ["children", "options"];
1452
- var r = { blockQuote: "0", breakLine: "1", breakThematic: "2", codeBlock: "3", codeFenced: "4", codeInline: "5", footnote: "6", footnoteReference: "7", gfmTask: "8", heading: "9", headingSetext: "10", htmlBlock: "11", htmlComment: "12", htmlSelfClosing: "13", image: "14", link: "15", linkAngleBraceStyleDetector: "16", linkBareUrlDetector: "17", linkMailtoDetector: "18", newlineCoalescer: "19", orderedList: "20", paragraph: "21", ref: "22", refImage: "23", refLink: "24", table: "25", tableSeparator: "26", text: "27", textBolded: "28", textEmphasized: "29", textEscaped: "30", textMarked: "31", textStrikethroughed: "32", unorderedList: "33" };
1453
- var i;
1454
- !function(e2) {
1455
- e2[e2.MAX = 0] = "MAX", e2[e2.HIGH = 1] = "HIGH", e2[e2.MED = 2] = "MED", e2[e2.LOW = 3] = "LOW", e2[e2.MIN = 4] = "MIN";
1456
- }(i || (i = {}));
1457
- var l = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e2, t2) => (e2[t2.toLowerCase()] = t2, e2), { class: "className", for: "htmlFor" });
1458
- var o = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: "\xA0", quot: "\u201C" };
1459
- var a = ["style", "script"];
1460
- var c = ["src", "href", "data", "formAction", "srcDoc", "action"];
1461
- var s = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi;
1462
- var d = /mailto:/i;
1463
- var u = /\n{2,}$/;
1464
- var p = /^(\s*>[\s\S]*?)(?=\n\n|$)/;
1465
- var f = /^ *> ?/gm;
1466
- var h = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/;
1467
- var m = /^ {2,}\n/;
1468
- var g = /^(?:( *[-*_])){3,} *(?:\n *)+\n/;
1469
- var y = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/;
1470
- var k = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/;
1471
- var x = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/;
1472
- var b = /^(?:\n *)*\n/;
1473
- var v = /\r\n?/g;
1474
- var C = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/;
1475
- var $ = /^\[\^([^\]]+)]/;
1476
- var S = /\f/g;
1477
- var w = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/;
1478
- var E = /^\s*?\[(x|\s)\]/;
2386
+ __name(n, "n");
2387
+ var r = ["children", "options"];
2388
+ var o = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e2, n2) => (e2[n2.toLowerCase()] = n2, e2), { class: "className", for: "htmlFor" });
2389
+ var a = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: "\xA0", quot: "\u201C" };
2390
+ var c = ["style", "script", "pre"];
2391
+ var i = ["src", "href", "data", "formAction", "srcDoc", "action"];
2392
+ var u = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi;
2393
+ var l = /mailto:/i;
2394
+ var s = /\n{2,}$/;
2395
+ var f = /^(\s*>[\s\S]*?)(?=\n\n|$)/;
2396
+ var _ = /^ *> ?/gm;
2397
+ var d = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/;
2398
+ var p = /^ {2,}\n/;
2399
+ var y = /^(?:( *[-*_])){3,} *(?:\n *)+\n/;
2400
+ var h = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/;
2401
+ var g = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/;
2402
+ var m = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/;
2403
+ var k = /^(?:\n *)*\n/;
2404
+ var x = /\r\n?/g;
2405
+ var v = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/;
2406
+ var q = /^\[\^([^\]]+)]/;
2407
+ var $ = /\f/g;
2408
+ var b = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/;
2409
+ var S = /^\s*?\[(x|\s)\]/;
1479
2410
  var z = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/;
1480
- var L = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/;
1481
- var A = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/;
1482
- var O = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i;
1483
- var T = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi;
1484
- var B = /^<!--[\s\S]*?(?:-->)/;
1485
- var M = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/;
1486
- var R = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i;
1487
- var I = /^\{.*\}$/;
1488
- var D = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/;
1489
- var U = /^<([^ >]+@[^ >]+)>/;
1490
- var N = /^<([^ >]+:\/[^ >]+)>/;
1491
- var j = /-([a-z])?/gi;
1492
- var H = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/;
2411
+ var E = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/;
2412
+ var A = /^([^\n]+)\n *(=|-){3,} *\n/;
2413
+ var R = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i;
2414
+ var B = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi;
2415
+ var L = /^<!--[\s\S]*?(?:-->)/;
2416
+ var O = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/;
2417
+ var j = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i;
2418
+ var C = /^\{.*\}$/;
2419
+ var I = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/;
2420
+ var T = /^<([^ >]+@[^ >]+)>/;
2421
+ var M = /^<([^ >]+:\/[^ >]+)>/;
2422
+ var w = /-([a-z])?/gi;
2423
+ var D = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/;
2424
+ var F = /^[^\n]+(?: \n|\n{2,})/;
1493
2425
  var P = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/;
1494
- var _ = /^!\[([^\]]*)\] ?\[([^\]]*)\]/;
1495
- var F = /^\[([^\]]*)\] ?\[([^\]]*)\]/;
1496
- var W = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/;
1497
- var G = /\t/g;
1498
- var Z = /(^ *\||\| *$)/g;
1499
- var q = /^ *:-+: *$/;
2426
+ var Z = /^!\[([^\]]*)\] ?\[([^\]]*)\]/;
2427
+ var N = /^\[([^\]]*)\] ?\[([^\]]*)\]/;
2428
+ var G = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/;
2429
+ var U = /\t/g;
2430
+ var V = /(^ *\||\| *$)/g;
2431
+ var H = /^ *:-+: *$/;
1500
2432
  var Q = /^ *:-+ *$/;
1501
- var V = /^ *-+: *$/;
1502
- var X = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)";
1503
- var J = new RegExp(`^([*_])\\1${X}\\1\\1(?!\\1)`);
1504
- var K = new RegExp(`^([*_])${X}\\1(?!\\1)`);
1505
- var Y = new RegExp(`^(==)${X}\\1`);
1506
- var ee = new RegExp(`^(~~)${X}\\1`);
2433
+ var W = /^ *-+: *$/;
2434
+ var J = /* @__PURE__ */ __name((e2) => `(?=[\\s\\S]+?\\1${e2 ? "\\1" : ""})`, "J");
2435
+ var K = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)";
2436
+ var X = RegExp(`^([*_])\\1${J(1)}${K}\\1\\1(?!\\1)`);
2437
+ var Y = RegExp(`^([*_])${J(0)}${K}\\1(?!\\1)`);
2438
+ var ee = RegExp(`^(==)${J(0)}${K}\\1`);
2439
+ var ne = RegExp(`^(~~)${J(0)}${K}\\1`);
2440
+ var re = /^(:[a-zA-Z0-9-_]+:)/;
1507
2441
  var te = /^\\([^0-9A-Za-z\s])/;
1508
- var ne = /\\([^0-9A-Za-z\s])/g;
1509
- var re = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/;
1510
- var ie = /^\n+/;
1511
- var le = /^([ \t]*)/;
1512
- var oe = /\\([^\\])/g;
1513
- var ae = /(?:^|\n)( *)$/;
1514
- var ce = "(?:\\d+\\.)";
2442
+ var oe = /\\([^0-9A-Za-z\s])/g;
2443
+ var ae = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/;
2444
+ var ce = /^\n+/;
2445
+ var ie = /^([ \t]*)/;
2446
+ var ue = /(?:^|\n)( *)$/;
2447
+ var le = "(?:\\d+\\.)";
1515
2448
  var se = "(?:[*+-])";
1516
- function de(e2) {
1517
- return "( *)(" + (1 === e2 ? ce : se) + ") +";
1518
- }
1519
- __name(de, "de");
1520
- var ue = de(1);
1521
- var pe = de(2);
1522
2449
  function fe(e2) {
1523
- return new RegExp("^" + (1 === e2 ? ue : pe));
2450
+ return "( *)(" + (1 === e2 ? le : se) + ") +";
1524
2451
  }
1525
2452
  __name(fe, "fe");
1526
- var he = fe(1);
1527
- var me = fe(2);
2453
+ var _e = fe(1);
2454
+ var de = fe(2);
2455
+ function pe(e2) {
2456
+ return RegExp("^" + (1 === e2 ? _e : de));
2457
+ }
2458
+ __name(pe, "pe");
2459
+ var ye = pe(1);
2460
+ var he = pe(2);
1528
2461
  function ge(e2) {
1529
- return new RegExp("^" + (1 === e2 ? ue : pe) + "[^\\n]*(?:\\n(?!\\1" + (1 === e2 ? ce : se) + " )[^\\n]*)*(\\n|$)", "gm");
2462
+ return RegExp("^" + (1 === e2 ? _e : de) + "[^\\n]*(?:\\n(?!\\1" + (1 === e2 ? le : se) + " )[^\\n]*)*(\\n|$)", "gm");
1530
2463
  }
1531
2464
  __name(ge, "ge");
1532
- var ye = ge(1);
2465
+ var me = ge(1);
1533
2466
  var ke = ge(2);
1534
2467
  function xe(e2) {
1535
- const t2 = 1 === e2 ? ce : se;
1536
- return new RegExp("^( *)(" + t2 + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t2 + " (?!" + t2 + " ))\\n*|\\s*\\n*$)");
2468
+ const n2 = 1 === e2 ? le : se;
2469
+ return RegExp("^( *)(" + n2 + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + n2 + " (?!" + n2 + " ))\\n*|\\s*\\n*$)");
1537
2470
  }
1538
2471
  __name(xe, "xe");
1539
- var be = xe(1);
1540
- var ve = xe(2);
1541
- function Ce(e2, t2) {
1542
- const n2 = 1 === t2, i2 = n2 ? be : ve, l2 = n2 ? ye : ke, o2 = n2 ? he : me;
1543
- return { match: Me(function(e3, t3) {
1544
- const n3 = ae.exec(t3.prevCapture);
1545
- return n3 && (t3.list || !t3.inline && !t3.simple) ? i2.exec(e3 = n3[1] + e3) : null;
1546
- }), order: 1, parse(e3, t3, r2) {
1547
- const i3 = n2 ? +e3[2] : void 0, a2 = e3[0].replace(u, "\n").match(l2);
1548
- let c2 = false;
1549
- return { items: a2.map(function(e4, n3) {
1550
- const i4 = o2.exec(e4)[0].length, l3 = new RegExp("^ {1," + i4 + "}", "gm"), s2 = e4.replace(l3, "").replace(o2, ""), d2 = n3 === a2.length - 1, u2 = -1 !== s2.indexOf("\n\n") || d2 && c2;
1551
- c2 = u2;
1552
- const p2 = r2.inline, f2 = r2.list;
1553
- let h2;
1554
- r2.list = true, u2 ? (r2.inline = false, h2 = ze(s2) + "\n\n") : (r2.inline = true, h2 = ze(s2));
1555
- const m2 = t3(h2, r2);
1556
- return r2.inline = p2, r2.list = f2, m2;
1557
- }), ordered: n2, start: i3 };
1558
- }, render: /* @__PURE__ */ __name((t3, n3, i3) => e2(t3.ordered ? "ol" : "ul", { key: i3.key, start: t3.type === r.orderedList ? t3.start : void 0 }, t3.items.map(function(t4, r2) {
1559
- return e2("li", { key: r2 }, n3(t4, i3));
1560
- })), "render") };
2472
+ var ve = xe(1);
2473
+ var qe = xe(2);
2474
+ function $e(e2, n2) {
2475
+ const r2 = 1 === n2, t = r2 ? ve : qe, o2 = r2 ? me : ke, a2 = r2 ? ye : he;
2476
+ return { t: /* @__PURE__ */ __name((e3) => a2.test(e3), "t"), o: Ce(function(e3, n3) {
2477
+ const r3 = ue.exec(n3.prevCapture);
2478
+ return r3 && (n3.list || !n3.inline && !n3.simple) ? t.exec(e3 = r3[1] + e3) : null;
2479
+ }), i: 1, u(e3, n3, t2) {
2480
+ const c2 = r2 ? +e3[2] : void 0, i2 = e3[0].replace(s, "\n").match(o2);
2481
+ let u2 = false;
2482
+ return { items: i2.map(function(e4, r3) {
2483
+ const o3 = a2.exec(e4)[0].length, c3 = RegExp("^ {1," + o3 + "}", "gm"), l2 = e4.replace(c3, "").replace(a2, ""), s2 = r3 === i2.length - 1, f2 = -1 !== l2.indexOf("\n\n") || s2 && u2;
2484
+ u2 = f2;
2485
+ const _2 = t2.inline, d2 = t2.list;
2486
+ let p2;
2487
+ t2.list = true, f2 ? (t2.inline = false, p2 = ze(l2) + "\n\n") : (t2.inline = true, p2 = ze(l2));
2488
+ const y2 = n3(p2, t2);
2489
+ return t2.inline = _2, t2.list = d2, y2;
2490
+ }), ordered: r2, start: c2 };
2491
+ }, l: /* @__PURE__ */ __name((n3, r3, t2) => e2(n3.ordered ? "ol" : "ul", { key: t2.key, start: "20" === n3.type ? n3.start : void 0 }, n3.items.map(function(n4, o3) {
2492
+ return e2("li", { key: o3 }, r3(n4, t2));
2493
+ })), "l") };
1561
2494
  }
1562
- __name(Ce, "Ce");
1563
- var $e = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`);
2495
+ __name($e, "$e");
2496
+ var be = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`);
1564
2497
  var Se = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
1565
- var we = [p, y, k, z, A, L, H, be, ve];
1566
- var Ee = [...we, /^[^\n]+(?: \n|\n{2,})/, O, B, R];
1567
2498
  function ze(e2) {
1568
- let t2 = e2.length;
1569
- for (; t2 > 0 && e2[t2 - 1] <= " "; ) t2--;
1570
- return e2.slice(0, t2);
2499
+ let n2 = e2.length;
2500
+ for (; n2 > 0 && e2[n2 - 1] <= " "; ) n2--;
2501
+ return e2.slice(0, n2);
1571
2502
  }
1572
2503
  __name(ze, "ze");
1573
- function Le(e2) {
1574
- return e2.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
2504
+ function Ee(e2, n2) {
2505
+ return e2.startsWith(n2);
1575
2506
  }
1576
- __name(Le, "Le");
1577
- function Ae(e2) {
1578
- return V.test(e2) ? "right" : q.test(e2) ? "center" : Q.test(e2) ? "left" : null;
2507
+ __name(Ee, "Ee");
2508
+ function Ae(e2, n2, r2) {
2509
+ if (Array.isArray(r2)) {
2510
+ for (let n3 = 0; n3 < r2.length; n3++) if (Ee(e2, r2[n3])) return true;
2511
+ return false;
2512
+ }
2513
+ return r2(e2, n2);
1579
2514
  }
1580
2515
  __name(Ae, "Ae");
1581
- function Oe(e2, t2, n2, r2) {
1582
- const i2 = n2.inTable;
1583
- n2.inTable = true;
1584
- let l2 = [[]], o2 = "";
1585
- function a2() {
1586
- if (!o2) return;
1587
- const e3 = l2[l2.length - 1];
1588
- e3.push.apply(e3, t2(o2, n2)), o2 = "";
1589
- }
1590
- __name(a2, "a");
1591
- return e2.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e3, t3, n3) => {
1592
- "|" === e3.trim() && (a2(), r2) ? 0 !== t3 && t3 !== n3.length - 1 && l2.push([]) : o2 += e3;
1593
- }), a2(), n2.inTable = i2, l2;
2516
+ function Re(e2) {
2517
+ return e2.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
1594
2518
  }
1595
- __name(Oe, "Oe");
1596
- function Te(e2, t2, n2) {
1597
- n2.inline = true;
1598
- const i2 = e2[2] ? e2[2].replace(Z, "").split("|").map(Ae) : [], l2 = e2[3] ? function(e3, t3, n3) {
2519
+ __name(Re, "Re");
2520
+ function Be(e2) {
2521
+ return W.test(e2) ? "right" : H.test(e2) ? "center" : Q.test(e2) ? "left" : null;
2522
+ }
2523
+ __name(Be, "Be");
2524
+ function Le(e2, n2, r2, t) {
2525
+ const o2 = r2.inTable;
2526
+ r2.inTable = true;
2527
+ let a2 = [[]], c2 = "";
2528
+ function i2() {
2529
+ if (!c2) return;
2530
+ const e3 = a2[a2.length - 1];
2531
+ e3.push.apply(e3, n2(c2, r2)), c2 = "";
2532
+ }
2533
+ __name(i2, "i");
2534
+ return e2.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e3, n3, r3) => {
2535
+ "|" === e3.trim() && (i2(), t) ? 0 !== n3 && n3 !== r3.length - 1 && a2.push([]) : c2 += e3;
2536
+ }), i2(), r2.inTable = o2, a2;
2537
+ }
2538
+ __name(Le, "Le");
2539
+ function Oe(e2, n2, r2) {
2540
+ r2.inline = true;
2541
+ const t = e2[2] ? e2[2].replace(V, "").split("|").map(Be) : [], o2 = e2[3] ? function(e3, n3, r3) {
1599
2542
  return e3.trim().split("\n").map(function(e4) {
1600
- return Oe(e4, t3, n3, true);
2543
+ return Le(e4, n3, r3, true);
1601
2544
  });
1602
- }(e2[3], t2, n2) : [], o2 = Oe(e2[1], t2, n2, !!l2.length);
1603
- return n2.inline = false, l2.length ? { align: i2, cells: l2, header: o2, type: r.table } : { children: o2, type: r.paragraph };
2545
+ }(e2[3], n2, r2) : [], a2 = Le(e2[1], n2, r2, !!o2.length);
2546
+ return r2.inline = false, o2.length ? { align: t, cells: o2, header: a2, type: "25" } : { children: a2, type: "21" };
1604
2547
  }
1605
- __name(Te, "Te");
1606
- function Be(e2, t2) {
1607
- return null == e2.align[t2] ? {} : { textAlign: e2.align[t2] };
2548
+ __name(Oe, "Oe");
2549
+ function je(e2, n2) {
2550
+ return null == e2.align[n2] ? {} : { textAlign: e2.align[n2] };
1608
2551
  }
1609
- __name(Be, "Be");
1610
- function Me(e2) {
2552
+ __name(je, "je");
2553
+ function Ce(e2) {
1611
2554
  return e2.inline = 1, e2;
1612
2555
  }
1613
- __name(Me, "Me");
1614
- function Re(e2) {
1615
- return Me(function(t2, n2) {
1616
- return n2.inline ? e2.exec(t2) : null;
1617
- });
1618
- }
1619
- __name(Re, "Re");
2556
+ __name(Ce, "Ce");
1620
2557
  function Ie(e2) {
1621
- return Me(function(t2, n2) {
1622
- return n2.inline || n2.simple ? e2.exec(t2) : null;
2558
+ return Ce(function(n2, r2) {
2559
+ return r2.inline ? e2.exec(n2) : null;
1623
2560
  });
1624
2561
  }
1625
2562
  __name(Ie, "Ie");
1626
- function De(e2) {
1627
- return function(t2, n2) {
1628
- return n2.inline || n2.simple ? null : e2.exec(t2);
2563
+ function Te(e2) {
2564
+ return Ce(function(n2, r2) {
2565
+ return r2.inline || r2.simple ? e2.exec(n2) : null;
2566
+ });
2567
+ }
2568
+ __name(Te, "Te");
2569
+ function Me(e2) {
2570
+ return function(n2, r2) {
2571
+ return r2.inline || r2.simple ? null : e2.exec(n2);
1629
2572
  };
1630
2573
  }
1631
- __name(De, "De");
1632
- function Ue(e2) {
1633
- return Me(function(t2) {
1634
- return e2.exec(t2);
2574
+ __name(Me, "Me");
2575
+ function we(e2) {
2576
+ return Ce(function(n2) {
2577
+ return e2.exec(n2);
1635
2578
  });
1636
2579
  }
1637
- __name(Ue, "Ue");
1638
- function Ne(e2, t2) {
1639
- if (t2.inline || t2.simple) return null;
1640
- let n2 = "";
1641
- e2.split("\n").every((e3) => (e3 += "\n", !we.some((t3) => t3.test(e3)) && (n2 += e3, !!e3.trim())));
1642
- const r2 = ze(n2);
1643
- return "" == r2 ? null : [n2, , r2];
1644
- }
1645
- __name(Ne, "Ne");
1646
- var je = /(javascript|vbscript|data(?!:image)):/i;
1647
- function He(e2) {
2580
+ __name(we, "we");
2581
+ var De = /(javascript|vbscript|data(?!:image)):/i;
2582
+ function Fe(e2) {
1648
2583
  try {
1649
- const t2 = decodeURIComponent(e2).replace(/[^A-Za-z0-9/:]/g, "");
1650
- if (je.test(t2)) return null;
2584
+ const n2 = decodeURIComponent(e2).replace(/[^A-Za-z0-9/:]/g, "");
2585
+ if (De.test(n2)) return null;
1651
2586
  } catch (e3) {
1652
2587
  return null;
1653
2588
  }
1654
2589
  return e2;
1655
2590
  }
1656
- __name(He, "He");
2591
+ __name(Fe, "Fe");
1657
2592
  function Pe(e2) {
1658
- return e2.replace(oe, "$1");
2593
+ return e2 ? e2.replace(oe, "$1") : e2;
1659
2594
  }
1660
2595
  __name(Pe, "Pe");
1661
- function _e(e2, t2, n2) {
1662
- const r2 = n2.inline || false, i2 = n2.simple || false;
1663
- n2.inline = true, n2.simple = true;
1664
- const l2 = e2(t2, n2);
1665
- return n2.inline = r2, n2.simple = i2, l2;
2596
+ function Ze(e2, n2, r2) {
2597
+ const t = r2.inline || false, o2 = r2.simple || false;
2598
+ r2.inline = true, r2.simple = true;
2599
+ const a2 = e2(n2, r2);
2600
+ return r2.inline = t, r2.simple = o2, a2;
1666
2601
  }
1667
- __name(_e, "_e");
1668
- function Fe(e2, t2, n2) {
1669
- const r2 = n2.inline || false, i2 = n2.simple || false;
1670
- n2.inline = false, n2.simple = true;
1671
- const l2 = e2(t2, n2);
1672
- return n2.inline = r2, n2.simple = i2, l2;
2602
+ __name(Ze, "Ze");
2603
+ function Ne(e2, n2, r2) {
2604
+ const t = r2.inline || false, o2 = r2.simple || false;
2605
+ r2.inline = false, r2.simple = true;
2606
+ const a2 = e2(n2, r2);
2607
+ return r2.inline = t, r2.simple = o2, a2;
1673
2608
  }
1674
- __name(Fe, "Fe");
1675
- function We(e2, t2, n2) {
1676
- const r2 = n2.inline || false;
1677
- n2.inline = false;
1678
- const i2 = e2(t2, n2);
1679
- return n2.inline = r2, i2;
2609
+ __name(Ne, "Ne");
2610
+ function Ge(e2, n2, r2) {
2611
+ const t = r2.inline || false;
2612
+ r2.inline = false;
2613
+ const o2 = e2(n2, r2);
2614
+ return r2.inline = t, o2;
1680
2615
  }
1681
- __name(We, "We");
1682
- var Ge = /* @__PURE__ */ __name((e2, t2, n2) => ({ children: _e(t2, e2[2], n2) }), "Ge");
1683
- function Ze() {
2616
+ __name(Ge, "Ge");
2617
+ var Ue = /* @__PURE__ */ __name((e2, n2, r2) => ({ children: Ze(n2, e2[2], r2) }), "Ue");
2618
+ function Ve() {
1684
2619
  return {};
1685
2620
  }
1686
- __name(Ze, "Ze");
1687
- function qe() {
2621
+ __name(Ve, "Ve");
2622
+ function He() {
1688
2623
  return null;
1689
2624
  }
1690
- __name(qe, "qe");
2625
+ __name(He, "He");
1691
2626
  function Qe(...e2) {
1692
2627
  return e2.filter(Boolean).join(" ");
1693
2628
  }
1694
2629
  __name(Qe, "Qe");
1695
- function Ve(e2, t2, n2) {
1696
- let r2 = e2;
1697
- const i2 = t2.split(".");
1698
- for (; i2.length && (r2 = r2[i2[0]], void 0 !== r2); ) i2.shift();
1699
- return r2 || n2;
2630
+ function We(e2, n2, r2) {
2631
+ let t = e2;
2632
+ const o2 = n2.split(".");
2633
+ for (; o2.length && (t = t[o2[0]], void 0 !== t); ) o2.shift();
2634
+ return t || r2;
1700
2635
  }
1701
- __name(Ve, "Ve");
1702
- function Xe(n2 = "", i2 = {}) {
1703
- function u2(e2, n3, ...r2) {
1704
- const l2 = Ve(i2.overrides, `${e2}.props`, {});
1705
- return i2.createElement(function(e3, t2) {
1706
- const n4 = Ve(t2, e3);
1707
- return n4 ? "function" == typeof n4 || "object" == typeof n4 && "render" in n4 ? n4 : Ve(t2, `${e3}.component`, e3) : e3;
1708
- }(e2, i2.overrides), t({}, n3, l2, { className: Qe(null == n3 ? void 0 : n3.className, l2.className) || void 0 }), ...r2);
1709
- }
1710
- __name(u2, "u");
1711
- function Z2(e2) {
1712
- e2 = e2.replace(w, "");
1713
- let t2 = false;
1714
- i2.forceInline ? t2 = true : i2.forceBlock || (t2 = false === W.test(e2));
1715
- const n3 = ae2(oe2(t2 ? e2 : `${ze(e2).replace(ie, "")}
1716
-
1717
- `, { inline: t2 }));
1718
- for (; "string" == typeof n3[n3.length - 1] && !n3[n3.length - 1].trim(); ) n3.pop();
1719
- if (null === i2.wrapper) return n3;
1720
- const r2 = i2.wrapper || (t2 ? "span" : "div");
1721
- let l2;
1722
- if (n3.length > 1 || i2.forceWrapper) l2 = n3;
2636
+ __name(We, "We");
2637
+ function Je(r2 = "", t = {}) {
2638
+ t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? n({}, a, t.namedCodesToUnicode) : a;
2639
+ const s2 = t.slugify || Re, V2 = t.sanitizer || Fe, H4 = t.createElement || e.createElement, Q2 = [f, h, g, t.enforceAtxHeadings ? E : z, A, D, ve, qe], W2 = [...Q2, F, R, L, j];
2640
+ function J2(e2, r3, ...o2) {
2641
+ const a2 = We(t.overrides, e2 + ".props", {});
2642
+ return H4(function(e3, n2) {
2643
+ const r4 = We(n2, e3);
2644
+ return r4 ? "function" == typeof r4 || "object" == typeof r4 && "render" in r4 ? r4 : We(n2, e3 + ".component", e3) : e3;
2645
+ }(e2, t.overrides), n({}, r3, a2, { className: Qe(null == r3 ? void 0 : r3.className, a2.className) || void 0 }), ...o2);
2646
+ }
2647
+ __name(J2, "J");
2648
+ function K2(e2) {
2649
+ e2 = e2.replace(b, "");
2650
+ let n2 = false;
2651
+ t.forceInline ? n2 = true : t.forceBlock || (n2 = false === G.test(e2));
2652
+ const r3 = _e2(fe2(n2 ? e2 : ze(e2).replace(ce, "") + "\n\n", { inline: n2 }));
2653
+ for (; "string" == typeof r3[r3.length - 1] && !r3[r3.length - 1].trim(); ) r3.pop();
2654
+ if (null === t.wrapper) return r3;
2655
+ const o2 = t.wrapper || (n2 ? "span" : "div");
2656
+ let a2;
2657
+ if (r3.length > 1 || t.forceWrapper) a2 = r3;
1723
2658
  else {
1724
- if (1 === n3.length) return l2 = n3[0], "string" == typeof l2 ? u2("span", { key: "outer" }, l2) : l2;
1725
- l2 = null;
1726
- }
1727
- return i2.createElement(r2, { key: "outer" }, l2);
1728
- }
1729
- __name(Z2, "Z");
1730
- function q2(e2, t2) {
1731
- const n3 = t2.match(s);
1732
- return n3 ? n3.reduce(function(t3, n4) {
1733
- const r2 = n4.indexOf("=");
1734
- if (-1 !== r2) {
1735
- const o2 = function(e3) {
1736
- return -1 !== e3.indexOf("-") && null === e3.match(M) && (e3 = e3.replace(j, function(e4, t4) {
1737
- return t4.toUpperCase();
2659
+ if (1 === r3.length) return a2 = r3[0], "string" == typeof a2 ? J2("span", { key: "outer" }, a2) : a2;
2660
+ a2 = null;
2661
+ }
2662
+ return H4(o2, { key: "outer" }, a2);
2663
+ }
2664
+ __name(K2, "K");
2665
+ function oe2(e2, n2) {
2666
+ if (!n2 || !n2.trim()) return null;
2667
+ const r3 = n2.match(u);
2668
+ return r3 ? r3.reduce(function(n3, r4) {
2669
+ const t2 = r4.indexOf("=");
2670
+ if (-1 !== t2) {
2671
+ const a2 = function(e3) {
2672
+ return -1 !== e3.indexOf("-") && null === e3.match(O) && (e3 = e3.replace(w, function(e4, n4) {
2673
+ return n4.toUpperCase();
1738
2674
  })), e3;
1739
- }(n4.slice(0, r2)).trim(), a2 = function(e3) {
1740
- const t4 = e3[0];
1741
- return ('"' === t4 || "'" === t4) && e3.length >= 2 && e3[e3.length - 1] === t4 ? e3.slice(1, -1) : e3;
1742
- }(n4.slice(r2 + 1).trim()), s2 = l[o2] || o2;
1743
- if ("ref" === s2) return t3;
1744
- const d2 = t3[s2] = function(e3, t4, n5, r3) {
1745
- return "style" === t4 ? function(e4) {
1746
- const t5 = [];
1747
- let n6 = "", r4 = false, i3 = false, l2 = "";
1748
- if (!e4) return t5;
1749
- for (let o4 = 0; o4 < e4.length; o4++) {
1750
- const a3 = e4[o4];
1751
- if ('"' !== a3 && "'" !== a3 || r4 || (i3 ? a3 === l2 && (i3 = false, l2 = "") : (i3 = true, l2 = a3)), "(" === a3 && n6.endsWith("url") ? r4 = true : ")" === a3 && r4 && (r4 = false), ";" !== a3 || i3 || r4) n6 += a3;
2675
+ }(r4.slice(0, t2)).trim(), c2 = function(e3) {
2676
+ const n4 = e3[0];
2677
+ return ('"' === n4 || "'" === n4) && e3.length >= 2 && e3[e3.length - 1] === n4 ? e3.slice(1, -1) : e3;
2678
+ }(r4.slice(t2 + 1).trim()), u2 = o[a2] || a2;
2679
+ if ("ref" === u2) return n3;
2680
+ const l2 = n3[u2] = function(e3, n4, r5, t3) {
2681
+ return "style" === n4 ? function(e4) {
2682
+ const n5 = [];
2683
+ let r6 = "", t4 = false, o2 = false, a3 = "";
2684
+ if (!e4) return n5;
2685
+ for (let c4 = 0; c4 < e4.length; c4++) {
2686
+ const i2 = e4[c4];
2687
+ if ('"' !== i2 && "'" !== i2 || t4 || (o2 ? i2 === a3 && (o2 = false, a3 = "") : (o2 = true, a3 = i2)), "(" === i2 && r6.endsWith("url") ? t4 = true : ")" === i2 && t4 && (t4 = false), ";" !== i2 || o2 || t4) r6 += i2;
1752
2688
  else {
1753
- const e5 = n6.trim();
2689
+ const e5 = r6.trim();
1754
2690
  if (e5) {
1755
- const n7 = e5.indexOf(":");
1756
- if (n7 > 0) {
1757
- const r5 = e5.slice(0, n7).trim(), i4 = e5.slice(n7 + 1).trim();
1758
- t5.push([r5, i4]);
2691
+ const r7 = e5.indexOf(":");
2692
+ if (r7 > 0) {
2693
+ const t5 = e5.slice(0, r7).trim(), o3 = e5.slice(r7 + 1).trim();
2694
+ n5.push([t5, o3]);
1759
2695
  }
1760
2696
  }
1761
- n6 = "";
2697
+ r6 = "";
1762
2698
  }
1763
2699
  }
1764
- const o3 = n6.trim();
1765
- if (o3) {
1766
- const e5 = o3.indexOf(":");
2700
+ const c3 = r6.trim();
2701
+ if (c3) {
2702
+ const e5 = c3.indexOf(":");
1767
2703
  if (e5 > 0) {
1768
- const n7 = o3.slice(0, e5).trim(), r5 = o3.slice(e5 + 1).trim();
1769
- t5.push([n7, r5]);
2704
+ const r7 = c3.slice(0, e5).trim(), t5 = c3.slice(e5 + 1).trim();
2705
+ n5.push([r7, t5]);
1770
2706
  }
1771
2707
  }
1772
- return t5;
1773
- }(n5).reduce(function(t5, [n6, i3]) {
1774
- return t5[n6.replace(/(-[a-z])/g, (e4) => e4[1].toUpperCase())] = r3(i3, e3, n6), t5;
1775
- }, {}) : -1 !== c.indexOf(t4) ? r3(n5, e3, t4) : (n5.match(I) && (n5 = n5.slice(1, n5.length - 1)), "true" === n5 || "false" !== n5 && n5);
1776
- }(e2, o2, a2, i2.sanitizer);
1777
- "string" == typeof d2 && (O.test(d2) || R.test(d2)) && (t3[s2] = Z2(d2.trim()));
1778
- } else "style" !== n4 && (t3[l[n4] || n4] = true);
1779
- return t3;
2708
+ return n5;
2709
+ }(r5).reduce(function(n5, [r6, o2]) {
2710
+ return n5[r6.replace(/(-[a-z])/g, (e4) => e4[1].toUpperCase())] = t3(o2, e3, r6), n5;
2711
+ }, {}) : -1 !== i.indexOf(n4) ? t3(Pe(r5), e3, n4) : (r5.match(C) && (r5 = Pe(r5.slice(1, r5.length - 1))), "true" === r5 || "false" !== r5 && r5);
2712
+ }(e2, a2, c2, V2);
2713
+ "string" == typeof l2 && (R.test(l2) || j.test(l2)) && (n3[u2] = K2(l2.trim()));
2714
+ } else "style" !== r4 && (n3[o[r4] || r4] = true);
2715
+ return n3;
1780
2716
  }, {}) : null;
1781
2717
  }
1782
- __name(q2, "q");
1783
- i2.overrides = i2.overrides || {}, i2.sanitizer = i2.sanitizer || He, i2.slugify = i2.slugify || Le, i2.namedCodesToUnicode = i2.namedCodesToUnicode ? t({}, o, i2.namedCodesToUnicode) : o, i2.createElement = i2.createElement || e.createElement;
1784
- const Q2 = [], V2 = {}, X2 = { [r.blockQuote]: { match: De(p), order: 1, parse(e2, t2, n3) {
1785
- const [, r2, i3] = e2[0].replace(f, "").match(h);
1786
- return { alert: r2, children: t2(i3, n3) };
1787
- }, render(e2, t2, n3) {
1788
- const l2 = { key: n3.key };
1789
- return e2.alert && (l2.className = "markdown-alert-" + i2.slugify(e2.alert.toLowerCase(), Le), e2.children.unshift({ attrs: {}, children: [{ type: r.text, text: e2.alert }], noInnerParse: true, type: r.htmlBlock, tag: "header" })), u2("blockquote", l2, t2(e2.children, n3));
1790
- } }, [r.breakLine]: { match: Ue(m), order: 1, parse: Ze, render: /* @__PURE__ */ __name((e2, t2, n3) => u2("br", { key: n3.key }), "render") }, [r.breakThematic]: { match: De(g), order: 1, parse: Ze, render: /* @__PURE__ */ __name((e2, t2, n3) => u2("hr", { key: n3.key }), "render") }, [r.codeBlock]: { match: De(k), order: 0, parse: /* @__PURE__ */ __name((e2) => ({ lang: void 0, text: ze(e2[0].replace(/^ {4}/gm, "")).replace(ne, "$1") }), "parse"), render: /* @__PURE__ */ __name((e2, n3, r2) => u2("pre", { key: r2.key }, u2("code", t({}, e2.attrs, { className: e2.lang ? `lang-${e2.lang}` : "" }), e2.text)), "render") }, [r.codeFenced]: { match: De(y), order: 0, parse: /* @__PURE__ */ __name((e2) => ({ attrs: q2("code", e2[3] || ""), lang: e2[2] || void 0, text: e2[4], type: r.codeBlock }), "parse") }, [r.codeInline]: { match: Ie(x), order: 3, parse: /* @__PURE__ */ __name((e2) => ({ text: e2[2].replace(ne, "$1") }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("code", { key: n3.key }, e2.text), "render") }, [r.footnote]: { match: De(C), order: 0, parse: /* @__PURE__ */ __name((e2) => (Q2.push({ footnote: e2[2], identifier: e2[1] }), {}), "parse"), render: qe }, [r.footnoteReference]: { match: Re($), order: 1, parse: /* @__PURE__ */ __name((e2) => ({ target: `#${i2.slugify(e2[1], Le)}`, text: e2[1] }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("a", { key: n3.key, href: i2.sanitizer(e2.target, "a", "href") }, u2("sup", { key: n3.key }, e2.text)), "render") }, [r.gfmTask]: { match: Re(E), order: 1, parse: /* @__PURE__ */ __name((e2) => ({ completed: "x" === e2[1].toLowerCase() }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("input", { checked: e2.completed, key: n3.key, readOnly: true, type: "checkbox" }), "render") }, [r.heading]: { match: De(i2.enforceAtxHeadings ? L : z), order: 1, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: _e(t2, e2[2], n3), id: i2.slugify(e2[2], Le), level: e2[1].length }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2(`h${e2.level}`, { id: e2.id, key: n3.key }, t2(e2.children, n3)), "render") }, [r.headingSetext]: { match: De(A), order: 0, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: _e(t2, e2[1], n3), level: "=" === e2[2] ? 1 : 2, type: r.heading }), "parse") }, [r.htmlBlock]: { match: Ue(O), order: 1, parse(e2, t2, n3) {
1791
- const [, r2] = e2[3].match(le), i3 = new RegExp(`^${r2}`, "gm"), l2 = e2[3].replace(i3, ""), o2 = (c2 = l2, Ee.some((e3) => e3.test(c2)) ? We : _e);
1792
- var c2;
1793
- const s2 = e2[1].toLowerCase(), d2 = -1 !== a.indexOf(s2), u3 = (d2 ? s2 : e2[1]).trim(), p2 = { attrs: q2(u3, e2[2]), noInnerParse: d2, tag: u3 };
1794
- return n3.inAnchor = n3.inAnchor || "a" === s2, d2 ? p2.text = e2[3] : p2.children = o2(t2, l2, n3), n3.inAnchor = false, p2;
1795
- }, render: /* @__PURE__ */ __name((e2, n3, r2) => u2(e2.tag, t({ key: r2.key }, e2.attrs), e2.text || (e2.children ? n3(e2.children, r2) : "")), "render") }, [r.htmlSelfClosing]: { match: Ue(R), order: 1, parse(e2) {
1796
- const t2 = e2[1].trim();
1797
- return { attrs: q2(t2, e2[2] || ""), tag: t2 };
1798
- }, render: /* @__PURE__ */ __name((e2, n3, r2) => u2(e2.tag, t({}, e2.attrs, { key: r2.key })), "render") }, [r.htmlComment]: { match: Ue(B), order: 1, parse: /* @__PURE__ */ __name(() => ({}), "parse"), render: qe }, [r.image]: { match: Ie(Se), order: 1, parse: /* @__PURE__ */ __name((e2) => ({ alt: e2[1], target: Pe(e2[2]), title: e2[3] }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("img", { key: n3.key, alt: e2.alt || void 0, title: e2.title || void 0, src: i2.sanitizer(e2.target, "img", "src") }), "render") }, [r.link]: { match: Re($e), order: 3, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: Fe(t2, e2[1], n3), target: Pe(e2[2]), title: e2[3] }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("a", { key: n3.key, href: i2.sanitizer(e2.target, "a", "href"), title: e2.title }, t2(e2.children, n3)), "render") }, [r.linkAngleBraceStyleDetector]: { match: Re(N), order: 0, parse: /* @__PURE__ */ __name((e2) => ({ children: [{ text: e2[1], type: r.text }], target: e2[1], type: r.link }), "parse") }, [r.linkBareUrlDetector]: { match: Me((e2, t2) => t2.inAnchor || i2.disableAutoLink ? null : Re(D)(e2, t2)), order: 0, parse: /* @__PURE__ */ __name((e2) => ({ children: [{ text: e2[1], type: r.text }], target: e2[1], title: void 0, type: r.link }), "parse") }, [r.linkMailtoDetector]: { match: Re(U), order: 0, parse(e2) {
1799
- let t2 = e2[1], n3 = e2[1];
1800
- return d.test(n3) || (n3 = "mailto:" + n3), { children: [{ text: t2.replace("mailto:", ""), type: r.text }], target: n3, type: r.link };
1801
- } }, [r.orderedList]: Ce(u2, 1), [r.unorderedList]: Ce(u2, 2), [r.newlineCoalescer]: { match: De(b), order: 3, parse: Ze, render: /* @__PURE__ */ __name(() => "\n", "render") }, [r.paragraph]: { match: Me(Ne), order: 3, parse: Ge, render: /* @__PURE__ */ __name((e2, t2, n3) => u2("p", { key: n3.key }, t2(e2.children, n3)), "render") }, [r.ref]: { match: Re(P), order: 0, parse: /* @__PURE__ */ __name((e2) => (V2[e2[1]] = { target: e2[2], title: e2[4] }, {}), "parse"), render: qe }, [r.refImage]: { match: Ie(_), order: 0, parse: /* @__PURE__ */ __name((e2) => ({ alt: e2[1] || void 0, ref: e2[2] }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => V2[e2.ref] ? u2("img", { key: n3.key, alt: e2.alt, src: i2.sanitizer(V2[e2.ref].target, "img", "src"), title: V2[e2.ref].title }) : null, "render") }, [r.refLink]: { match: Re(F), order: 0, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: t2(e2[1], n3), fallbackChildren: e2[0], ref: e2[2] }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => V2[e2.ref] ? u2("a", { key: n3.key, href: i2.sanitizer(V2[e2.ref].target, "a", "href"), title: V2[e2.ref].title }, t2(e2.children, n3)) : u2("span", { key: n3.key }, e2.fallbackChildren), "render") }, [r.table]: { match: De(H), order: 1, parse: Te, render(e2, t2, n3) {
1802
- const r2 = e2;
1803
- return u2("table", { key: n3.key }, u2("thead", null, u2("tr", null, r2.header.map(function(e3, i3) {
1804
- return u2("th", { key: i3, style: Be(r2, i3) }, t2(e3, n3));
1805
- }))), u2("tbody", null, r2.cells.map(function(e3, i3) {
1806
- return u2("tr", { key: i3 }, e3.map(function(e4, i4) {
1807
- return u2("td", { key: i4, style: Be(r2, i4) }, t2(e4, n3));
2718
+ __name(oe2, "oe");
2719
+ const ue2 = [], le2 = {}, se2 = { 0: { t: [">"], o: Me(f), i: 1, u(e2, n2, r3) {
2720
+ const [, t2, o2] = e2[0].replace(_, "").match(d);
2721
+ return { alert: t2, children: n2(o2, r3) };
2722
+ }, l(e2, n2, r3) {
2723
+ const t2 = { key: r3.key };
2724
+ return e2.alert && (t2.className = "markdown-alert-" + s2(e2.alert.toLowerCase(), Re), e2.children.unshift({ attrs: {}, children: [{ type: "27", text: e2.alert }], noInnerParse: true, type: "11", tag: "header" })), J2("blockquote", t2, n2(e2.children, r3));
2725
+ } }, 1: { o: we(p), i: 1, u: Ve, l: /* @__PURE__ */ __name((e2, n2, r3) => J2("br", { key: r3.key }), "l") }, 2: { t: /* @__PURE__ */ __name((e2) => {
2726
+ const n2 = e2[0];
2727
+ return "-" === n2 || "*" === n2 || "_" === n2;
2728
+ }, "t"), o: Me(y), i: 1, u: Ve, l: /* @__PURE__ */ __name((e2, n2, r3) => J2("hr", { key: r3.key }), "l") }, 3: { t: [" "], o: Me(g), i: 0, u: /* @__PURE__ */ __name((e2) => ({ lang: void 0, text: Pe(ze(e2[0].replace(/^ {4}/gm, ""))) }), "u"), l: /* @__PURE__ */ __name((e2, r3, t2) => J2("pre", { key: t2.key }, J2("code", n({}, e2.attrs, { className: e2.lang ? "lang-" + e2.lang : "" }), e2.text)), "l") }, 4: { t: ["```", "~~~"], o: Me(h), i: 0, u: /* @__PURE__ */ __name((e2) => ({ attrs: oe2("code", e2[3] || ""), lang: e2[2] || void 0, text: e2[4], type: "3" }), "u") }, 5: { t: ["`"], o: Te(m), i: 3, u: /* @__PURE__ */ __name((e2) => ({ text: Pe(e2[2]) }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("code", { key: r3.key }, e2.text), "l") }, 6: { t: ["[^"], o: Me(v), i: 0, u: /* @__PURE__ */ __name((e2) => (ue2.push({ footnote: e2[2], identifier: e2[1] }), {}), "u"), l: He }, 7: { t: ["[^"], o: Ie(q), i: 1, u: /* @__PURE__ */ __name((e2) => ({ target: "#" + s2(e2[1], Re), text: e2[1] }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("a", { key: r3.key, href: V2(e2.target, "a", "href") }, J2("sup", { key: r3.key }, e2.text)), "l") }, 8: { t: ["[ ]", "[x]"], o: Ie(S), i: 1, u: /* @__PURE__ */ __name((e2) => ({ completed: "x" === e2[1].toLowerCase() }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("input", { checked: e2.completed, key: r3.key, readOnly: true, type: "checkbox" }), "l") }, 9: { t: ["#"], o: Me(t.enforceAtxHeadings ? E : z), i: 1, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: Ze(n2, e2[2], r3), id: s2(e2[2], Re), level: e2[1].length }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("h" + e2.level, { id: e2.id, key: r3.key }, n2(e2.children, r3)), "l") }, 10: { o: Me(A), i: 0, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: Ze(n2, e2[1], r3), level: "=" === e2[2] ? 1 : 2, type: "9" }), "u") }, 11: { t: ["<"], o: we(R), i: 1, u(e2, n2, r3) {
2729
+ const [, t2] = e2[3].match(ie), o2 = RegExp("^" + t2, "gm"), a2 = e2[3].replace(o2, ""), i2 = (u2 = a2, W2.some((e3) => e3.test(u2)) ? Ge : Ze);
2730
+ var u2;
2731
+ const l2 = e2[1].toLowerCase(), s3 = -1 !== c.indexOf(l2), f2 = (s3 ? l2 : e2[1]).trim(), _2 = { attrs: oe2(f2, e2[2]), noInnerParse: s3, tag: f2 };
2732
+ if (r3.inAnchor = r3.inAnchor || "a" === l2, s3) _2.text = e2[3];
2733
+ else {
2734
+ const e3 = r3.inHTML;
2735
+ r3.inHTML = true, _2.children = i2(n2, a2, r3), r3.inHTML = e3;
2736
+ }
2737
+ return r3.inAnchor = false, _2;
2738
+ }, l: /* @__PURE__ */ __name((e2, r3, t2) => J2(e2.tag, n({ key: t2.key }, e2.attrs), e2.text || (e2.children ? r3(e2.children, t2) : "")), "l") }, 13: { t: ["<"], o: we(j), i: 1, u(e2) {
2739
+ const n2 = e2[1].trim();
2740
+ return { attrs: oe2(n2, e2[2] || ""), tag: n2 };
2741
+ }, l: /* @__PURE__ */ __name((e2, r3, t2) => J2(e2.tag, n({}, e2.attrs, { key: t2.key })), "l") }, 12: { t: ["<!--"], o: we(L), i: 1, u: /* @__PURE__ */ __name(() => ({}), "u"), l: He }, 14: { t: ["!["], o: Te(Se), i: 1, u: /* @__PURE__ */ __name((e2) => ({ alt: Pe(e2[1]), target: Pe(e2[2]), title: Pe(e2[3]) }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("img", { key: r3.key, alt: e2.alt || void 0, title: e2.title || void 0, src: V2(e2.target, "img", "src") }), "l") }, 15: { t: ["["], o: Ie(be), i: 3, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: Ne(n2, e2[1], r3), target: Pe(e2[2]), title: Pe(e2[3]) }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("a", { key: r3.key, href: V2(e2.target, "a", "href"), title: e2.title }, n2(e2.children, r3)), "l") }, 16: { t: ["<"], o: Ie(M), i: 0, u: /* @__PURE__ */ __name((e2) => ({ children: [{ text: e2[1], type: "27" }], target: e2[1], type: "15" }), "u") }, 17: { t: /* @__PURE__ */ __name((e2, n2) => !n2.inAnchor && !t.disableAutoLink && (Ee(e2, "http://") || Ee(e2, "https://")), "t"), o: Ie(I), i: 0, u: /* @__PURE__ */ __name((e2) => ({ children: [{ text: e2[1], type: "27" }], target: e2[1], title: void 0, type: "15" }), "u") }, 18: { t: ["<"], o: Ie(T), i: 0, u(e2) {
2742
+ let n2 = e2[1], r3 = e2[1];
2743
+ return l.test(r3) || (r3 = "mailto:" + r3), { children: [{ text: n2.replace("mailto:", ""), type: "27" }], target: r3, type: "15" };
2744
+ } }, 20: $e(J2, 1), 33: $e(J2, 2), 19: { o: Me(k), i: 3, u: Ve, l: /* @__PURE__ */ __name(() => "\n", "l") }, 21: { o: Ce(function(e2, n2) {
2745
+ if (n2.inline || n2.simple || n2.inHTML && -1 === e2.indexOf("\n\n") && -1 === n2.prevCapture.indexOf("\n\n")) return null;
2746
+ let r3 = "";
2747
+ e2.split("\n").every((e3) => (e3 += "\n", !Q2.some((n3) => n3.test(e3)) && (r3 += e3, !!e3.trim())));
2748
+ const t2 = ze(r3);
2749
+ return "" === t2 ? null : [r3, , t2];
2750
+ }), i: 3, u: Ue, l: /* @__PURE__ */ __name((e2, n2, r3) => J2("p", { key: r3.key }, n2(e2.children, r3)), "l") }, 22: { t: ["["], o: Ie(P), i: 0, u: /* @__PURE__ */ __name((e2) => (le2[e2[1]] = { target: e2[2], title: e2[4] }, {}), "u"), l: He }, 23: { t: ["!["], o: Te(Z), i: 0, u: /* @__PURE__ */ __name((e2) => ({ alt: e2[1] ? Pe(e2[1]) : void 0, ref: e2[2] }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => le2[e2.ref] ? J2("img", { key: r3.key, alt: e2.alt, src: V2(le2[e2.ref].target, "img", "src"), title: le2[e2.ref].title }) : null, "l") }, 24: { t: /* @__PURE__ */ __name((e2) => "[" === e2[0] && -1 === e2.indexOf("]("), "t"), o: Ie(N), i: 0, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: n2(e2[1], r3), fallbackChildren: e2[0], ref: e2[2] }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => le2[e2.ref] ? J2("a", { key: r3.key, href: V2(le2[e2.ref].target, "a", "href"), title: le2[e2.ref].title }, n2(e2.children, r3)) : J2("span", { key: r3.key }, e2.fallbackChildren), "l") }, 25: { t: ["|"], o: Me(D), i: 1, u: Oe, l(e2, n2, r3) {
2751
+ const t2 = e2;
2752
+ return J2("table", { key: r3.key }, J2("thead", null, J2("tr", null, t2.header.map(function(e3, o2) {
2753
+ return J2("th", { key: o2, style: je(t2, o2) }, n2(e3, r3));
2754
+ }))), J2("tbody", null, t2.cells.map(function(e3, o2) {
2755
+ return J2("tr", { key: o2 }, e3.map(function(e4, o3) {
2756
+ return J2("td", { key: o3, style: je(t2, o3) }, n2(e4, r3));
1808
2757
  }));
1809
2758
  })));
1810
- } }, [r.text]: { match: Ue(re), order: 4, parse: /* @__PURE__ */ __name((e2) => ({ text: e2[0].replace(T, (e3, t2) => i2.namedCodesToUnicode[t2] ? i2.namedCodesToUnicode[t2] : e3) }), "parse"), render: /* @__PURE__ */ __name((e2) => e2.text, "render") }, [r.textBolded]: { match: Ie(J), order: 2, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: t2(e2[2], n3) }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("strong", { key: n3.key }, t2(e2.children, n3)), "render") }, [r.textEmphasized]: { match: Ie(K), order: 3, parse: /* @__PURE__ */ __name((e2, t2, n3) => ({ children: t2(e2[2], n3) }), "parse"), render: /* @__PURE__ */ __name((e2, t2, n3) => u2("em", { key: n3.key }, t2(e2.children, n3)), "render") }, [r.textEscaped]: { match: Ie(te), order: 1, parse: /* @__PURE__ */ __name((e2) => ({ text: e2[1], type: r.text }), "parse") }, [r.textMarked]: { match: Ie(Y), order: 3, parse: Ge, render: /* @__PURE__ */ __name((e2, t2, n3) => u2("mark", { key: n3.key }, t2(e2.children, n3)), "render") }, [r.textStrikethroughed]: { match: Ie(ee), order: 3, parse: Ge, render: /* @__PURE__ */ __name((e2, t2, n3) => u2("del", { key: n3.key }, t2(e2.children, n3)), "render") } };
1811
- true === i2.disableParsingRawHTML && (delete X2[r.htmlBlock], delete X2[r.htmlSelfClosing]);
1812
- const oe2 = function(e2) {
1813
- let t2 = Object.keys(e2);
1814
- function n3(r2, i3) {
1815
- let l2, o2, a2 = [], c2 = "", s2 = "";
1816
- for (i3.prevCapture = i3.prevCapture || ""; r2; ) {
1817
- let d2 = 0;
1818
- for (; d2 < t2.length; ) {
1819
- if (c2 = t2[d2], l2 = e2[c2], i3.inline && !l2.match.inline) {
1820
- d2++;
1821
- continue;
1822
- }
1823
- const u3 = l2.match(r2, i3);
1824
- if (u3) {
1825
- s2 = u3[0], i3.prevCapture += s2, r2 = r2.substring(s2.length), o2 = l2.parse(u3, n3, i3), null == o2.type && (o2.type = c2), a2.push(o2);
2759
+ } }, 27: { o: Ce(function(e2, n2) {
2760
+ let r3;
2761
+ return Ee(e2, ":") && (r3 = re.exec(e2)), r3 || ae.exec(e2);
2762
+ }), i: 4, u(e2) {
2763
+ const n2 = e2[0];
2764
+ return { text: -1 === n2.indexOf("&") ? n2 : n2.replace(B, (e3, n3) => t.namedCodesToUnicode[n3] || e3) };
2765
+ }, l: /* @__PURE__ */ __name((e2) => e2.text, "l") }, 28: { t: ["**", "__"], o: Te(X), i: 2, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: n2(e2[2], r3) }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("strong", { key: r3.key }, n2(e2.children, r3)), "l") }, 29: { t: /* @__PURE__ */ __name((e2) => {
2766
+ const n2 = e2[0];
2767
+ return ("*" === n2 || "_" === n2) && e2[1] !== n2;
2768
+ }, "t"), o: Te(Y), i: 3, u: /* @__PURE__ */ __name((e2, n2, r3) => ({ children: n2(e2[2], r3) }), "u"), l: /* @__PURE__ */ __name((e2, n2, r3) => J2("em", { key: r3.key }, n2(e2.children, r3)), "l") }, 30: { t: ["\\"], o: Te(te), i: 1, u: /* @__PURE__ */ __name((e2) => ({ text: e2[1], type: "27" }), "u") }, 31: { t: ["=="], o: Te(ee), i: 3, u: Ue, l: /* @__PURE__ */ __name((e2, n2, r3) => J2("mark", { key: r3.key }, n2(e2.children, r3)), "l") }, 32: { t: ["~~"], o: Te(ne), i: 3, u: Ue, l: /* @__PURE__ */ __name((e2, n2, r3) => J2("del", { key: r3.key }, n2(e2.children, r3)), "l") } };
2769
+ true === t.disableParsingRawHTML && (delete se2[11], delete se2[13]);
2770
+ const fe2 = function(e2) {
2771
+ var n2 = Object.keys(e2);
2772
+ function r3(t2, o2) {
2773
+ var a2 = [];
2774
+ if (o2.prevCapture = o2.prevCapture || "", t2.trim()) for (; t2; ) for (var c2 = 0; c2 < n2.length; ) {
2775
+ var i2 = n2[c2], u2 = e2[i2];
2776
+ if (!u2.t || Ae(t2, o2, u2.t)) {
2777
+ var l2 = u2.o(t2, o2);
2778
+ if (l2 && l2[0]) {
2779
+ t2 = t2.substring(l2[0].length);
2780
+ var s3 = u2.u(l2, r3, o2);
2781
+ o2.prevCapture += l2[0], s3.type || (s3.type = i2), a2.push(s3);
1826
2782
  break;
1827
2783
  }
1828
- d2++;
1829
- }
2784
+ c2++;
2785
+ } else c2++;
1830
2786
  }
1831
- return i3.prevCapture = "", a2;
1832
- }
1833
- __name(n3, "n");
1834
- return t2.sort(function(t3, n4) {
1835
- let r2 = e2[t3].order, i3 = e2[n4].order;
1836
- return r2 !== i3 ? r2 - i3 : t3 < n4 ? -1 : 1;
1837
- }), function(e3, t3) {
1838
- return n3(function(e4) {
1839
- return e4.replace(v, "\n").replace(S, "").replace(G, " ");
1840
- }(e3), t3);
2787
+ return o2.prevCapture = "", a2;
2788
+ }
2789
+ __name(r3, "r");
2790
+ return n2.sort(function(n3, r4) {
2791
+ return e2[n3].i - e2[r4].i || (n3 < r4 ? -1 : 1);
2792
+ }), function(e3, n3) {
2793
+ return r3(function(e4) {
2794
+ return e4.replace(x, "\n").replace($, "").replace(U, " ");
2795
+ }(e3), n3);
1841
2796
  };
1842
- }(X2), ae2 = (ce2 = /* @__PURE__ */ function(e2, t2) {
1843
- return function(n3, r2, i3) {
1844
- const l2 = e2[n3.type].render;
1845
- return t2 ? t2(() => l2(n3, r2, i3), n3, r2, i3) : l2(n3, r2, i3);
2797
+ }(se2), _e2 = (de2 = /* @__PURE__ */ function(e2, n2) {
2798
+ return function(r3, t2, o2) {
2799
+ const a2 = e2[r3.type].l;
2800
+ return n2 ? n2(() => a2(r3, t2, o2), r3, t2, o2) : a2(r3, t2, o2);
1846
2801
  };
1847
- }(X2, i2.renderRule), /* @__PURE__ */ __name(function e2(t2, n3 = {}) {
1848
- if (Array.isArray(t2)) {
1849
- const r2 = n3.key, i3 = [];
1850
- let l2 = false;
1851
- for (let r3 = 0; r3 < t2.length; r3++) {
1852
- n3.key = r3;
1853
- const o2 = e2(t2[r3], n3), a2 = "string" == typeof o2;
1854
- a2 && l2 ? i3[i3.length - 1] += o2 : null !== o2 && i3.push(o2), l2 = a2;
1855
- }
1856
- return n3.key = r2, i3;
1857
- }
1858
- return ce2(t2, e2, n3);
2802
+ }(se2, t.renderRule), /* @__PURE__ */ __name(function e2(n2, r3 = {}) {
2803
+ if (Array.isArray(n2)) {
2804
+ const t2 = r3.key, o2 = [];
2805
+ let a2 = false;
2806
+ for (let t3 = 0; t3 < n2.length; t3++) {
2807
+ r3.key = t3;
2808
+ const c2 = e2(n2[t3], r3), i2 = "string" == typeof c2;
2809
+ i2 && a2 ? o2[o2.length - 1] += c2 : null !== c2 && o2.push(c2), a2 = i2;
2810
+ }
2811
+ return r3.key = t2, o2;
2812
+ }
2813
+ return de2(n2, e2, r3);
1859
2814
  }, "e"));
1860
- var ce2;
1861
- const se2 = Z2(n2);
1862
- return Q2.length ? u2("div", null, se2, u2("footer", { key: "footer" }, Q2.map(function(e2) {
1863
- return u2("div", { id: i2.slugify(e2.identifier, Le), key: e2.identifier }, e2.identifier, ae2(oe2(e2.footnote, { inline: true })));
1864
- }))) : se2;
2815
+ var de2;
2816
+ const pe2 = K2(r2);
2817
+ return ue2.length ? J2("div", null, pe2, J2("footer", { key: "footer" }, ue2.map(function(e2) {
2818
+ return J2("div", { id: s2(e2.identifier, Re), key: e2.identifier }, e2.identifier, _e2(fe2(e2.footnote, { inline: true })));
2819
+ }))) : pe2;
1865
2820
  }
1866
- __name(Xe, "Xe");
1867
- var index_modern_default = /* @__PURE__ */ __name((t2) => {
1868
- let { children: r2 = "", options: i2 } = t2, l2 = function(e2, t3) {
2821
+ __name(Je, "Je");
2822
+ var index_modern_default = /* @__PURE__ */ __name((n2) => {
2823
+ let { children: t = "", options: o2 } = n2, a2 = function(e2, n3) {
1869
2824
  if (null == e2) return {};
1870
- var n2, r3, i3 = {}, l3 = Object.keys(e2);
1871
- for (r3 = 0; r3 < l3.length; r3++) t3.indexOf(n2 = l3[r3]) >= 0 || (i3[n2] = e2[n2]);
1872
- return i3;
1873
- }(t2, n);
1874
- return e.cloneElement(Xe(r2, i2), l2);
2825
+ var r2, t2, o3 = {}, a3 = Object.keys(e2);
2826
+ for (t2 = 0; t2 < a3.length; t2++) n3.indexOf(r2 = a3[t2]) >= 0 || (o3[r2] = e2[r2]);
2827
+ return o3;
2828
+ }(n2, r);
2829
+ return e.cloneElement(Je(t, o2), a2);
1875
2830
  }, "default");
1876
2831
 
1877
2832
  // src/blocks/components/ArgsTable/ArgRow.tsx
1878
2833
  import { styled as styled22 } from "storybook/theming";
1879
2834
 
1880
2835
  // src/blocks/components/ArgsTable/ArgControl.tsx
1881
- import React26, { useCallback as useCallback6, useEffect as useEffect8, useState as useState8 } from "react";
2836
+ import React27, { useCallback as useCallback6, useEffect as useEffect9, useState as useState9 } from "react";
1882
2837
  import { Link } from "storybook/internal/components";
1883
2838
 
1884
2839
  // src/blocks/controls/index.tsx
1885
- import React25, { Suspense, lazy } from "react";
2840
+ import React26, { Suspense, lazy } from "react";
1886
2841
 
1887
2842
  // src/blocks/controls/Boolean.tsx
1888
- import React11, { useCallback as useCallback2 } from "react";
2843
+ import React12, { useCallback as useCallback2 } from "react";
1889
2844
  import { Button } from "storybook/internal/components";
1890
2845
  import { styled as styled9 } from "storybook/theming";
1891
2846
  var Label2 = styled9.label(({ theme }) => ({
@@ -1976,7 +2931,7 @@ var BooleanControl = /* @__PURE__ */ __name(({
1976
2931
  const onSetFalse = useCallback2(() => onChange(false), [onChange]);
1977
2932
  const readonly = !!argType?.table?.readonly;
1978
2933
  if (value2 === void 0) {
1979
- return React11.createElement(
2934
+ return React12.createElement(
1980
2935
  Button,
1981
2936
  {
1982
2937
  variant: "outline",
@@ -1990,7 +2945,7 @@ var BooleanControl = /* @__PURE__ */ __name(({
1990
2945
  }
1991
2946
  const controlId = getControlId(name);
1992
2947
  const parsedValue = typeof value2 === "string" ? parse(value2) : value2;
1993
- return React11.createElement(Label2, { "aria-disabled": readonly, htmlFor: controlId, "aria-label": name }, React11.createElement(
2948
+ return React12.createElement(Label2, { "aria-disabled": readonly, htmlFor: controlId, "aria-label": name }, React12.createElement(
1994
2949
  "input",
1995
2950
  {
1996
2951
  id: controlId,
@@ -2001,11 +2956,11 @@ var BooleanControl = /* @__PURE__ */ __name(({
2001
2956
  disabled: readonly,
2002
2957
  ...{ name, onBlur, onFocus }
2003
2958
  }
2004
- ), React11.createElement("span", { "aria-hidden": "true" }, "False"), React11.createElement("span", { "aria-hidden": "true" }, "True"));
2959
+ ), React12.createElement("span", { "aria-hidden": "true" }, "False"), React12.createElement("span", { "aria-hidden": "true" }, "True"));
2005
2960
  }, "BooleanControl");
2006
2961
 
2007
2962
  // src/blocks/controls/Date.tsx
2008
- import React12, { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
2963
+ import React13, { useEffect as useEffect4, useRef as useRef2, useState as useState4 } from "react";
2009
2964
  import { Form } from "storybook/internal/components";
2010
2965
  import { styled as styled10 } from "storybook/theming";
2011
2966
  var parseDate = /* @__PURE__ */ __name((value2) => {
@@ -2060,11 +3015,11 @@ var FlexSpaced = styled10.div(({ theme }) => ({
2060
3015
  }
2061
3016
  }));
2062
3017
  var DateControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, onFocus, onBlur, argType }) => {
2063
- const [valid, setValid] = useState3(true);
3018
+ const [valid, setValid] = useState4(true);
2064
3019
  const dateRef = useRef2();
2065
3020
  const timeRef = useRef2();
2066
3021
  const readonly = !!argType?.table?.readonly;
2067
- useEffect3(() => {
3022
+ useEffect4(() => {
2068
3023
  if (valid !== false) {
2069
3024
  if (dateRef && dateRef.current) {
2070
3025
  dateRef.current.value = value2 ? formatDate(value2) : "";
@@ -2102,7 +3057,7 @@ var DateControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, onFoc
2102
3057
  setValid(!!time);
2103
3058
  }, "onTimeChange");
2104
3059
  const controlId = getControlId(name);
2105
- return React12.createElement(FlexSpaced, null, React12.createElement(
3060
+ return React13.createElement(FlexSpaced, null, React13.createElement(
2106
3061
  FormInput,
2107
3062
  {
2108
3063
  type: "date",
@@ -2114,7 +3069,7 @@ var DateControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, onFoc
2114
3069
  onChange: onDateChange,
2115
3070
  ...{ onFocus, onBlur }
2116
3071
  }
2117
- ), React12.createElement(
3072
+ ), React13.createElement(
2118
3073
  FormInput,
2119
3074
  {
2120
3075
  type: "time",
@@ -2125,11 +3080,11 @@ var DateControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, onFoc
2125
3080
  readOnly: readonly,
2126
3081
  ...{ onFocus, onBlur }
2127
3082
  }
2128
- ), !valid ? React12.createElement("div", null, "invalid") : null);
3083
+ ), !valid ? React13.createElement("div", null, "invalid") : null);
2129
3084
  }, "DateControl");
2130
3085
 
2131
3086
  // src/blocks/controls/Number.tsx
2132
- import React13, { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "react";
3087
+ import React14, { useCallback as useCallback3, useEffect as useEffect5, useRef as useRef3, useState as useState5 } from "react";
2133
3088
  import { Button as Button2, Form as Form2 } from "storybook/internal/components";
2134
3089
  import { styled as styled11 } from "storybook/theming";
2135
3090
  var Wrapper3 = styled11.label({
@@ -2154,9 +3109,9 @@ var NumberControl = /* @__PURE__ */ __name(({
2154
3109
  onFocus,
2155
3110
  argType
2156
3111
  }) => {
2157
- const [inputValue, setInputValue] = useState4(typeof value2 === "number" ? value2 : "");
2158
- const [forceVisible, setForceVisible] = useState4(false);
2159
- const [parseError, setParseError] = useState4(null);
3112
+ const [inputValue, setInputValue] = useState5(typeof value2 === "number" ? value2 : "");
3113
+ const [forceVisible, setForceVisible] = useState5(false);
3114
+ const [parseError, setParseError] = useState5(null);
2160
3115
  const readonly = !!argType?.table?.readonly;
2161
3116
  const handleChange = useCallback3(
2162
3117
  (event) => {
@@ -2177,19 +3132,19 @@ var NumberControl = /* @__PURE__ */ __name(({
2177
3132
  setForceVisible(true);
2178
3133
  }, [setForceVisible]);
2179
3134
  const htmlElRef = useRef3(null);
2180
- useEffect4(() => {
3135
+ useEffect5(() => {
2181
3136
  if (forceVisible && htmlElRef.current) {
2182
3137
  htmlElRef.current.select();
2183
3138
  }
2184
3139
  }, [forceVisible]);
2185
- useEffect4(() => {
3140
+ useEffect5(() => {
2186
3141
  const newInputValue = typeof value2 === "number" ? value2 : "";
2187
3142
  if (inputValue !== newInputValue) {
2188
3143
  setInputValue(newInputValue);
2189
3144
  }
2190
3145
  }, [value2]);
2191
3146
  if (value2 === void 0) {
2192
- return React13.createElement(
3147
+ return React14.createElement(
2193
3148
  Button2,
2194
3149
  {
2195
3150
  variant: "outline",
@@ -2201,7 +3156,7 @@ var NumberControl = /* @__PURE__ */ __name(({
2201
3156
  "Set number"
2202
3157
  );
2203
3158
  }
2204
- return React13.createElement(Wrapper3, null, React13.createElement(
3159
+ return React14.createElement(Wrapper3, null, React14.createElement(
2205
3160
  FormInput2,
2206
3161
  {
2207
3162
  ref: htmlElRef,
@@ -2220,10 +3175,10 @@ var NumberControl = /* @__PURE__ */ __name(({
2220
3175
  }, "NumberControl");
2221
3176
 
2222
3177
  // src/blocks/controls/options/Options.tsx
2223
- import React17 from "react";
3178
+ import React18 from "react";
2224
3179
 
2225
3180
  // src/blocks/controls/options/Checkbox.tsx
2226
- import React14, { useEffect as useEffect5, useState as useState5 } from "react";
3181
+ import React15, { useEffect as useEffect6, useState as useState6 } from "react";
2227
3182
  import { logger } from "storybook/internal/client-logger";
2228
3183
  import { styled as styled12 } from "storybook/theming";
2229
3184
 
@@ -2287,10 +3242,10 @@ var CheckboxControl = /* @__PURE__ */ __name(({
2287
3242
  }) => {
2288
3243
  if (!options) {
2289
3244
  logger.warn(`Checkbox with no options: ${name}`);
2290
- return React14.createElement(React14.Fragment, null, "-");
3245
+ return React15.createElement(React15.Fragment, null, "-");
2291
3246
  }
2292
3247
  const initial = selectedKeys(value2 || [], options);
2293
- const [selected, setSelected] = useState5(initial);
3248
+ const [selected, setSelected] = useState6(initial);
2294
3249
  const readonly = !!argType?.table?.readonly;
2295
3250
  const handleChange = /* @__PURE__ */ __name((e2) => {
2296
3251
  const option = e2.target.value;
@@ -2303,13 +3258,13 @@ var CheckboxControl = /* @__PURE__ */ __name(({
2303
3258
  onChange(selectedValues(updated, options));
2304
3259
  setSelected(updated);
2305
3260
  }, "handleChange");
2306
- useEffect5(() => {
3261
+ useEffect6(() => {
2307
3262
  setSelected(selectedKeys(value2 || [], options));
2308
3263
  }, [value2]);
2309
3264
  const controlId = getControlId(name);
2310
- return React14.createElement(Wrapper4, { "aria-readonly": readonly, isInline }, Object.keys(options).map((key, index) => {
3265
+ return React15.createElement(Wrapper4, { "aria-readonly": readonly, isInline }, Object.keys(options).map((key, index) => {
2311
3266
  const id = `${controlId}-${index}`;
2312
- return React14.createElement(Label3, { key: id, htmlFor: id }, React14.createElement(
3267
+ return React15.createElement(Label3, { key: id, htmlFor: id }, React15.createElement(
2313
3268
  "input",
2314
3269
  {
2315
3270
  type: "checkbox",
@@ -2320,12 +3275,12 @@ var CheckboxControl = /* @__PURE__ */ __name(({
2320
3275
  onChange: handleChange,
2321
3276
  checked: selected?.includes(key)
2322
3277
  }
2323
- ), React14.createElement(Text, null, key));
3278
+ ), React15.createElement(Text, null, key));
2324
3279
  }));
2325
3280
  }, "CheckboxControl");
2326
3281
 
2327
3282
  // src/blocks/controls/options/Radio.tsx
2328
- import React15 from "react";
3283
+ import React16 from "react";
2329
3284
  import { logger as logger2 } from "storybook/internal/client-logger";
2330
3285
  import { styled as styled13 } from "storybook/theming";
2331
3286
  var Wrapper5 = styled13.div(
@@ -2379,14 +3334,14 @@ var RadioControl = /* @__PURE__ */ __name(({
2379
3334
  }) => {
2380
3335
  if (!options) {
2381
3336
  logger2.warn(`Radio with no options: ${name}`);
2382
- return React15.createElement(React15.Fragment, null, "-");
3337
+ return React16.createElement(React16.Fragment, null, "-");
2383
3338
  }
2384
3339
  const selection = selectedKey(value2, options);
2385
3340
  const controlId = getControlId(name);
2386
3341
  const readonly = !!argType?.table?.readonly;
2387
- return React15.createElement(Wrapper5, { "aria-readonly": readonly, isInline }, Object.keys(options).map((key, index) => {
3342
+ return React16.createElement(Wrapper5, { "aria-readonly": readonly, isInline }, Object.keys(options).map((key, index) => {
2388
3343
  const id = `${controlId}-${index}`;
2389
- return React15.createElement(Label4, { key: id, htmlFor: id }, React15.createElement(
3344
+ return React16.createElement(Label4, { key: id, htmlFor: id }, React16.createElement(
2390
3345
  "input",
2391
3346
  {
2392
3347
  type: "radio",
@@ -2397,12 +3352,12 @@ var RadioControl = /* @__PURE__ */ __name(({
2397
3352
  onChange: (e2) => onChange(options[e2.currentTarget.value]),
2398
3353
  checked: key === selection
2399
3354
  }
2400
- ), React15.createElement(Text2, null, key));
3355
+ ), React16.createElement(Text2, null, key));
2401
3356
  }));
2402
3357
  }, "RadioControl");
2403
3358
 
2404
3359
  // src/blocks/controls/options/Select.tsx
2405
- import React16 from "react";
3360
+ import React17 from "react";
2406
3361
  import { logger as logger3 } from "storybook/internal/client-logger";
2407
3362
  import { ChevronSmallDownIcon } from "@storybook/icons";
2408
3363
  import { styled as styled14 } from "storybook/theming";
@@ -2480,7 +3435,7 @@ var SingleSelect = /* @__PURE__ */ __name(({ name, value: value2, options, onCha
2480
3435
  const selection = selectedKey(value2, options) || NO_SELECTION;
2481
3436
  const controlId = getControlId(name);
2482
3437
  const readonly = !!argType?.table?.readonly;
2483
- return React16.createElement(SelectWrapper, null, React16.createElement(ChevronSmallDownIcon, null), React16.createElement(OptionsSelect, { disabled: readonly, id: controlId, value: selection, onChange: handleChange }, React16.createElement("option", { key: "no-selection", disabled: true }, NO_SELECTION), Object.keys(options).map((key) => React16.createElement("option", { key, value: key }, key))));
3438
+ return React17.createElement(SelectWrapper, null, React17.createElement(ChevronSmallDownIcon, null), React17.createElement(OptionsSelect, { disabled: readonly, id: controlId, value: selection, onChange: handleChange }, React17.createElement("option", { key: "no-selection", disabled: true }, NO_SELECTION), Object.keys(options).map((key) => React17.createElement("option", { key, value: key }, key))));
2484
3439
  }, "SingleSelect");
2485
3440
  var MultiSelect = /* @__PURE__ */ __name(({ name, value: value2, options, onChange, argType }) => {
2486
3441
  const handleChange = /* @__PURE__ */ __name((e2) => {
@@ -2490,7 +3445,7 @@ var MultiSelect = /* @__PURE__ */ __name(({ name, value: value2, options, onChan
2490
3445
  const selection = selectedKeys(value2, options);
2491
3446
  const controlId = getControlId(name);
2492
3447
  const readonly = !!argType?.table?.readonly;
2493
- return React16.createElement(SelectWrapper, null, React16.createElement(
3448
+ return React17.createElement(SelectWrapper, null, React17.createElement(
2494
3449
  OptionsSelect,
2495
3450
  {
2496
3451
  disabled: readonly,
@@ -2499,16 +3454,16 @@ var MultiSelect = /* @__PURE__ */ __name(({ name, value: value2, options, onChan
2499
3454
  value: selection,
2500
3455
  onChange: handleChange
2501
3456
  },
2502
- Object.keys(options).map((key) => React16.createElement("option", { key, value: key }, key))
3457
+ Object.keys(options).map((key) => React17.createElement("option", { key, value: key }, key))
2503
3458
  ));
2504
3459
  }, "MultiSelect");
2505
3460
  var SelectControl = /* @__PURE__ */ __name((props) => {
2506
3461
  const { name, options } = props;
2507
3462
  if (!options) {
2508
3463
  logger3.warn(`Select with no options: ${name}`);
2509
- return React16.createElement(React16.Fragment, null, "-");
3464
+ return React17.createElement(React17.Fragment, null, "-");
2510
3465
  }
2511
- return props.isMulti ? React16.createElement(MultiSelect, { ...props }) : React16.createElement(SingleSelect, { ...props });
3466
+ return props.isMulti ? React17.createElement(MultiSelect, { ...props }) : React17.createElement(SingleSelect, { ...props });
2512
3467
  }, "SelectControl");
2513
3468
 
2514
3469
  // src/blocks/controls/options/Options.tsx
@@ -2540,25 +3495,25 @@ var OptionsControl = /* @__PURE__ */ __name((props) => {
2540
3495
  };
2541
3496
  const Control = Controls[type];
2542
3497
  if (Control) {
2543
- return React17.createElement(Control, { ...normalized });
3498
+ return React18.createElement(Control, { ...normalized });
2544
3499
  }
2545
3500
  throw new Error(`Unknown options type: ${type}`);
2546
3501
  }, "OptionsControl");
2547
3502
 
2548
3503
  // src/blocks/controls/Object.tsx
2549
- import React21, { useCallback as useCallback4, useEffect as useEffect6, useMemo, useRef as useRef4, useState as useState6 } from "react";
3504
+ import React22, { useCallback as useCallback4, useEffect as useEffect7, useMemo, useRef as useRef4, useState as useState7 } from "react";
2550
3505
  import { Button as Button3, Form as Form3, IconButton as IconButton2 } from "storybook/internal/components";
2551
3506
  import { AddIcon, EyeCloseIcon, EyeIcon, SubtractIcon } from "@storybook/icons";
2552
3507
  import { styled as styled16, useTheme } from "storybook/theming";
2553
3508
 
2554
3509
  // src/blocks/controls/react-editable-json-tree/index.tsx
2555
- import React20, { Component as Component3 } from "react";
3510
+ import React21, { Component as Component3 } from "react";
2556
3511
 
2557
3512
  // src/blocks/controls/react-editable-json-tree/JsonNodes.tsx
2558
- import React19, { Component as Component2, cloneElement as cloneElement2 } from "react";
3513
+ import React20, { Component as Component2, cloneElement as cloneElement2 } from "react";
2559
3514
 
2560
3515
  // src/blocks/controls/react-editable-json-tree/JsonNodeAccordion.tsx
2561
- import React18 from "react";
3516
+ import React19 from "react";
2562
3517
  import { styled as styled15 } from "storybook/theming";
2563
3518
  var Container = styled15.div(({ theme }) => ({
2564
3519
  position: "relative",
@@ -2629,7 +3584,7 @@ function JsonNodeAccordion({
2629
3584
  region: `${accordionKey}-region`
2630
3585
  };
2631
3586
  const containerTag = keyPath.length > 0 ? "li" : "div";
2632
- return React18.createElement(Container, { as: containerTag }, React18.createElement(
3587
+ return React19.createElement(Container, { as: containerTag }, React19.createElement(
2633
3588
  Trigger,
2634
3589
  {
2635
3590
  type: "button",
@@ -2641,7 +3596,7 @@ function JsonNodeAccordion({
2641
3596
  },
2642
3597
  name,
2643
3598
  " :"
2644
- ), React18.createElement(
3599
+ ), React19.createElement(
2645
3600
  Region,
2646
3601
  {
2647
3602
  role: "region",
@@ -2785,15 +3740,15 @@ var _JsonAddValue = class _JsonAddValue extends Component2 {
2785
3740
  onKeyDown: this.onKeydown
2786
3741
  });
2787
3742
  }
2788
- return React19.createElement("span", { className: "rejt-add-value-node" }, inputElementKeyLayout, inputElementValueLayout, addButtonElementLayout, cancelButtonElementLayout);
3743
+ return React20.createElement("span", { className: "rejt-add-value-node" }, inputElementKeyLayout, inputElementValueLayout, addButtonElementLayout, cancelButtonElementLayout);
2789
3744
  }
2790
3745
  };
2791
3746
  __name(_JsonAddValue, "JsonAddValue");
2792
3747
  var JsonAddValue = _JsonAddValue;
2793
3748
  JsonAddValue.defaultProps = {
2794
3749
  onlyValue: false,
2795
- addButtonElement: React19.createElement("button", null, "+"),
2796
- cancelButtonElement: React19.createElement("button", null, "c")
3750
+ addButtonElement: React20.createElement("button", null, "+"),
3751
+ cancelButtonElement: React20.createElement("button", null, "c")
2797
3752
  };
2798
3753
  var _JsonArray = class _JsonArray extends Component2 {
2799
3754
  constructor(props) {
@@ -2862,9 +3817,10 @@ var _JsonArray = class _JsonArray extends Component2 {
2862
3817
  }).catch(logger4.error);
2863
3818
  };
2864
3819
  }
2865
- handleAddValueAdd({ key, newValue }) {
3820
+ handleAddValueAdd({ newValue }) {
2866
3821
  const { data, keyPath = [], nextDeep: deep } = this.state;
2867
3822
  const { beforeAddAction, logger: logger4 } = this.props;
3823
+ const key = data.length;
2868
3824
  (beforeAddAction || Promise.resolve.bind(Promise))(key, keyPath, deep, newValue).then(() => {
2869
3825
  data[key] = newValue;
2870
3826
  this.setState({
@@ -2922,7 +3878,7 @@ var _JsonArray = class _JsonArray extends Component2 {
2922
3878
  style: minus,
2923
3879
  "aria-label": `remove the array '${String(name)}'`
2924
3880
  });
2925
- return React19.createElement(React19.Fragment, null, React19.createElement("span", { style: collapsed }, "[...] ", data.length, " ", data.length === 1 ? "item" : "items"), !isReadOnly && removeItemButton);
3881
+ return React20.createElement(React20.Fragment, null, React20.createElement("span", { style: collapsed }, "[...] ", data.length, " ", data.length === 1 ? "item" : "items"), !isReadOnly && removeItemButton);
2926
3882
  }
2927
3883
  renderNotCollapsed() {
2928
3884
  const { name, data, keyPath, deep, addFormVisible, nextDeep } = this.state;
@@ -2962,7 +3918,7 @@ var _JsonArray = class _JsonArray extends Component2 {
2962
3918
  const onlyValue = true;
2963
3919
  const startObject = "[";
2964
3920
  const endObject = "]";
2965
- return React19.createElement(React19.Fragment, null, React19.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, startObject), !addFormVisible && addItemButton, React19.createElement("ul", { className: "rejt-not-collapsed-list", style: ul }, data.map((item, index) => React19.createElement(
3921
+ return React20.createElement(React20.Fragment, null, React20.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, startObject), !addFormVisible && addItemButton, React20.createElement("ul", { className: "rejt-not-collapsed-list", style: ul }, data.map((item, index) => React20.createElement(
2966
3922
  JsonNode,
2967
3923
  {
2968
3924
  key: index,
@@ -2989,7 +3945,7 @@ var _JsonArray = class _JsonArray extends Component2 {
2989
3945
  logger: logger4,
2990
3946
  onSubmitValueParser
2991
3947
  }
2992
- ))), !isReadOnly && addFormVisible && React19.createElement("div", { className: "rejt-add-form", style: addForm }, React19.createElement(
3948
+ ))), !isReadOnly && addFormVisible && React20.createElement("div", { className: "rejt-add-form", style: addForm }, React20.createElement(
2993
3949
  JsonAddValue,
2994
3950
  {
2995
3951
  handleAdd: this.handleAddValueAdd,
@@ -3002,12 +3958,12 @@ var _JsonArray = class _JsonArray extends Component2 {
3002
3958
  deep,
3003
3959
  onSubmitValueParser
3004
3960
  }
3005
- )), React19.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, endObject), !isReadOnly && removeItemButton);
3961
+ )), React20.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, endObject), !isReadOnly && removeItemButton);
3006
3962
  }
3007
3963
  render() {
3008
3964
  const { name, collapsed, keyPath, deep } = this.state;
3009
3965
  const value2 = collapsed ? this.renderCollapsed() : this.renderNotCollapsed();
3010
- return React19.createElement(
3966
+ return React20.createElement(
3011
3967
  JsonNodeAccordion,
3012
3968
  {
3013
3969
  name,
@@ -3025,8 +3981,8 @@ var JsonArray = _JsonArray;
3025
3981
  JsonArray.defaultProps = {
3026
3982
  keyPath: [],
3027
3983
  deep: 0,
3028
- minusMenuElement: React19.createElement("span", null, " - "),
3029
- plusMenuElement: React19.createElement("span", null, " + ")
3984
+ minusMenuElement: React20.createElement("span", null, " - "),
3985
+ plusMenuElement: React20.createElement("span", null, " + ")
3030
3986
  };
3031
3987
  var _JsonFunctionValue = class _JsonFunctionValue extends Component2 {
3032
3988
  constructor(props) {
@@ -3131,10 +4087,10 @@ var _JsonFunctionValue = class _JsonFunctionValue extends Component2 {
3131
4087
  defaultValue: value2,
3132
4088
  onKeyDown: this.onKeydown
3133
4089
  });
3134
- result = React19.createElement("span", { className: "rejt-edit-form", style: style.editForm }, textareaElementLayout);
4090
+ result = React20.createElement("span", { className: "rejt-edit-form", style: style.editForm }, textareaElementLayout);
3135
4091
  minusElement = null;
3136
4092
  } else {
3137
- result = React19.createElement(
4093
+ result = React20.createElement(
3138
4094
  "span",
3139
4095
  {
3140
4096
  className: "rejt-value",
@@ -3152,7 +4108,7 @@ var _JsonFunctionValue = class _JsonFunctionValue extends Component2 {
3152
4108
  });
3153
4109
  minusElement = resultOnlyResult ? null : minusMenuLayout;
3154
4110
  }
3155
- return React19.createElement("li", { className: "rejt-value-node", style: style.li }, React19.createElement("span", { className: "rejt-name", style: style.name }, name, " :", " "), result, minusElement);
4111
+ return React20.createElement("li", { className: "rejt-value-node", style: style.li }, React20.createElement("span", { className: "rejt-name", style: style.name }, name, " :", " "), result, minusElement);
3156
4112
  }
3157
4113
  };
3158
4114
  __name(_JsonFunctionValue, "JsonFunctionValue");
@@ -3162,8 +4118,8 @@ JsonFunctionValue.defaultProps = {
3162
4118
  deep: 0,
3163
4119
  handleUpdateValue: /* @__PURE__ */ __name(() => {
3164
4120
  }, "handleUpdateValue"),
3165
- cancelButtonElement: React19.createElement("button", null, "c"),
3166
- minusMenuElement: React19.createElement("span", null, " - ")
4121
+ cancelButtonElement: React20.createElement("button", null, "c"),
4122
+ minusMenuElement: React20.createElement("span", null, " - ")
3167
4123
  };
3168
4124
  var _JsonNode = class _JsonNode extends Component2 {
3169
4125
  constructor(props) {
@@ -3204,7 +4160,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3204
4160
  const dataType = getObjectType(data);
3205
4161
  switch (dataType) {
3206
4162
  case ERROR:
3207
- return React19.createElement(
4163
+ return React20.createElement(
3208
4164
  JsonObject,
3209
4165
  {
3210
4166
  data,
@@ -3232,7 +4188,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3232
4188
  }
3233
4189
  );
3234
4190
  case OBJECT:
3235
- return React19.createElement(
4191
+ return React20.createElement(
3236
4192
  JsonObject,
3237
4193
  {
3238
4194
  data,
@@ -3260,7 +4216,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3260
4216
  }
3261
4217
  );
3262
4218
  case ARRAY:
3263
- return React19.createElement(
4219
+ return React20.createElement(
3264
4220
  JsonArray,
3265
4221
  {
3266
4222
  data,
@@ -3288,7 +4244,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3288
4244
  }
3289
4245
  );
3290
4246
  case STRING:
3291
- return React19.createElement(
4247
+ return React20.createElement(
3292
4248
  JsonValue,
3293
4249
  {
3294
4250
  name,
@@ -3309,7 +4265,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3309
4265
  }
3310
4266
  );
3311
4267
  case NUMBER:
3312
- return React19.createElement(
4268
+ return React20.createElement(
3313
4269
  JsonValue,
3314
4270
  {
3315
4271
  name,
@@ -3330,7 +4286,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3330
4286
  }
3331
4287
  );
3332
4288
  case BOOLEAN:
3333
- return React19.createElement(
4289
+ return React20.createElement(
3334
4290
  JsonValue,
3335
4291
  {
3336
4292
  name,
@@ -3351,7 +4307,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3351
4307
  }
3352
4308
  );
3353
4309
  case DATE:
3354
- return React19.createElement(
4310
+ return React20.createElement(
3355
4311
  JsonValue,
3356
4312
  {
3357
4313
  name,
@@ -3372,7 +4328,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3372
4328
  }
3373
4329
  );
3374
4330
  case NULL:
3375
- return React19.createElement(
4331
+ return React20.createElement(
3376
4332
  JsonValue,
3377
4333
  {
3378
4334
  name,
@@ -3393,7 +4349,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3393
4349
  }
3394
4350
  );
3395
4351
  case UNDEFINED:
3396
- return React19.createElement(
4352
+ return React20.createElement(
3397
4353
  JsonValue,
3398
4354
  {
3399
4355
  name,
@@ -3414,7 +4370,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3414
4370
  }
3415
4371
  );
3416
4372
  case FUNCTION:
3417
- return React19.createElement(
4373
+ return React20.createElement(
3418
4374
  JsonFunctionValue,
3419
4375
  {
3420
4376
  name,
@@ -3435,7 +4391,7 @@ var _JsonNode = class _JsonNode extends Component2 {
3435
4391
  }
3436
4392
  );
3437
4393
  case SYMBOL:
3438
- return React19.createElement(
4394
+ return React20.createElement(
3439
4395
  JsonValue,
3440
4396
  {
3441
4397
  name,
@@ -3594,7 +4550,7 @@ var _JsonObject = class _JsonObject extends Component2 {
3594
4550
  style: minus,
3595
4551
  "aria-label": `remove the object '${String(name)}'`
3596
4552
  });
3597
- return React19.createElement(React19.Fragment, null, React19.createElement("span", { style: collapsed }, "{...}", " ", keyList.length, " ", keyList.length === 1 ? "key" : "keys"), !isReadOnly && removeItemButton);
4553
+ return React20.createElement(React20.Fragment, null, React20.createElement("span", { style: collapsed }, "{...}", " ", keyList.length, " ", keyList.length === 1 ? "key" : "keys"), !isReadOnly && removeItemButton);
3598
4554
  }
3599
4555
  renderNotCollapsed() {
3600
4556
  const { name, data, keyPath, deep, nextDeep, addFormVisible } = this.state;
@@ -3632,7 +4588,7 @@ var _JsonObject = class _JsonObject extends Component2 {
3632
4588
  style: minus,
3633
4589
  "aria-label": `remove the object '${String(name)}'`
3634
4590
  });
3635
- const list = keyList.map((key) => React19.createElement(
4591
+ const list = keyList.map((key) => React20.createElement(
3636
4592
  JsonNode,
3637
4593
  {
3638
4594
  key,
@@ -3662,7 +4618,7 @@ var _JsonObject = class _JsonObject extends Component2 {
3662
4618
  ));
3663
4619
  const startObject = "{";
3664
4620
  const endObject = "}";
3665
- return React19.createElement(React19.Fragment, null, React19.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, startObject), !isReadOnly && addItemButton, React19.createElement("ul", { className: "rejt-not-collapsed-list", style: ul }, list), !isReadOnly && addFormVisible && React19.createElement("div", { className: "rejt-add-form", style: addForm }, React19.createElement(
4621
+ return React20.createElement(React20.Fragment, null, React20.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, startObject), !isReadOnly && addItemButton, React20.createElement("ul", { className: "rejt-not-collapsed-list", style: ul }, list), !isReadOnly && addFormVisible && React20.createElement("div", { className: "rejt-add-form", style: addForm }, React20.createElement(
3666
4622
  JsonAddValue,
3667
4623
  {
3668
4624
  handleAdd: this.handleAddValueAdd,
@@ -3674,12 +4630,12 @@ var _JsonObject = class _JsonObject extends Component2 {
3674
4630
  deep,
3675
4631
  onSubmitValueParser
3676
4632
  }
3677
- )), React19.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, endObject), !isReadOnly && removeItemButton);
4633
+ )), React20.createElement("span", { className: "rejt-not-collapsed-delimiter", style: delimiter }, endObject), !isReadOnly && removeItemButton);
3678
4634
  }
3679
4635
  render() {
3680
4636
  const { name, collapsed, keyPath, deep = 0 } = this.state;
3681
4637
  const value2 = collapsed ? this.renderCollapsed() : this.renderNotCollapsed();
3682
- return React19.createElement(
4638
+ return React20.createElement(
3683
4639
  JsonNodeAccordion,
3684
4640
  {
3685
4641
  name,
@@ -3697,8 +4653,8 @@ var JsonObject = _JsonObject;
3697
4653
  JsonObject.defaultProps = {
3698
4654
  keyPath: [],
3699
4655
  deep: 0,
3700
- minusMenuElement: React19.createElement("span", null, " - "),
3701
- plusMenuElement: React19.createElement("span", null, " + ")
4656
+ minusMenuElement: React20.createElement("span", null, " - "),
4657
+ plusMenuElement: React20.createElement("span", null, " + ")
3702
4658
  };
3703
4659
  var _JsonValue = class _JsonValue extends Component2 {
3704
4660
  constructor(props) {
@@ -3808,7 +4764,7 @@ var _JsonValue = class _JsonValue extends Component2 {
3808
4764
  style: style.minus,
3809
4765
  "aria-label": `remove the property '${String(name)}' with value '${String(originalValue)}'${String(parentPropertyName) ? ` from '${String(parentPropertyName)}'` : ""}`
3810
4766
  });
3811
- return React19.createElement("li", { className: "rejt-value-node", style: style.li }, React19.createElement("span", { className: "rejt-name", style: style.name }, name, " : "), isEditing ? React19.createElement("span", { className: "rejt-edit-form", style: style.editForm }, inputElementLayout) : React19.createElement(
4767
+ return React20.createElement("li", { className: "rejt-value-node", style: style.li }, React20.createElement("span", { className: "rejt-name", style: style.name }, name, " : "), isEditing ? React20.createElement("span", { className: "rejt-edit-form", style: style.editForm }, inputElementLayout) : React20.createElement(
3812
4768
  "span",
3813
4769
  {
3814
4770
  className: "rejt-value",
@@ -3825,8 +4781,8 @@ JsonValue.defaultProps = {
3825
4781
  keyPath: [],
3826
4782
  deep: 0,
3827
4783
  handleUpdateValue: /* @__PURE__ */ __name(() => Promise.resolve(), "handleUpdateValue"),
3828
- cancelButtonElement: React19.createElement("button", null, "c"),
3829
- minusMenuElement: React19.createElement("span", null, " - ")
4784
+ cancelButtonElement: React20.createElement("button", null, "c"),
4785
+ minusMenuElement: React20.createElement("span", null, " - ")
3830
4786
  };
3831
4787
 
3832
4788
  // src/blocks/controls/react-editable-json-tree/utils/parse.ts
@@ -3965,7 +4921,7 @@ var _JsonTree = class _JsonTree extends Component3 {
3965
4921
  textareaElementFunction = /* @__PURE__ */ __name(() => textareaElement, "textareaElementFunction");
3966
4922
  }
3967
4923
  if (dataType === "Object" || dataType === "Array") {
3968
- return React20.createElement("div", { className: "rejt-tree" }, React20.createElement(
4924
+ return React21.createElement("div", { className: "rejt-tree" }, React21.createElement(
3969
4925
  JsonNode,
3970
4926
  {
3971
4927
  data,
@@ -4022,8 +4978,8 @@ JsonTree.defaultProps = {
4022
4978
  logger: { error: /* @__PURE__ */ __name(() => {
4023
4979
  }, "error") },
4024
4980
  onSubmitValueParser: /* @__PURE__ */ __name((isEditMode, keyPath, deep, name, rawValue) => parse3(rawValue), "onSubmitValueParser"),
4025
- inputElement: /* @__PURE__ */ __name(() => React20.createElement("input", null), "inputElement"),
4026
- textareaElement: /* @__PURE__ */ __name(() => React20.createElement("textarea", null), "textareaElement"),
4981
+ inputElement: /* @__PURE__ */ __name(() => React21.createElement("input", null), "inputElement"),
4982
+ textareaElement: /* @__PURE__ */ __name(() => React21.createElement("textarea", null), "textareaElement"),
4027
4983
  fallback: null
4028
4984
  };
4029
4985
 
@@ -4193,8 +5149,8 @@ var ObjectControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, arg
4193
5149
  const theme = useTheme();
4194
5150
  const data = useMemo(() => value2 && cloneDeep(value2), [value2]);
4195
5151
  const hasData = data !== null && data !== void 0;
4196
- const [showRaw, setShowRaw] = useState6(!hasData);
4197
- const [parseError, setParseError] = useState6(null);
5152
+ const [showRaw, setShowRaw] = useState7(!hasData);
5153
+ const [parseError, setParseError] = useState7(null);
4198
5154
  const readonly = !!argType?.table?.readonly;
4199
5155
  const updateRaw = useCallback4(
4200
5156
  (raw) => {
@@ -4209,21 +5165,21 @@ var ObjectControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, arg
4209
5165
  },
4210
5166
  [onChange]
4211
5167
  );
4212
- const [forceVisible, setForceVisible] = useState6(false);
5168
+ const [forceVisible, setForceVisible] = useState7(false);
4213
5169
  const onForceVisible = useCallback4(() => {
4214
5170
  onChange({});
4215
5171
  setForceVisible(true);
4216
5172
  }, [setForceVisible]);
4217
5173
  const htmlElRef = useRef4(null);
4218
- useEffect6(() => {
5174
+ useEffect7(() => {
4219
5175
  if (forceVisible && htmlElRef.current) {
4220
5176
  htmlElRef.current.select();
4221
5177
  }
4222
5178
  }, [forceVisible]);
4223
5179
  if (!hasData) {
4224
- return React21.createElement(Button3, { disabled: readonly, id: getControlSetterButtonId(name), onClick: onForceVisible }, "Set object");
5180
+ return React22.createElement(Button3, { disabled: readonly, id: getControlSetterButtonId(name), onClick: onForceVisible }, "Set object");
4225
5181
  }
4226
- const rawJSONForm = React21.createElement(
5182
+ const rawJSONForm = React22.createElement(
4227
5183
  RawInput,
4228
5184
  {
4229
5185
  ref: htmlElRef,
@@ -4238,7 +5194,7 @@ var ObjectControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, arg
4238
5194
  }
4239
5195
  );
4240
5196
  const isObjectOrArray = Array.isArray(value2) || typeof value2 === "object" && value2?.constructor === Object;
4241
- return React21.createElement(Wrapper6, { "aria-readonly": readonly }, isObjectOrArray && React21.createElement(
5197
+ return React22.createElement(Wrapper6, { "aria-readonly": readonly }, isObjectOrArray && React22.createElement(
4242
5198
  RawButton,
4243
5199
  {
4244
5200
  role: "switch",
@@ -4249,9 +5205,9 @@ var ObjectControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, arg
4249
5205
  setShowRaw((isRaw) => !isRaw);
4250
5206
  }
4251
5207
  },
4252
- showRaw ? React21.createElement(EyeCloseIcon, null) : React21.createElement(EyeIcon, null),
4253
- React21.createElement("span", null, "RAW")
4254
- ), !showRaw ? React21.createElement(
5208
+ showRaw ? React22.createElement(EyeCloseIcon, null) : React22.createElement(EyeIcon, null),
5209
+ React22.createElement("span", null, "RAW")
5210
+ ), !showRaw ? React22.createElement(
4255
5211
  JsonTree,
4256
5212
  {
4257
5213
  readOnly: readonly || !isObjectOrArray,
@@ -4263,18 +5219,18 @@ var ObjectControl = /* @__PURE__ */ __name(({ name, value: value2, onChange, arg
4263
5219
  rootName: name,
4264
5220
  onFullyUpdate: onChange,
4265
5221
  getStyle: getCustomStyleFunction(theme),
4266
- cancelButtonElement: React21.createElement(ButtonInline, { type: "button" }, "Cancel"),
4267
- addButtonElement: React21.createElement(ButtonInline, { type: "submit", primary: true }, "Save"),
4268
- plusMenuElement: React21.createElement(ActionButton, { type: "button" }, React21.createElement(AddIcon, null)),
4269
- minusMenuElement: React21.createElement(ActionButton, { type: "button" }, React21.createElement(SubtractIcon, null)),
4270
- inputElement: (_2, __, ___, key) => key ? React21.createElement(Input, { onFocus: selectValue, onBlur: dispatchEnterKey }) : React21.createElement(Input, null),
5222
+ cancelButtonElement: React22.createElement(ButtonInline, { type: "button" }, "Cancel"),
5223
+ addButtonElement: React22.createElement(ButtonInline, { type: "submit", primary: true }, "Save"),
5224
+ plusMenuElement: React22.createElement(ActionButton, { type: "button" }, React22.createElement(AddIcon, null)),
5225
+ minusMenuElement: React22.createElement(ActionButton, { type: "button" }, React22.createElement(SubtractIcon, null)),
5226
+ inputElement: (_2, __, ___, key) => key ? React22.createElement(Input, { onFocus: selectValue, onBlur: dispatchEnterKey }) : React22.createElement(Input, null),
4271
5227
  fallback: rawJSONForm
4272
5228
  }
4273
5229
  ) : rawJSONForm);
4274
5230
  }, "ObjectControl");
4275
5231
 
4276
5232
  // src/blocks/controls/Range.tsx
4277
- import React22, { useMemo as useMemo2 } from "react";
5233
+ import React23, { useMemo as useMemo2 } from "react";
4278
5234
  import { styled as styled17 } from "storybook/theming";
4279
5235
  var RangeInput = styled17.input(
4280
5236
  ({ theme, min, max, value: value2, disabled }) => ({
@@ -4447,7 +5403,7 @@ var RangeControl = /* @__PURE__ */ __name(({
4447
5403
  const hasValue = value2 !== void 0;
4448
5404
  const numberOFDecimalsPlaces = useMemo2(() => getNumberOfDecimalPlaces(step), [step]);
4449
5405
  const readonly = !!argType?.table?.readonly;
4450
- return React22.createElement(RangeWrapper, { "aria-readonly": readonly }, React22.createElement(RangeLabel, null, min), React22.createElement(
5406
+ return React23.createElement(RangeWrapper, { "aria-readonly": readonly }, React23.createElement(RangeLabel, null, min), React23.createElement(
4451
5407
  RangeInput,
4452
5408
  {
4453
5409
  id: getControlId(name),
@@ -4457,11 +5413,11 @@ var RangeControl = /* @__PURE__ */ __name(({
4457
5413
  ...{ name, min, max, step, onFocus, onBlur },
4458
5414
  value: value2 ?? min
4459
5415
  }
4460
- ), React22.createElement(RangeCurrentAndMaxLabel, { numberOFDecimalsPlaces, max }, hasValue ? value2.toFixed(numberOFDecimalsPlaces) : "--", " / ", max));
5416
+ ), React23.createElement(RangeCurrentAndMaxLabel, { numberOFDecimalsPlaces, max }, hasValue ? value2.toFixed(numberOFDecimalsPlaces) : "--", " / ", max));
4461
5417
  }, "RangeControl");
4462
5418
 
4463
5419
  // src/blocks/controls/Text.tsx
4464
- import React23, { useCallback as useCallback5, useState as useState7 } from "react";
5420
+ import React24, { useCallback as useCallback5, useState as useState8 } from "react";
4465
5421
  import { Button as Button4, Form as Form4 } from "storybook/internal/components";
4466
5422
  import { styled as styled18 } from "storybook/theming";
4467
5423
  var Wrapper7 = styled18.label({
@@ -4485,13 +5441,13 @@ var TextControl = /* @__PURE__ */ __name(({
4485
5441
  onChange(event.target.value);
4486
5442
  }, "handleChange");
4487
5443
  const readonly = !!argType?.table?.readonly;
4488
- const [forceVisible, setForceVisible] = useState7(false);
5444
+ const [forceVisible, setForceVisible] = useState8(false);
4489
5445
  const onForceVisible = useCallback5(() => {
4490
5446
  onChange("");
4491
5447
  setForceVisible(true);
4492
5448
  }, [setForceVisible]);
4493
5449
  if (value2 === void 0) {
4494
- return React23.createElement(
5450
+ return React24.createElement(
4495
5451
  Button4,
4496
5452
  {
4497
5453
  variant: "outline",
@@ -4504,7 +5460,7 @@ var TextControl = /* @__PURE__ */ __name(({
4504
5460
  );
4505
5461
  }
4506
5462
  const isValid = typeof value2 === "string";
4507
- return React23.createElement(Wrapper7, null, React23.createElement(
5463
+ return React24.createElement(Wrapper7, null, React24.createElement(
4508
5464
  Form4.Textarea,
4509
5465
  {
4510
5466
  id: getControlId(name),
@@ -4517,11 +5473,11 @@ var TextControl = /* @__PURE__ */ __name(({
4517
5473
  valid: isValid ? void 0 : "error",
4518
5474
  ...{ name, value: isValid ? value2 : "", onFocus, onBlur }
4519
5475
  }
4520
- ), maxLength && React23.createElement(MaxLength, { isMaxed: value2?.length === maxLength }, value2?.length ?? 0, " / ", maxLength));
5476
+ ), maxLength && React24.createElement(MaxLength, { isMaxed: value2?.length === maxLength }, value2?.length ?? 0, " / ", maxLength));
4521
5477
  }, "TextControl");
4522
5478
 
4523
5479
  // src/blocks/controls/Files.tsx
4524
- import React24, { useEffect as useEffect7, useRef as useRef5 } from "react";
5480
+ import React25, { useEffect as useEffect8, useRef as useRef5 } from "react";
4525
5481
  import { Form as Form5 } from "storybook/internal/components";
4526
5482
  import { styled as styled19 } from "storybook/theming";
4527
5483
  var FileInput = styled19(Form5.Input)({
@@ -4553,12 +5509,12 @@ var FilesControl = /* @__PURE__ */ __name(({
4553
5509
  revokeOldUrls(value2 || []);
4554
5510
  }
4555
5511
  __name(handleFileChange, "handleFileChange");
4556
- useEffect7(() => {
5512
+ useEffect8(() => {
4557
5513
  if (value2 == null && inputElement.current) {
4558
5514
  inputElement.current.value = "";
4559
5515
  }
4560
5516
  }, [value2, name]);
4561
- return React24.createElement(
5517
+ return React25.createElement(
4562
5518
  FileInput,
4563
5519
  {
4564
5520
  ref: inputElement,
@@ -4575,8 +5531,8 @@ var FilesControl = /* @__PURE__ */ __name(({
4575
5531
  }, "FilesControl");
4576
5532
 
4577
5533
  // src/blocks/controls/index.tsx
4578
- var LazyColorControl = lazy(() => import("./_browser-chunks/Color-LWAWP22K.js"));
4579
- var ColorControl = /* @__PURE__ */ __name((props) => React25.createElement(Suspense, { fallback: React25.createElement("div", null) }, React25.createElement(LazyColorControl, { ...props })), "ColorControl");
5534
+ var LazyColorControl = lazy(() => import("./_browser-chunks/Color-4NTW6CRW.js"));
5535
+ var ColorControl = /* @__PURE__ */ __name((props) => React26.createElement(Suspense, { fallback: React26.createElement("div", null) }, React26.createElement(LazyColorControl, { ...props })), "ColorControl");
4580
5536
 
4581
5537
  // src/blocks/components/ArgsTable/ArgControl.tsx
4582
5538
  var Controls2 = {
@@ -4596,12 +5552,12 @@ var Controls2 = {
4596
5552
  text: TextControl,
4597
5553
  file: FilesControl
4598
5554
  };
4599
- var NoControl = /* @__PURE__ */ __name(() => React26.createElement(React26.Fragment, null, "-"), "NoControl");
5555
+ var NoControl = /* @__PURE__ */ __name(() => React27.createElement(React27.Fragment, null, "-"), "NoControl");
4600
5556
  var ArgControl = /* @__PURE__ */ __name(({ row, arg, updateArgs, isHovered }) => {
4601
5557
  const { key, control } = row;
4602
- const [isFocused, setFocused] = useState8(false);
4603
- const [boxedValue, setBoxedValue] = useState8({ value: arg });
4604
- useEffect8(() => {
5558
+ const [isFocused, setFocused] = useState9(false);
5559
+ const [boxedValue, setBoxedValue] = useState9({ value: arg });
5560
+ useEffect9(() => {
4605
5561
  if (!isFocused) {
4606
5562
  setBoxedValue({ value: arg });
4607
5563
  }
@@ -4618,7 +5574,7 @@ var ArgControl = /* @__PURE__ */ __name(({ row, arg, updateArgs, isHovered }) =>
4618
5574
  const onFocus = useCallback6(() => setFocused(true), []);
4619
5575
  if (!control || control.disable) {
4620
5576
  const canBeSetup = control?.disable !== true && row?.type?.name !== "function";
4621
- return isHovered && canBeSetup ? React26.createElement(
5577
+ return isHovered && canBeSetup ? React27.createElement(
4622
5578
  Link,
4623
5579
  {
4624
5580
  href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
@@ -4626,15 +5582,15 @@ var ArgControl = /* @__PURE__ */ __name(({ row, arg, updateArgs, isHovered }) =>
4626
5582
  withArrow: true
4627
5583
  },
4628
5584
  "Setup controls"
4629
- ) : React26.createElement(NoControl, null);
5585
+ ) : React27.createElement(NoControl, null);
4630
5586
  }
4631
5587
  const props = { name: key, argType: row, value: boxedValue.value, onChange, onBlur, onFocus };
4632
5588
  const Control = Controls2[control.type] || NoControl;
4633
- return React26.createElement(Control, { ...props, ...control, controlType: control.type });
5589
+ return React27.createElement(Control, { ...props, ...control, controlType: control.type });
4634
5590
  }, "ArgControl");
4635
5591
 
4636
5592
  // src/blocks/components/ArgsTable/ArgJsDoc.tsx
4637
- import React27 from "react";
5593
+ import React28 from "react";
4638
5594
  import { codeCommon } from "storybook/internal/components";
4639
5595
  import { styled as styled20 } from "storybook/theming";
4640
5596
  var Table = styled20.table(({ theme }) => ({
@@ -4694,13 +5650,13 @@ var ArgJsDoc = /* @__PURE__ */ __name(({ tags }) => {
4694
5650
  if (!hasDisplayableParams && !hasDisplayableReturns && !hasDisplayableDeprecated) {
4695
5651
  return null;
4696
5652
  }
4697
- return React27.createElement(React27.Fragment, null, React27.createElement(Table, null, React27.createElement("tbody", null, hasDisplayableDeprecated && React27.createElement("tr", { key: "deprecated" }, React27.createElement("td", { colSpan: 2 }, React27.createElement("strong", null, "Deprecated"), ": ", tags.deprecated?.toString())), hasDisplayableParams && params.map((x2) => {
4698
- return React27.createElement("tr", { key: x2.name }, React27.createElement("td", null, React27.createElement("code", null, x2.name)), React27.createElement("td", null, x2.description));
4699
- }), hasDisplayableReturns && React27.createElement("tr", { key: "returns" }, React27.createElement("td", null, React27.createElement("code", null, "Returns")), React27.createElement("td", null, tags.returns?.description)))));
5653
+ return React28.createElement(React28.Fragment, null, React28.createElement(Table, null, React28.createElement("tbody", null, hasDisplayableDeprecated && React28.createElement("tr", { key: "deprecated" }, React28.createElement("td", { colSpan: 2 }, React28.createElement("strong", null, "Deprecated"), ": ", tags.deprecated?.toString())), hasDisplayableParams && params.map((x2) => {
5654
+ return React28.createElement("tr", { key: x2.name }, React28.createElement("td", null, React28.createElement("code", null, x2.name)), React28.createElement("td", null, x2.description));
5655
+ }), hasDisplayableReturns && React28.createElement("tr", { key: "returns" }, React28.createElement("td", null, React28.createElement("code", null, "Returns")), React28.createElement("td", null, tags.returns?.description)))));
4700
5656
  }, "ArgJsDoc");
4701
5657
 
4702
5658
  // src/blocks/components/ArgsTable/ArgValue.tsx
4703
- import React28, { useState as useState9 } from "react";
5659
+ import React29, { useState as useState10 } from "react";
4704
5660
  import { SyntaxHighlighter, WithTooltipPure, codeCommon as codeCommon2 } from "storybook/internal/components";
4705
5661
  import { ChevronSmallDownIcon as ChevronSmallDownIcon2, ChevronSmallUpIcon } from "@storybook/icons";
4706
5662
  var import_memoizerific = __toESM(require_memoizerific(), 1);
@@ -4771,10 +5727,10 @@ var ChevronDownIcon = styled21(ChevronSmallDownIcon2)({
4771
5727
  marginLeft: 4
4772
5728
  });
4773
5729
  var EmptyArg = /* @__PURE__ */ __name(() => {
4774
- return React28.createElement("span", null, "-");
5730
+ return React29.createElement("span", null, "-");
4775
5731
  }, "EmptyArg");
4776
5732
  var ArgText = /* @__PURE__ */ __name(({ text, simple }) => {
4777
- return React28.createElement(Text3, { simple }, text);
5733
+ return React29.createElement(Text3, { simple }, text);
4778
5734
  }, "ArgText");
4779
5735
  var calculateDetailWidth = (0, import_memoizerific.default)(1e3)((detail) => {
4780
5736
  const lines = detail.split(/\r?\n/);
@@ -4793,12 +5749,12 @@ var renderSummaryItems = /* @__PURE__ */ __name((summaryItems, isExpanded = true
4793
5749
  if (!isExpanded) {
4794
5750
  items = summaryItems.slice(0, ITEMS_BEFORE_EXPANSION);
4795
5751
  }
4796
- return items.map((item) => React28.createElement(ArgText, { key: item, text: item === "" ? '""' : item }));
5752
+ return items.map((item) => React29.createElement(ArgText, { key: item, text: item === "" ? '""' : item }));
4797
5753
  }, "renderSummaryItems");
4798
5754
  var ArgSummary = /* @__PURE__ */ __name(({ value: value2, initialExpandedArgs }) => {
4799
5755
  const { summary, detail } = value2;
4800
- const [isOpen, setIsOpen] = useState9(false);
4801
- const [isExpanded, setIsExpanded] = useState9(initialExpandedArgs || false);
5756
+ const [isOpen, setIsOpen] = useState10(false);
5757
+ const [isExpanded, setIsExpanded] = useState10(initialExpandedArgs || false);
4802
5758
  if (summary === void 0 || summary === null) {
4803
5759
  return null;
4804
5760
  }
@@ -4806,14 +5762,14 @@ var ArgSummary = /* @__PURE__ */ __name(({ value: value2, initialExpandedArgs })
4806
5762
  if (detail == null) {
4807
5763
  const cannotBeSafelySplitted = /[(){}[\]<>]/.test(summaryAsString);
4808
5764
  if (cannotBeSafelySplitted) {
4809
- return React28.createElement(ArgText, { text: summaryAsString });
5765
+ return React29.createElement(ArgText, { text: summaryAsString });
4810
5766
  }
4811
5767
  const summaryItems = getSummaryItems(summaryAsString);
4812
5768
  const itemsCount = summaryItems.length;
4813
5769
  const hasManyItems = itemsCount > ITEMS_BEFORE_EXPANSION;
4814
- return hasManyItems ? React28.createElement(Summary, { isExpanded }, renderSummaryItems(summaryItems, isExpanded), React28.createElement(ExpandButton, { onClick: () => setIsExpanded(!isExpanded) }, isExpanded ? "Show less..." : `Show ${itemsCount - ITEMS_BEFORE_EXPANSION} more...`)) : React28.createElement(Summary, null, renderSummaryItems(summaryItems));
5770
+ return hasManyItems ? React29.createElement(Summary, { isExpanded }, renderSummaryItems(summaryItems, isExpanded), React29.createElement(ExpandButton, { onClick: () => setIsExpanded(!isExpanded) }, isExpanded ? "Show less..." : `Show ${itemsCount - ITEMS_BEFORE_EXPANSION} more...`)) : React29.createElement(Summary, null, renderSummaryItems(summaryItems));
4815
5771
  }
4816
- return React28.createElement(
5772
+ return React29.createElement(
4817
5773
  WithTooltipPure,
4818
5774
  {
4819
5775
  closeOnOutsideClick: true,
@@ -4822,13 +5778,13 @@ var ArgSummary = /* @__PURE__ */ __name(({ value: value2, initialExpandedArgs })
4822
5778
  onVisibleChange: (isVisible) => {
4823
5779
  setIsOpen(isVisible);
4824
5780
  },
4825
- tooltip: React28.createElement(Detail, { width: calculateDetailWidth(detail) }, React28.createElement(SyntaxHighlighter, { language: "jsx", format: false }, detail))
5781
+ tooltip: React29.createElement(Detail, { width: calculateDetailWidth(detail) }, React29.createElement(SyntaxHighlighter, { language: "jsx", format: false }, detail))
4826
5782
  },
4827
- React28.createElement(Expandable, { className: "sbdocs-expandable" }, React28.createElement("span", null, summaryAsString), isOpen ? React28.createElement(ChevronUpIcon, null) : React28.createElement(ChevronDownIcon, null))
5783
+ React29.createElement(Expandable, { className: "sbdocs-expandable" }, React29.createElement("span", null, summaryAsString), isOpen ? React29.createElement(ChevronUpIcon, null) : React29.createElement(ChevronDownIcon, null))
4828
5784
  );
4829
5785
  }, "ArgSummary");
4830
5786
  var ArgValue = /* @__PURE__ */ __name(({ value: value2, initialExpandedArgs }) => {
4831
- return value2 == null ? React28.createElement(EmptyArg, null) : React28.createElement(ArgSummary, { value: value2, initialExpandedArgs });
5787
+ return value2 == null ? React29.createElement(EmptyArg, null) : React29.createElement(ArgSummary, { value: value2, initialExpandedArgs });
4832
5788
  }, "ArgValue");
4833
5789
 
4834
5790
  // src/blocks/components/ArgsTable/ArgRow.tsx
@@ -4880,7 +5836,7 @@ var toSummary = /* @__PURE__ */ __name((value2) => {
4880
5836
  return { summary: val };
4881
5837
  }, "toSummary");
4882
5838
  var ArgRow = /* @__PURE__ */ __name((props) => {
4883
- const [isHovered, setIsHovered] = useState10(false);
5839
+ const [isHovered, setIsHovered] = useState11(false);
4884
5840
  const { row, updateArgs, compact, expandable, initialExpandedArgs } = props;
4885
5841
  const { name, description } = row;
4886
5842
  const table = row.table || {};
@@ -4888,11 +5844,11 @@ var ArgRow = /* @__PURE__ */ __name((props) => {
4888
5844
  const defaultValue = table.defaultValue || row.defaultValue;
4889
5845
  const required = row.type?.required;
4890
5846
  const hasDescription = description != null && description !== "";
4891
- return React29.createElement("tr", { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) }, React29.createElement(StyledTd, { expandable: expandable ?? false }, React29.createElement(Name, null, name), required ? React29.createElement(Required, { title: "Required" }, "*") : null), compact ? null : React29.createElement("td", null, hasDescription && React29.createElement(Description, null, React29.createElement(index_modern_default, null, description)), table.jsDocTags != null ? React29.createElement(React29.Fragment, null, React29.createElement(TypeWithJsDoc, { hasDescription }, React29.createElement(ArgValue, { value: type, initialExpandedArgs })), React29.createElement(ArgJsDoc, { tags: table.jsDocTags })) : React29.createElement(Type, { hasDescription }, React29.createElement(ArgValue, { value: type, initialExpandedArgs }))), compact ? null : React29.createElement("td", null, React29.createElement(ArgValue, { value: defaultValue, initialExpandedArgs })), updateArgs ? React29.createElement("td", null, React29.createElement(ArgControl, { ...props, isHovered })) : null);
5847
+ return React30.createElement("tr", { onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false) }, React30.createElement(StyledTd, { expandable: expandable ?? false }, React30.createElement(Name, null, name), required ? React30.createElement(Required, { title: "Required" }, "*") : null), compact ? null : React30.createElement("td", null, hasDescription && React30.createElement(Description, null, React30.createElement(index_modern_default, null, description)), table.jsDocTags != null ? React30.createElement(React30.Fragment, null, React30.createElement(TypeWithJsDoc, { hasDescription }, React30.createElement(ArgValue, { value: type, initialExpandedArgs })), React30.createElement(ArgJsDoc, { tags: table.jsDocTags })) : React30.createElement(Type, { hasDescription }, React30.createElement(ArgValue, { value: type, initialExpandedArgs }))), compact ? null : React30.createElement("td", null, React30.createElement(ArgValue, { value: defaultValue, initialExpandedArgs })), updateArgs ? React30.createElement("td", null, React30.createElement(ArgControl, { ...props, isHovered })) : null);
4892
5848
  }, "ArgRow");
4893
5849
 
4894
5850
  // src/blocks/components/ArgsTable/Empty.tsx
4895
- import React30, { useEffect as useEffect9, useState as useState11 } from "react";
5851
+ import React31, { useEffect as useEffect10, useState as useState12 } from "react";
4896
5852
  import { EmptyTabContent, Link as Link2 } from "storybook/internal/components";
4897
5853
  import { DocumentIcon } from "@storybook/icons";
4898
5854
  import { styled as styled23 } from "storybook/theming";
@@ -4914,8 +5870,8 @@ var Links = styled23.div(({ theme }) => ({
4914
5870
  gap: 25
4915
5871
  }));
4916
5872
  var Empty = /* @__PURE__ */ __name(({ inAddonPanel }) => {
4917
- const [isLoading, setIsLoading] = useState11(true);
4918
- useEffect9(() => {
5873
+ const [isLoading, setIsLoading] = useState12(true);
5874
+ useEffect10(() => {
4919
5875
  const load = setTimeout(() => {
4920
5876
  setIsLoading(false);
4921
5877
  }, 100);
@@ -4924,28 +5880,28 @@ var Empty = /* @__PURE__ */ __name(({ inAddonPanel }) => {
4924
5880
  if (isLoading) {
4925
5881
  return null;
4926
5882
  }
4927
- return React30.createElement(Wrapper8, { inAddonPanel }, React30.createElement(
5883
+ return React31.createElement(Wrapper8, { inAddonPanel }, React31.createElement(
4928
5884
  EmptyTabContent,
4929
5885
  {
4930
5886
  title: inAddonPanel ? "Interactive story playground" : "Args table with interactive controls couldn't be auto-generated",
4931
- description: React30.createElement(React30.Fragment, null, "Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),
4932
- footer: React30.createElement(Links, null, inAddonPanel && React30.createElement(React30.Fragment, null, React30.createElement(
5887
+ description: React31.createElement(React31.Fragment, null, "Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),
5888
+ footer: React31.createElement(Links, null, inAddonPanel && React31.createElement(React31.Fragment, null, React31.createElement(
4933
5889
  Link2,
4934
5890
  {
4935
5891
  href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
4936
5892
  target: "_blank",
4937
5893
  withArrow: true
4938
5894
  },
4939
- React30.createElement(DocumentIcon, null),
5895
+ React31.createElement(DocumentIcon, null),
4940
5896
  " Read docs"
4941
- )), !inAddonPanel && React30.createElement(
5897
+ )), !inAddonPanel && React31.createElement(
4942
5898
  Link2,
4943
5899
  {
4944
5900
  href: "https://storybook.js.org/docs/essentials/controls?ref=ui",
4945
5901
  target: "_blank",
4946
5902
  withArrow: true
4947
5903
  },
4948
- React30.createElement(DocumentIcon, null),
5904
+ React31.createElement(DocumentIcon, null),
4949
5905
  " Learn how to set that up"
4950
5906
  ))
4951
5907
  }
@@ -4953,7 +5909,7 @@ var Empty = /* @__PURE__ */ __name(({ inAddonPanel }) => {
4953
5909
  }, "Empty");
4954
5910
 
4955
5911
  // src/blocks/components/ArgsTable/SectionRow.tsx
4956
- import React31, { useState as useState12 } from "react";
5912
+ import React32, { useState as useState13 } from "react";
4957
5913
  import { ChevronDownIcon as ChevronDownIcon2, ChevronRightIcon } from "@storybook/icons";
4958
5914
  import { styled as styled24 } from "storybook/theming";
4959
5915
  var ExpanderIconDown = styled24(ChevronDownIcon2)(({ theme }) => ({
@@ -5035,12 +5991,12 @@ var SectionRow = /* @__PURE__ */ __name(({
5035
5991
  initialExpanded = true,
5036
5992
  colSpan = 3
5037
5993
  }) => {
5038
- const [expanded, setExpanded] = useState12(initialExpanded);
5994
+ const [expanded, setExpanded] = useState13(initialExpanded);
5039
5995
  const Level = level === "subsection" ? Subsection : Section;
5040
5996
  const itemCount = children?.length || 0;
5041
5997
  const caption = level === "subsection" ? `${itemCount} item${itemCount !== 1 ? "s" : ""}` : "";
5042
5998
  const helperText = `${expanded ? "Hide" : "Show"} ${level === "subsection" ? itemCount : label} item${itemCount !== 1 ? "s" : ""}`;
5043
- return React31.createElement(React31.Fragment, null, React31.createElement(StyledTr, { title: helperText }, React31.createElement(Level, { colSpan: 1 }, React31.createElement(ClickIntercept, { onClick: (e2) => setExpanded(!expanded), tabIndex: 0 }, helperText), React31.createElement(FlexWrapper, null, expanded ? React31.createElement(ExpanderIconDown, null) : React31.createElement(ExpanderIconRight, null), label)), React31.createElement(StyledTd2, { colSpan: colSpan - 1 }, React31.createElement(
5999
+ return React32.createElement(React32.Fragment, null, React32.createElement(StyledTr, { title: helperText }, React32.createElement(Level, { colSpan: 1 }, React32.createElement(ClickIntercept, { onClick: (e2) => setExpanded(!expanded), tabIndex: 0 }, helperText), React32.createElement(FlexWrapper, null, expanded ? React32.createElement(ExpanderIconDown, null) : React32.createElement(ExpanderIconRight, null), label)), React32.createElement(StyledTd2, { colSpan: colSpan - 1 }, React32.createElement(
5044
6000
  ClickIntercept,
5045
6001
  {
5046
6002
  onClick: (e2) => setExpanded(!expanded),
@@ -5052,7 +6008,7 @@ var SectionRow = /* @__PURE__ */ __name(({
5052
6008
  }, "SectionRow");
5053
6009
 
5054
6010
  // src/blocks/components/ArgsTable/Skeleton.tsx
5055
- import React32 from "react";
6011
+ import React33 from "react";
5056
6012
  import { styled as styled25 } from "storybook/theming";
5057
6013
  var TableWrapper = styled25.div(({ theme }) => ({
5058
6014
  width: "100%",
@@ -5110,7 +6066,7 @@ var SkeletonText = styled25.div(
5110
6066
  borderRadius: 3
5111
6067
  })
5112
6068
  );
5113
- var Skeleton = /* @__PURE__ */ __name(() => React32.createElement(TableWrapper, null, React32.createElement(Row, null, React32.createElement(Column, { position: "first" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "second" }, React32.createElement(SkeletonText, { width: "30%" })), React32.createElement(Column, { position: "third" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "last" }, React32.createElement(SkeletonText, { width: "60%" }))), React32.createElement(Row, null, React32.createElement(Column, { position: "first" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "second" }, React32.createElement(SkeletonText, { width: "80%" }), React32.createElement(SkeletonText, { width: "30%" })), React32.createElement(Column, { position: "third" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "last" }, React32.createElement(SkeletonText, { width: "60%" }))), React32.createElement(Row, null, React32.createElement(Column, { position: "first" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "second" }, React32.createElement(SkeletonText, { width: "80%" }), React32.createElement(SkeletonText, { width: "30%" })), React32.createElement(Column, { position: "third" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "last" }, React32.createElement(SkeletonText, { width: "60%" }))), React32.createElement(Row, null, React32.createElement(Column, { position: "first" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "second" }, React32.createElement(SkeletonText, { width: "80%" }), React32.createElement(SkeletonText, { width: "30%" })), React32.createElement(Column, { position: "third" }, React32.createElement(SkeletonText, { width: "60%" })), React32.createElement(Column, { position: "last" }, React32.createElement(SkeletonText, { width: "60%" })))), "Skeleton");
6069
+ var Skeleton = /* @__PURE__ */ __name(() => React33.createElement(TableWrapper, null, React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" }))), React33.createElement(Row, null, React33.createElement(Column, { position: "first" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "second" }, React33.createElement(SkeletonText, { width: "80%" }), React33.createElement(SkeletonText, { width: "30%" })), React33.createElement(Column, { position: "third" }, React33.createElement(SkeletonText, { width: "60%" })), React33.createElement(Column, { position: "last" }, React33.createElement(SkeletonText, { width: "60%" })))), "Skeleton");
5114
6070
 
5115
6071
  // src/blocks/components/ArgsTable/ArgsTable.tsx
5116
6072
  var TableWrapper2 = styled26.table(({ theme, compact, inAddonPanel }) => ({
@@ -5311,10 +6267,10 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5311
6267
  } = props;
5312
6268
  if ("error" in props) {
5313
6269
  const { error } = props;
5314
- return React33.createElement(EmptyBlock, null, error, "\xA0", React33.createElement(Link3, { href: "http://storybook.js.org/docs/?ref=ui", target: "_blank", withArrow: true }, React33.createElement(DocumentIcon2, null), " Read the docs"));
6270
+ return React34.createElement(EmptyBlock, null, error, "\xA0", React34.createElement(Link3, { href: "http://storybook.js.org/docs/?ref=ui", target: "_blank", withArrow: true }, React34.createElement(DocumentIcon2, null), " Read the docs"));
5315
6271
  }
5316
6272
  if (isLoading) {
5317
- return React33.createElement(Skeleton, null);
6273
+ return React34.createElement(Skeleton, null);
5318
6274
  }
5319
6275
  const { rows, args, globals } = "rows" in props ? props : { rows: void 0, args: void 0, globals: void 0 };
5320
6276
  const groups = groupRows(
@@ -5328,7 +6284,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5328
6284
  const hasNoSections = Object.entries(groups.sections).length === 0;
5329
6285
  const hasNoUngroupedSubsections = Object.entries(groups.ungroupedSubsections).length === 0;
5330
6286
  if (hasNoUngrouped && hasNoSections && hasNoUngroupedSubsections) {
5331
- return React33.createElement(Empty, { inAddonPanel });
6287
+ return React34.createElement(Empty, { inAddonPanel });
5332
6288
  }
5333
6289
  let colSpan = 1;
5334
6290
  if (updateArgs) {
@@ -5339,15 +6295,15 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5339
6295
  }
5340
6296
  const expandable = Object.keys(groups.sections).length > 0;
5341
6297
  const common = { updateArgs, compact, inAddonPanel, initialExpandedArgs };
5342
- return React33.createElement(ResetWrapper3, null, React33.createElement(TablePositionWrapper, null, updateArgs && !isLoading && resetArgs && React33.createElement(ButtonPositionWrapper, null, React33.createElement(
6298
+ return React34.createElement(ResetWrapper3, null, React34.createElement(TablePositionWrapper, null, updateArgs && !isLoading && resetArgs && React34.createElement(ButtonPositionWrapper, null, React34.createElement(
5343
6299
  IconButton3,
5344
6300
  {
5345
6301
  onClick: () => resetArgs(),
5346
6302
  "aria-label": "Reset controls",
5347
6303
  title: "Reset controls"
5348
6304
  },
5349
- React33.createElement(UndoIcon, null)
5350
- )), React33.createElement(TableWrapper2, { ...{ compact, inAddonPanel }, className: "docblock-argstable sb-unstyled" }, React33.createElement("thead", { className: "docblock-argstable-head" }, React33.createElement("tr", null, React33.createElement("th", null, React33.createElement("span", null, "Name")), compact ? null : React33.createElement("th", null, React33.createElement("span", null, "Description")), compact ? null : React33.createElement("th", null, React33.createElement("span", null, "Default")), updateArgs ? React33.createElement("th", null, React33.createElement("span", null, "Control")) : null)), React33.createElement("tbody", { className: "docblock-argstable-body" }, groups.ungrouped.map((row) => React33.createElement(ArgRow, { key: row.key, row, arg: args && args[row.key], ...common })), Object.entries(groups.ungroupedSubsections).map(([subcategory, subsection]) => React33.createElement(
6305
+ React34.createElement(UndoIcon, null)
6306
+ )), React34.createElement(TableWrapper2, { ...{ compact, inAddonPanel }, className: "docblock-argstable sb-unstyled" }, React34.createElement("thead", { className: "docblock-argstable-head" }, React34.createElement("tr", null, React34.createElement("th", null, React34.createElement("span", null, "Name")), compact ? null : React34.createElement("th", null, React34.createElement("span", null, "Description")), compact ? null : React34.createElement("th", null, React34.createElement("span", null, "Default")), updateArgs ? React34.createElement("th", null, React34.createElement("span", null, "Control")) : null)), React34.createElement("tbody", { className: "docblock-argstable-body" }, groups.ungrouped.map((row) => React34.createElement(ArgRow, { key: row.key, row, arg: args && args[row.key], ...common })), Object.entries(groups.ungroupedSubsections).map(([subcategory, subsection]) => React34.createElement(
5351
6307
  SectionRow,
5352
6308
  {
5353
6309
  key: subcategory,
@@ -5355,7 +6311,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5355
6311
  level: "subsection",
5356
6312
  colSpan
5357
6313
  },
5358
- subsection.map((row) => React33.createElement(
6314
+ subsection.map((row) => React34.createElement(
5359
6315
  ArgRow,
5360
6316
  {
5361
6317
  key: row.key,
@@ -5365,7 +6321,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5365
6321
  ...common
5366
6322
  }
5367
6323
  ))
5368
- )), Object.entries(groups.sections).map(([category, section]) => React33.createElement(SectionRow, { key: category, label: category, level: "section", colSpan }, section.ungrouped.map((row) => React33.createElement(ArgRow, { key: row.key, row, arg: args && args[row.key], ...common })), Object.entries(section.subsections).map(([subcategory, subsection]) => React33.createElement(
6324
+ )), Object.entries(groups.sections).map(([category, section]) => React34.createElement(SectionRow, { key: category, label: category, level: "section", colSpan }, section.ungrouped.map((row) => React34.createElement(ArgRow, { key: row.key, row, arg: args && args[row.key], ...common })), Object.entries(section.subsections).map(([subcategory, subsection]) => React34.createElement(
5369
6325
  SectionRow,
5370
6326
  {
5371
6327
  key: subcategory,
@@ -5373,7 +6329,7 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5373
6329
  level: "subsection",
5374
6330
  colSpan
5375
6331
  },
5376
- subsection.map((row) => React33.createElement(
6332
+ subsection.map((row) => React34.createElement(
5377
6333
  ArgRow,
5378
6334
  {
5379
6335
  key: row.key,
@@ -5387,28 +6343,18 @@ var ArgsTable = /* @__PURE__ */ __name((props) => {
5387
6343
  }, "ArgsTable");
5388
6344
 
5389
6345
  // src/blocks/blocks/Anchor.tsx
5390
- import React34 from "react";
6346
+ import React35 from "react";
5391
6347
  var anchorBlockIdFromId = /* @__PURE__ */ __name((storyId) => `anchor--${storyId}`, "anchorBlockIdFromId");
5392
- var Anchor = /* @__PURE__ */ __name(({ storyId, children }) => React34.createElement("div", { id: anchorBlockIdFromId(storyId), className: "sb-anchor" }, children), "Anchor");
6348
+ var Anchor = /* @__PURE__ */ __name(({ storyId, children }) => React35.createElement("div", { id: anchorBlockIdFromId(storyId), className: "sb-anchor" }, children), "Anchor");
5393
6349
 
5394
6350
  // src/blocks/blocks/ArgTypes.tsx
5395
- import React35 from "react";
6351
+ import React36 from "react";
5396
6352
  import { filterArgTypes } from "storybook/preview-api";
5397
6353
 
5398
6354
  // src/blocks/blocks/useOf.ts
5399
- import { useContext } from "react";
5400
-
5401
- // src/blocks/blocks/DocsContext.ts
5402
- import { createContext as createContext2 } from "react";
5403
- if (globalThis && globalThis.__DOCS_CONTEXT__ === void 0) {
5404
- globalThis.__DOCS_CONTEXT__ = createContext2(null);
5405
- globalThis.__DOCS_CONTEXT__.displayName = "DocsContext";
5406
- }
5407
- var DocsContext = globalThis ? globalThis.__DOCS_CONTEXT__ : createContext2(null);
5408
-
5409
- // src/blocks/blocks/useOf.ts
6355
+ import { useContext as useContext3 } from "react";
5410
6356
  var useOf = /* @__PURE__ */ __name((moduleExportOrType, validTypes) => {
5411
- const context = useContext(DocsContext);
6357
+ const context = useContext3(DocsContext);
5412
6358
  return context.resolveOf(moduleExportOrType, validTypes);
5413
6359
  }, "useOf");
5414
6360
 
@@ -5485,7 +6431,7 @@ var ArgTypes = /* @__PURE__ */ __name((props) => {
5485
6431
  const filteredArgTypes = filterArgTypes(argTypes, include, exclude);
5486
6432
  const hasSubcomponents = Boolean(subcomponents) && Object.keys(subcomponents || {}).length > 0;
5487
6433
  if (!hasSubcomponents) {
5488
- return React35.createElement(ArgsTable, { rows: filteredArgTypes, sort });
6434
+ return React36.createElement(ArgsTable, { rows: filteredArgTypes, sort });
5489
6435
  }
5490
6436
  const mainComponentName = getComponentName(component) || "Main";
5491
6437
  const subcomponentTabs = Object.fromEntries(
@@ -5505,18 +6451,18 @@ var ArgTypes = /* @__PURE__ */ __name((props) => {
5505
6451
  [mainComponentName]: { rows: filteredArgTypes, sort },
5506
6452
  ...subcomponentTabs
5507
6453
  };
5508
- return React35.createElement(TabbedArgsTable, { tabs, sort });
6454
+ return React36.createElement(TabbedArgsTable, { tabs, sort });
5509
6455
  }, "ArgTypes");
5510
6456
 
5511
6457
  // src/blocks/blocks/Canvas.tsx
5512
- import React39, { useContext as useContext4 } from "react";
6458
+ import React39, { useContext as useContext5 } from "react";
5513
6459
 
5514
6460
  // src/blocks/blocks/Source.tsx
5515
- import React37, { useContext as useContext2, useMemo as useMemo3 } from "react";
6461
+ import React38, { useContext as useContext4, useMemo as useMemo3 } from "react";
5516
6462
  import { SourceType } from "storybook/internal/docs-tools";
5517
6463
 
5518
6464
  // src/blocks/blocks/SourceContainer.tsx
5519
- import React36, { createContext as createContext3, useEffect as useEffect10, useState as useState13 } from "react";
6465
+ import React37, { createContext as createContext3, useEffect as useEffect11, useState as useState14 } from "react";
5520
6466
  import { SNIPPET_RENDERED } from "storybook/internal/docs-tools";
5521
6467
 
5522
6468
  // ../../node_modules/telejson/dist/chunk-EAFQLD22.mjs
@@ -7056,8 +8002,8 @@ var SourceContainer = /* @__PURE__ */ __name(({
7056
8002
  children,
7057
8003
  channel
7058
8004
  }) => {
7059
- const [sources, setSources] = useState13({});
7060
- useEffect10(() => {
8005
+ const [sources, setSources] = useState14({});
8006
+ useEffect11(() => {
7061
8007
  const handleSnippetRendered = /* @__PURE__ */ __name((idOrEvent, inputSource = null, inputFormat = false) => {
7062
8008
  const {
7063
8009
  id,
@@ -7084,15 +8030,15 @@ var SourceContainer = /* @__PURE__ */ __name(({
7084
8030
  channel.on(SNIPPET_RENDERED, handleSnippetRendered);
7085
8031
  return () => channel.off(SNIPPET_RENDERED, handleSnippetRendered);
7086
8032
  }, []);
7087
- return React36.createElement(SourceContext.Provider, { value: { sources } }, children);
8033
+ return React37.createElement(SourceContext.Provider, { value: { sources } }, children);
7088
8034
  }, "SourceContainer");
7089
8035
 
7090
8036
  // src/blocks/blocks/useTransformCode.tsx
7091
- import { useEffect as useEffect11, useState as useState14 } from "react";
8037
+ import { useEffect as useEffect12, useState as useState15 } from "react";
7092
8038
  function useTransformCode(source, transform, storyContext) {
7093
- const [transformedCode, setTransformedCode] = useState14("Transforming...");
8039
+ const [transformedCode, setTransformedCode] = useState15("Transforming...");
7094
8040
  const transformed = transform ? transform?.(source, storyContext) : source;
7095
- useEffect11(() => {
8041
+ useEffect12(() => {
7096
8042
  async function getTransformedCode() {
7097
8043
  const transformResult = await transformed;
7098
8044
  if (transformResult !== transformedCode) {
@@ -7188,106 +8134,16 @@ var useSourceProps = /* @__PURE__ */ __name((props, docsContext, sourceContext)
7188
8134
  };
7189
8135
  }, "useSourceProps");
7190
8136
  var Source2 = /* @__PURE__ */ __name((props) => {
7191
- const sourceContext = useContext2(SourceContext);
7192
- const docsContext = useContext2(DocsContext);
8137
+ const sourceContext = useContext4(SourceContext);
8138
+ const docsContext = useContext4(DocsContext);
7193
8139
  const sourceProps = useSourceProps(props, docsContext, sourceContext);
7194
- return React37.createElement(Source, { ...sourceProps });
8140
+ return React38.createElement(Source, { ...sourceProps });
7195
8141
  }, "Source");
7196
8142
 
7197
- // src/blocks/blocks/Story.tsx
7198
- import React38, { useContext as useContext3 } from "react";
7199
-
7200
- // src/blocks/blocks/useStory.ts
7201
- import { useEffect as useEffect12, useState as useState15 } from "react";
7202
- function useStory(storyId, context) {
7203
- const stories = useStories([storyId], context);
7204
- return stories && stories[0];
7205
- }
7206
- __name(useStory, "useStory");
7207
- function useStories(storyIds, context) {
7208
- const [storiesById, setStories] = useState15({});
7209
- useEffect12(() => {
7210
- Promise.all(
7211
- storyIds.map(async (storyId) => {
7212
- const story = await context.loadStory(storyId);
7213
- setStories(
7214
- (current) => current[storyId] === story ? current : { ...current, [storyId]: story }
7215
- );
7216
- })
7217
- );
7218
- });
7219
- return storyIds.map((storyId) => {
7220
- if (storiesById[storyId]) {
7221
- return storiesById[storyId];
7222
- }
7223
- try {
7224
- return context.storyById(storyId);
7225
- } catch (err) {
7226
- return void 0;
7227
- }
7228
- });
7229
- }
7230
- __name(useStories, "useStories");
7231
-
7232
- // src/blocks/blocks/Story.tsx
7233
- var getStoryId2 = /* @__PURE__ */ __name((props, context) => {
7234
- const { of, meta } = props;
7235
- if ("of" in props && of === void 0) {
7236
- throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");
7237
- }
7238
- if (meta) {
7239
- context.referenceMeta(meta, false);
7240
- }
7241
- const resolved = context.resolveOf(of || "story", ["story"]);
7242
- return resolved.story.id;
7243
- }, "getStoryId");
7244
- var getStoryProps = /* @__PURE__ */ __name((props, story, context) => {
7245
- const { parameters = {} } = story || {};
7246
- const { docs = {} } = parameters;
7247
- const storyParameters = docs.story || {};
7248
- if (docs.disable) {
7249
- return null;
7250
- }
7251
- const inline = props.inline ?? storyParameters.inline ?? false;
7252
- if (inline) {
7253
- const height2 = props.height ?? storyParameters.height;
7254
- const autoplay = props.autoplay ?? storyParameters.autoplay ?? false;
7255
- return {
7256
- story,
7257
- inline: true,
7258
- height: height2,
7259
- autoplay,
7260
- forceInitialArgs: !!props.__forceInitialArgs,
7261
- primary: !!props.__primary,
7262
- renderStoryToElement: context.renderStoryToElement
7263
- };
7264
- }
7265
- const height = props.height ?? storyParameters.height ?? storyParameters.iframeHeight ?? "100px";
7266
- return {
7267
- story,
7268
- inline: false,
7269
- height,
7270
- primary: !!props.__primary
7271
- };
7272
- }, "getStoryProps");
7273
- var Story2 = /* @__PURE__ */ __name((props = { __forceInitialArgs: false, __primary: false }) => {
7274
- const context = useContext3(DocsContext);
7275
- const storyId = getStoryId2(props, context);
7276
- const story = useStory(storyId, context);
7277
- if (!story) {
7278
- return React38.createElement(StorySkeleton, null);
7279
- }
7280
- const storyProps = getStoryProps(props, story, context);
7281
- if (!storyProps) {
7282
- return null;
7283
- }
7284
- return React38.createElement(Story, { ...storyProps });
7285
- }, "Story");
7286
-
7287
8143
  // src/blocks/blocks/Canvas.tsx
7288
8144
  var Canvas = /* @__PURE__ */ __name((props) => {
7289
- const docsContext = useContext4(DocsContext);
7290
- const sourceContext = useContext4(SourceContext);
8145
+ const docsContext = useContext5(DocsContext);
8146
+ const sourceContext = useContext5(SourceContext);
7291
8147
  const { of, source } = props;
7292
8148
  if ("of" in props && of === void 0) {
7293
8149
  throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");
@@ -7316,7 +8172,7 @@ var Canvas = /* @__PURE__ */ __name((props) => {
7316
8172
  }, "Canvas");
7317
8173
 
7318
8174
  // src/blocks/blocks/Controls.tsx
7319
- import React40, { useContext as useContext5 } from "react";
8175
+ import React40, { useContext as useContext6 } from "react";
7320
8176
  import { filterArgTypes as filterArgTypes2 } from "storybook/preview-api";
7321
8177
 
7322
8178
  // src/blocks/blocks/useArgs.ts
@@ -7387,7 +8243,7 @@ var Controls3 = /* @__PURE__ */ __name((props) => {
7387
8243
  if ("of" in props && of === void 0) {
7388
8244
  throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");
7389
8245
  }
7390
- const context = useContext5(DocsContext);
8246
+ const context = useContext6(DocsContext);
7391
8247
  const { story } = context.resolveOf(of || "story", ["story"]);
7392
8248
  const { parameters, argTypes, component, subcomponents } = story;
7393
8249
  const controlsParameters = parameters.docs?.controls || {};
@@ -7449,12 +8305,12 @@ import React42 from "react";
7449
8305
  import { dedent } from "ts-dedent";
7450
8306
 
7451
8307
  // src/blocks/blocks/mdx.tsx
7452
- import React41, { useContext as useContext6 } from "react";
8308
+ import React41, { useContext as useContext7 } from "react";
7453
8309
  import { Code, components, nameSpaceClassNames } from "storybook/internal/components";
7454
8310
  import { NAVIGATE_URL as NAVIGATE_URL2 } from "storybook/internal/core-events";
7455
8311
  import { LinkIcon } from "@storybook/icons";
7456
8312
  import { styled as styled27 } from "storybook/theming";
7457
- var { document } = globalThis;
8313
+ var { document: document2 } = globalThis;
7458
8314
  var assertIsFn = /* @__PURE__ */ __name((val) => {
7459
8315
  if (typeof val !== "function") {
7460
8316
  throw new Error(`Expected story function, got: ${val}`);
@@ -7491,7 +8347,7 @@ function navigate(context, url) {
7491
8347
  __name(navigate, "navigate");
7492
8348
  var A2 = components.a;
7493
8349
  var AnchorInPage = /* @__PURE__ */ __name(({ hash, children }) => {
7494
- const context = useContext6(DocsContext);
8350
+ const context = useContext7(DocsContext);
7495
8351
  return React41.createElement(
7496
8352
  A2,
7497
8353
  {
@@ -7499,7 +8355,7 @@ var AnchorInPage = /* @__PURE__ */ __name(({ hash, children }) => {
7499
8355
  target: "_self",
7500
8356
  onClick: (event) => {
7501
8357
  const id = hash.substring(1);
7502
- const element = document.getElementById(id);
8358
+ const element = document2.getElementById(id);
7503
8359
  if (element) {
7504
8360
  navigate(context, hash);
7505
8361
  }
@@ -7510,7 +8366,7 @@ var AnchorInPage = /* @__PURE__ */ __name(({ hash, children }) => {
7510
8366
  }, "AnchorInPage");
7511
8367
  var AnchorMdx = /* @__PURE__ */ __name((props) => {
7512
8368
  const { href, target, children, ...rest } = props;
7513
- const context = useContext6(DocsContext);
8369
+ const context = useContext7(DocsContext);
7514
8370
  if (!href || target === "_blank" || /^https?:\/\//.test(href)) {
7515
8371
  return React41.createElement(A2, { ...props });
7516
8372
  }
@@ -7568,7 +8424,7 @@ var HeaderWithOcticonAnchor = /* @__PURE__ */ __name(({
7568
8424
  children,
7569
8425
  ...rest
7570
8426
  }) => {
7571
- const context = useContext6(DocsContext);
8427
+ const context = useContext7(DocsContext);
7572
8428
  const OcticonHeader = OcticonHeaders[as];
7573
8429
  const hash = `#${id}`;
7574
8430
  return React41.createElement(OcticonHeader, { id, ...rest }, React41.createElement(
@@ -7579,7 +8435,7 @@ var HeaderWithOcticonAnchor = /* @__PURE__ */ __name(({
7579
8435
  tabIndex: -1,
7580
8436
  target: "_self",
7581
8437
  onClick: (event) => {
7582
- const element = document.getElementById(id);
8438
+ const element = document2.getElementById(id);
7583
8439
  if (element) {
7584
8440
  navigate(context, hash);
7585
8441
  }
@@ -7707,7 +8563,7 @@ import React53 from "react";
7707
8563
  // src/blocks/blocks/DocsContainer.tsx
7708
8564
  import React44, { useEffect as useEffect15 } from "react";
7709
8565
  import { ThemeProvider, ensure as ensureTheme } from "storybook/theming";
7710
- var { document: document2, window: globalWindow3 } = globalThis;
8566
+ var { document: document3, window: globalWindow3 } = globalThis;
7711
8567
  var DocsContainer = /* @__PURE__ */ __name(({
7712
8568
  context,
7713
8569
  theme,
@@ -7725,7 +8581,7 @@ var DocsContainer = /* @__PURE__ */ __name(({
7725
8581
  try {
7726
8582
  url = new URL(globalWindow3.parent.location.toString());
7727
8583
  if (url.hash) {
7728
- const element = document2.getElementById(decodeURIComponent(url.hash.substring(1)));
8584
+ const element = document3.getElementById(decodeURIComponent(url.hash.substring(1)));
7729
8585
  if (element) {
7730
8586
  setTimeout(() => {
7731
8587
  scrollToElement(element);
@@ -7755,7 +8611,7 @@ var DocsContainer = /* @__PURE__ */ __name(({
7755
8611
  import React52 from "react";
7756
8612
 
7757
8613
  // src/blocks/blocks/Primary.tsx
7758
- import React48, { useContext as useContext7 } from "react";
8614
+ import React48, { useContext as useContext8 } from "react";
7759
8615
 
7760
8616
  // src/blocks/blocks/DocsStory.tsx
7761
8617
  import React47 from "react";
@@ -7875,13 +8731,13 @@ var Primary = /* @__PURE__ */ __name((props) => {
7875
8731
  throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");
7876
8732
  }
7877
8733
  const { csfFile } = useOf(of || "meta", ["meta"]);
7878
- const context = useContext7(DocsContext);
8734
+ const context = useContext8(DocsContext);
7879
8735
  const primaryStory = context.componentStoriesFromCSFFile(csfFile)[0];
7880
8736
  return primaryStory ? React48.createElement(DocsStory, { of: primaryStory.moduleExport, expanded: false, __primary: true, withToolbar: true }) : null;
7881
8737
  }, "Primary");
7882
8738
 
7883
8739
  // src/blocks/blocks/Stories.tsx
7884
- import React49, { useContext as useContext8 } from "react";
8740
+ import React49, { useContext as useContext9 } from "react";
7885
8741
  import { styled as styled28 } from "storybook/theming";
7886
8742
  var StyledHeading = styled28(Heading2)(({ theme }) => ({
7887
8743
  fontSize: `${theme.typography.size.s2 - 1}px`,
@@ -7898,7 +8754,7 @@ var StyledHeading = styled28(Heading2)(({ theme }) => ({
7898
8754
  }
7899
8755
  }));
7900
8756
  var Stories = /* @__PURE__ */ __name(({ title = "Stories", includePrimary = true }) => {
7901
- const { componentStories, projectAnnotations, getStoryContext } = useContext8(DocsContext);
8757
+ const { componentStories, projectAnnotations, getStoryContext } = useContext9(DocsContext);
7902
8758
  let stories = componentStories();
7903
8759
  const { stories: { filter } = { filter: void 0 } } = projectAnnotations.parameters?.docs || {};
7904
8760
  if (filter) {
@@ -8066,7 +8922,8 @@ var _ExternalPreview = class _ExternalPreview extends Preview2 {
8066
8922
  importPath,
8067
8923
  title,
8068
8924
  name,
8069
- type: "story"
8925
+ type: "story",
8926
+ subtype: "story"
8070
8927
  };
8071
8928
  });
8072
8929
  this.onStoriesChanged({ storyIndex: this.storyIndex });
@@ -8124,9 +8981,9 @@ var ExternalDocsContainer = /* @__PURE__ */ __name(({ projectAnnotations, childr
8124
8981
  }, "ExternalDocsContainer");
8125
8982
 
8126
8983
  // src/blocks/blocks/Meta.tsx
8127
- import React56, { useContext as useContext9 } from "react";
8984
+ import React56, { useContext as useContext10 } from "react";
8128
8985
  var Meta = /* @__PURE__ */ __name(({ of }) => {
8129
- const context = useContext9(DocsContext);
8986
+ const context = useContext10(DocsContext);
8130
8987
  if (of) {
8131
8988
  context.referenceMeta(of, true);
8132
8989
  }
@@ -8206,7 +9063,7 @@ export {
8206
9063
  format,
8207
9064
  formatDate,
8208
9065
  formatTime,
8209
- getStoryId2 as getStoryId,
9066
+ getStoryId,
8210
9067
  getStoryProps,
8211
9068
  parse2 as parse,
8212
9069
  parseDate,