@ryanfw/prompt-orchestration-pipeline 0.15.1 → 0.16.1

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.
@@ -2416,7 +2416,7 @@ function requireReactDomClient_production() {
2416
2416
  nativeEvent = nativeEvent.detail;
2417
2417
  return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
2418
2418
  }
2419
- var isComposing = false;
2419
+ var isComposing2 = false;
2420
2420
  function getNativeBeforeInputChars(domEventName, nativeEvent) {
2421
2421
  switch (domEventName) {
2422
2422
  case "compositionend":
@@ -2432,8 +2432,8 @@ function requireReactDomClient_production() {
2432
2432
  }
2433
2433
  }
2434
2434
  function getFallbackBeforeInputChars(domEventName, nativeEvent) {
2435
- if (isComposing)
2436
- return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root2 = null, isComposing = false, domEventName) : null;
2435
+ if (isComposing2)
2436
+ return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root2 = null, isComposing2 = false, domEventName) : null;
2437
2437
  switch (domEventName) {
2438
2438
  case "paste":
2439
2439
  return null;
@@ -10164,8 +10164,8 @@ function requireReactDomClient_production() {
10164
10164
  eventType = void 0;
10165
10165
  }
10166
10166
  else
10167
- isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && 229 === nativeEvent.keyCode && (eventType = "onCompositionStart");
10168
- eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing && (fallbackData = getData()) : (root2 = nativeEventTarget, startText = "value" in root2 ? root2.value : root2.textContent, isComposing = true)), handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
10167
+ isComposing2 ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && 229 === nativeEvent.keyCode && (eventType = "onCompositionStart");
10168
+ eventType && (useFallbackCompositionData && "ko" !== nativeEvent.locale && (isComposing2 || "onCompositionStart" !== eventType ? "onCompositionEnd" === eventType && isComposing2 && (fallbackData = getData()) : (root2 = nativeEventTarget, startText = "value" in root2 ? root2.value : root2.textContent, isComposing2 = true)), handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
10169
10169
  eventType,
10170
10170
  domEventName,
10171
10171
  null,
@@ -12584,7 +12584,7 @@ function createBrowserHistory(options = {}) {
12584
12584
  options
12585
12585
  );
12586
12586
  }
12587
- function invariant(value, message) {
12587
+ function invariant$1(value, message) {
12588
12588
  if (value === false || value === null || typeof value === "undefined") {
12589
12589
  throw new Error(message);
12590
12590
  }
@@ -12751,7 +12751,7 @@ function createBrowserURLImpl(to, isAbsolute = false) {
12751
12751
  if (typeof window !== "undefined") {
12752
12752
  base = window.location.origin !== "null" ? window.location.origin : window.location.href;
12753
12753
  }
12754
- invariant(base, "No window.location.(origin|href) available to create URL");
12754
+ invariant$1(base, "No window.location.(origin|href) available to create URL");
12755
12755
  let href = typeof to === "string" ? to : createPath(to);
12756
12756
  href = href.replace(/ $/, "%20");
12757
12757
  if (!isAbsolute && href.startsWith("//")) {
@@ -12793,7 +12793,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
12793
12793
  if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {
12794
12794
  return;
12795
12795
  }
12796
- invariant(
12796
+ invariant$1(
12797
12797
  meta.relativePath.startsWith(parentPath),
12798
12798
  `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
12799
12799
  );
@@ -12802,7 +12802,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
12802
12802
  let path2 = joinPaths([parentPath, meta.relativePath]);
12803
12803
  let routesMeta = parentsMeta.concat(meta);
12804
12804
  if (route.children && route.children.length > 0) {
12805
- invariant(
12805
+ invariant$1(
12806
12806
  // Our types know better, but runtime JS may not!
12807
12807
  // @ts-expect-error
12808
12808
  route.index !== true,
@@ -13076,15 +13076,15 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
13076
13076
  to = parsePath(toArg);
13077
13077
  } else {
13078
13078
  to = { ...toArg };
13079
- invariant(
13079
+ invariant$1(
13080
13080
  !to.pathname || !to.pathname.includes("?"),
13081
13081
  getInvalidPathError("?", "pathname", "search", to)
13082
13082
  );
13083
- invariant(
13083
+ invariant$1(
13084
13084
  !to.pathname || !to.pathname.includes("#"),
13085
13085
  getInvalidPathError("#", "pathname", "hash", to)
13086
13086
  );
13087
- invariant(
13087
+ invariant$1(
13088
13088
  !to.search || !to.search.includes("#"),
13089
13089
  getInvalidPathError("#", "search", "hash", to)
13090
13090
  );
@@ -13167,7 +13167,7 @@ RouteContext.displayName = "Route";
13167
13167
  var RouteErrorContext = reactExports.createContext(null);
13168
13168
  RouteErrorContext.displayName = "RouteError";
13169
13169
  function useHref(to, { relative } = {}) {
13170
- invariant(
13170
+ invariant$1(
13171
13171
  useInRouterContext(),
13172
13172
  // TODO: This error is probably because they somehow have 2 versions of the
13173
13173
  // router loaded. We can help them understand how to avoid that.
@@ -13185,7 +13185,7 @@ function useInRouterContext() {
13185
13185
  return reactExports.useContext(LocationContext) != null;
13186
13186
  }
13187
13187
  function useLocation() {
13188
- invariant(
13188
+ invariant$1(
13189
13189
  useInRouterContext(),
13190
13190
  // TODO: This error is probably because they somehow have 2 versions of the
13191
13191
  // router loaded. We can help them understand how to avoid that.
@@ -13205,7 +13205,7 @@ function useNavigate() {
13205
13205
  return isDataRoute ? useNavigateStable() : useNavigateUnstable();
13206
13206
  }
13207
13207
  function useNavigateUnstable() {
13208
- invariant(
13208
+ invariant$1(
13209
13209
  useInRouterContext(),
13210
13210
  // TODO: This error is probably because they somehow have 2 versions of the
13211
13211
  // router loaded. We can help them understand how to avoid that.
@@ -13277,7 +13277,7 @@ function useRoutes(routes, locationArg) {
13277
13277
  return useRoutesImpl(routes, locationArg);
13278
13278
  }
13279
13279
  function useRoutesImpl(routes, locationArg, dataRouterState, unstable_onError, future) {
13280
- invariant(
13280
+ invariant$1(
13281
13281
  useInRouterContext(),
13282
13282
  // TODO: This error is probably because they somehow have 2 versions of the
13283
13283
  // router loaded. We can help them understand how to avoid that.
@@ -13304,7 +13304,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
13304
13304
  let location;
13305
13305
  if (locationArg) {
13306
13306
  let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
13307
- invariant(
13307
+ invariant$1(
13308
13308
  parentPathnameBase === "/" || parsedLocationArg.pathname?.startsWith(parentPathnameBase),
13309
13309
  `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${parentPathnameBase}" but pathname "${parsedLocationArg.pathname}" was given in the \`location\` prop.`
13310
13310
  );
@@ -13473,7 +13473,7 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, uns
13473
13473
  let errorIndex = renderedMatches.findIndex(
13474
13474
  (m2) => m2.route.id && errors?.[m2.route.id] !== void 0
13475
13475
  );
13476
- invariant(
13476
+ invariant$1(
13477
13477
  errorIndex >= 0,
13478
13478
  `Could not find a matching route for errors on route IDs: ${Object.keys(
13479
13479
  errors
@@ -13579,23 +13579,23 @@ function getDataRouterConsoleError(hookName) {
13579
13579
  }
13580
13580
  function useDataRouterContext(hookName) {
13581
13581
  let ctx = reactExports.useContext(DataRouterContext);
13582
- invariant(ctx, getDataRouterConsoleError(hookName));
13582
+ invariant$1(ctx, getDataRouterConsoleError(hookName));
13583
13583
  return ctx;
13584
13584
  }
13585
13585
  function useDataRouterState(hookName) {
13586
13586
  let state = reactExports.useContext(DataRouterStateContext);
13587
- invariant(state, getDataRouterConsoleError(hookName));
13587
+ invariant$1(state, getDataRouterConsoleError(hookName));
13588
13588
  return state;
13589
13589
  }
13590
13590
  function useRouteContext(hookName) {
13591
13591
  let route = reactExports.useContext(RouteContext);
13592
- invariant(route, getDataRouterConsoleError(hookName));
13592
+ invariant$1(route, getDataRouterConsoleError(hookName));
13593
13593
  return route;
13594
13594
  }
13595
13595
  function useCurrentRouteId(hookName) {
13596
13596
  let route = useRouteContext(hookName);
13597
13597
  let thisRoute = route.matches[route.matches.length - 1];
13598
- invariant(
13598
+ invariant$1(
13599
13599
  thisRoute.route.id,
13600
13600
  `${hookName} can only be used on routes that contain a unique "id"`
13601
13601
  );
@@ -13666,7 +13666,7 @@ function DataRoutes({
13666
13666
  return useRoutesImpl(routes, void 0, state, unstable_onError, future);
13667
13667
  }
13668
13668
  function Route(props) {
13669
- invariant(
13669
+ invariant$1(
13670
13670
  false,
13671
13671
  `A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`
13672
13672
  );
@@ -13679,7 +13679,7 @@ function Router({
13679
13679
  navigator: navigator2,
13680
13680
  static: staticProp = false
13681
13681
  }) {
13682
- invariant(
13682
+ invariant$1(
13683
13683
  !useInRouterContext(),
13684
13684
  `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`
13685
13685
  );
@@ -13748,11 +13748,11 @@ function createRoutesFromChildren(children, parentPath = []) {
13748
13748
  );
13749
13749
  return;
13750
13750
  }
13751
- invariant(
13751
+ invariant$1(
13752
13752
  element2.type === Route,
13753
13753
  `[${typeof element2.type === "string" ? element2.type : element2.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`
13754
13754
  );
13755
- invariant(
13755
+ invariant$1(
13756
13756
  !element2.props.index || !element2.props.children,
13757
13757
  "An index route cannot have child routes."
13758
13758
  );
@@ -14034,8 +14034,8 @@ function dedupeHrefs(hrefs) {
14034
14034
  }
14035
14035
  function sortKeys(obj) {
14036
14036
  let sorted = {};
14037
- let keys2 = Object.keys(obj).sort();
14038
- for (let key of keys2) {
14037
+ let keys4 = Object.keys(obj).sort();
14038
+ for (let key of keys4) {
14039
14039
  sorted[key] = obj[key];
14040
14040
  }
14041
14041
  return sorted;
@@ -14082,7 +14082,7 @@ function usePrefetchBehavior(prefetch, theirElementProps) {
14082
14082
  let frameworkContext = reactExports.useContext(FrameworkContext);
14083
14083
  let [maybePrefetch, setMaybePrefetch] = reactExports.useState(false);
14084
14084
  let [shouldPrefetch, setShouldPrefetch] = reactExports.useState(false);
14085
- let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
14085
+ let { onFocus, onBlur: onBlur2, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
14086
14086
  let ref = reactExports.useRef(null);
14087
14087
  reactExports.useEffect(() => {
14088
14088
  if (prefetch === "render") {
@@ -14129,7 +14129,7 @@ function usePrefetchBehavior(prefetch, theirElementProps) {
14129
14129
  ref,
14130
14130
  {
14131
14131
  onFocus: composeEventHandlers$1(onFocus, setIntent),
14132
- onBlur: composeEventHandlers$1(onBlur, cancelIntent),
14132
+ onBlur: composeEventHandlers$1(onBlur2, cancelIntent),
14133
14133
  onMouseEnter: composeEventHandlers$1(onMouseEnter, setIntent),
14134
14134
  onMouseLeave: composeEventHandlers$1(onMouseLeave, cancelIntent),
14135
14135
  onTouchStart: composeEventHandlers$1(onTouchStart, setIntent)
@@ -14507,7 +14507,7 @@ function getDataRouterConsoleError2(hookName) {
14507
14507
  }
14508
14508
  function useDataRouterContext3(hookName) {
14509
14509
  let ctx = reactExports.useContext(DataRouterContext);
14510
- invariant(ctx, getDataRouterConsoleError2(hookName));
14510
+ invariant$1(ctx, getDataRouterConsoleError2(hookName));
14511
14511
  return ctx;
14512
14512
  }
14513
14513
  function useLinkClickHandler(to, {
@@ -14595,7 +14595,7 @@ function useSubmit() {
14595
14595
  function useFormAction(action, { relative } = {}) {
14596
14596
  let { basename: basename2 } = reactExports.useContext(NavigationContext);
14597
14597
  let routeContext = reactExports.useContext(RouteContext);
14598
- invariant(routeContext, "useFormAction must be used inside a RouteContext");
14598
+ invariant$1(routeContext, "useFormAction must be used inside a RouteContext");
14599
14599
  let [match] = routeContext.matches.slice(-1);
14600
14600
  let path2 = { ...useResolvedPath(action ? action : ".", { relative }) };
14601
14601
  let location = useLocation();
@@ -14621,7 +14621,7 @@ function useFormAction(action, { relative } = {}) {
14621
14621
  }
14622
14622
  function useViewTransitionState(to, { relative } = {}) {
14623
14623
  let vtContext = reactExports.useContext(ViewTransitionContext);
14624
- invariant(
14624
+ invariant$1(
14625
14625
  vtContext != null,
14626
14626
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
14627
14627
  );
@@ -17610,7 +17610,7 @@ function isNode(value) {
17610
17610
  }
17611
17611
  return value instanceof Node || value instanceof getWindow(value).Node;
17612
17612
  }
17613
- function isElement(value) {
17613
+ function isElement$1(value) {
17614
17614
  if (!hasWindow()) {
17615
17615
  return false;
17616
17616
  }
@@ -17657,7 +17657,7 @@ const willChangeValues = ["transform", "translate", "scale", "rotate", "perspect
17657
17657
  const containValues = ["paint", "layout", "strict", "content"];
17658
17658
  function isContainingBlock(elementOrCss) {
17659
17659
  const webkit = isWebKit();
17660
- const css2 = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
17660
+ const css2 = isElement$1(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
17661
17661
  return transformProperties.some((value) => css2[value] ? css2[value] !== "none" : false) || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit && (css2.filter ? css2.filter !== "none" : false) || willChangeValues.some((value) => (css2.willChange || "").includes(value)) || containValues.some((value) => (css2.contain || "").includes(value));
17662
17662
  }
17663
17663
  function getContainingBlock(element2) {
@@ -17684,7 +17684,7 @@ function getComputedStyle$1(element2) {
17684
17684
  return getWindow(element2).getComputedStyle(element2);
17685
17685
  }
17686
17686
  function getNodeScroll(element2) {
17687
- if (isElement(element2)) {
17687
+ if (isElement$1(element2)) {
17688
17688
  return {
17689
17689
  scrollLeft: element2.scrollLeft,
17690
17690
  scrollTop: element2.scrollTop
@@ -17757,7 +17757,7 @@ function getCssDimensions(element2) {
17757
17757
  };
17758
17758
  }
17759
17759
  function unwrapElement(element2) {
17760
- return !isElement(element2) ? element2.contextElement : element2;
17760
+ return !isElement$1(element2) ? element2.contextElement : element2;
17761
17761
  }
17762
17762
  function getScale(element2) {
17763
17763
  const domElement = unwrapElement(element2);
@@ -17815,7 +17815,7 @@ function getBoundingClientRect(element2, includeScale, isFixedStrategy, offsetPa
17815
17815
  let scale = createCoords(1);
17816
17816
  if (includeScale) {
17817
17817
  if (offsetParent) {
17818
- if (isElement(offsetParent)) {
17818
+ if (isElement$1(offsetParent)) {
17819
17819
  scale = getScale(offsetParent);
17820
17820
  }
17821
17821
  } else {
@@ -17829,7 +17829,7 @@ function getBoundingClientRect(element2, includeScale, isFixedStrategy, offsetPa
17829
17829
  let height = clientRect.height / scale.y;
17830
17830
  if (domElement) {
17831
17831
  const win = getWindow(domElement);
17832
- const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
17832
+ const offsetWin = offsetParent && isElement$1(offsetParent) ? getWindow(offsetParent) : offsetParent;
17833
17833
  let currentWin = win;
17834
17834
  let currentIFrame = getFrameElement(currentWin);
17835
17835
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
@@ -17992,7 +17992,7 @@ function getClientRectFromClippingAncestor(element2, clippingAncestor, strategy)
17992
17992
  rect = getViewportRect(element2, strategy);
17993
17993
  } else if (clippingAncestor === "document") {
17994
17994
  rect = getDocumentRect(getDocumentElement(element2));
17995
- } else if (isElement(clippingAncestor)) {
17995
+ } else if (isElement$1(clippingAncestor)) {
17996
17996
  rect = getInnerBoundingClientRect(clippingAncestor, strategy);
17997
17997
  } else {
17998
17998
  const visualOffsets = getVisualOffsets(element2);
@@ -18007,7 +18007,7 @@ function getClientRectFromClippingAncestor(element2, clippingAncestor, strategy)
18007
18007
  }
18008
18008
  function hasFixedPositionAncestor(element2, stopNode) {
18009
18009
  const parentNode = getParentNode(element2);
18010
- if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
18010
+ if (parentNode === stopNode || !isElement$1(parentNode) || isLastTraversableNode(parentNode)) {
18011
18011
  return false;
18012
18012
  }
18013
18013
  return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
@@ -18017,11 +18017,11 @@ function getClippingElementAncestors(element2, cache) {
18017
18017
  if (cachedResult) {
18018
18018
  return cachedResult;
18019
18019
  }
18020
- let result = getOverflowAncestors(element2, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
18020
+ let result = getOverflowAncestors(element2, [], false).filter((el) => isElement$1(el) && getNodeName(el) !== "body");
18021
18021
  let currentContainingBlockComputedStyle = null;
18022
18022
  const elementIsFixed = getComputedStyle$1(element2).position === "fixed";
18023
18023
  let currentNode = elementIsFixed ? getParentNode(element2) : element2;
18024
- while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
18024
+ while (isElement$1(currentNode) && !isLastTraversableNode(currentNode)) {
18025
18025
  const computedStyle = getComputedStyle$1(currentNode);
18026
18026
  const currentNodeIsContaining = isContainingBlock(currentNode);
18027
18027
  if (!currentNodeIsContaining && computedStyle.position === "fixed") {
@@ -18135,7 +18135,7 @@ function getOffsetParent(element2, polyfill2) {
18135
18135
  if (!isHTMLElement(element2)) {
18136
18136
  let svgOffsetParent = getParentNode(element2);
18137
18137
  while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
18138
- if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
18138
+ if (isElement$1(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
18139
18139
  return svgOffsetParent;
18140
18140
  }
18141
18141
  svgOffsetParent = getParentNode(svgOffsetParent);
@@ -18177,7 +18177,7 @@ const platform = {
18177
18177
  getClientRects,
18178
18178
  getDimensions,
18179
18179
  getScale,
18180
- isElement,
18180
+ isElement: isElement$1,
18181
18181
  isRTL
18182
18182
  };
18183
18183
  function rectsAreEqual(a2, b2) {
@@ -18363,7 +18363,7 @@ function deepEqual(a2, b2) {
18363
18363
  }
18364
18364
  let length;
18365
18365
  let i2;
18366
- let keys2;
18366
+ let keys4;
18367
18367
  if (a2 && b2 && typeof a2 === "object") {
18368
18368
  if (Array.isArray(a2)) {
18369
18369
  length = a2.length;
@@ -18375,18 +18375,18 @@ function deepEqual(a2, b2) {
18375
18375
  }
18376
18376
  return true;
18377
18377
  }
18378
- keys2 = Object.keys(a2);
18379
- length = keys2.length;
18378
+ keys4 = Object.keys(a2);
18379
+ length = keys4.length;
18380
18380
  if (length !== Object.keys(b2).length) {
18381
18381
  return false;
18382
18382
  }
18383
18383
  for (i2 = length; i2-- !== 0; ) {
18384
- if (!{}.hasOwnProperty.call(b2, keys2[i2])) {
18384
+ if (!{}.hasOwnProperty.call(b2, keys4[i2])) {
18385
18385
  return false;
18386
18386
  }
18387
18387
  }
18388
18388
  for (i2 = length; i2-- !== 0; ) {
18389
- const key = keys2[i2];
18389
+ const key = keys4[i2];
18390
18390
  if (key === "_owner" && a2.$$typeof) {
18391
18391
  continue;
18392
18392
  }
@@ -22857,46 +22857,131 @@ const createLucideIcon = (iconName, iconNode) => {
22857
22857
  * This source code is licensed under the ISC license.
22858
22858
  * See the LICENSE file in the root directory of this source tree.
22859
22859
  */
22860
- const __iconNode$8 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
22861
- const Check = createLucideIcon("check", __iconNode$8);
22860
+ const __iconNode$f = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
22861
+ const Check = createLucideIcon("check", __iconNode$f);
22862
22862
  /**
22863
22863
  * @license lucide-react v0.544.0 - ISC
22864
22864
  *
22865
22865
  * This source code is licensed under the ISC license.
22866
22866
  * See the LICENSE file in the root directory of this source tree.
22867
22867
  */
22868
- const __iconNode$7 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
22869
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$7);
22868
+ const __iconNode$e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
22869
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$e);
22870
22870
  /**
22871
22871
  * @license lucide-react v0.544.0 - ISC
22872
22872
  *
22873
22873
  * This source code is licensed under the ISC license.
22874
22874
  * See the LICENSE file in the root directory of this source tree.
22875
22875
  */
22876
- const __iconNode$6 = [
22876
+ const __iconNode$d = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
22877
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$d);
22878
+ /**
22879
+ * @license lucide-react v0.544.0 - ISC
22880
+ *
22881
+ * This source code is licensed under the ISC license.
22882
+ * See the LICENSE file in the root directory of this source tree.
22883
+ */
22884
+ const __iconNode$c = [
22877
22885
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
22878
22886
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
22879
22887
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
22880
22888
  ];
22881
- const CodeXml = createLucideIcon("code-xml", __iconNode$6);
22889
+ const CodeXml = createLucideIcon("code-xml", __iconNode$c);
22882
22890
  /**
22883
22891
  * @license lucide-react v0.544.0 - ISC
22884
22892
  *
22885
22893
  * This source code is licensed under the ISC license.
22886
22894
  * See the LICENSE file in the root directory of this source tree.
22887
22895
  */
22888
- const __iconNode$5 = [
22896
+ const __iconNode$b = [
22889
22897
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
22890
22898
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
22891
22899
  ];
22892
- const Copy = createLucideIcon("copy", __iconNode$5);
22900
+ const Copy = createLucideIcon("copy", __iconNode$b);
22893
22901
  /**
22894
22902
  * @license lucide-react v0.544.0 - ISC
22895
22903
  *
22896
22904
  * This source code is licensed under the ISC license.
22897
22905
  * See the LICENSE file in the root directory of this source tree.
22898
22906
  */
22899
- const __iconNode$4 = [
22907
+ const __iconNode$a = [
22908
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
22909
+ ["path", { d: "M12 2v2", key: "tus03m" }],
22910
+ ["path", { d: "M17 20v2", key: "1rnc9c" }],
22911
+ ["path", { d: "M17 2v2", key: "11trls" }],
22912
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
22913
+ ["path", { d: "M2 17h2", key: "7oei6x" }],
22914
+ ["path", { d: "M2 7h2", key: "asdhe0" }],
22915
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
22916
+ ["path", { d: "M20 17h2", key: "1fpfkl" }],
22917
+ ["path", { d: "M20 7h2", key: "1o8tra" }],
22918
+ ["path", { d: "M7 20v2", key: "4gnj0m" }],
22919
+ ["path", { d: "M7 2v2", key: "1i4yhu" }],
22920
+ ["rect", { x: "4", y: "4", width: "16", height: "16", rx: "2", key: "1vbyd7" }],
22921
+ ["rect", { x: "8", y: "8", width: "8", height: "8", rx: "1", key: "z9xiuo" }]
22922
+ ];
22923
+ const Cpu = createLucideIcon("cpu", __iconNode$a);
22924
+ /**
22925
+ * @license lucide-react v0.544.0 - ISC
22926
+ *
22927
+ * This source code is licensed under the ISC license.
22928
+ * See the LICENSE file in the root directory of this source tree.
22929
+ */
22930
+ const __iconNode$9 = [
22931
+ ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
22932
+ ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
22933
+ ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
22934
+ ];
22935
+ const Database = createLucideIcon("database", __iconNode$9);
22936
+ /**
22937
+ * @license lucide-react v0.544.0 - ISC
22938
+ *
22939
+ * This source code is licensed under the ISC license.
22940
+ * See the LICENSE file in the root directory of this source tree.
22941
+ */
22942
+ const __iconNode$8 = [
22943
+ ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
22944
+ ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
22945
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
22946
+ ["path", { d: "M16 13H8", key: "t4e002" }],
22947
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
22948
+ ];
22949
+ const FileText = createLucideIcon("file-text", __iconNode$8);
22950
+ /**
22951
+ * @license lucide-react v0.544.0 - ISC
22952
+ *
22953
+ * This source code is licensed under the ISC license.
22954
+ * See the LICENSE file in the root directory of this source tree.
22955
+ */
22956
+ const __iconNode$7 = [
22957
+ [
22958
+ "path",
22959
+ {
22960
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
22961
+ key: "1kt360"
22962
+ }
22963
+ ]
22964
+ ];
22965
+ const Folder = createLucideIcon("folder", __iconNode$7);
22966
+ /**
22967
+ * @license lucide-react v0.544.0 - ISC
22968
+ *
22969
+ * This source code is licensed under the ISC license.
22970
+ * See the LICENSE file in the root directory of this source tree.
22971
+ */
22972
+ const __iconNode$6 = [
22973
+ ["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
22974
+ ["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
22975
+ ["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
22976
+ ];
22977
+ const Key = createLucideIcon("key", __iconNode$6);
22978
+ /**
22979
+ * @license lucide-react v0.544.0 - ISC
22980
+ *
22981
+ * This source code is licensed under the ISC license.
22982
+ * See the LICENSE file in the root directory of this source tree.
22983
+ */
22984
+ const __iconNode$5 = [
22900
22985
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
22901
22986
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
22902
22987
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -22904,18 +22989,34 @@ const __iconNode$4 = [
22904
22989
  ["path", { d: "M8 12h13", key: "1za7za" }],
22905
22990
  ["path", { d: "M8 19h13", key: "m83p4d" }]
22906
22991
  ];
22907
- const List = createLucideIcon("list", __iconNode$4);
22992
+ const List = createLucideIcon("list", __iconNode$5);
22908
22993
  /**
22909
22994
  * @license lucide-react v0.544.0 - ISC
22910
22995
  *
22911
22996
  * This source code is licensed under the ISC license.
22912
22997
  * See the LICENSE file in the root directory of this source tree.
22913
22998
  */
22914
- const __iconNode$3 = [
22999
+ const __iconNode$4 = [
22915
23000
  ["path", { d: "M5 12h14", key: "1ays0h" }],
22916
23001
  ["path", { d: "M12 5v14", key: "s699le" }]
22917
23002
  ];
22918
- const Plus = createLucideIcon("plus", __iconNode$3);
23003
+ const Plus = createLucideIcon("plus", __iconNode$4);
23004
+ /**
23005
+ * @license lucide-react v0.544.0 - ISC
23006
+ *
23007
+ * This source code is licensed under the ISC license.
23008
+ * See the LICENSE file in the root directory of this source tree.
23009
+ */
23010
+ const __iconNode$3 = [
23011
+ [
23012
+ "path",
23013
+ {
23014
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
23015
+ key: "oel41y"
23016
+ }
23017
+ ]
23018
+ ];
23019
+ const Shield = createLucideIcon("shield", __iconNode$3);
22919
23020
  /**
22920
23021
  * @license lucide-react v0.544.0 - ISC
22921
23022
  *
@@ -23592,6 +23693,7 @@ function Layout({
23592
23693
  pageTitle,
23593
23694
  breadcrumbs,
23594
23695
  actions,
23696
+ subheader,
23595
23697
  backTo = "/",
23596
23698
  maxWidth = "max-w-7xl"
23597
23699
  }) {
@@ -23782,6 +23884,7 @@ function Layout({
23782
23884
  )
23783
23885
  }
23784
23886
  ),
23887
+ subheader,
23785
23888
  /* @__PURE__ */ jsxRuntimeExports.jsx(
23786
23889
  "main",
23787
23890
  {
@@ -23845,15 +23948,44 @@ function PromptPipelineDashboard() {
23845
23948
  console.warn(`Cannot open job "${job.name}" - no valid job ID available`);
23846
23949
  }
23847
23950
  };
23848
- const headerActions = runningJobs.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", className: "text-gray-11", children: [
23849
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "1", weight: "medium", children: "Overall Progress" }),
23850
- /* @__PURE__ */ jsxRuntimeExports.jsx(Progress, { value: aggregateProgress, className: "w-20" }),
23851
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { size: "1", className: "text-gray-9", children: [
23852
- aggregateProgress,
23853
- "%"
23854
- ] })
23855
- ] });
23856
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout, { title: "Prompt Pipeline", actions: headerActions, children: [
23951
+ const progressBanner = runningJobs.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
23952
+ p$9,
23953
+ {
23954
+ role: "status",
23955
+ "aria-live": "polite",
23956
+ className: "bg-blue-50 border-b border-blue-200",
23957
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
23958
+ p$6,
23959
+ {
23960
+ align: "center",
23961
+ gap: "4",
23962
+ className: "mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-3",
23963
+ children: [
23964
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { size: "2", children: [
23965
+ runningJobs.length,
23966
+ " job",
23967
+ runningJobs.length !== 1 ? "s" : "",
23968
+ " ",
23969
+ "running"
23970
+ ] }),
23971
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23972
+ Progress,
23973
+ {
23974
+ value: aggregateProgress,
23975
+ variant: "running",
23976
+ className: "flex-1"
23977
+ }
23978
+ ),
23979
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { size: "2", weight: "medium", children: [
23980
+ aggregateProgress,
23981
+ "%"
23982
+ ] })
23983
+ ]
23984
+ }
23985
+ )
23986
+ }
23987
+ ) : null;
23988
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout, { title: "Prompt Pipeline", subheader: progressBanner, children: [
23857
23989
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(p$9, { className: "mb-4 rounded-md bg-yellow-50 p-3 border border-yellow-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", className: "text-yellow-800", children: "Unable to load jobs from the server" }) }),
23858
23990
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
23859
23991
  m,
@@ -23922,7 +24054,7 @@ function TaskFilePane({
23922
24054
  type,
23923
24055
  filename,
23924
24056
  onClose,
23925
- inline = false
24057
+ inline: inline3 = false
23926
24058
  }) {
23927
24059
  const [copyNotice, setCopyNotice] = reactExports.useState(null);
23928
24060
  const [loading, setLoading] = reactExports.useState(false);
@@ -24287,10 +24419,10 @@ function TaskFilePane({
24287
24419
  if (!isOpen) {
24288
24420
  return null;
24289
24421
  }
24290
- const containerClassName = inline ? "flex flex-col h-full" : "bg-white rounded-lg shadow-xl w-full max-w-6xl max-h-[90vh] flex flex-col";
24422
+ const containerClassName = inline3 ? "flex flex-col h-full" : "bg-white rounded-lg shadow-xl w-full max-w-6xl max-h-[90vh] flex flex-col";
24291
24423
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: containerClassName, children: [
24292
24424
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between p-4 border-b bg-white", children: [
24293
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold", children: inline ? "File Preview" : filename }) }),
24425
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold", children: inline3 ? "File Preview" : filename }) }),
24294
24426
  /* @__PURE__ */ jsxRuntimeExports.jsx(
24295
24427
  "button",
24296
24428
  {
@@ -24320,7 +24452,7 @@ function TaskFilePane({
24320
24452
  )
24321
24453
  ] }),
24322
24454
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col bg-gray-50 overflow-hidden", children: [
24323
- !inline && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white border-b p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
24455
+ !inline3 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white border-b p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
24324
24456
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24325
24457
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium", children: filename }),
24326
24458
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center text-sm text-gray-500 mt-1", children: [
@@ -24351,7 +24483,7 @@ function TaskFilePane({
24351
24483
  )
24352
24484
  ] })
24353
24485
  ] }) }),
24354
- inline && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white border-b p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
24486
+ inline3 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white border-b p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
24355
24487
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24356
24488
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-sm", children: filename }),
24357
24489
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center text-xs text-gray-500 mt-1", children: [
@@ -25002,10 +25134,10 @@ function coerceStringArray(value) {
25002
25134
  if (!Array.isArray(value)) return [];
25003
25135
  return value.filter((entry) => typeof entry === "string");
25004
25136
  }
25005
- function reportUnsupportedKeys(keys2) {
25006
- if (keys2.length === 0) return;
25007
- const legacyKeys = keys2.filter((key) => LEGACY_KEY_SET.has(key));
25008
- const otherKeys = keys2.filter((key) => !LEGACY_KEY_SET.has(key));
25137
+ function reportUnsupportedKeys(keys4) {
25138
+ if (keys4.length === 0) return;
25139
+ const legacyKeys = keys4.filter((key) => LEGACY_KEY_SET.has(key));
25140
+ const otherKeys = keys4.filter((key) => !LEGACY_KEY_SET.has(key));
25009
25141
  if (legacyKeys.length > 0) {
25010
25142
  console.warn(
25011
25143
  `[task-files] Ignoring unsupported legacy keys: ${legacyKeys.join(", ")}`
@@ -25144,7 +25276,7 @@ const TaskCard = reactExports.memo(function TaskCard2({
25144
25276
  disabledReason,
25145
25277
  startDisabledReason,
25146
25278
  onClick,
25147
- onKeyDown,
25279
+ onKeyDown: onKeyDown2,
25148
25280
  handleRestartClick,
25149
25281
  handleStartClick
25150
25282
  }) {
@@ -25158,7 +25290,7 @@ const TaskCard = reactExports.memo(function TaskCard2({
25158
25290
  "aria-current": isActive ? "step" : void 0,
25159
25291
  tabIndex: 0,
25160
25292
  onClick,
25161
- onKeyDown,
25293
+ onKeyDown: onKeyDown2,
25162
25294
  className: `cursor-pointer rounded-lg border border-gray-400 ${status === TaskState.PENDING ? "bg-gray-50" : "bg-white"} overflow-hidden flex flex-col ${reducedMotion ? "" : "transition-all duration-200 ease-in-out"} outline outline-2 outline-transparent hover:outline-gray-400/70 focus-visible:outline-blue-500/60`,
25163
25295
  children: [
25164
25296
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -26741,232 +26873,524 @@ function PipelineDetail() {
26741
26873
  )
26742
26874
  ] });
26743
26875
  }
26744
- const ioFunctions = [
26876
+ function Card({ className = "", ...p2 }) {
26877
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
26878
+ "div",
26879
+ {
26880
+ className: ["rounded-xl border bg-white shadow-sm", className].join(" "),
26881
+ ...p2
26882
+ }
26883
+ );
26884
+ }
26885
+ function CardHeader({ className = "", ...p2 }) {
26886
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: ["p-4 border-b", className].join(" "), ...p2 });
26887
+ }
26888
+ function CardTitle({ className = "", ...p2 }) {
26889
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: ["text-base font-semibold", className].join(" "), ...p2 });
26890
+ }
26891
+ function CardContent({ className = "", ...p2 }) {
26892
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: ["p-4", className].join(" "), ...p2 });
26893
+ }
26894
+ function CopyableCodeBlock({ children, className = "", maxHeight }) {
26895
+ const [copied, setCopied] = reactExports.useState(false);
26896
+ const handleCopy = async () => {
26897
+ const text2 = typeof children === "string" ? children : String(children);
26898
+ await navigator.clipboard.writeText(text2);
26899
+ setCopied(true);
26900
+ setTimeout(() => setCopied(false), 2e3);
26901
+ };
26902
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { className: `relative group ${className}`, children: [
26903
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26904
+ "pre",
26905
+ {
26906
+ className: "text-sm bg-gray-50 p-4 rounded-lg overflow-auto border border-gray-200 font-mono leading-relaxed",
26907
+ style: maxHeight ? { maxHeight } : void 0,
26908
+ children
26909
+ }
26910
+ ),
26911
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26912
+ Button,
26913
+ {
26914
+ size: "sm",
26915
+ variant: "ghost",
26916
+ onClick: handleCopy,
26917
+ className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity h-8 px-2 bg-white/80 hover:bg-white border border-gray-200",
26918
+ "aria-label": copied ? "Copied" : "Copy code",
26919
+ children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26920
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "h-3.5 w-3.5 text-green-600 mr-1" }),
26921
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-green-600", children: "Copied" })
26922
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26923
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: "h-3.5 w-3.5 mr-1" }),
26924
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs", children: "Copy" })
26925
+ ] })
26926
+ }
26927
+ )
26928
+ ] });
26929
+ }
26930
+ const sections = [
26931
+ { id: "environment", label: "Environment", icon: Key },
26932
+ { id: "getting-started", label: "Getting Started", icon: FileText },
26933
+ { id: "io-api", label: "IO API", icon: Database },
26934
+ { id: "llm-api", label: "LLM API", icon: Cpu },
26935
+ { id: "validation", label: "Validation", icon: Shield }
26936
+ ];
26937
+ const writeFunctions = [
26745
26938
  {
26746
26939
  name: "writeArtifact",
26747
- description: "Write an artifact file",
26748
- params: 'name: string, content: string, options?: { mode?: "replace"|"append"=replace }',
26940
+ description: "Persist output files for downstream tasks",
26941
+ params: 'name, content, { mode?: "replace"|"append" }',
26749
26942
  returns: "Promise<string>",
26750
- notes: "Writes to {workDir}/files/artifacts; updates tasks-status.json"
26943
+ path: "{workDir}/files/artifacts"
26751
26944
  },
26752
26945
  {
26753
26946
  name: "writeLog",
26754
- description: "Write a log file",
26755
- params: 'name: string, content: string, options?: { mode?: "append"|"replace"=append }',
26947
+ description: "Append debug or progress logs",
26948
+ params: 'name, content, { mode?: "append"|"replace" }',
26756
26949
  returns: "Promise<string>",
26757
- notes: "Writes to {workDir}/files/logs; default append; updates tasks-status.json"
26950
+ path: "{workDir}/files/logs"
26758
26951
  },
26759
26952
  {
26760
26953
  name: "writeTmp",
26761
- description: "Write a temporary file",
26762
- params: 'name: string, content: string, options?: { mode?: "replace"|"append"=replace }',
26954
+ description: "Store intermediate scratch data",
26955
+ params: 'name, content, { mode?: "replace"|"append" }',
26763
26956
  returns: "Promise<string>",
26764
- notes: "Writes to {workDir}/files/tmp; updates tasks-status.json"
26765
- },
26957
+ path: "{workDir}/files/tmp"
26958
+ }
26959
+ ];
26960
+ const readFunctions = [
26766
26961
  {
26767
26962
  name: "readArtifact",
26768
- description: "Read an artifact file",
26963
+ description: "Load artifacts from previous tasks",
26769
26964
  params: "name: string",
26770
26965
  returns: "Promise<string>",
26771
- notes: "Reads from {workDir}/files/artifacts"
26966
+ path: "{workDir}/files/artifacts"
26772
26967
  },
26773
26968
  {
26774
26969
  name: "readLog",
26775
- description: "Read a log file",
26970
+ description: "Read log file contents",
26776
26971
  params: "name: string",
26777
26972
  returns: "Promise<string>",
26778
- notes: "Reads from {workDir}/files/logs"
26973
+ path: "{workDir}/files/logs"
26779
26974
  },
26780
26975
  {
26781
26976
  name: "readTmp",
26782
- description: "Read a temporary file",
26977
+ description: "Read temporary file contents",
26783
26978
  params: "name: string",
26784
26979
  returns: "Promise<string>",
26785
- notes: "Reads from {workDir}/files/tmp"
26786
- },
26980
+ path: "{workDir}/files/tmp"
26981
+ }
26982
+ ];
26983
+ const utilityFunctions = [
26787
26984
  {
26788
26985
  name: "getTaskDir",
26789
- description: "Get the task directory path",
26790
- params: "",
26986
+ description: "Get the current task's directory path",
26987
+ params: "",
26791
26988
  returns: "string",
26792
26989
  notes: "Returns {workDir}/tasks/{taskName}"
26793
26990
  },
26794
26991
  {
26795
26992
  name: "getCurrentStage",
26796
26993
  description: "Get the current stage name",
26797
- params: "",
26994
+ params: "",
26798
26995
  returns: "string",
26799
26996
  notes: "Calls injected getStage()"
26997
+ },
26998
+ {
26999
+ name: "getDB",
27000
+ description: "Get SQLite database for this job run",
27001
+ params: "options?: better-sqlite3 Options",
27002
+ returns: "Database",
27003
+ notes: "WAL mode enabled; caller must close"
27004
+ },
27005
+ {
27006
+ name: "runBatch",
27007
+ description: "Execute batch jobs concurrently with retry support",
27008
+ params: "{ jobs, processor, concurrency?, maxRetries?, batchId? }",
27009
+ returns: "Promise<{ completed, failed }>",
27010
+ notes: "Auto-retries failures; state persisted in SQLite"
26800
27011
  }
26801
27012
  ];
26802
27013
  const sampleSeed = {
26803
- name: "some-name",
27014
+ name: "my-blog-post",
26804
27015
  pipeline: "content-generation",
26805
27016
  data: {
26806
- type: "some-type",
26807
27017
  contentType: "blog-post",
26808
- targetAudience: "software-developers",
26809
- tone: "professional-yet-accessible",
26810
- length: "1500-2000 words",
26811
- outputFormat: "blog-post"
27018
+ topic: "AI in Healthcare",
27019
+ targetAudience: "developers"
26812
27020
  }
26813
27021
  };
27022
+ const envVars = [
27023
+ { name: "OPENAI_API_KEY", provider: "OpenAI" },
27024
+ { name: "ANTHROPIC_API_KEY", provider: "Anthropic" },
27025
+ { name: "GEMINI_API_KEY", provider: "Google Gemini" },
27026
+ { name: "DEEPSEEK_API_KEY", provider: "DeepSeek" },
27027
+ { name: "ZHIPU_API_KEY", provider: "Zhipu" }
27028
+ ];
27029
+ function CollapsibleSection({
27030
+ id,
27031
+ title,
27032
+ icon: Icon2,
27033
+ defaultOpen = false,
27034
+ children
27035
+ }) {
27036
+ const [isOpen, setIsOpen] = reactExports.useState(defaultOpen);
27037
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { id, className: "scroll-mt-24", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: "mb-6", children: [
27038
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27039
+ "button",
27040
+ {
27041
+ onClick: () => setIsOpen(!isOpen),
27042
+ className: "w-full text-left",
27043
+ "aria-expanded": isOpen,
27044
+ "aria-controls": `${id}-content`,
27045
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
27046
+ CardHeader,
27047
+ {
27048
+ className: `flex flex-row items-center justify-between cursor-pointer hover:bg-gray-50 rounded-t-xl transition-colors ${!isOpen ? "rounded-b-xl border-b-0" : ""}`,
27049
+ children: [
27050
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "3", children: [
27051
+ Icon2 && /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: "h-5 w-5 text-gray-500" }),
27052
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-lg", children: title })
27053
+ ] }),
27054
+ isOpen ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "h-5 w-5 text-gray-400" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "h-5 w-5 text-gray-400" })
27055
+ ]
27056
+ }
27057
+ )
27058
+ }
27059
+ ),
27060
+ isOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { id: `${id}-content`, className: "pt-4", children })
27061
+ ] }) });
27062
+ }
27063
+ function FunctionRow({ name: name2, description, params, returns, path: path2, notes }) {
27064
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-3 border-b border-gray-100 last:border-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { justify: "between", align: "start", gap: "4", wrap: "wrap", children: [
27065
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-[200px]", children: [
27066
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$4, { size: "2", className: "text-blue-600 font-medium", children: [
27067
+ "io.",
27068
+ name2
27069
+ ] }),
27070
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "p", size: "2", className: "text-gray-600 mt-1", children: description })
27071
+ ] }),
27072
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-right text-sm space-y-1", children: [
27073
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27074
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-400", children: "params: " }),
27075
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "1", children: params })
27076
+ ] }),
27077
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27078
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-400", children: "returns: " }),
27079
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "1", children: returns })
27080
+ ] }),
27081
+ path2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-gray-400 text-xs flex items-center justify-end gap-1", children: [
27082
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Folder, { className: "h-3 w-3" }),
27083
+ path2
27084
+ ] }),
27085
+ notes && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-gray-400 text-xs", children: notes })
27086
+ ] })
27087
+ ] }) });
27088
+ }
26814
27089
  function CodePage() {
26815
27090
  const [llmFunctions, setLlmFunctions] = reactExports.useState(null);
27091
+ const [activeSection, setActiveSection] = reactExports.useState("environment");
26816
27092
  reactExports.useEffect(() => {
26817
27093
  fetch("/api/llm/functions").then((res) => res.json()).then(({ ok: ok2, data }) => {
26818
27094
  if (!ok2 || typeof data !== "object" || data === null) {
26819
- throw new Error(
26820
- "Invalid /api/llm/functions response: expected { ok:true, data:Object }"
26821
- );
27095
+ throw new Error("Invalid /api/llm/functions response");
26822
27096
  }
26823
27097
  setLlmFunctions(data);
26824
27098
  }).catch(console.error);
26825
27099
  }, []);
26826
- const breadcrumbs = [{ label: "Home", href: "/" }, { label: "Code" }];
26827
- const handleCopySeed = () => {
26828
- navigator.clipboard.writeText(JSON.stringify(sampleSeed, null, 2));
26829
- };
26830
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout, { children: [
26831
- /* @__PURE__ */ jsxRuntimeExports.jsx(PageSubheader, { breadcrumbs }),
26832
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { children: [
26833
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { mb: "8", children: [
26834
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "6", mb: "4", children: "Seed File Example" }),
26835
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "p", mb: "3", size: "2", children: "A seed file is a JSON object used to start a new pipeline job. It defines the job name, the pipeline to run, and any contextual data the pipeline requires to begin." }),
26836
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "p", mb: "3", size: "2", weight: "bold", children: "Required fields:" }),
26837
- /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "list-disc list-inside mb-4 space-y-1", children: [
26838
- /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "text-sm text-gray-700", children: [
26839
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "span", weight: "bold", children: "name" }),
26840
- " ",
26841
- "(string): Human-friendly title; non-empty, printable only, ≤120 chars; must be unique."
26842
- ] }),
26843
- /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "text-sm text-gray-700", children: [
26844
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "span", weight: "bold", children: "pipeline" }),
26845
- " ",
26846
- "(string): Pipeline slug defined in your registry (e.g., content-generation)."
26847
- ] }),
26848
- /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "text-sm text-gray-700", children: [
26849
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "span", weight: "bold", children: "data" }),
26850
- " ",
26851
- "(object): Required but flexible; include any arbitrary keys your pipeline tasks expect."
26852
- ] })
26853
- ] }),
26854
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$9, { mb: "3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
26855
- Button,
26856
- {
26857
- size: "1",
26858
- onClick: handleCopySeed,
26859
- "data-testid": "copy-seed-example",
26860
- children: "Copy"
27100
+ reactExports.useEffect(() => {
27101
+ const observer = new IntersectionObserver(
27102
+ (entries) => {
27103
+ entries.forEach((entry) => {
27104
+ if (entry.isIntersecting) {
27105
+ setActiveSection(entry.target.id);
26861
27106
  }
26862
- ) }),
26863
- /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "text-xs bg-gray-50 p-3 rounded overflow-auto max-h-60 border border-gray-200", children: JSON.stringify(sampleSeed, null, 2) })
26864
- ] }),
26865
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "6", mb: "4", children: "Pipeline Task IO API" }),
26866
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$9, { overflowX: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(m$1, { children: [
26867
- /* @__PURE__ */ jsxRuntimeExports.jsx(d, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
26868
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Function" }),
26869
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Parameters" }),
26870
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Returns" }),
26871
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Notes" })
26872
- ] }) }),
26873
- /* @__PURE__ */ jsxRuntimeExports.jsx(b$1, { children: ioFunctions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
26874
- /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$4, { size: "3", children: [
26875
- "io.",
26876
- fn.name
26877
- ] }) }),
26878
- /* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: fn.params || "—" }) }),
26879
- /* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: fn.returns }) }),
26880
- /* @__PURE__ */ jsxRuntimeExports.jsxs(T, { children: [
26881
- fn.description,
26882
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
26883
- fn.notes
26884
- ] })
26885
- ] }, fn.name)) })
26886
- ] }) }),
26887
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "6", mt: "8", mb: "4", children: "Pipeline Task LLM API" }),
26888
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { mb: "4", children: [
26889
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", children: "Arguments" }),
26890
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", mb: "4", children: `{
26891
- messages: Array<{role: "system"|"user"|"assistant", content: string }>,
26892
- temperature?: number,
26893
- maxTokens?: number,
26894
- responseFormat?: "json" | { type: "json_object" | { type: "json_schema", name: string, json_schema: object } },
26895
- stop?: string | string[],
26896
- topP?: number,
26897
- frequencyPenalty?: number,
26898
- presencePenalty?: number,
26899
- seed?: number,
26900
- provider?: string,
26901
- model?: string,
26902
- metadata?: object,
26903
- maxRetries?: number
26904
- }` }),
26905
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", children: "Returns" }),
26906
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: `Promise<{ content: any, usage?: object, raw?: any }>` })
26907
- ] }),
26908
- llmFunctions && /* @__PURE__ */ jsxRuntimeExports.jsx(p$9, { overflowX: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(m$1, { children: [
26909
- /* @__PURE__ */ jsxRuntimeExports.jsx(d, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
26910
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Function" }),
26911
- /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Model" })
26912
- ] }) }),
26913
- /* @__PURE__ */ jsxRuntimeExports.jsx(b$1, { children: Object.entries(llmFunctions).map(
26914
- ([provider, functions]) => functions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
26915
- /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: fn.fullPath }) }),
26916
- /* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: fn.model }) })
26917
- ] }, fn.fullPath))
26918
- ) })
26919
- ] }) }),
26920
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "6", mt: "8", mb: "4", children: "Validation API" }),
26921
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "p", mb: "3", size: "2", children: "Schema validation helper available to task stages via validators." }),
26922
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { mb: "4", children: [
26923
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", children: "Function Signature" }),
26924
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: `validateWithSchema(schema: object, data: object | string): { valid: true } | { valid: false, errors: AjvError[] }` }),
26925
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", mt: "4", children: "Behavior" }),
26926
- /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "list-disc list-inside mb-4 space-y-1", children: [
26927
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-sm text-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "span", children: [
26928
- "Parses string data to JSON; on parse failure returns",
26929
- " ",
26930
- `{ valid:false, errors:[{ keyword:"type", message:"must be a valid JSON object (string parsing failed)"} ]`
26931
- ] }) }),
26932
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-sm text-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "span", children: [
26933
- "Uses Ajv(",
26934
- `{ allErrors: true, strict: false }`,
26935
- "); compiles provided schema"
26936
- ] }) }),
26937
- /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-sm text-gray-700", children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "span", children: "Returns AJV errors array when invalid" }) })
26938
- ] }),
26939
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", children: "Source" }),
26940
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "src/api/validators/json.js" }),
26941
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", mt: "4", children: "Usage Example" }),
26942
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: `export const validateStructure = async ({
27107
+ });
27108
+ },
27109
+ { rootMargin: "-100px 0px -66% 0px" }
27110
+ );
27111
+ sections.forEach(({ id }) => {
27112
+ const el = document.getElementById(id);
27113
+ if (el) observer.observe(el);
27114
+ });
27115
+ return () => observer.disconnect();
27116
+ }, []);
27117
+ const breadcrumbs = [
27118
+ { label: "Home", href: "/" },
27119
+ { label: "API Reference" }
27120
+ ];
27121
+ const llmArgsCode = `{
27122
+ messages: Array<{ role: "system"|"user"|"assistant", content: string }>,
27123
+ temperature?: number, // 0-2, default varies by model
27124
+ maxTokens?: number, // Max response tokens
27125
+ responseFormat?: "json" | { type: "json_object" } | { type: "json_schema", ... },
27126
+ stop?: string | string[], // Stop sequences
27127
+ topP?: number, // Nucleus sampling
27128
+ frequencyPenalty?: number, // -2 to 2
27129
+ presencePenalty?: number, // -2 to 2
27130
+ seed?: number, // For reproducibility
27131
+ provider?: string, // Override default provider
27132
+ model?: string, // Override default model
27133
+ maxRetries?: number // Auto-retry on failure
27134
+ }`;
27135
+ const validationExampleCode = `export const validateStructure = async ({
26943
27136
  io,
26944
27137
  flags,
26945
27138
  validators: { validateWithSchema },
26946
27139
  }) => {
26947
27140
  const content = await io.readArtifact("research-output.json");
26948
- const result = validateWithSchema(researchJsonSchema, content);
27141
+ const result = validateWithSchema(mySchema, content);
26949
27142
 
26950
27143
  if (!result.valid) {
26951
- console.warn("[Research:validateStructure] Validation failed", result.errors);
27144
+ console.warn("Validation failed", result.errors);
26952
27145
  return { output: {}, flags: { ...flags, validationFailed: true } };
26953
27146
  }
26954
27147
  return { output: {}, flags };
26955
- };` })
26956
- ] }),
26957
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "6", mt: "8", mb: "4", children: "Environment Configuration" }),
26958
- /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { mb: "4", children: [
26959
- /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "4", mb: "2", children: "Example .env Configuration" }),
26960
- /* @__PURE__ */ jsxRuntimeExports.jsx(p$9, { overflowX: "auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(m$1, { children: [
26961
- /* @__PURE__ */ jsxRuntimeExports.jsx(d, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { children: "Environment Variable" }) }) }),
26962
- /* @__PURE__ */ jsxRuntimeExports.jsxs(b$1, { children: [
26963
- /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "OPENAI_API_KEY=" }) }) }),
26964
- /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "DEEPSEEK_API_KEY=" }) }) }),
26965
- /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "GEMINI_API_KEY=" }) }) }),
26966
- /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "ANTHROPIC_API_KEY=" }) }) }),
26967
- /* @__PURE__ */ jsxRuntimeExports.jsx(P$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "3", children: "ZHIPU_API_KEY=" }) }) })
27148
+ };`;
27149
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Layout, { children: [
27150
+ /* @__PURE__ */ jsxRuntimeExports.jsx(PageSubheader, { breadcrumbs }),
27151
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { gap: "6", className: "relative", children: [
27152
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27153
+ "nav",
27154
+ {
27155
+ "aria-label": "Page sections",
27156
+ className: "hidden lg:block w-48 shrink-0",
27157
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sticky top-28 space-y-1", children: [
27158
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27159
+ p$d,
27160
+ {
27161
+ size: "1",
27162
+ weight: "medium",
27163
+ className: "text-gray-400 uppercase tracking-wide mb-3 block",
27164
+ children: "On this page"
27165
+ }
27166
+ ),
27167
+ sections.map(({ id, label, icon: Icon2 }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27168
+ "a",
27169
+ {
27170
+ href: `#${id}`,
27171
+ className: `flex items-center gap-2 px-3 py-2 text-sm rounded-md transition-colors ${activeSection === id ? "bg-blue-50 text-blue-700 font-medium" : "text-gray-600 hover:bg-gray-100 hover:text-gray-900"}`,
27172
+ children: [
27173
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon2, { className: "h-4 w-4" }),
27174
+ label
27175
+ ]
27176
+ },
27177
+ id
27178
+ ))
26968
27179
  ] })
26969
- ] }) })
27180
+ }
27181
+ ),
27182
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$9, { className: "flex-1 min-w-0 pb-16", children: [
27183
+ /* @__PURE__ */ jsxRuntimeExports.jsx(r$a, { size: "7", className: "mb-2", children: "Pipeline API Reference" }),
27184
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { as: "p", size: "3", className: "text-gray-600", mb: "3", children: "Everything you need to build pipeline tasks — from file I/O to LLM calls." }),
27185
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27186
+ CollapsibleSection,
27187
+ {
27188
+ id: "environment",
27189
+ title: "Environment Setup",
27190
+ icon: Key,
27191
+ defaultOpen: true,
27192
+ children: [
27193
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-4", children: [
27194
+ "Configure API keys in your ",
27195
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: ".env" }),
27196
+ " file before running pipelines. Only add keys for providers you plan to use."
27197
+ ] }),
27198
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-lg p-4 border border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid gap-2", children: envVars.map(({ name: name2, provider }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", justify: "between", children: [
27199
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$4, { size: "2", children: [
27200
+ name2,
27201
+ "="
27202
+ ] }),
27203
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "1", className: "text-gray-500", children: provider })
27204
+ ] }, name2)) }) })
27205
+ ]
27206
+ }
27207
+ ),
27208
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27209
+ CollapsibleSection,
27210
+ {
27211
+ id: "getting-started",
27212
+ title: "Getting Started: Seed Files",
27213
+ icon: FileText,
27214
+ defaultOpen: true,
27215
+ children: [
27216
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-4", children: [
27217
+ "A seed file initiates a pipeline job. Upload it via the UI or place it in the ",
27218
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "pending/" }),
27219
+ " directory."
27220
+ ] }),
27221
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
27222
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27223
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Required Fields" }),
27224
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
27225
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "start", gap: "3", className: "text-base", children: [
27226
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", className: "shrink-0 mt-0.5", children: "name" }),
27227
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { className: "text-gray-600", children: "Unique job identifier — printable characters only, max 120 chars" })
27228
+ ] }),
27229
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "start", gap: "3", className: "text-base", children: [
27230
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", className: "shrink-0 mt-0.5", children: "pipeline" }),
27231
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { className: "text-gray-600", children: "Pipeline slug from your registry (e.g., content-generation)" })
27232
+ ] }),
27233
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "start", gap: "3", className: "text-base", children: [
27234
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", className: "shrink-0 mt-0.5", children: "data" }),
27235
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { className: "text-gray-600", children: "Object containing any context your pipeline tasks expect" })
27236
+ ] })
27237
+ ] })
27238
+ ] }),
27239
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27240
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Example" }),
27241
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCodeBlock, { maxHeight: "200px", children: JSON.stringify(sampleSeed, null, 2) })
27242
+ ] })
27243
+ ] })
27244
+ ]
27245
+ }
27246
+ ),
27247
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27248
+ CollapsibleSection,
27249
+ {
27250
+ id: "io-api",
27251
+ title: "IO API",
27252
+ icon: Database,
27253
+ defaultOpen: true,
27254
+ children: [
27255
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-6", children: [
27256
+ "File operations for reading/writing artifacts, logs, and temporary files. All functions are available on the ",
27257
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "io" }),
27258
+ " ",
27259
+ "object passed to task stages."
27260
+ ] }),
27261
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
27262
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", className: "mb-3", children: [
27263
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 rounded-full bg-green-500" }),
27264
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", children: "Write Functions" })
27265
+ ] }),
27266
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-gray-200 rounded-lg px-4 bg-white", children: writeFunctions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsx(FunctionRow, { ...fn }, fn.name)) })
27267
+ ] }),
27268
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [
27269
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", className: "mb-3", children: [
27270
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-500" }),
27271
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", children: "Read Functions" })
27272
+ ] }),
27273
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-gray-200 rounded-lg px-4 bg-white", children: readFunctions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsx(FunctionRow, { ...fn }, fn.name)) })
27274
+ ] }),
27275
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27276
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$6, { align: "center", gap: "2", className: "mb-3", children: [
27277
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 rounded-full bg-purple-500" }),
27278
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", children: "Utility Functions" })
27279
+ ] }),
27280
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-gray-200 rounded-lg px-4 bg-white", children: utilityFunctions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsx(FunctionRow, { ...fn }, fn.name)) })
27281
+ ] })
27282
+ ]
27283
+ }
27284
+ ),
27285
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27286
+ CollapsibleSection,
27287
+ {
27288
+ id: "llm-api",
27289
+ title: "LLM API",
27290
+ icon: Cpu,
27291
+ defaultOpen: true,
27292
+ children: [
27293
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-6", children: [
27294
+ "Call language models from any provider using a unified interface. Functions are available on the ",
27295
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "llm" }),
27296
+ " object."
27297
+ ] }),
27298
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
27299
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27300
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Arguments" }),
27301
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCodeBlock, { maxHeight: "280px", children: llmArgsCode })
27302
+ ] }),
27303
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27304
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Returns" }),
27305
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-lg p-3 border border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: `Promise<{ content: any, usage?: object, raw?: any }>` }) })
27306
+ ] }),
27307
+ llmFunctions && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27308
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-3 block", children: "Available Models" }),
27309
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(m$1, { children: [
27310
+ /* @__PURE__ */ jsxRuntimeExports.jsx(d, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
27311
+ /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Function" }),
27312
+ /* @__PURE__ */ jsxRuntimeExports.jsx(f$1, { className: "bg-gray-50", children: "Model" })
27313
+ ] }) }),
27314
+ /* @__PURE__ */ jsxRuntimeExports.jsx(b$1, { children: Object.entries(llmFunctions).flatMap(
27315
+ ([_provider, functions]) => functions.map((fn) => /* @__PURE__ */ jsxRuntimeExports.jsxs(P$1, { children: [
27316
+ /* @__PURE__ */ jsxRuntimeExports.jsx(R, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: fn.fullPath }) }),
27317
+ /* @__PURE__ */ jsxRuntimeExports.jsx(T, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", className: "text-gray-600", children: fn.model }) })
27318
+ ] }, fn.fullPath))
27319
+ ) })
27320
+ ] }) })
27321
+ ] })
27322
+ ] })
27323
+ ]
27324
+ }
27325
+ ),
27326
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27327
+ CollapsibleSection,
27328
+ {
27329
+ id: "validation",
27330
+ title: "Validation API",
27331
+ icon: Shield,
27332
+ defaultOpen: true,
27333
+ children: [
27334
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(p$d, { as: "p", size: "3", className: "text-gray-600 mb-6", children: [
27335
+ "Validate JSON data against schemas using",
27336
+ " ",
27337
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "validateWithSchema" }),
27338
+ ". Available via the",
27339
+ " ",
27340
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "validators" }),
27341
+ " object in task stages."
27342
+ ] }),
27343
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
27344
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27345
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Function Signature" }),
27346
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-lg p-3 border border-gray-200", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(p$4, { size: "2", children: [
27347
+ "validateWithSchema(schema, data) → ",
27348
+ "{",
27349
+ " valid: boolean, errors?: AjvError[] ",
27350
+ "}"
27351
+ ] }) })
27352
+ ] }),
27353
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27354
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Behavior" }),
27355
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-2 text-base text-gray-600", children: [
27356
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
27357
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-1", children: "•" }),
27358
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Accepts string or object data — strings are parsed as JSON first" })
27359
+ ] }),
27360
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
27361
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-1", children: "•" }),
27362
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
27363
+ "Uses Ajv with",
27364
+ " ",
27365
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "{ allErrors: true, strict: false }" })
27366
+ ] })
27367
+ ] }),
27368
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "flex items-start gap-2", children: [
27369
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-blue-500 mt-1", children: "•" }),
27370
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
27371
+ "Returns ",
27372
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "{ valid: true }" }),
27373
+ " on success, or",
27374
+ " ",
27375
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "{ valid: false, errors: [...] }" }),
27376
+ " ",
27377
+ "on failure"
27378
+ ] })
27379
+ ] })
27380
+ ] })
27381
+ ] }),
27382
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27383
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$d, { size: "2", weight: "medium", className: "mb-2 block", children: "Usage Example" }),
27384
+ /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableCodeBlock, { maxHeight: "240px", children: validationExampleCode })
27385
+ ] }),
27386
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-base text-gray-500", children: [
27387
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Source: " }),
27388
+ /* @__PURE__ */ jsxRuntimeExports.jsx(p$4, { size: "2", children: "src/api/validators/json.js" })
27389
+ ] })
27390
+ ] })
27391
+ ]
27392
+ }
27393
+ )
26970
27394
  ] })
26971
27395
  ] })
26972
27396
  ] });
@@ -27247,7 +27671,7 @@ const StageTimeline = React.memo(({ stages }) => {
27247
27671
  );
27248
27672
  });
27249
27673
  StageTimeline.displayName = "StageTimeline";
27250
- function _objectWithoutPropertiesLoose(r2, e2) {
27674
+ function _objectWithoutPropertiesLoose$1(r2, e2) {
27251
27675
  if (null == r2) return {};
27252
27676
  var t2 = {};
27253
27677
  for (var n2 in r2) if ({}.hasOwnProperty.call(r2, n2)) {
@@ -27256,9 +27680,9 @@ function _objectWithoutPropertiesLoose(r2, e2) {
27256
27680
  }
27257
27681
  return t2;
27258
27682
  }
27259
- function _objectWithoutProperties(e2, t2) {
27683
+ function _objectWithoutProperties$1(e2, t2) {
27260
27684
  if (null == e2) return {};
27261
- var o2, r2, i2 = _objectWithoutPropertiesLoose(e2, t2);
27685
+ var o2, r2, i2 = _objectWithoutPropertiesLoose$1(e2, t2);
27262
27686
  if (Object.getOwnPropertySymbols) {
27263
27687
  var n2 = Object.getOwnPropertySymbols(e2);
27264
27688
  for (r2 = 0; r2 < n2.length; r2++) o2 = n2[r2], -1 === t2.indexOf(o2) && {}.propertyIsEnumerable.call(e2, o2) && (i2[o2] = e2[o2]);
@@ -27270,10 +27694,10 @@ function _arrayLikeToArray(r2, a2) {
27270
27694
  for (var e2 = 0, n2 = Array(a2); e2 < a2; e2++) n2[e2] = r2[e2];
27271
27695
  return n2;
27272
27696
  }
27273
- function _arrayWithoutHoles(r2) {
27697
+ function _arrayWithoutHoles$1(r2) {
27274
27698
  if (Array.isArray(r2)) return _arrayLikeToArray(r2);
27275
27699
  }
27276
- function _iterableToArray(r2) {
27700
+ function _iterableToArray$1(r2) {
27277
27701
  if ("undefined" != typeof Symbol && null != r2[Symbol.iterator] || null != r2["@@iterator"]) return Array.from(r2);
27278
27702
  }
27279
27703
  function _unsupportedIterableToArray(r2, a2) {
@@ -27283,35 +27707,35 @@ function _unsupportedIterableToArray(r2, a2) {
27283
27707
  return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r2, a2) : void 0;
27284
27708
  }
27285
27709
  }
27286
- function _nonIterableSpread() {
27710
+ function _nonIterableSpread$1() {
27287
27711
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
27288
27712
  }
27289
- function _toConsumableArray(r2) {
27290
- return _arrayWithoutHoles(r2) || _iterableToArray(r2) || _unsupportedIterableToArray(r2) || _nonIterableSpread();
27713
+ function _toConsumableArray$1(r2) {
27714
+ return _arrayWithoutHoles$1(r2) || _iterableToArray$1(r2) || _unsupportedIterableToArray(r2) || _nonIterableSpread$1();
27291
27715
  }
27292
- function _typeof(o2) {
27716
+ function _typeof$1(o2) {
27293
27717
  "@babel/helpers - typeof";
27294
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
27718
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
27295
27719
  return typeof o3;
27296
27720
  } : function(o3) {
27297
27721
  return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3;
27298
- }, _typeof(o2);
27722
+ }, _typeof$1(o2);
27299
27723
  }
27300
27724
  function toPrimitive(t2, r2) {
27301
- if ("object" != _typeof(t2) || !t2) return t2;
27725
+ if ("object" != _typeof$1(t2) || !t2) return t2;
27302
27726
  var e2 = t2[Symbol.toPrimitive];
27303
27727
  if (void 0 !== e2) {
27304
27728
  var i2 = e2.call(t2, r2);
27305
- if ("object" != _typeof(i2)) return i2;
27729
+ if ("object" != _typeof$1(i2)) return i2;
27306
27730
  throw new TypeError("@@toPrimitive must return a primitive value.");
27307
27731
  }
27308
27732
  return ("string" === r2 ? String : Number)(t2);
27309
27733
  }
27310
27734
  function toPropertyKey(t2) {
27311
27735
  var i2 = toPrimitive(t2, "string");
27312
- return "symbol" == _typeof(i2) ? i2 : i2 + "";
27736
+ return "symbol" == _typeof$1(i2) ? i2 : i2 + "";
27313
27737
  }
27314
- function _defineProperty(e2, r2, t2) {
27738
+ function _defineProperty$1(e2, r2, t2) {
27315
27739
  return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
27316
27740
  value: t2,
27317
27741
  enumerable: true,
@@ -27319,16 +27743,16 @@ function _defineProperty(e2, r2, t2) {
27319
27743
  writable: true
27320
27744
  }) : e2[r2] = t2, e2;
27321
27745
  }
27322
- function _extends() {
27323
- return _extends = Object.assign ? Object.assign.bind() : function(n2) {
27746
+ function _extends$1() {
27747
+ return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
27324
27748
  for (var e2 = 1; e2 < arguments.length; e2++) {
27325
27749
  var t2 = arguments[e2];
27326
27750
  for (var r2 in t2) ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
27327
27751
  }
27328
27752
  return n2;
27329
- }, _extends.apply(null, arguments);
27753
+ }, _extends$1.apply(null, arguments);
27330
27754
  }
27331
- function ownKeys$1(e2, r2) {
27755
+ function ownKeys$6(e2, r2) {
27332
27756
  var t2 = Object.keys(e2);
27333
27757
  if (Object.getOwnPropertySymbols) {
27334
27758
  var o2 = Object.getOwnPropertySymbols(e2);
@@ -27338,12 +27762,12 @@ function ownKeys$1(e2, r2) {
27338
27762
  }
27339
27763
  return t2;
27340
27764
  }
27341
- function _objectSpread$1(e2) {
27765
+ function _objectSpread$6(e2) {
27342
27766
  for (var r2 = 1; r2 < arguments.length; r2++) {
27343
27767
  var t2 = null != arguments[r2] ? arguments[r2] : {};
27344
- r2 % 2 ? ownKeys$1(Object(t2), true).forEach(function(r3) {
27345
- _defineProperty(e2, r3, t2[r3]);
27346
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1(Object(t2)).forEach(function(r3) {
27768
+ r2 % 2 ? ownKeys$6(Object(t2), true).forEach(function(r3) {
27769
+ _defineProperty$1(e2, r3, t2[r3]);
27770
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$6(Object(t2)).forEach(function(r3) {
27347
27771
  Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3));
27348
27772
  });
27349
27773
  }
@@ -27379,7 +27803,7 @@ function createStyleObject(classNames) {
27379
27803
  });
27380
27804
  var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
27381
27805
  return classNamesCombinations.reduce(function(styleObject, className) {
27382
- return _objectSpread$1(_objectSpread$1({}, styleObject), stylesheet[className]);
27806
+ return _objectSpread$6(_objectSpread$6({}, styleObject), stylesheet[className]);
27383
27807
  }, elementStyle);
27384
27808
  }
27385
27809
  function createClassNameString(classNames) {
@@ -27408,7 +27832,7 @@ function createElement(_ref) {
27408
27832
  var childrenCreator = createChildren$1(stylesheet, useInlineStyles);
27409
27833
  var props;
27410
27834
  if (!useInlineStyles) {
27411
- props = _objectSpread$1(_objectSpread$1({}, properties), {}, {
27835
+ props = _objectSpread$6(_objectSpread$6({}, properties), {}, {
27412
27836
  className: createClassNameString(properties.className)
27413
27837
  });
27414
27838
  } else {
@@ -27422,13 +27846,13 @@ function createElement(_ref) {
27422
27846
  var className = properties.className && startingClassName.concat(properties.className.filter(function(className2) {
27423
27847
  return !allStylesheetSelectors.includes(className2);
27424
27848
  }));
27425
- props = _objectSpread$1(_objectSpread$1({}, properties), {}, {
27849
+ props = _objectSpread$6(_objectSpread$6({}, properties), {}, {
27426
27850
  className: createClassNameString(className) || void 0,
27427
27851
  style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
27428
27852
  });
27429
27853
  }
27430
27854
  var children = childrenCreator(node2.children);
27431
- return /* @__PURE__ */ React.createElement(TagName, _extends({
27855
+ return /* @__PURE__ */ React.createElement(TagName, _extends$1({
27432
27856
  key
27433
27857
  }, props), children);
27434
27858
  }
@@ -27437,8 +27861,8 @@ const checkForListedLanguage = (function(astGenerator, language2) {
27437
27861
  var langs = astGenerator.listLanguages();
27438
27862
  return langs.indexOf(language2) !== -1;
27439
27863
  });
27440
- var _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
27441
- function ownKeys(e2, r2) {
27864
+ var _excluded$1 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
27865
+ function ownKeys$5(e2, r2) {
27442
27866
  var t2 = Object.keys(e2);
27443
27867
  if (Object.getOwnPropertySymbols) {
27444
27868
  var o2 = Object.getOwnPropertySymbols(e2);
@@ -27448,12 +27872,12 @@ function ownKeys(e2, r2) {
27448
27872
  }
27449
27873
  return t2;
27450
27874
  }
27451
- function _objectSpread(e2) {
27875
+ function _objectSpread$5(e2) {
27452
27876
  for (var r2 = 1; r2 < arguments.length; r2++) {
27453
27877
  var t2 = null != arguments[r2] ? arguments[r2] : {};
27454
- r2 % 2 ? ownKeys(Object(t2), true).forEach(function(r3) {
27455
- _defineProperty(e2, r3, t2[r3]);
27456
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys(Object(t2)).forEach(function(r3) {
27878
+ r2 % 2 ? ownKeys$5(Object(t2), true).forEach(function(r3) {
27879
+ _defineProperty$1(e2, r3, t2[r3]);
27880
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$5(Object(t2)).forEach(function(r3) {
27457
27881
  Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3));
27458
27882
  });
27459
27883
  }
@@ -27514,19 +27938,19 @@ function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber
27514
27938
  userSelect: "none"
27515
27939
  };
27516
27940
  var customLineNumberStyle = typeof lineNumberStyle === "function" ? lineNumberStyle(lineNumber) : lineNumberStyle;
27517
- var assembledStyle = _objectSpread(_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);
27941
+ var assembledStyle = _objectSpread$5(_objectSpread$5({}, defaultLineNumberStyle), customLineNumberStyle);
27518
27942
  return assembledStyle;
27519
27943
  }
27520
27944
  function createLineElement(_ref3) {
27521
27945
  var children = _ref3.children, lineNumber = _ref3.lineNumber, lineNumberStyle = _ref3.lineNumberStyle, largestLineNumber = _ref3.largestLineNumber, showInlineLineNumbers = _ref3.showInlineLineNumbers, _ref3$lineProps = _ref3.lineProps, lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps, _ref3$className = _ref3.className, className = _ref3$className === void 0 ? [] : _ref3$className, showLineNumbers = _ref3.showLineNumbers, wrapLongLines = _ref3.wrapLongLines, _ref3$wrapLines = _ref3.wrapLines, wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;
27522
- var properties = wrapLines ? _objectSpread({}, typeof lineProps === "function" ? lineProps(lineNumber) : lineProps) : {};
27523
- properties["className"] = properties["className"] ? [].concat(_toConsumableArray(properties["className"].trim().split(/\s+/)), _toConsumableArray(className)) : className;
27946
+ var properties = wrapLines ? _objectSpread$5({}, typeof lineProps === "function" ? lineProps(lineNumber) : lineProps) : {};
27947
+ properties["className"] = properties["className"] ? [].concat(_toConsumableArray$1(properties["className"].trim().split(/\s+/)), _toConsumableArray$1(className)) : className;
27524
27948
  if (lineNumber && showInlineLineNumbers) {
27525
27949
  var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);
27526
27950
  children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));
27527
27951
  }
27528
27952
  if (wrapLongLines & showLineNumbers) {
27529
- properties.style = _objectSpread({
27953
+ properties.style = _objectSpread$5({
27530
27954
  display: "flex"
27531
27955
  }, properties.style);
27532
27956
  }
@@ -27545,7 +27969,7 @@ function flattenCodeTree(tree) {
27545
27969
  if (node2.type === "text") {
27546
27970
  newTree.push(createLineElement({
27547
27971
  children: [node2],
27548
- className: _toConsumableArray(new Set(className))
27972
+ className: _toConsumableArray$1(new Set(className))
27549
27973
  }));
27550
27974
  } else if (node2.children) {
27551
27975
  var classNames = className.concat(node2.properties.className);
@@ -27693,8 +28117,8 @@ function highlight(defaultAstGenerator, defaultStyle2) {
27693
28117
  var _code$match$length, _code$match;
27694
28118
  var language2 = _ref7.language, children = _ref7.children, _ref7$style = _ref7.style, style = _ref7$style === void 0 ? defaultStyle2 : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === void 0 ? {
27695
28119
  className: language2 ? "language-".concat(language2) : void 0,
27696
- style: _objectSpread(_objectSpread({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language2, '"]')])
27697
- } : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code2 = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = _objectWithoutProperties(_ref7, _excluded);
28120
+ style: _objectSpread$5(_objectSpread$5({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language2, '"]')])
28121
+ } : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code2 = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = _objectWithoutProperties$1(_ref7, _excluded$1);
27698
28122
  astGenerator = astGenerator || defaultAstGenerator;
27699
28123
  var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React.createElement(AllLineNumbers, {
27700
28124
  containerStyle: lineNumberContainerStyle,
@@ -27714,11 +28138,11 @@ function highlight(defaultAstGenerator, defaultStyle2) {
27714
28138
  style: Object.assign({}, customStyle)
27715
28139
  });
27716
28140
  if (wrapLongLines) {
27717
- codeTagProps.style = _objectSpread({
28141
+ codeTagProps.style = _objectSpread$5({
27718
28142
  whiteSpace: "pre-wrap"
27719
28143
  }, codeTagProps.style);
27720
28144
  } else {
27721
- codeTagProps.style = _objectSpread({
28145
+ codeTagProps.style = _objectSpread$5({
27722
28146
  whiteSpace: "pre"
27723
28147
  }, codeTagProps.style);
27724
28148
  }
@@ -27798,8 +28222,8 @@ function requireMerge() {
27798
28222
  hasRequiredMerge = 1;
27799
28223
  var xtend = requireImmutable();
27800
28224
  var Schema2 = requireSchema();
27801
- merge_1 = merge2;
27802
- function merge2(definitions) {
28225
+ merge_1 = merge3;
28226
+ function merge3(definitions) {
27803
28227
  var length = definitions.length;
27804
28228
  var property = [];
27805
28229
  var normal = [];
@@ -27904,9 +28328,9 @@ function requireDefinedInfo() {
27904
28328
  mark2(this, check, (mask & types2[check]) === types2[check]);
27905
28329
  }
27906
28330
  }
27907
- function mark2(values, key, value) {
28331
+ function mark2(values3, key, value) {
27908
28332
  if (value) {
27909
- values[key] = value;
28333
+ values3[key] = value;
27910
28334
  }
27911
28335
  }
27912
28336
  return definedInfo;
@@ -28472,13 +28896,13 @@ var hasRequiredHtml$1;
28472
28896
  function requireHtml$1() {
28473
28897
  if (hasRequiredHtml$1) return html_1$1;
28474
28898
  hasRequiredHtml$1 = 1;
28475
- var merge2 = requireMerge();
28899
+ var merge3 = requireMerge();
28476
28900
  var xlink2 = requireXlink();
28477
28901
  var xml2 = requireXml();
28478
28902
  var xmlns2 = requireXmlns();
28479
28903
  var aria2 = requireAria();
28480
28904
  var html2 = requireHtml$2();
28481
- html_1$1 = merge2([xml2, xlink2, xmlns2, aria2, html2]);
28905
+ html_1$1 = merge3([xml2, xlink2, xmlns2, aria2, html2]);
28482
28906
  return html_1$1;
28483
28907
  }
28484
28908
  var find_1;
@@ -28588,8 +29012,8 @@ function requireSpaceSeparatedTokens() {
28588
29012
  var input = String(value || empty2).trim();
28589
29013
  return input === empty2 ? [] : input.split(whiteSpace);
28590
29014
  }
28591
- function stringify2(values) {
28592
- return values.join(space2).trim();
29015
+ function stringify2(values3) {
29016
+ return values3.join(space2).trim();
28593
29017
  }
28594
29018
  return spaceSeparatedTokens;
28595
29019
  }
@@ -28604,7 +29028,7 @@ function requireCommaSeparatedTokens() {
28604
29028
  var space2 = " ";
28605
29029
  var empty2 = "";
28606
29030
  function parse2(value) {
28607
- var values = [];
29031
+ var values3 = [];
28608
29032
  var input = String(value || empty2);
28609
29033
  var index2 = input.indexOf(comma);
28610
29034
  var lastIndex = 0;
@@ -28617,21 +29041,21 @@ function requireCommaSeparatedTokens() {
28617
29041
  }
28618
29042
  val = input.slice(lastIndex, index2).trim();
28619
29043
  if (val || !end) {
28620
- values.push(val);
29044
+ values3.push(val);
28621
29045
  }
28622
29046
  lastIndex = index2 + 1;
28623
29047
  index2 = input.indexOf(comma, lastIndex);
28624
29048
  }
28625
- return values;
29049
+ return values3;
28626
29050
  }
28627
- function stringify2(values, options) {
29051
+ function stringify2(values3, options) {
28628
29052
  var settings = options || {};
28629
29053
  var left = settings.padLeft === false ? empty2 : space2;
28630
29054
  var right = settings.padRight ? space2 : empty2;
28631
- if (values[values.length - 1] === empty2) {
28632
- values = values.concat(empty2);
29055
+ if (values3[values3.length - 1] === empty2) {
29056
+ values3 = values3.concat(empty2);
28633
29057
  }
28634
- return values.join(right + comma + left).trim();
29058
+ return values3.join(right + comma + left).trim();
28635
29059
  }
28636
29060
  return commaSeparatedTokens;
28637
29061
  }
@@ -28773,13 +29197,13 @@ function requireFactory() {
28773
29197
  }
28774
29198
  return result.join("; ");
28775
29199
  }
28776
- function createAdjustMap(values) {
28777
- var length = values.length;
29200
+ function createAdjustMap(values3) {
29201
+ var length = values3.length;
28778
29202
  var index2 = -1;
28779
29203
  var result = {};
28780
29204
  var value;
28781
29205
  while (++index2 < length) {
28782
- value = values[index2];
29206
+ value = values3[index2];
28783
29207
  result[value.toLowerCase()] = value;
28784
29208
  }
28785
29209
  return result;
@@ -30914,13 +31338,13 @@ function requireCore$1() {
30914
31338
  env2.content
30915
31339
  );
30916
31340
  }
30917
- function stringifyAll(values, language2) {
31341
+ function stringifyAll(values3, language2) {
30918
31342
  var result = [];
30919
- var length = values.length;
31343
+ var length = values3.length;
30920
31344
  var index2 = -1;
30921
31345
  var value;
30922
31346
  while (++index2 < length) {
30923
- value = values[index2];
31347
+ value = values3[index2];
30924
31348
  if (value !== "" && value !== null && value !== void 0) {
30925
31349
  result.push(value);
30926
31350
  }
@@ -30959,7 +31383,7 @@ function requireCore$1() {
30959
31383
  }
30960
31384
  return core$1;
30961
31385
  }
30962
- const defaultStyle = {
31386
+ const defaultStyle$1 = {
30963
31387
  'code[class*="language-"]': {
30964
31388
  "color": "black",
30965
31389
  "background": "none",
@@ -32256,11 +32680,11 @@ function requireAsciidoc() {
32256
32680
  alias: "punctuation"
32257
32681
  }
32258
32682
  };
32259
- function copyFromAsciiDoc(keys2) {
32260
- keys2 = keys2.split(" ");
32683
+ function copyFromAsciiDoc(keys4) {
32684
+ keys4 = keys4.split(" ");
32261
32685
  var o2 = {};
32262
- for (var i2 = 0, l2 = keys2.length; i2 < l2; i2++) {
32263
- o2[keys2[i2]] = asciidoc2[keys2[i2]];
32686
+ for (var i2 = 0, l2 = keys4.length; i2 < l2; i2++) {
32687
+ o2[keys4[i2]] = asciidoc2[keys4[i2]];
32264
32688
  }
32265
32689
  return o2;
32266
32690
  }
@@ -33198,7 +33622,7 @@ function requireBash() {
33198
33622
  bash2.aliases = ["shell"];
33199
33623
  function bash2(Prism) {
33200
33624
  (function(Prism2) {
33201
- var envVars = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b";
33625
+ var envVars2 = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b";
33202
33626
  var commandAfterHeredoc = {
33203
33627
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
33204
33628
  lookbehind: true,
@@ -33210,7 +33634,7 @@ function requireBash() {
33210
33634
  var insideString = {
33211
33635
  bash: commandAfterHeredoc,
33212
33636
  environment: {
33213
- pattern: RegExp("\\$" + envVars),
33637
+ pattern: RegExp("\\$" + envVars2),
33214
33638
  alias: "constant"
33215
33639
  },
33216
33640
  variable: [
@@ -33250,7 +33674,7 @@ function requireBash() {
33250
33674
  operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
33251
33675
  punctuation: /[\[\]]/,
33252
33676
  environment: {
33253
- pattern: RegExp("(\\{)" + envVars),
33677
+ pattern: RegExp("(\\{)" + envVars2),
33254
33678
  lookbehind: true,
33255
33679
  alias: "constant"
33256
33680
  }
@@ -33299,7 +33723,7 @@ function requireBash() {
33299
33723
  pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
33300
33724
  inside: {
33301
33725
  environment: {
33302
- pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars),
33726
+ pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars2),
33303
33727
  lookbehind: true,
33304
33728
  alias: "constant"
33305
33729
  }
@@ -33349,7 +33773,7 @@ function requireBash() {
33349
33773
  }
33350
33774
  ],
33351
33775
  environment: {
33352
- pattern: RegExp("\\$?" + envVars),
33776
+ pattern: RegExp("\\$?" + envVars2),
33353
33777
  alias: "constant"
33354
33778
  },
33355
33779
  variable: insideString.variable,
@@ -35619,15 +36043,15 @@ function requireMarkupTemplating() {
35619
36043
  }
35620
36044
  env2.grammar = Prism2.languages[language2];
35621
36045
  var j = 0;
35622
- var keys2 = Object.keys(env2.tokenStack);
36046
+ var keys4 = Object.keys(env2.tokenStack);
35623
36047
  function walkTokens(tokens) {
35624
36048
  for (var i2 = 0; i2 < tokens.length; i2++) {
35625
- if (j >= keys2.length) {
36049
+ if (j >= keys4.length) {
35626
36050
  break;
35627
36051
  }
35628
36052
  var token = tokens[i2];
35629
36053
  if (typeof token === "string" || token.content && typeof token.content === "string") {
35630
- var k = keys2[j];
36054
+ var k = keys4[j];
35631
36055
  var t2 = env2.tokenStack[k];
35632
36056
  var s2 = typeof token === "string" ? token : token.content;
35633
36057
  var placeholder = getPlaceholder(language2, k);
@@ -52456,7 +52880,7 @@ function requireRefractor() {
52456
52880
  }
52457
52881
  var refractorExports = requireRefractor();
52458
52882
  const refractor = /* @__PURE__ */ getDefaultExportFromCjs(refractorExports);
52459
- var highlighter = highlight(refractor, defaultStyle);
52883
+ var highlighter = highlight(refractor, defaultStyle$1);
52460
52884
  highlighter.supportedLanguages = supportedLanguages;
52461
52885
  const oneLight = {
52462
52886
  'code[class*="language-"]': {
@@ -53567,13 +53991,2330 @@ function PipelineDAGGrid({ items, cols = 3, pipelineSlug }) {
53567
53991
  )
53568
53992
  ] });
53569
53993
  }
53994
+ function _arrayWithoutHoles(arr) {
53995
+ if (Array.isArray(arr)) {
53996
+ for (var i2 = 0, arr2 = new Array(arr.length); i2 < arr.length; i2++) {
53997
+ arr2[i2] = arr[i2];
53998
+ }
53999
+ return arr2;
54000
+ }
54001
+ }
54002
+ function _iterableToArray(iter) {
54003
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
54004
+ }
54005
+ function _nonIterableSpread() {
54006
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
54007
+ }
54008
+ function _toConsumableArray(arr) {
54009
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
54010
+ }
54011
+ function _extends() {
54012
+ _extends = Object.assign || function(target) {
54013
+ for (var i2 = 1; i2 < arguments.length; i2++) {
54014
+ var source2 = arguments[i2];
54015
+ for (var key in source2) {
54016
+ if (Object.prototype.hasOwnProperty.call(source2, key)) {
54017
+ target[key] = source2[key];
54018
+ }
54019
+ }
54020
+ }
54021
+ return target;
54022
+ };
54023
+ return _extends.apply(this, arguments);
54024
+ }
54025
+ function _classCallCheck(instance, Constructor) {
54026
+ if (!(instance instanceof Constructor)) {
54027
+ throw new TypeError("Cannot call a class as a function");
54028
+ }
54029
+ }
54030
+ function _defineProperties(target, props) {
54031
+ for (var i2 = 0; i2 < props.length; i2++) {
54032
+ var descriptor = props[i2];
54033
+ descriptor.enumerable = descriptor.enumerable || false;
54034
+ descriptor.configurable = true;
54035
+ if ("value" in descriptor) descriptor.writable = true;
54036
+ Object.defineProperty(target, descriptor.key, descriptor);
54037
+ }
54038
+ }
54039
+ function _createClass(Constructor, protoProps, staticProps) {
54040
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
54041
+ return Constructor;
54042
+ }
54043
+ function _assertThisInitialized(self2) {
54044
+ if (self2 === void 0) {
54045
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
54046
+ }
54047
+ return self2;
54048
+ }
54049
+ function _setPrototypeOf(o2, p2) {
54050
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o3, p3) {
54051
+ o3.__proto__ = p3;
54052
+ return o3;
54053
+ };
54054
+ return _setPrototypeOf(o2, p2);
54055
+ }
54056
+ function _inherits(subClass, superClass) {
54057
+ if (typeof superClass !== "function" && superClass !== null) {
54058
+ throw new TypeError("Super expression must either be null or a function");
54059
+ }
54060
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
54061
+ constructor: {
54062
+ value: subClass,
54063
+ writable: true,
54064
+ configurable: true
54065
+ }
54066
+ });
54067
+ if (superClass) _setPrototypeOf(subClass, superClass);
54068
+ }
54069
+ function _typeof2(obj) {
54070
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
54071
+ _typeof2 = function _typeof22(obj2) {
54072
+ return typeof obj2;
54073
+ };
54074
+ } else {
54075
+ _typeof2 = function _typeof22(obj2) {
54076
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
54077
+ };
54078
+ }
54079
+ return _typeof2(obj);
54080
+ }
54081
+ function _typeof(obj) {
54082
+ if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
54083
+ _typeof = function _typeof3(obj2) {
54084
+ return _typeof2(obj2);
54085
+ };
54086
+ } else {
54087
+ _typeof = function _typeof3(obj2) {
54088
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : _typeof2(obj2);
54089
+ };
54090
+ }
54091
+ return _typeof(obj);
54092
+ }
54093
+ function _possibleConstructorReturn(self2, call) {
54094
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
54095
+ return call;
54096
+ }
54097
+ return _assertThisInitialized(self2);
54098
+ }
54099
+ function _getPrototypeOf(o2) {
54100
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o3) {
54101
+ return o3.__proto__ || Object.getPrototypeOf(o3);
54102
+ };
54103
+ return _getPrototypeOf(o2);
54104
+ }
54105
+ function _defineProperty(obj, key, value) {
54106
+ if (key in obj) {
54107
+ Object.defineProperty(obj, key, {
54108
+ value,
54109
+ enumerable: true,
54110
+ configurable: true,
54111
+ writable: true
54112
+ });
54113
+ } else {
54114
+ obj[key] = value;
54115
+ }
54116
+ return obj;
54117
+ }
54118
+ var browser;
54119
+ var hasRequiredBrowser;
54120
+ function requireBrowser() {
54121
+ if (hasRequiredBrowser) return browser;
54122
+ hasRequiredBrowser = 1;
54123
+ var invariant3 = function(condition, format, a2, b2, c2, d2, e2, f2) {
54124
+ if (!condition) {
54125
+ var error;
54126
+ if (format === void 0) {
54127
+ error = new Error(
54128
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
54129
+ );
54130
+ } else {
54131
+ var args = [a2, b2, c2, d2, e2, f2];
54132
+ var argIndex = 0;
54133
+ error = new Error(
54134
+ format.replace(/%s/g, function() {
54135
+ return args[argIndex++];
54136
+ })
54137
+ );
54138
+ error.name = "Invariant Violation";
54139
+ }
54140
+ error.framesToPop = 1;
54141
+ throw error;
54142
+ }
54143
+ };
54144
+ browser = invariant3;
54145
+ return browser;
54146
+ }
54147
+ var browserExports = requireBrowser();
54148
+ const invariant = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
54149
+ function _arrayWithHoles(arr) {
54150
+ if (Array.isArray(arr)) return arr;
54151
+ }
54152
+ function _iterableToArrayLimit(arr, i2) {
54153
+ var _arr = [];
54154
+ var _n = true;
54155
+ var _d = false;
54156
+ var _e = void 0;
54157
+ try {
54158
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
54159
+ _arr.push(_s.value);
54160
+ if (i2 && _arr.length === i2) break;
54161
+ }
54162
+ } catch (err) {
54163
+ _d = true;
54164
+ _e = err;
54165
+ } finally {
54166
+ try {
54167
+ if (!_n && _i["return"] != null) _i["return"]();
54168
+ } finally {
54169
+ if (_d) throw _e;
54170
+ }
54171
+ }
54172
+ return _arr;
54173
+ }
54174
+ function _nonIterableRest() {
54175
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
54176
+ }
54177
+ function _slicedToArray(arr, i2) {
54178
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i2) || _nonIterableRest();
54179
+ }
54180
+ function _objectWithoutPropertiesLoose(source2, excluded) {
54181
+ if (source2 == null) return {};
54182
+ var target = {};
54183
+ var sourceKeys = Object.keys(source2);
54184
+ var key, i2;
54185
+ for (i2 = 0; i2 < sourceKeys.length; i2++) {
54186
+ key = sourceKeys[i2];
54187
+ if (excluded.indexOf(key) >= 0) continue;
54188
+ target[key] = source2[key];
54189
+ }
54190
+ return target;
54191
+ }
54192
+ function _objectWithoutProperties(source2, excluded) {
54193
+ if (source2 == null) return {};
54194
+ var target = _objectWithoutPropertiesLoose(source2, excluded);
54195
+ var key, i2;
54196
+ if (Object.getOwnPropertySymbols) {
54197
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source2);
54198
+ for (i2 = 0; i2 < sourceSymbolKeys.length; i2++) {
54199
+ key = sourceSymbolKeys[i2];
54200
+ if (excluded.indexOf(key) >= 0) continue;
54201
+ if (!Object.prototype.propertyIsEnumerable.call(source2, key)) continue;
54202
+ target[key] = source2[key];
54203
+ }
54204
+ }
54205
+ return target;
54206
+ }
54207
+ var keys$2 = function keys(obj) {
54208
+ return obj === Object(obj) ? Object.keys(obj) : [];
54209
+ };
54210
+ var values = function values2(obj) {
54211
+ return obj === Object(obj) ? Object.values(obj) : [];
54212
+ };
54213
+ function mergeDeep(target, source2) {
54214
+ var output = Object.assign({}, target);
54215
+ if (isPlainObject$1(target) && isPlainObject$1(source2)) {
54216
+ keys$2(source2).forEach(function(key) {
54217
+ if (isPlainObject$1(source2[key])) {
54218
+ if (!(key in target)) Object.assign(output, _defineProperty$1({}, key, source2[key]));
54219
+ else output[key] = mergeDeep(target[key], source2[key]);
54220
+ } else {
54221
+ Object.assign(output, _defineProperty$1({}, key, source2[key]));
54222
+ }
54223
+ });
54224
+ }
54225
+ return output;
54226
+ }
54227
+ var merge$1 = function merge(target) {
54228
+ for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
54229
+ sources[_key - 1] = arguments[_key];
54230
+ }
54231
+ return sources.reduce(function(t2, s2) {
54232
+ return mergeDeep(t2, s2);
54233
+ }, target);
54234
+ };
54235
+ var omit$1 = function omit(obj, keys4) {
54236
+ var other = Object.assign({}, obj);
54237
+ if (keys4) {
54238
+ for (var i2 = 0; i2 < keys4.length; i2++) {
54239
+ delete other[keys4[i2]];
54240
+ }
54241
+ }
54242
+ return other;
54243
+ };
54244
+ var isPlainObject$1 = function isPlainObject(obj) {
54245
+ return obj === Object(obj) && !(obj instanceof Date) && !Array.isArray(obj);
54246
+ };
54247
+ var compact = function compact2(arr) {
54248
+ return (arr || []).filter(Boolean);
54249
+ };
54250
+ var isModifier = function isModifier2(key) {
54251
+ return key[0] === "&";
54252
+ };
54253
+ var isElement = function isElement2(key) {
54254
+ return !isModifier(key);
54255
+ };
54256
+ var camelize = function camelize2(key) {
54257
+ return key.replace(/-(\w)/g, function(m2, c2) {
54258
+ return c2.toUpperCase();
54259
+ });
54260
+ };
54261
+ var pickDirectStyles = function pickDirectStyles2(style) {
54262
+ var objectPropertiesWhitelist = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
54263
+ var styleKeys = keys$2(style);
54264
+ var result = {};
54265
+ for (var i2 = 0, l2 = styleKeys.length; i2 < l2; i2 += 1) {
54266
+ var key = styleKeys[i2];
54267
+ var isDirect = Object.prototype.toString.call(style[key]) !== "[object Object]" || // style defs
54268
+ key[0] === ":" || // pseudo selectors
54269
+ key[0] === "@" || // @media / @keyframes / @supports / @font-face
54270
+ objectPropertiesWhitelist.indexOf(key) >= 0;
54271
+ if (isDirect) {
54272
+ result[key] = style[key];
54273
+ }
54274
+ }
54275
+ return result;
54276
+ };
54277
+ var pickNestedStyles = function pickNestedStyles2(style, keysToPick) {
54278
+ var camelizedKeysToPick = keysToPick.map(camelize);
54279
+ var styleKeys = keys$2(style);
54280
+ var result = {};
54281
+ for (var i2 = 0, l2 = styleKeys.length; i2 < l2; i2 += 1) {
54282
+ var key = styleKeys[i2];
54283
+ if (keysToPick.indexOf(key) >= 0 || camelizedKeysToPick.indexOf(camelize(key)) >= 0) {
54284
+ result[key] = style[key];
54285
+ }
54286
+ }
54287
+ return result;
54288
+ };
54289
+ var hoistModifierStylesRecursive = function hoistModifierStylesRecursive2(style, modifierKeysToPick) {
54290
+ var result = merge$1.apply(void 0, [{}, omit$1(style, modifierKeysToPick)].concat(_toConsumableArray$1(values(pickNestedStyles(style, modifierKeysToPick)))));
54291
+ var modifierKeys = keys$2(result).filter(isModifier);
54292
+ for (var i2 = 0, l2 = modifierKeys.length; i2 < l2; i2 += 1) {
54293
+ var key = modifierKeys[i2];
54294
+ var subresult = hoistModifierStylesRecursive2(result[key], modifierKeysToPick);
54295
+ if (modifierKeysToPick.indexOf(key) >= 0) {
54296
+ delete result[key];
54297
+ result = merge$1({}, result, subresult);
54298
+ } else {
54299
+ result[key] = subresult;
54300
+ }
54301
+ }
54302
+ return result;
54303
+ };
54304
+ function ownKeys$4(object, enumerableOnly) {
54305
+ var keys4 = Object.keys(object);
54306
+ if (Object.getOwnPropertySymbols) {
54307
+ var symbols = Object.getOwnPropertySymbols(object);
54308
+ if (enumerableOnly) {
54309
+ symbols = symbols.filter(function(sym) {
54310
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
54311
+ });
54312
+ }
54313
+ keys4.push.apply(keys4, symbols);
54314
+ }
54315
+ return keys4;
54316
+ }
54317
+ function _objectSpread$4(target) {
54318
+ for (var i2 = 1; i2 < arguments.length; i2++) {
54319
+ var source2 = arguments[i2] != null ? arguments[i2] : {};
54320
+ if (i2 % 2) {
54321
+ ownKeys$4(Object(source2), true).forEach(function(key) {
54322
+ _defineProperty$1(target, key, source2[key]);
54323
+ });
54324
+ } else if (Object.getOwnPropertyDescriptors) {
54325
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source2));
54326
+ } else {
54327
+ ownKeys$4(Object(source2)).forEach(function(key) {
54328
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source2, key));
54329
+ });
54330
+ }
54331
+ }
54332
+ return target;
54333
+ }
54334
+ var defaultObjectPropsWhitelist = ["animationName"];
54335
+ var defaultPropsDecorator = function defaultPropsDecorator2(_ref) {
54336
+ var style = _ref.style, className = _ref.className;
54337
+ return _objectSpread$4(_objectSpread$4({}, style ? {
54338
+ style: pickDirectStyles(style, defaultObjectPropsWhitelist)
54339
+ } : {}), className ? {
54340
+ className
54341
+ } : {});
54342
+ };
54343
+ var PropsDecoratorContext = /* @__PURE__ */ reactExports.createContext(defaultPropsDecorator);
54344
+ PropsDecoratorContext.Provider;
54345
+ var coerceSelection = function coerceSelection2(select) {
54346
+ if (!select) {
54347
+ return [];
54348
+ } else if (typeof select === "string") {
54349
+ return [select];
54350
+ } else if (!Array.isArray(select)) {
54351
+ var objSelect = select;
54352
+ return keys$2(select).reduce(function(acc, key) {
54353
+ return acc.concat(objSelect[key] ? [key] : []);
54354
+ }, []);
54355
+ }
54356
+ return select;
54357
+ };
54358
+ var EMPTY$1 = {};
54359
+ var memoize = function memoize2(substyle) {
54360
+ return function(select, defaultStyle2) {
54361
+ var cacheKey = defaultStyle2 || EMPTY$1;
54362
+ substyle.memoize = substyle.memoize || /* @__PURE__ */ new WeakMap();
54363
+ var mapEntry;
54364
+ if (!substyle.memoize.has(cacheKey)) {
54365
+ mapEntry = {};
54366
+ substyle.memoize.set(cacheKey, mapEntry);
54367
+ } else {
54368
+ mapEntry = substyle.memoize.get(cacheKey);
54369
+ }
54370
+ var selectHash = coerceSelection(select).join(" ");
54371
+ return selectHash in mapEntry ? mapEntry[selectHash] : mapEntry[selectHash] = substyle(select || [], defaultStyle2);
54372
+ };
54373
+ };
54374
+ function ownKeys$3(object, enumerableOnly) {
54375
+ var keys4 = Object.keys(object);
54376
+ if (Object.getOwnPropertySymbols) {
54377
+ var symbols = Object.getOwnPropertySymbols(object);
54378
+ if (enumerableOnly) {
54379
+ symbols = symbols.filter(function(sym) {
54380
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
54381
+ });
54382
+ }
54383
+ keys4.push.apply(keys4, symbols);
54384
+ }
54385
+ return keys4;
54386
+ }
54387
+ function _objectSpread$3(target) {
54388
+ for (var i2 = 1; i2 < arguments.length; i2++) {
54389
+ var source2 = arguments[i2] != null ? arguments[i2] : {};
54390
+ if (i2 % 2) {
54391
+ ownKeys$3(Object(source2), true).forEach(function(key) {
54392
+ _defineProperty$1(target, key, source2[key]);
54393
+ });
54394
+ } else if (Object.getOwnPropertyDescriptors) {
54395
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source2));
54396
+ } else {
54397
+ ownKeys$3(Object(source2)).forEach(function(key) {
54398
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source2, key));
54399
+ });
54400
+ }
54401
+ }
54402
+ return target;
54403
+ }
54404
+ var guessBaseClassName = function guessBaseClassName2(classNames) {
54405
+ var firstKey = classNames && keys$2(classNames)[0];
54406
+ return firstKey && firstKey.split("__")[0].split("--")[0];
54407
+ };
54408
+ var deriveClassNames = function deriveClassNames2(className, elementKeys, modifierKeys) {
54409
+ if (!className) {
54410
+ return void 0;
54411
+ }
54412
+ var firstClassName = className.split(" ")[0];
54413
+ var derivedClassNames = [].concat(_toConsumableArray$1(elementKeys.length === 0 ? modifierKeys.map(function(key) {
54414
+ return "".concat(firstClassName, "--").concat(key.substring(1));
54415
+ }) : []), _toConsumableArray$1(elementKeys.map(function(key) {
54416
+ return "".concat(firstClassName, "__").concat(key);
54417
+ })));
54418
+ return elementKeys.length === 0 ? [className].concat(_toConsumableArray$1(derivedClassNames)) : derivedClassNames;
54419
+ };
54420
+ function createSubstyle(_ref) {
54421
+ var style = _ref.style, className = _ref.className, classNames = _ref.classNames;
54422
+ var propsDecorator = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultPropsDecorator;
54423
+ var baseClassName = className || guessBaseClassName(classNames) || (style === null || style === void 0 ? void 0 : style.className);
54424
+ var substyle = typeof style === "function" ? style : memoize(function(select, defaultStyle2) {
54425
+ var selectedKeys = coerceSelection(select);
54426
+ invariant(Array.isArray(selectedKeys), "First parameter must be a string, an array of strings, a plain object with boolean values, or a falsy value.");
54427
+ invariant(!defaultStyle2 || isPlainObject$1(defaultStyle2), "Optional second parameter must be a plain object.");
54428
+ var modifierKeys = selectedKeys.filter(isModifier);
54429
+ var elementKeys = selectedKeys.filter(isElement);
54430
+ var collectElementStyles = elementKeys.length > 0 ? function(fromStyle) {
54431
+ return values(pickNestedStyles(fromStyle, elementKeys));
54432
+ } : function(fromStyle) {
54433
+ return [fromStyle];
54434
+ };
54435
+ var collectSelectedStyles = function collectSelectedStyles2() {
54436
+ var fromStyle = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
54437
+ return collectElementStyles(hoistModifierStylesRecursive(fromStyle, modifierKeys));
54438
+ };
54439
+ var derivedClassNames = deriveClassNames(baseClassName, elementKeys, modifierKeys);
54440
+ return createSubstyle(_objectSpread$3(_objectSpread$3(_objectSpread$3({}, (style || defaultStyle2) && {
54441
+ style: merge$1.apply(void 0, [{}].concat(_toConsumableArray$1(collectSelectedStyles(defaultStyle2)), _toConsumableArray$1(collectSelectedStyles(style))))
54442
+ }), derivedClassNames && {
54443
+ className: derivedClassNames.join(" ")
54444
+ }), classNames && {
54445
+ classNames
54446
+ }), propsDecorator);
54447
+ });
54448
+ var styleProps = _objectSpread$3({}, typeof style === "function" ? style : {
54449
+ style
54450
+ });
54451
+ var classNameSplit = _toConsumableArray$1(new Set([].concat(_toConsumableArray$1(styleProps.className ? styleProps.className.split(" ") : []), _toConsumableArray$1(baseClassName ? baseClassName.split(" ") : []))));
54452
+ var mappedClassNames = classNames ? compact(classNameSplit.map(function(singleClassName) {
54453
+ return classNames[singleClassName];
54454
+ })) : classNameSplit;
54455
+ var propsForSpread = propsDecorator(_objectSpread$3(_objectSpread$3({}, styleProps), mappedClassNames.length > 0 ? {
54456
+ className: mappedClassNames.join(" ")
54457
+ } : {}));
54458
+ Object.assign(substyle, propsForSpread);
54459
+ return substyle;
54460
+ }
54461
+ function ownKeys$2(object, enumerableOnly) {
54462
+ var keys4 = Object.keys(object);
54463
+ if (Object.getOwnPropertySymbols) {
54464
+ var symbols = Object.getOwnPropertySymbols(object);
54465
+ if (enumerableOnly) {
54466
+ symbols = symbols.filter(function(sym) {
54467
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
54468
+ });
54469
+ }
54470
+ keys4.push.apply(keys4, symbols);
54471
+ }
54472
+ return keys4;
54473
+ }
54474
+ function _objectSpread$2(target) {
54475
+ for (var i2 = 1; i2 < arguments.length; i2++) {
54476
+ var source2 = arguments[i2] != null ? arguments[i2] : {};
54477
+ if (i2 % 2) {
54478
+ ownKeys$2(Object(source2), true).forEach(function(key) {
54479
+ _defineProperty$1(target, key, source2[key]);
54480
+ });
54481
+ } else if (Object.getOwnPropertyDescriptors) {
54482
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source2));
54483
+ } else {
54484
+ ownKeys$2(Object(source2)).forEach(function(key) {
54485
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source2, key));
54486
+ });
54487
+ }
54488
+ }
54489
+ return target;
54490
+ }
54491
+ var inline = function inline2() {
54492
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
54493
+ args[_key] = arguments[_key];
54494
+ }
54495
+ return args.reduce(function(result, arg) {
54496
+ return _objectSpread$2(_objectSpread$2(_objectSpread$2({}, result), typeof arg === "function" ? arg : {}), {}, {
54497
+ style: _objectSpread$2(_objectSpread$2({}, result.style), typeof arg === "function" ? arg.style : arg)
54498
+ });
54499
+ }, {});
54500
+ };
54501
+ var useStyles = function useStyles2(defaultStyle2, _ref, modifiers) {
54502
+ var style = _ref.style, className = _ref.className, classNames = _ref.classNames;
54503
+ var propsDecorator = reactExports.useContext(PropsDecoratorContext);
54504
+ var substyle = reactExports.useMemo(function() {
54505
+ return createSubstyle({
54506
+ style,
54507
+ className,
54508
+ classNames
54509
+ }, propsDecorator);
54510
+ }, [style, className, classNames, propsDecorator]);
54511
+ return substyle(modifiers, defaultStyle2);
54512
+ };
54513
+ var propTypes$1 = { exports: {} };
54514
+ var ReactPropTypesSecret_1;
54515
+ var hasRequiredReactPropTypesSecret;
54516
+ function requireReactPropTypesSecret() {
54517
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
54518
+ hasRequiredReactPropTypesSecret = 1;
54519
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
54520
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
54521
+ return ReactPropTypesSecret_1;
54522
+ }
54523
+ var factoryWithThrowingShims;
54524
+ var hasRequiredFactoryWithThrowingShims;
54525
+ function requireFactoryWithThrowingShims() {
54526
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
54527
+ hasRequiredFactoryWithThrowingShims = 1;
54528
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
54529
+ function emptyFunction() {
54530
+ }
54531
+ function emptyFunctionWithReset() {
54532
+ }
54533
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
54534
+ factoryWithThrowingShims = function() {
54535
+ function shim(props, propName, componentName, location, propFullName, secret) {
54536
+ if (secret === ReactPropTypesSecret) {
54537
+ return;
54538
+ }
54539
+ var err = new Error(
54540
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
54541
+ );
54542
+ err.name = "Invariant Violation";
54543
+ throw err;
54544
+ }
54545
+ shim.isRequired = shim;
54546
+ function getShim() {
54547
+ return shim;
54548
+ }
54549
+ var ReactPropTypes = {
54550
+ array: shim,
54551
+ bigint: shim,
54552
+ bool: shim,
54553
+ func: shim,
54554
+ number: shim,
54555
+ object: shim,
54556
+ string: shim,
54557
+ symbol: shim,
54558
+ any: shim,
54559
+ arrayOf: getShim,
54560
+ element: shim,
54561
+ elementType: shim,
54562
+ instanceOf: getShim,
54563
+ node: shim,
54564
+ objectOf: getShim,
54565
+ oneOf: getShim,
54566
+ oneOfType: getShim,
54567
+ shape: getShim,
54568
+ exact: getShim,
54569
+ checkPropTypes: emptyFunctionWithReset,
54570
+ resetWarningCache: emptyFunction
54571
+ };
54572
+ ReactPropTypes.PropTypes = ReactPropTypes;
54573
+ return ReactPropTypes;
54574
+ };
54575
+ return factoryWithThrowingShims;
54576
+ }
54577
+ var hasRequiredPropTypes;
54578
+ function requirePropTypes() {
54579
+ if (hasRequiredPropTypes) return propTypes$1.exports;
54580
+ hasRequiredPropTypes = 1;
54581
+ {
54582
+ propTypes$1.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
54583
+ }
54584
+ return propTypes$1.exports;
54585
+ }
54586
+ var propTypesExports = /* @__PURE__ */ requirePropTypes();
54587
+ const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
54588
+ var escapeRegex = function escapeRegex2(str) {
54589
+ return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
54590
+ };
54591
+ var PLACEHOLDERS = {
54592
+ id: "__id__",
54593
+ display: "__display__"
54594
+ };
54595
+ var findPositionOfCapturingGroup = function findPositionOfCapturingGroup2(markup, parameterName) {
54596
+ invariant(parameterName === "id" || parameterName === "display", 'Second arg must be either "id" or "display", got: "'.concat(parameterName, '"'));
54597
+ var indexDisplay = markup.indexOf(PLACEHOLDERS.display);
54598
+ var indexId = markup.indexOf(PLACEHOLDERS.id);
54599
+ if (indexDisplay < 0) indexDisplay = null;
54600
+ if (indexId < 0) indexId = null;
54601
+ invariant(indexDisplay !== null || indexId !== null, "The markup '".concat(markup, "' does not contain either of the placeholders '__id__' or '__display__'"));
54602
+ if (indexDisplay !== null && indexId !== null) {
54603
+ return parameterName === "id" && indexId <= indexDisplay || parameterName === "display" && indexDisplay <= indexId ? 0 : 1;
54604
+ }
54605
+ return 0;
54606
+ };
54607
+ var combineRegExps = function combineRegExps2(regExps) {
54608
+ var serializedRegexParser = /^\/(.+)\/(\w+)?$/;
54609
+ return new RegExp(regExps.map(function(regex) {
54610
+ var _serializedRegexParse = serializedRegexParser.exec(regex.toString()), _serializedRegexParse2 = _slicedToArray(_serializedRegexParse, 3), regexString = _serializedRegexParse2[1], regexFlags = _serializedRegexParse2[2];
54611
+ invariant(!regexFlags, "RegExp flags are not supported. Change /".concat(regexString, "/").concat(regexFlags, " into /").concat(regexString, "/"));
54612
+ return "(".concat(regexString, ")");
54613
+ }).join("|"), "g");
54614
+ };
54615
+ var countPlaceholders = function countPlaceholders2(markup) {
54616
+ var count2 = 0;
54617
+ if (markup.indexOf("__id__") >= 0) count2++;
54618
+ if (markup.indexOf("__display__") >= 0) count2++;
54619
+ return count2;
54620
+ };
54621
+ var emptyFn = function emptyFn2() {
54622
+ };
54623
+ var iterateMentionsMarkup = function iterateMentionsMarkup2(value, config, markupIteratee) {
54624
+ var textIteratee = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : emptyFn;
54625
+ var regex = combineRegExps(config.map(function(c2) {
54626
+ return c2.regex;
54627
+ }));
54628
+ var accOffset = 2;
54629
+ var captureGroupOffsets = config.map(function(_ref) {
54630
+ var markup2 = _ref.markup;
54631
+ var result = accOffset;
54632
+ accOffset += countPlaceholders(markup2) + 1;
54633
+ return result;
54634
+ });
54635
+ var match;
54636
+ var start = 0;
54637
+ var currentPlainTextIndex = 0;
54638
+ while ((match = regex.exec(value)) !== null) {
54639
+ var offset2 = captureGroupOffsets.find(function(o2) {
54640
+ return !!match[o2];
54641
+ });
54642
+ var mentionChildIndex = captureGroupOffsets.indexOf(offset2);
54643
+ var _config$mentionChildI = config[mentionChildIndex], markup = _config$mentionChildI.markup, displayTransform2 = _config$mentionChildI.displayTransform;
54644
+ var idPos = offset2 + findPositionOfCapturingGroup(markup, "id");
54645
+ var displayPos = offset2 + findPositionOfCapturingGroup(markup, "display");
54646
+ var id = match[idPos];
54647
+ var display = displayTransform2(id, match[displayPos]);
54648
+ var substr = value.substring(start, match.index);
54649
+ textIteratee(substr, start, currentPlainTextIndex);
54650
+ currentPlainTextIndex += substr.length;
54651
+ markupIteratee(match[0], match.index, currentPlainTextIndex, id, display, mentionChildIndex, start);
54652
+ currentPlainTextIndex += display.length;
54653
+ start = regex.lastIndex;
54654
+ }
54655
+ if (start < value.length) {
54656
+ textIteratee(value.substring(start), start, currentPlainTextIndex);
54657
+ }
54658
+ };
54659
+ var getPlainText = function getPlainText2(value, config) {
54660
+ var result = "";
54661
+ iterateMentionsMarkup(value, config, function(match, index2, plainTextIndex, id, display) {
54662
+ result += display;
54663
+ }, function(plainText) {
54664
+ result += plainText;
54665
+ });
54666
+ return result;
54667
+ };
54668
+ var mapPlainTextIndex = function mapPlainTextIndex2(value, config, indexInPlainText) {
54669
+ var inMarkupCorrection = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "START";
54670
+ if (typeof indexInPlainText !== "number") {
54671
+ return indexInPlainText;
54672
+ }
54673
+ var result;
54674
+ var textIteratee = function textIteratee2(substr, index2, substrPlainTextIndex) {
54675
+ if (result !== void 0) return;
54676
+ if (substrPlainTextIndex + substr.length >= indexInPlainText) {
54677
+ result = index2 + indexInPlainText - substrPlainTextIndex;
54678
+ }
54679
+ };
54680
+ var markupIteratee = function markupIteratee2(markup, index2, mentionPlainTextIndex, id, display, childIndex, lastMentionEndIndex) {
54681
+ if (result !== void 0) return;
54682
+ if (mentionPlainTextIndex + display.length > indexInPlainText) {
54683
+ if (inMarkupCorrection === "NULL") {
54684
+ result = null;
54685
+ } else {
54686
+ result = index2 + (inMarkupCorrection === "END" ? markup.length : 0);
54687
+ }
54688
+ }
54689
+ };
54690
+ iterateMentionsMarkup(value, config, markupIteratee, textIteratee);
54691
+ return result === void 0 ? value.length : result;
54692
+ };
54693
+ var spliceString = function spliceString2(str, start, end, insert) {
54694
+ return str.substring(0, start) + insert + str.substring(end);
54695
+ };
54696
+ var applyChangeToValue = function applyChangeToValue2(value, plainTextValue, _ref, config) {
54697
+ var selectionStartBefore = _ref.selectionStartBefore, selectionEndBefore = _ref.selectionEndBefore, selectionEndAfter = _ref.selectionEndAfter;
54698
+ var oldPlainTextValue = getPlainText(value, config);
54699
+ var lengthDelta = oldPlainTextValue.length - plainTextValue.length;
54700
+ if (selectionStartBefore === "undefined") {
54701
+ selectionStartBefore = selectionEndAfter + lengthDelta;
54702
+ }
54703
+ if (selectionEndBefore === "undefined") {
54704
+ selectionEndBefore = selectionStartBefore;
54705
+ }
54706
+ if (selectionStartBefore === selectionEndBefore && selectionEndBefore === selectionEndAfter && oldPlainTextValue.length === plainTextValue.length) {
54707
+ selectionStartBefore = selectionStartBefore - 1;
54708
+ }
54709
+ var insert = plainTextValue.slice(selectionStartBefore, selectionEndAfter);
54710
+ var spliceStart = Math.min(selectionStartBefore, selectionEndAfter);
54711
+ var spliceEnd = selectionEndBefore;
54712
+ if (selectionStartBefore === selectionEndAfter) {
54713
+ spliceEnd = Math.max(selectionEndBefore, selectionStartBefore + lengthDelta);
54714
+ }
54715
+ var mappedSpliceStart = mapPlainTextIndex(value, config, spliceStart, "START");
54716
+ var mappedSpliceEnd = mapPlainTextIndex(value, config, spliceEnd, "END");
54717
+ var controlSpliceStart = mapPlainTextIndex(value, config, spliceStart, "NULL");
54718
+ var controlSpliceEnd = mapPlainTextIndex(value, config, spliceEnd, "NULL");
54719
+ var willRemoveMention = controlSpliceStart === null || controlSpliceEnd === null;
54720
+ var newValue = spliceString(value, mappedSpliceStart, mappedSpliceEnd, insert);
54721
+ if (!willRemoveMention) {
54722
+ var controlPlainTextValue = getPlainText(newValue, config);
54723
+ if (controlPlainTextValue !== plainTextValue) {
54724
+ spliceStart = 0;
54725
+ while (plainTextValue[spliceStart] === controlPlainTextValue[spliceStart]) {
54726
+ spliceStart++;
54727
+ }
54728
+ insert = plainTextValue.slice(spliceStart, selectionEndAfter);
54729
+ spliceEnd = oldPlainTextValue.lastIndexOf(plainTextValue.substring(selectionEndAfter));
54730
+ mappedSpliceStart = mapPlainTextIndex(value, config, spliceStart, "START");
54731
+ mappedSpliceEnd = mapPlainTextIndex(value, config, spliceEnd, "END");
54732
+ newValue = spliceString(value, mappedSpliceStart, mappedSpliceEnd, insert);
54733
+ }
54734
+ }
54735
+ return newValue;
54736
+ };
54737
+ var findStartOfMentionInPlainText = function findStartOfMentionInPlainText2(value, config, indexInPlainText) {
54738
+ var result = indexInPlainText;
54739
+ var foundMention = false;
54740
+ var markupIteratee = function markupIteratee2(markup, index2, mentionPlainTextIndex, id, display, childIndex, lastMentionEndIndex) {
54741
+ if (mentionPlainTextIndex <= indexInPlainText && mentionPlainTextIndex + display.length > indexInPlainText) {
54742
+ result = mentionPlainTextIndex;
54743
+ foundMention = true;
54744
+ }
54745
+ };
54746
+ iterateMentionsMarkup(value, config, markupIteratee);
54747
+ if (foundMention) {
54748
+ return result;
54749
+ }
54750
+ };
54751
+ var getMentions = function getMentions2(value, config) {
54752
+ var mentions = [];
54753
+ iterateMentionsMarkup(value, config, function(match, index2, plainTextIndex, id, display, childIndex, start) {
54754
+ mentions.push({
54755
+ id,
54756
+ display,
54757
+ childIndex,
54758
+ index: index2,
54759
+ plainTextIndex
54760
+ });
54761
+ });
54762
+ return mentions;
54763
+ };
54764
+ var getSuggestionHtmlId = function getSuggestionHtmlId2(prefix, id) {
54765
+ return "".concat(prefix, "-").concat(id);
54766
+ };
54767
+ var countSuggestions = function countSuggestions2(suggestions) {
54768
+ return Object.values(suggestions).reduce(function(acc, _ref) {
54769
+ var results = _ref.results;
54770
+ return acc + results.length;
54771
+ }, 0);
54772
+ };
54773
+ var getEndOfLastMention = function getEndOfLastMention2(value, config) {
54774
+ var mentions = getMentions(value, config);
54775
+ var lastMention = mentions[mentions.length - 1];
54776
+ return lastMention ? lastMention.plainTextIndex + lastMention.display.length : 0;
54777
+ };
54778
+ var markupToRegex = function markupToRegex2(markup) {
54779
+ var escapedMarkup = escapeRegex(markup);
54780
+ var charAfterDisplay = markup[markup.indexOf(PLACEHOLDERS.display) + PLACEHOLDERS.display.length];
54781
+ var charAfterId = markup[markup.indexOf(PLACEHOLDERS.id) + PLACEHOLDERS.id.length];
54782
+ return new RegExp(escapedMarkup.replace(PLACEHOLDERS.display, "([^".concat(escapeRegex(charAfterDisplay || ""), "]+?)")).replace(PLACEHOLDERS.id, "([^".concat(escapeRegex(charAfterId || ""), "]+?)")));
54783
+ };
54784
+ var readConfigFromChildren = function readConfigFromChildren2(children) {
54785
+ return reactExports.Children.toArray(children).map(function(_ref) {
54786
+ var _ref$props = _ref.props, markup = _ref$props.markup, regex = _ref$props.regex, displayTransform2 = _ref$props.displayTransform;
54787
+ return {
54788
+ markup,
54789
+ regex: regex ? coerceCapturingGroups(regex, markup) : markupToRegex(markup),
54790
+ displayTransform: displayTransform2 || function(id, display) {
54791
+ return display || id;
54792
+ }
54793
+ };
54794
+ });
54795
+ };
54796
+ var coerceCapturingGroups = function coerceCapturingGroups2(regex, markup) {
54797
+ var numberOfGroups = new RegExp(regex.toString() + "|").exec("").length - 1;
54798
+ var numberOfPlaceholders = countPlaceholders(markup);
54799
+ invariant(numberOfGroups === numberOfPlaceholders, "Number of capturing groups in RegExp ".concat(regex.toString(), " (").concat(numberOfGroups, ") does not match the number of placeholders in the markup '").concat(markup, "' (").concat(numberOfPlaceholders, ")"));
54800
+ return regex;
54801
+ };
54802
+ var makeMentionsMarkup = function makeMentionsMarkup2(markup, id, display) {
54803
+ return markup.replace(PLACEHOLDERS.id, id).replace(PLACEHOLDERS.display, display);
54804
+ };
54805
+ var lettersDiacritics = [{
54806
+ base: "A",
54807
+ letters: /(&#65;|&#9398;|&#65313;|&#192;|&#193;|&#194;|&#7846;|&#7844;|&#7850;|&#7848;|&#195;|&#256;|&#258;|&#7856;|&#7854;|&#7860;|&#7858;|&#550;|&#480;|&#196;|&#478;|&#7842;|&#197;|&#506;|&#461;|&#512;|&#514;|&#7840;|&#7852;|&#7862;|&#7680;|&#260;|&#570;|&#11375;|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g
54808
+ }, {
54809
+ base: "AA",
54810
+ letters: /(&#42802;|[\uA732])/g
54811
+ }, {
54812
+ base: "AE",
54813
+ letters: /(&#198;|&#508;|&#482;|[\u00C6\u01FC\u01E2])/g
54814
+ }, {
54815
+ base: "AO",
54816
+ letters: /(&#42804;|[\uA734])/g
54817
+ }, {
54818
+ base: "AU",
54819
+ letters: /(&#42806;|[\uA736])/g
54820
+ }, {
54821
+ base: "AV",
54822
+ letters: /(&#42808;|&#42810;|[\uA738\uA73A])/g
54823
+ }, {
54824
+ base: "AY",
54825
+ letters: /(&#42812;|[\uA73C])/g
54826
+ }, {
54827
+ base: "B",
54828
+ letters: /(&#66;|&#9399;|&#65314;|&#7682;|&#7684;|&#7686;|&#579;|&#386;|&#385;|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g
54829
+ }, {
54830
+ base: "C",
54831
+ letters: /(&#67;|&#9400;|&#65315;|&#262;|&#264;|&#266;|&#268;|&#199;|&#7688;|&#391;|&#571;|&#42814;|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g
54832
+ }, {
54833
+ base: "D",
54834
+ letters: /(&#68;|&#9401;|&#65316;|&#7690;|&#270;|&#7692;|&#7696;|&#7698;|&#7694;|&#272;|&#395;|&#394;|&#393;|&#42873;|&#208;|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g
54835
+ }, {
54836
+ base: "DZ",
54837
+ letters: /(&#497;|&#452;|[\u01F1\u01C4])/g
54838
+ }, {
54839
+ base: "Dz",
54840
+ letters: /(&#498;|&#453;|[\u01F2\u01C5])/g
54841
+ }, {
54842
+ base: "E",
54843
+ letters: /(&#69;|&#9402;|&#65317;|&#200;|&#201;|&#202;|&#7872;|&#7870;|&#7876;|&#7874;|&#7868;|&#274;|&#7700;|&#7702;|&#276;|&#278;|&#203;|&#7866;|&#282;|&#516;|&#518;|&#7864;|&#7878;|&#552;|&#7708;|&#280;|&#7704;|&#7706;|&#400;|&#398;|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g
54844
+ }, {
54845
+ base: "F",
54846
+ letters: /(&#70;|&#9403;|&#65318;|&#7710;|&#401;|&#42875;|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g
54847
+ }, {
54848
+ base: "G",
54849
+ letters: /(&#71;|&#9404;|&#65319;|&#500;|&#284;|&#7712;|&#286;|&#288;|&#486;|&#290;|&#484;|&#403;|&#42912;|&#42877;|&#42878;|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g
54850
+ }, {
54851
+ base: "H",
54852
+ letters: /(&#72;|&#9405;|&#65320;|&#292;|&#7714;|&#7718;|&#542;|&#7716;|&#7720;|&#7722;|&#294;|&#11367;|&#11381;|&#42893;|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g
54853
+ }, {
54854
+ base: "I",
54855
+ letters: /(&#73;|&#9406;|&#65321;|&#204;|&#205;|&#206;|&#296;|&#298;|&#300;|&#304;|&#207;|&#7726;|&#7880;|&#463;|&#520;|&#522;|&#7882;|&#302;|&#7724;|&#407;|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g
54856
+ }, {
54857
+ base: "J",
54858
+ letters: /(&#74;|&#9407;|&#65322;|&#308;|&#584;|[\u004A\u24BF\uFF2A\u0134\u0248])/g
54859
+ }, {
54860
+ base: "K",
54861
+ letters: /(&#75;|&#9408;|&#65323;|&#7728;|&#488;|&#7730;|&#310;|&#7732;|&#408;|&#11369;|&#42816;|&#42818;|&#42820;|&#42914;|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g
54862
+ }, {
54863
+ base: "L",
54864
+ letters: /(&#76;|&#9409;|&#65324;|&#319;|&#313;|&#317;|&#7734;|&#7736;|&#315;|&#7740;|&#7738;|&#321;|&#573;|&#11362;|&#11360;|&#42824;|&#42822;|&#42880;|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g
54865
+ }, {
54866
+ base: "LJ",
54867
+ letters: /(&#455;|[\u01C7])/g
54868
+ }, {
54869
+ base: "Lj",
54870
+ letters: /(&#456;|[\u01C8])/g
54871
+ }, {
54872
+ base: "M",
54873
+ letters: /(&#77;|&#9410;|&#65325;|&#7742;|&#7744;|&#7746;|&#11374;|&#412;|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g
54874
+ }, {
54875
+ base: "N",
54876
+ letters: /(&#78;|&#9411;|&#65326;|&#504;|&#323;|&#209;|&#7748;|&#327;|&#7750;|&#325;|&#7754;|&#7752;|&#544;|&#413;|&#42896;|&#42916;|&#330;|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g
54877
+ }, {
54878
+ base: "NJ",
54879
+ letters: /(&#458;|[\u01CA])/g
54880
+ }, {
54881
+ base: "Nj",
54882
+ letters: /(&#459;|[\u01CB])/g
54883
+ }, {
54884
+ base: "O",
54885
+ letters: /(&#79;|&#9412;|&#65327;|&#210;|&#211;|&#212;|&#7890;|&#7888;|&#7894;|&#7892;|&#213;|&#7756;|&#556;|&#7758;|&#332;|&#7760;|&#7762;|&#334;|&#558;|&#560;|&#214;|&#554;|&#7886;|&#336;|&#465;|&#524;|&#526;|&#416;|&#7900;|&#7898;|&#7904;|&#7902;|&#7906;|&#7884;|&#7896;|&#490;|&#492;|&#216;|&#510;|&#390;|&#415;|&#42826;|&#42828;|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g
54886
+ }, {
54887
+ base: "OE",
54888
+ letters: /(&#338;|[\u0152])/g
54889
+ }, {
54890
+ base: "OI",
54891
+ letters: /(&#418;|[\u01A2])/g
54892
+ }, {
54893
+ base: "OO",
54894
+ letters: /(&#42830;|[\uA74E])/g
54895
+ }, {
54896
+ base: "OU",
54897
+ letters: /(&#546;|[\u0222])/g
54898
+ }, {
54899
+ base: "P",
54900
+ letters: /(&#80;|&#9413;|&#65328;|&#7764;|&#7766;|&#420;|&#11363;|&#42832;|&#42834;|&#42836;|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g
54901
+ }, {
54902
+ base: "Q",
54903
+ letters: /(&#81;|&#9414;|&#65329;|&#42838;|&#42840;|&#586;|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g
54904
+ }, {
54905
+ base: "R",
54906
+ letters: /(&#82;|&#9415;|&#65330;|&#340;|&#7768;|&#344;|&#528;|&#530;|&#7770;|&#7772;|&#342;|&#7774;|&#588;|&#11364;|&#42842;|&#42918;|&#42882;|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g
54907
+ }, {
54908
+ base: "S",
54909
+ letters: /(&#83;|&#9416;|&#65331;|&#7838;|&#346;|&#7780;|&#348;|&#7776;|&#352;|&#7782;|&#7778;|&#7784;|&#536;|&#350;|&#11390;|&#42920;|&#42884;|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g
54910
+ }, {
54911
+ base: "T",
54912
+ letters: /(&#84;|&#9417;|&#65332;|&#7786;|&#356;|&#7788;|&#538;|&#354;|&#7792;|&#7790;|&#358;|&#428;|&#430;|&#574;|&#42886;|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g
54913
+ }, {
54914
+ base: "TH",
54915
+ letters: /(&#222;|[\u00DE])/g
54916
+ }, {
54917
+ base: "TZ",
54918
+ letters: /(&#42792;|[\uA728])/g
54919
+ }, {
54920
+ base: "U",
54921
+ letters: /(&#85;|&#9418;|&#65333;|&#217;|&#218;|&#219;|&#360;|&#7800;|&#362;|&#7802;|&#364;|&#220;|&#475;|&#471;|&#469;|&#473;|&#7910;|&#366;|&#368;|&#467;|&#532;|&#534;|&#431;|&#7914;|&#7912;|&#7918;|&#7916;|&#7920;|&#7908;|&#7794;|&#370;|&#7798;|&#7796;|&#580;|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g
54922
+ }, {
54923
+ base: "V",
54924
+ letters: /(&#86;|&#9419;|&#65334;|&#7804;|&#7806;|&#434;|&#42846;|&#581;|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g
54925
+ }, {
54926
+ base: "VY",
54927
+ letters: /(&#42848;|[\uA760])/g
54928
+ }, {
54929
+ base: "W",
54930
+ letters: /(&#87;|&#9420;|&#65335;|&#7808;|&#7810;|&#372;|&#7814;|&#7812;|&#7816;|&#11378;|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g
54931
+ }, {
54932
+ base: "X",
54933
+ letters: /(&#88;|&#9421;|&#65336;|&#7818;|&#7820;|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g
54934
+ }, {
54935
+ base: "Y",
54936
+ letters: /(&#89;|&#9422;|&#65337;|&#7922;|&#221;|&#374;|&#7928;|&#562;|&#7822;|&#376;|&#7926;|&#7924;|&#435;|&#590;|&#7934;|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g
54937
+ }, {
54938
+ base: "Z",
54939
+ letters: /(&#90;|&#9423;|&#65338;|&#377;|&#7824;|&#379;|&#381;|&#7826;|&#7828;|&#437;|&#548;|&#11391;|&#11371;|&#42850;|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g
54940
+ }, {
54941
+ base: "a",
54942
+ letters: /(&#97;|&#9424;|&#65345;|&#7834;|&#224;|&#225;|&#226;|&#7847;|&#7845;|&#7851;|&#7849;|&#227;|&#257;|&#259;|&#7857;|&#7855;|&#7861;|&#7859;|&#551;|&#481;|&#228;|&#479;|&#7843;|&#229;|&#507;|&#462;|&#513;|&#515;|&#7841;|&#7853;|&#7863;|&#7681;|&#261;|&#11365;|&#592;|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g
54943
+ }, {
54944
+ base: "aa",
54945
+ letters: /(&#42803;|[\uA733])/g
54946
+ }, {
54947
+ base: "ae",
54948
+ letters: /(&#230;|&#509;|&#483;|[\u00E6\u01FD\u01E3])/g
54949
+ }, {
54950
+ base: "ao",
54951
+ letters: /(&#42805;|[\uA735])/g
54952
+ }, {
54953
+ base: "au",
54954
+ letters: /(&#42807;|[\uA737])/g
54955
+ }, {
54956
+ base: "av",
54957
+ letters: /(&#42809;|&#42811;|[\uA739\uA73B])/g
54958
+ }, {
54959
+ base: "ay",
54960
+ letters: /(&#42813;|[\uA73D])/g
54961
+ }, {
54962
+ base: "b",
54963
+ letters: /(&#98;|&#9425;|&#65346;|&#7683;|&#7685;|&#7687;|&#384;|&#387;|&#595;|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g
54964
+ }, {
54965
+ base: "c",
54966
+ letters: /(&#99;|&#9426;|&#65347;|&#263;|&#265;|&#267;|&#269;|&#231;|&#7689;|&#392;|&#572;|&#42815;|&#8580;|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g
54967
+ }, {
54968
+ base: "d",
54969
+ letters: /(&#100;|&#9427;|&#65348;|&#7691;|&#271;|&#7693;|&#7697;|&#7699;|&#7695;|&#273;|&#396;|&#598;|&#599;|&#42874;|&#240;|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g
54970
+ }, {
54971
+ base: "dz",
54972
+ letters: /(&#499;|&#454;|[\u01F3\u01C6])/g
54973
+ }, {
54974
+ base: "e",
54975
+ letters: /(&#101;|&#9428;|&#65349;|&#232;|&#233;|&#234;|&#7873;|&#7871;|&#7877;|&#7875;|&#7869;|&#275;|&#7701;|&#7703;|&#277;|&#279;|&#235;|&#7867;|&#283;|&#517;|&#519;|&#7865;|&#7879;|&#553;|&#7709;|&#281;|&#7705;|&#7707;|&#583;|&#603;|&#477;|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g
54976
+ }, {
54977
+ base: "f",
54978
+ letters: /(&#102;|&#9429;|&#65350;|&#7711;|&#402;|&#42876;|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g
54979
+ }, {
54980
+ base: "g",
54981
+ letters: /(&#103;|&#9430;|&#65351;|&#501;|&#285;|&#7713;|&#287;|&#289;|&#487;|&#291;|&#485;|&#608;|&#42913;|&#7545;|&#42879;|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g
54982
+ }, {
54983
+ base: "h",
54984
+ letters: /(&#104;|&#9431;|&#65352;|&#293;|&#7715;|&#7719;|&#543;|&#7717;|&#7721;|&#7723;|&#7830;|&#295;|&#11368;|&#11382;|&#613;|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g
54985
+ }, {
54986
+ base: "hv",
54987
+ letters: /(&#405;|[\u0195])/g
54988
+ }, {
54989
+ base: "i",
54990
+ letters: /(&#105;|&#9432;|&#65353;|&#236;|&#237;|&#238;|&#297;|&#299;|&#301;|&#239;|&#7727;|&#7881;|&#464;|&#521;|&#523;|&#7883;|&#303;|&#7725;|&#616;|&#305;|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g
54991
+ }, {
54992
+ base: "ij",
54993
+ letters: /(&#307;|[\u0133])/g
54994
+ }, {
54995
+ base: "j",
54996
+ letters: /(&#106;|&#9433;|&#65354;|&#309;|&#496;|&#585;|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g
54997
+ }, {
54998
+ base: "k",
54999
+ letters: /(&#107;|&#9434;|&#65355;|&#7729;|&#489;|&#7731;|&#311;|&#7733;|&#409;|&#11370;|&#42817;|&#42819;|&#42821;|&#42915;|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g
55000
+ }, {
55001
+ base: "l",
55002
+ letters: /(&#108;|&#9435;|&#65356;|&#320;|&#314;|&#318;|&#7735;|&#7737;|&#316;|&#7741;|&#7739;|&#322;|&#410;|&#619;|&#11361;|&#42825;|&#42881;|&#42823;|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g
55003
+ }, {
55004
+ base: "lj",
55005
+ letters: /(&#457;|[\u01C9])/g
55006
+ }, {
55007
+ base: "m",
55008
+ letters: /(&#109;|&#9436;|&#65357;|&#7743;|&#7745;|&#7747;|&#625;|&#623;|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g
55009
+ }, {
55010
+ base: "n",
55011
+ letters: /(&#110;|&#9437;|&#65358;|&#505;|&#324;|&#241;|&#7749;|&#328;|&#7751;|&#326;|&#7755;|&#7753;|&#414;|&#626;|&#329;|&#42897;|&#42917;|&#331;|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g
55012
+ }, {
55013
+ base: "nj",
55014
+ letters: /(&#460;|[\u01CC])/g
55015
+ }, {
55016
+ base: "o",
55017
+ letters: /(&#111;|&#9438;|&#65359;|&#242;|&#243;|&#244;|&#7891;|&#7889;|&#7895;|&#7893;|&#245;|&#7757;|&#557;|&#7759;|&#333;|&#7761;|&#7763;|&#335;|&#559;|&#561;|&#246;|&#555;|&#7887;|&#337;|&#466;|&#525;|&#527;|&#417;|&#7901;|&#7899;|&#7905;|&#7903;|&#7907;|&#7885;|&#7897;|&#491;|&#493;|&#248;|&#511;|&#596;|&#42827;|&#42829;|&#629;|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g
55018
+ }, {
55019
+ base: "oe",
55020
+ letters: /(&#339;|[\u0153])/g
55021
+ }, {
55022
+ base: "oi",
55023
+ letters: /(&#419;|[\u01A3])/g
55024
+ }, {
55025
+ base: "ou",
55026
+ letters: /(&#547;|[\u0223])/g
55027
+ }, {
55028
+ base: "oo",
55029
+ letters: /(&#42831;|[\uA74F])/g
55030
+ }, {
55031
+ base: "p",
55032
+ letters: /(&#112;|&#9439;|&#65360;|&#7765;|&#7767;|&#421;|&#7549;|&#42833;|&#42835;|&#42837;|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g
55033
+ }, {
55034
+ base: "q",
55035
+ letters: /(&#113;|&#9440;|&#65361;|&#587;|&#42839;|&#42841;|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g
55036
+ }, {
55037
+ base: "r",
55038
+ letters: /(&#114;|&#9441;|&#65362;|&#341;|&#7769;|&#345;|&#529;|&#531;|&#7771;|&#7773;|&#343;|&#7775;|&#589;|&#637;|&#42843;|&#42919;|&#42883;|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g
55039
+ }, {
55040
+ base: "s",
55041
+ letters: /(&#115;|&#9442;|&#65363;|&#347;|&#7781;|&#349;|&#7777;|&#353;|&#7783;|&#7779;|&#7785;|&#537;|&#351;|&#575;|&#42921;|&#42885;|&#7835;|&#383;|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g
55042
+ }, {
55043
+ base: "ss",
55044
+ letters: /(&#223;|[\u00DF])/g
55045
+ }, {
55046
+ base: "t",
55047
+ letters: /(&#116;|&#9443;|&#65364;|&#7787;|&#7831;|&#357;|&#7789;|&#539;|&#355;|&#7793;|&#7791;|&#359;|&#429;|&#648;|&#11366;|&#42887;|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g
55048
+ }, {
55049
+ base: "th",
55050
+ letters: /(&#254;|[\u00FE])/g
55051
+ }, {
55052
+ base: "tz",
55053
+ letters: /(&#42793;|[\uA729])/g
55054
+ }, {
55055
+ base: "u",
55056
+ letters: /(&#117;|&#9444;|&#65365;|&#249;|&#250;|&#251;|&#361;|&#7801;|&#363;|&#7803;|&#365;|&#252;|&#476;|&#472;|&#470;|&#474;|&#7911;|&#367;|&#369;|&#468;|&#533;|&#535;|&#432;|&#7915;|&#7913;|&#7919;|&#7917;|&#7921;|&#7909;|&#7795;|&#371;|&#7799;|&#7797;|&#649;|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g
55057
+ }, {
55058
+ base: "v",
55059
+ letters: /(&#118;|&#9445;|&#65366;|&#7805;|&#7807;|&#651;|&#42847;|&#652;|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g
55060
+ }, {
55061
+ base: "vy",
55062
+ letters: /(&#42849;|[\uA761])/g
55063
+ }, {
55064
+ base: "w",
55065
+ letters: /(&#119;|&#9446;|&#65367;|&#7809;|&#7811;|&#373;|&#7815;|&#7813;|&#7832;|&#7817;|&#11379;|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g
55066
+ }, {
55067
+ base: "x",
55068
+ letters: /(&#120;|&#9447;|&#65368;|&#7819;|&#7821;|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g
55069
+ }, {
55070
+ base: "y",
55071
+ letters: /(&#121;|&#9448;|&#65369;|&#7923;|&#253;|&#375;|&#7929;|&#563;|&#7823;|&#255;|&#7927;|&#7833;|&#7925;|&#436;|&#591;|&#7935;|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g
55072
+ }, {
55073
+ base: "z",
55074
+ letters: /(&#122;|&#9449;|&#65370;|&#378;|&#7825;|&#380;|&#382;|&#7827;|&#7829;|&#438;|&#549;|&#576;|&#11372;|&#42851;|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g
55075
+ }];
55076
+ var removeAccents = function removeAccents2(str) {
55077
+ var formattedStr = str;
55078
+ lettersDiacritics.forEach(function(letterDiacritics) {
55079
+ formattedStr = formattedStr.replace(letterDiacritics.letters, letterDiacritics.base);
55080
+ });
55081
+ return formattedStr;
55082
+ };
55083
+ var normalizeString$1 = function normalizeString(str) {
55084
+ return removeAccents(str).toLowerCase();
55085
+ };
55086
+ var getSubstringIndex = function getSubstringIndex2(str, substr, ignoreAccents) {
55087
+ if (!ignoreAccents) {
55088
+ return str.toLowerCase().indexOf(substr.toLowerCase());
55089
+ }
55090
+ return normalizeString$1(str).indexOf(normalizeString$1(substr));
55091
+ };
55092
+ var isIE = function isIE2() {
55093
+ return !!document.documentMode;
55094
+ };
55095
+ var isNumber = function isNumber2(val) {
55096
+ return typeof val === "number";
55097
+ };
55098
+ var keys$1 = function keys2(obj) {
55099
+ return obj === Object(obj) ? Object.keys(obj) : [];
55100
+ };
55101
+ var omit2 = function omit3(obj) {
55102
+ var _ref;
55103
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
55104
+ rest[_key - 1] = arguments[_key];
55105
+ }
55106
+ var keys4 = (_ref = []).concat.apply(_ref, rest);
55107
+ return Object.keys(obj).reduce(function(acc, k) {
55108
+ if (obj.hasOwnProperty(k) && !keys4.includes(k) && obj[k] !== void 0) {
55109
+ acc[k] = obj[k];
55110
+ }
55111
+ return acc;
55112
+ }, {});
55113
+ };
55114
+ var _excluded = ["style", "className", "classNames"];
55115
+ function ownKeys(object, enumerableOnly) {
55116
+ var keys4 = Object.keys(object);
55117
+ if (Object.getOwnPropertySymbols) {
55118
+ var symbols = Object.getOwnPropertySymbols(object);
55119
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
55120
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
55121
+ })), keys4.push.apply(keys4, symbols);
55122
+ }
55123
+ return keys4;
55124
+ }
55125
+ function _objectSpread(target) {
55126
+ for (var i2 = 1; i2 < arguments.length; i2++) {
55127
+ var source2 = null != arguments[i2] ? arguments[i2] : {};
55128
+ i2 % 2 ? ownKeys(Object(source2), true).forEach(function(key) {
55129
+ _defineProperty(target, key, source2[key]);
55130
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source2)) : ownKeys(Object(source2)).forEach(function(key) {
55131
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source2, key));
55132
+ });
55133
+ }
55134
+ return target;
55135
+ }
55136
+ function createDefaultStyle(defaultStyle2, getModifiers) {
55137
+ var enhance = function enhance2(ComponentToWrap) {
55138
+ var DefaultStyleEnhancer = function DefaultStyleEnhancer2(_ref) {
55139
+ var style = _ref.style, className = _ref.className, classNames = _ref.classNames, rest = _objectWithoutProperties(_ref, _excluded);
55140
+ var modifiers = getModifiers ? getModifiers(rest) : void 0;
55141
+ var styles = useStyles(defaultStyle2, {
55142
+ style,
55143
+ className,
55144
+ classNames
55145
+ }, modifiers);
55146
+ return /* @__PURE__ */ React.createElement(ComponentToWrap, _extends({}, rest, {
55147
+ style: styles
55148
+ }));
55149
+ };
55150
+ var displayName = ComponentToWrap.displayName || ComponentToWrap.name || "Component";
55151
+ DefaultStyleEnhancer.displayName = "defaultStyle(".concat(displayName, ")");
55152
+ return /* @__PURE__ */ React.forwardRef(function(props, ref) {
55153
+ return DefaultStyleEnhancer(_objectSpread(_objectSpread({}, props), {}, {
55154
+ ref
55155
+ }));
55156
+ });
55157
+ };
55158
+ return enhance;
55159
+ }
55160
+ var _generateComponentKey = function _generateComponentKey2(usedKeys, id) {
55161
+ if (!usedKeys.hasOwnProperty(id)) {
55162
+ usedKeys[id] = 0;
55163
+ } else {
55164
+ usedKeys[id]++;
55165
+ }
55166
+ return id + "_" + usedKeys[id];
55167
+ };
55168
+ function Highlighter(_ref) {
55169
+ var selectionStart = _ref.selectionStart, selectionEnd = _ref.selectionEnd, _ref$value = _ref.value, value = _ref$value === void 0 ? "" : _ref$value, onCaretPositionChange = _ref.onCaretPositionChange, containerRef = _ref.containerRef, children = _ref.children;
55170
+ _ref.singleLine;
55171
+ var style = _ref.style;
55172
+ var _useState = reactExports.useState({
55173
+ left: void 0,
55174
+ top: void 0
55175
+ }), _useState2 = _slicedToArray(_useState, 2), position2 = _useState2[0], setPosition = _useState2[1];
55176
+ var _useState3 = reactExports.useState(), _useState4 = _slicedToArray(_useState3, 2), caretElement = _useState4[0], setCaretElement = _useState4[1];
55177
+ reactExports.useEffect(function() {
55178
+ notifyCaretPosition();
55179
+ });
55180
+ var notifyCaretPosition = function notifyCaretPosition2() {
55181
+ if (!caretElement) {
55182
+ return;
55183
+ }
55184
+ var offsetLeft = caretElement.offsetLeft, offsetTop = caretElement.offsetTop;
55185
+ if (position2.left === offsetLeft && position2.top === offsetTop) {
55186
+ return;
55187
+ }
55188
+ var newPosition = {
55189
+ left: offsetLeft,
55190
+ top: offsetTop
55191
+ };
55192
+ setPosition(newPosition);
55193
+ onCaretPositionChange(newPosition);
55194
+ };
55195
+ var config = readConfigFromChildren(children);
55196
+ var caretPositionInMarkup;
55197
+ if (selectionEnd === selectionStart) {
55198
+ caretPositionInMarkup = mapPlainTextIndex(value, config, selectionStart, "START");
55199
+ }
55200
+ var resultComponents = [];
55201
+ var componentKeys = {};
55202
+ var components = resultComponents;
55203
+ var substringComponentKey = 0;
55204
+ var textIteratee = function textIteratee2(substr, index2, indexInPlainText) {
55205
+ if (isNumber(caretPositionInMarkup) && caretPositionInMarkup >= index2 && caretPositionInMarkup <= index2 + substr.length) {
55206
+ var splitIndex = caretPositionInMarkup - index2;
55207
+ components.push(renderSubstring(substr.substring(0, splitIndex), substringComponentKey));
55208
+ components = [renderSubstring(substr.substring(splitIndex), substringComponentKey)];
55209
+ } else {
55210
+ components.push(renderSubstring(substr, substringComponentKey));
55211
+ }
55212
+ substringComponentKey++;
55213
+ };
55214
+ var mentionIteratee = function mentionIteratee2(markup, index2, indexInPlainText, id, display, mentionChildIndex, lastMentionEndIndex) {
55215
+ var key = _generateComponentKey(componentKeys, id);
55216
+ components.push(getMentionComponentForMatch(id, display, mentionChildIndex, key));
55217
+ };
55218
+ var renderSubstring = function renderSubstring2(string2, key) {
55219
+ return /* @__PURE__ */ React.createElement("span", _extends({}, style("substring"), {
55220
+ key
55221
+ }), string2);
55222
+ };
55223
+ var getMentionComponentForMatch = function getMentionComponentForMatch2(id, display, mentionChildIndex, key) {
55224
+ var props = {
55225
+ id,
55226
+ display,
55227
+ key
55228
+ };
55229
+ var child = reactExports.Children.toArray(children)[mentionChildIndex];
55230
+ return /* @__PURE__ */ React.cloneElement(child, props);
55231
+ };
55232
+ var renderHighlighterCaret = function renderHighlighterCaret2(children2) {
55233
+ return /* @__PURE__ */ React.createElement("span", _extends({}, style("caret"), {
55234
+ ref: setCaretElement,
55235
+ key: "caret"
55236
+ }), children2);
55237
+ };
55238
+ iterateMentionsMarkup(value, config, mentionIteratee, textIteratee);
55239
+ components.push(" ");
55240
+ if (components !== resultComponents) {
55241
+ resultComponents.push(renderHighlighterCaret(components));
55242
+ }
55243
+ return /* @__PURE__ */ React.createElement("div", _extends({}, style, {
55244
+ ref: containerRef
55245
+ }), resultComponents);
55246
+ }
55247
+ Highlighter.propTypes = {
55248
+ selectionStart: PropTypes.number,
55249
+ selectionEnd: PropTypes.number,
55250
+ value: PropTypes.string.isRequired,
55251
+ onCaretPositionChange: PropTypes.func.isRequired,
55252
+ containerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
55253
+ current: typeof Element === "undefined" ? PropTypes.any : PropTypes.instanceOf(Element)
55254
+ })]),
55255
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired
55256
+ };
55257
+ var styled = createDefaultStyle({
55258
+ position: "relative",
55259
+ boxSizing: "border-box",
55260
+ width: "100%",
55261
+ color: "transparent",
55262
+ overflow: "hidden",
55263
+ whiteSpace: "pre-wrap",
55264
+ wordWrap: "break-word",
55265
+ border: "1px solid transparent",
55266
+ textAlign: "start",
55267
+ "&singleLine": {
55268
+ whiteSpace: "pre",
55269
+ wordWrap: null
55270
+ },
55271
+ substring: {
55272
+ visibility: "hidden"
55273
+ }
55274
+ }, function(props) {
55275
+ return {
55276
+ "&singleLine": props.singleLine
55277
+ };
55278
+ });
55279
+ var Highlighter$1 = styled(Highlighter);
55280
+ function Suggestion(_ref) {
55281
+ var id = _ref.id, focused = _ref.focused, ignoreAccents = _ref.ignoreAccents, index2 = _ref.index, onClick = _ref.onClick, onMouseEnter = _ref.onMouseEnter, query = _ref.query, renderSuggestion = _ref.renderSuggestion, suggestion = _ref.suggestion, style = _ref.style;
55282
+ _ref.className;
55283
+ _ref.classNames;
55284
+ var rest = {
55285
+ onClick,
55286
+ onMouseEnter
55287
+ };
55288
+ var renderContent = function renderContent2() {
55289
+ var display = getDisplay();
55290
+ var highlightedDisplay = renderHighlightedDisplay(display);
55291
+ if (renderSuggestion) {
55292
+ return renderSuggestion(suggestion, query, highlightedDisplay, index2, focused);
55293
+ }
55294
+ return highlightedDisplay;
55295
+ };
55296
+ var getDisplay = function getDisplay2() {
55297
+ if (typeof suggestion === "string") {
55298
+ return suggestion;
55299
+ }
55300
+ var id2 = suggestion.id, display = suggestion.display;
55301
+ if (id2 === void 0 || !display) {
55302
+ return id2;
55303
+ }
55304
+ return display;
55305
+ };
55306
+ var renderHighlightedDisplay = function renderHighlightedDisplay2(display) {
55307
+ var i2 = getSubstringIndex(display, query, ignoreAccents);
55308
+ if (i2 === -1) {
55309
+ return /* @__PURE__ */ React.createElement("span", style("display"), display);
55310
+ }
55311
+ return /* @__PURE__ */ React.createElement("span", style("display"), display.substring(0, i2), /* @__PURE__ */ React.createElement("b", style("highlight"), display.substring(i2, i2 + query.length)), display.substring(i2 + query.length));
55312
+ };
55313
+ return /* @__PURE__ */ React.createElement("li", _extends({
55314
+ id,
55315
+ role: "option",
55316
+ "aria-selected": focused
55317
+ }, rest, style), renderContent());
55318
+ }
55319
+ Suggestion.propTypes = {
55320
+ id: PropTypes.string.isRequired,
55321
+ query: PropTypes.string.isRequired,
55322
+ index: PropTypes.number.isRequired,
55323
+ ignoreAccents: PropTypes.bool,
55324
+ suggestion: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
55325
+ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
55326
+ display: PropTypes.string
55327
+ })]).isRequired,
55328
+ renderSuggestion: PropTypes.func,
55329
+ focused: PropTypes.bool
55330
+ };
55331
+ var styled$1 = createDefaultStyle({
55332
+ cursor: "pointer"
55333
+ }, function(props) {
55334
+ return {
55335
+ "&focused": props.focused
55336
+ };
55337
+ });
55338
+ var Suggestion$1 = styled$1(Suggestion);
55339
+ function LoadingIndicator(_ref) {
55340
+ var style = _ref.style, className = _ref.className, classNames = _ref.classNames;
55341
+ var styles = useStyles(defaultstyle, {
55342
+ style,
55343
+ className,
55344
+ classNames
55345
+ });
55346
+ var spinnerStyles = styles("spinner");
55347
+ return /* @__PURE__ */ React.createElement("div", styles, /* @__PURE__ */ React.createElement("div", spinnerStyles, /* @__PURE__ */ React.createElement("div", spinnerStyles(["element", "element1"])), /* @__PURE__ */ React.createElement("div", spinnerStyles(["element", "element2"])), /* @__PURE__ */ React.createElement("div", spinnerStyles(["element", "element3"])), /* @__PURE__ */ React.createElement("div", spinnerStyles(["element", "element4"])), /* @__PURE__ */ React.createElement("div", spinnerStyles(["element", "element5"]))));
55348
+ }
55349
+ var defaultstyle = {};
55350
+ function SuggestionsOverlay(_ref) {
55351
+ var id = _ref.id, _ref$suggestions = _ref.suggestions, suggestions = _ref$suggestions === void 0 ? {} : _ref$suggestions, a11ySuggestionsListLabel = _ref.a11ySuggestionsListLabel, focusIndex = _ref.focusIndex, position2 = _ref.position, left = _ref.left, right = _ref.right, top = _ref.top, scrollFocusedIntoView = _ref.scrollFocusedIntoView, isLoading = _ref.isLoading, isOpened = _ref.isOpened, _ref$onSelect = _ref.onSelect, onSelect2 = _ref$onSelect === void 0 ? function() {
55352
+ return null;
55353
+ } : _ref$onSelect, ignoreAccents = _ref.ignoreAccents, containerRef = _ref.containerRef, children = _ref.children, style = _ref.style, customSuggestionsContainer = _ref.customSuggestionsContainer, onMouseDown = _ref.onMouseDown, onMouseEnter = _ref.onMouseEnter;
55354
+ var _useState = reactExports.useState(void 0), _useState2 = _slicedToArray(_useState, 2), ulElement = _useState2[0], setUlElement = _useState2[1];
55355
+ reactExports.useEffect(function() {
55356
+ if (!ulElement || ulElement.offsetHeight >= ulElement.scrollHeight || !scrollFocusedIntoView) {
55357
+ return;
55358
+ }
55359
+ var scrollTop = ulElement.scrollTop;
55360
+ var _ulElement$children$f = ulElement.children[focusIndex].getBoundingClientRect(), top2 = _ulElement$children$f.top, bottom = _ulElement$children$f.bottom;
55361
+ var _ulElement$getBoundin = ulElement.getBoundingClientRect(), topContainer = _ulElement$getBoundin.top;
55362
+ top2 = top2 - topContainer + scrollTop;
55363
+ bottom = bottom - topContainer + scrollTop;
55364
+ if (top2 < scrollTop) {
55365
+ ulElement.scrollTop = top2;
55366
+ } else if (bottom > ulElement.offsetHeight) {
55367
+ ulElement.scrollTop = bottom - ulElement.offsetHeight;
55368
+ }
55369
+ }, [focusIndex, scrollFocusedIntoView, ulElement]);
55370
+ var renderSuggestions = function renderSuggestions2() {
55371
+ var suggestionsToRender = /* @__PURE__ */ React.createElement("ul", _extends({
55372
+ ref: setUlElement,
55373
+ id,
55374
+ role: "listbox",
55375
+ "aria-label": a11ySuggestionsListLabel
55376
+ }, style("list")), Object.values(suggestions).reduce(function(accResults, _ref2) {
55377
+ var results = _ref2.results, queryInfo = _ref2.queryInfo;
55378
+ return [].concat(_toConsumableArray(accResults), _toConsumableArray(results.map(function(result, index2) {
55379
+ return renderSuggestion(result, queryInfo, accResults.length + index2);
55380
+ })));
55381
+ }, []));
55382
+ if (customSuggestionsContainer) return customSuggestionsContainer(suggestionsToRender);
55383
+ return suggestionsToRender;
55384
+ };
55385
+ var renderSuggestion = function renderSuggestion2(result, queryInfo, index2) {
55386
+ var isFocused = index2 === focusIndex;
55387
+ var childIndex = queryInfo.childIndex, query = queryInfo.query;
55388
+ var renderSuggestion3 = reactExports.Children.toArray(children)[childIndex].props.renderSuggestion;
55389
+ return /* @__PURE__ */ React.createElement(Suggestion$1, {
55390
+ style: style("item"),
55391
+ key: "".concat(childIndex, "-").concat(getID(result)),
55392
+ id: getSuggestionHtmlId(id, index2),
55393
+ query,
55394
+ index: index2,
55395
+ ignoreAccents,
55396
+ renderSuggestion: renderSuggestion3,
55397
+ suggestion: result,
55398
+ focused: isFocused,
55399
+ onClick: function onClick() {
55400
+ return select(result, queryInfo);
55401
+ },
55402
+ onMouseEnter: function onMouseEnter2() {
55403
+ return handleMouseEnter(index2);
55404
+ }
55405
+ });
55406
+ };
55407
+ var renderLoadingIndicator = function renderLoadingIndicator2() {
55408
+ if (!isLoading) {
55409
+ return;
55410
+ }
55411
+ return /* @__PURE__ */ React.createElement(LoadingIndicator, {
55412
+ style: style("loadingIndicator")
55413
+ });
55414
+ };
55415
+ var handleMouseEnter = function handleMouseEnter2(index2, ev) {
55416
+ if (onMouseEnter) {
55417
+ onMouseEnter(index2);
55418
+ }
55419
+ };
55420
+ var select = function select2(suggestion, queryInfo) {
55421
+ onSelect2(suggestion, queryInfo);
55422
+ };
55423
+ var getID = function getID2(suggestion) {
55424
+ if (typeof suggestion === "string") {
55425
+ return suggestion;
55426
+ }
55427
+ return suggestion.id;
55428
+ };
55429
+ if (!isOpened) {
55430
+ return null;
55431
+ }
55432
+ return /* @__PURE__ */ React.createElement("div", _extends({}, inline({
55433
+ position: position2 || "absolute",
55434
+ left,
55435
+ right,
55436
+ top
55437
+ }, style), {
55438
+ onMouseDown,
55439
+ ref: containerRef
55440
+ }), renderSuggestions(), renderLoadingIndicator());
55441
+ }
55442
+ SuggestionsOverlay.propTypes = {
55443
+ id: PropTypes.string.isRequired,
55444
+ suggestions: PropTypes.object.isRequired,
55445
+ a11ySuggestionsListLabel: PropTypes.string,
55446
+ focusIndex: PropTypes.number,
55447
+ position: PropTypes.string,
55448
+ left: PropTypes.number,
55449
+ right: PropTypes.number,
55450
+ top: PropTypes.number,
55451
+ scrollFocusedIntoView: PropTypes.bool,
55452
+ isLoading: PropTypes.bool,
55453
+ isOpened: PropTypes.bool.isRequired,
55454
+ onSelect: PropTypes.func,
55455
+ ignoreAccents: PropTypes.bool,
55456
+ customSuggestionsContainer: PropTypes.func,
55457
+ containerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
55458
+ current: typeof Element === "undefined" ? PropTypes.any : PropTypes.instanceOf(Element)
55459
+ })])
55460
+ };
55461
+ var styled$2 = createDefaultStyle({
55462
+ zIndex: 1,
55463
+ backgroundColor: "white",
55464
+ marginTop: 14,
55465
+ minWidth: 100,
55466
+ list: {
55467
+ margin: 0,
55468
+ padding: 0,
55469
+ listStyleType: "none"
55470
+ }
55471
+ });
55472
+ var SuggestionsOverlay$1 = styled$2(SuggestionsOverlay);
55473
+ function ownKeys$1(object, enumerableOnly) {
55474
+ var keys4 = Object.keys(object);
55475
+ if (Object.getOwnPropertySymbols) {
55476
+ var symbols = Object.getOwnPropertySymbols(object);
55477
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
55478
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
55479
+ })), keys4.push.apply(keys4, symbols);
55480
+ }
55481
+ return keys4;
55482
+ }
55483
+ function _objectSpread$1(target) {
55484
+ for (var i2 = 1; i2 < arguments.length; i2++) {
55485
+ var source2 = null != arguments[i2] ? arguments[i2] : {};
55486
+ i2 % 2 ? ownKeys$1(Object(source2), true).forEach(function(key) {
55487
+ _defineProperty(target, key, source2[key]);
55488
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source2)) : ownKeys$1(Object(source2)).forEach(function(key) {
55489
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source2, key));
55490
+ });
55491
+ }
55492
+ return target;
55493
+ }
55494
+ function _createSuper(Derived) {
55495
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
55496
+ return function _createSuperInternal() {
55497
+ var Super = _getPrototypeOf(Derived), result;
55498
+ if (hasNativeReflectConstruct) {
55499
+ var NewTarget = _getPrototypeOf(this).constructor;
55500
+ result = Reflect.construct(Super, arguments, NewTarget);
55501
+ } else {
55502
+ result = Super.apply(this, arguments);
55503
+ }
55504
+ return _possibleConstructorReturn(this, result);
55505
+ };
55506
+ }
55507
+ function _isNativeReflectConstruct() {
55508
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
55509
+ if (Reflect.construct.sham) return false;
55510
+ if (typeof Proxy === "function") return true;
55511
+ try {
55512
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
55513
+ }));
55514
+ return true;
55515
+ } catch (e2) {
55516
+ return false;
55517
+ }
55518
+ }
55519
+ var makeTriggerRegex = function makeTriggerRegex2(trigger) {
55520
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
55521
+ if (trigger instanceof RegExp) {
55522
+ return trigger;
55523
+ } else {
55524
+ var allowSpaceInQuery = options.allowSpaceInQuery;
55525
+ var escapedTriggerChar = escapeRegex(trigger);
55526
+ return new RegExp("(?:^|\\s)(".concat(escapedTriggerChar, "([^").concat(allowSpaceInQuery ? "" : "\\s").concat(escapedTriggerChar, "]*))$"));
55527
+ }
55528
+ };
55529
+ var getDataProvider = function getDataProvider2(data, ignoreAccents) {
55530
+ if (data instanceof Array) {
55531
+ return function(query, callback) {
55532
+ var results = [];
55533
+ for (var i2 = 0, l2 = data.length; i2 < l2; ++i2) {
55534
+ var display = data[i2].display || data[i2].id;
55535
+ if (getSubstringIndex(display, query, ignoreAccents) >= 0) {
55536
+ results.push(data[i2]);
55537
+ }
55538
+ }
55539
+ return results;
55540
+ };
55541
+ } else {
55542
+ return data;
55543
+ }
55544
+ };
55545
+ var KEY = {
55546
+ TAB: 9,
55547
+ RETURN: 13,
55548
+ ESC: 27,
55549
+ UP: 38,
55550
+ DOWN: 40
55551
+ };
55552
+ var isComposing = false;
55553
+ var propTypes = {
55554
+ /**
55555
+ * If set to `true` a regular text input element will be rendered
55556
+ * instead of a textarea
55557
+ */
55558
+ singleLine: PropTypes.bool,
55559
+ allowSpaceInQuery: PropTypes.bool,
55560
+ allowSuggestionsAboveCursor: PropTypes.bool,
55561
+ forceSuggestionsAboveCursor: PropTypes.bool,
55562
+ ignoreAccents: PropTypes.bool,
55563
+ a11ySuggestionsListLabel: PropTypes.string,
55564
+ value: PropTypes.string,
55565
+ onKeyDown: PropTypes.func,
55566
+ customSuggestionsContainer: PropTypes.func,
55567
+ onSelect: PropTypes.func,
55568
+ onBlur: PropTypes.func,
55569
+ onChange: PropTypes.func,
55570
+ suggestionsPortalHost: typeof Element === "undefined" ? PropTypes.any : PropTypes.PropTypes.instanceOf(Element),
55571
+ inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
55572
+ current: typeof Element === "undefined" ? PropTypes.any : PropTypes.instanceOf(Element)
55573
+ })]),
55574
+ children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired
55575
+ };
55576
+ var MentionsInput = /* @__PURE__ */ (function(_React$Component) {
55577
+ _inherits(MentionsInput2, _React$Component);
55578
+ var _super = _createSuper(MentionsInput2);
55579
+ function MentionsInput2(_props) {
55580
+ var _this;
55581
+ _classCallCheck(this, MentionsInput2);
55582
+ _this = _super.call(this, _props);
55583
+ _defineProperty(_assertThisInitialized(_this), "setContainerElement", function(el) {
55584
+ _this.containerElement = el;
55585
+ });
55586
+ _defineProperty(_assertThisInitialized(_this), "getInputProps", function() {
55587
+ var _this$props = _this.props, readOnly = _this$props.readOnly, disabled = _this$props.disabled, style = _this$props.style;
55588
+ var props = omit2(
55589
+ _this.props,
55590
+ ["style", "classNames", "className"],
55591
+ // substyle props
55592
+ keys$1(propTypes)
55593
+ );
55594
+ return _objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({}, props), style("input")), {}, {
55595
+ value: _this.getPlainText(),
55596
+ onScroll: _this.updateHighlighterScroll
55597
+ }, !readOnly && !disabled && {
55598
+ onChange: _this.handleChange,
55599
+ onSelect: _this.handleSelect,
55600
+ onKeyDown: _this.handleKeyDown,
55601
+ onBlur: _this.handleBlur,
55602
+ onCompositionStart: _this.handleCompositionStart,
55603
+ onCompositionEnd: _this.handleCompositionEnd
55604
+ }), _this.isOpened() && {
55605
+ role: "combobox",
55606
+ "aria-controls": _this.uuidSuggestionsOverlay,
55607
+ "aria-expanded": true,
55608
+ "aria-autocomplete": "list",
55609
+ "aria-haspopup": "listbox",
55610
+ "aria-activedescendant": getSuggestionHtmlId(_this.uuidSuggestionsOverlay, _this.state.focusIndex)
55611
+ });
55612
+ });
55613
+ _defineProperty(_assertThisInitialized(_this), "renderControl", function() {
55614
+ var _this$props2 = _this.props, singleLine = _this$props2.singleLine, style = _this$props2.style;
55615
+ var inputProps = _this.getInputProps();
55616
+ return /* @__PURE__ */ React.createElement("div", style("control"), _this.renderHighlighter(), singleLine ? _this.renderInput(inputProps) : _this.renderTextarea(inputProps));
55617
+ });
55618
+ _defineProperty(_assertThisInitialized(_this), "renderInput", function(props) {
55619
+ return /* @__PURE__ */ React.createElement("input", _extends({
55620
+ type: "text",
55621
+ ref: _this.setInputRef
55622
+ }, props));
55623
+ });
55624
+ _defineProperty(_assertThisInitialized(_this), "renderTextarea", function(props) {
55625
+ return /* @__PURE__ */ React.createElement("textarea", _extends({
55626
+ ref: _this.setInputRef
55627
+ }, props));
55628
+ });
55629
+ _defineProperty(_assertThisInitialized(_this), "setInputRef", function(el) {
55630
+ _this.inputElement = el;
55631
+ var inputRef = _this.props.inputRef;
55632
+ if (typeof inputRef === "function") {
55633
+ inputRef(el);
55634
+ } else if (inputRef) {
55635
+ inputRef.current = el;
55636
+ }
55637
+ });
55638
+ _defineProperty(_assertThisInitialized(_this), "setSuggestionsElement", function(el) {
55639
+ _this.suggestionsElement = el;
55640
+ });
55641
+ _defineProperty(_assertThisInitialized(_this), "renderSuggestionsOverlay", function() {
55642
+ if (!isNumber(_this.state.selectionStart)) {
55643
+ return null;
55644
+ }
55645
+ var _this$state$suggestio = _this.state.suggestionsPosition, position2 = _this$state$suggestio.position, left = _this$state$suggestio.left, top = _this$state$suggestio.top, right = _this$state$suggestio.right;
55646
+ var suggestionsNode = /* @__PURE__ */ React.createElement(SuggestionsOverlay$1, {
55647
+ id: _this.uuidSuggestionsOverlay,
55648
+ style: _this.props.style("suggestions"),
55649
+ position: position2,
55650
+ left,
55651
+ top,
55652
+ right,
55653
+ focusIndex: _this.state.focusIndex,
55654
+ scrollFocusedIntoView: _this.state.scrollFocusedIntoView,
55655
+ containerRef: _this.setSuggestionsElement,
55656
+ suggestions: _this.state.suggestions,
55657
+ customSuggestionsContainer: _this.props.customSuggestionsContainer,
55658
+ onSelect: _this.addMention,
55659
+ onMouseDown: _this.handleSuggestionsMouseDown,
55660
+ onMouseEnter: _this.handleSuggestionsMouseEnter,
55661
+ isLoading: _this.isLoading(),
55662
+ isOpened: _this.isOpened(),
55663
+ ignoreAccents: _this.props.ignoreAccents,
55664
+ a11ySuggestionsListLabel: _this.props.a11ySuggestionsListLabel
55665
+ }, _this.props.children);
55666
+ if (_this.props.suggestionsPortalHost) {
55667
+ return /* @__PURE__ */ ReactDOM.createPortal(suggestionsNode, _this.props.suggestionsPortalHost);
55668
+ } else {
55669
+ return suggestionsNode;
55670
+ }
55671
+ });
55672
+ _defineProperty(_assertThisInitialized(_this), "renderHighlighter", function() {
55673
+ var _this$state = _this.state, selectionStart = _this$state.selectionStart, selectionEnd = _this$state.selectionEnd;
55674
+ var _this$props3 = _this.props, singleLine = _this$props3.singleLine, children = _this$props3.children, value = _this$props3.value, style = _this$props3.style;
55675
+ return /* @__PURE__ */ React.createElement(Highlighter$1, {
55676
+ containerRef: _this.setHighlighterElement,
55677
+ style: style("highlighter"),
55678
+ value,
55679
+ singleLine,
55680
+ selectionStart,
55681
+ selectionEnd,
55682
+ onCaretPositionChange: _this.handleCaretPositionChange
55683
+ }, children);
55684
+ });
55685
+ _defineProperty(_assertThisInitialized(_this), "setHighlighterElement", function(el) {
55686
+ _this.highlighterElement = el;
55687
+ });
55688
+ _defineProperty(_assertThisInitialized(_this), "handleCaretPositionChange", function(position2) {
55689
+ _this.setState({
55690
+ caretPosition: position2
55691
+ });
55692
+ });
55693
+ _defineProperty(_assertThisInitialized(_this), "getPlainText", function() {
55694
+ return getPlainText(_this.props.value || "", readConfigFromChildren(_this.props.children));
55695
+ });
55696
+ _defineProperty(_assertThisInitialized(_this), "executeOnChange", function(event) {
55697
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
55698
+ args[_key - 1] = arguments[_key];
55699
+ }
55700
+ if (_this.props.onChange) {
55701
+ var _this$props4;
55702
+ return (_this$props4 = _this.props).onChange.apply(_this$props4, [event].concat(args));
55703
+ }
55704
+ if (_this.props.valueLink) {
55705
+ var _this$props$valueLink;
55706
+ return (_this$props$valueLink = _this.props.valueLink).requestChange.apply(_this$props$valueLink, [event.target.value].concat(args));
55707
+ }
55708
+ });
55709
+ _defineProperty(_assertThisInitialized(_this), "handleChange", function(ev) {
55710
+ isComposing = false;
55711
+ if (isIE()) {
55712
+ var currentDocument = document.activeElement && document.activeElement.contentDocument || document;
55713
+ if (currentDocument.activeElement !== ev.target) {
55714
+ return;
55715
+ }
55716
+ }
55717
+ var value = _this.props.value || "";
55718
+ var config = readConfigFromChildren(_this.props.children);
55719
+ var newPlainTextValue = ev.target.value;
55720
+ var selectionStartBefore = _this.state.selectionStart;
55721
+ if (selectionStartBefore == null) {
55722
+ selectionStartBefore = ev.target.selectionStart;
55723
+ }
55724
+ var selectionEndBefore = _this.state.selectionEnd;
55725
+ if (selectionEndBefore == null) {
55726
+ selectionEndBefore = ev.target.selectionEnd;
55727
+ }
55728
+ var newValue = applyChangeToValue(value, newPlainTextValue, {
55729
+ selectionStartBefore,
55730
+ selectionEndBefore,
55731
+ selectionEndAfter: ev.target.selectionEnd
55732
+ }, config);
55733
+ newPlainTextValue = getPlainText(newValue, config);
55734
+ var selectionStart = ev.target.selectionStart;
55735
+ var selectionEnd = ev.target.selectionEnd;
55736
+ var setSelectionAfterMentionChange = false;
55737
+ var startOfMention = findStartOfMentionInPlainText(value, config, selectionStart);
55738
+ if (startOfMention !== void 0 && _this.state.selectionEnd > startOfMention) {
55739
+ selectionStart = startOfMention + (ev.nativeEvent.data ? ev.nativeEvent.data.length : 0);
55740
+ selectionEnd = selectionStart;
55741
+ setSelectionAfterMentionChange = true;
55742
+ }
55743
+ _this.setState({
55744
+ selectionStart,
55745
+ selectionEnd,
55746
+ setSelectionAfterMentionChange
55747
+ });
55748
+ var mentions = getMentions(newValue, config);
55749
+ if (ev.nativeEvent.isComposing && selectionStart === selectionEnd) {
55750
+ _this.updateMentionsQueries(_this.inputElement.value, selectionStart);
55751
+ }
55752
+ var eventMock = {
55753
+ target: {
55754
+ value: newValue
55755
+ }
55756
+ };
55757
+ _this.executeOnChange(eventMock, newValue, newPlainTextValue, mentions);
55758
+ });
55759
+ _defineProperty(_assertThisInitialized(_this), "handleSelect", function(ev) {
55760
+ _this.setState({
55761
+ selectionStart: ev.target.selectionStart,
55762
+ selectionEnd: ev.target.selectionEnd
55763
+ });
55764
+ if (isComposing) return;
55765
+ var el = _this.inputElement;
55766
+ if (ev.target.selectionStart === ev.target.selectionEnd) {
55767
+ _this.updateMentionsQueries(el.value, ev.target.selectionStart);
55768
+ } else {
55769
+ _this.clearSuggestions();
55770
+ }
55771
+ _this.updateHighlighterScroll();
55772
+ _this.props.onSelect(ev);
55773
+ });
55774
+ _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function(ev) {
55775
+ var suggestionsCount = countSuggestions(_this.state.suggestions);
55776
+ if (suggestionsCount === 0 || !_this.suggestionsElement) {
55777
+ _this.props.onKeyDown(ev);
55778
+ return;
55779
+ }
55780
+ if (Object.values(KEY).indexOf(ev.keyCode) >= 0) {
55781
+ ev.preventDefault();
55782
+ ev.stopPropagation();
55783
+ }
55784
+ switch (ev.keyCode) {
55785
+ case KEY.ESC: {
55786
+ _this.clearSuggestions();
55787
+ return;
55788
+ }
55789
+ case KEY.DOWN: {
55790
+ _this.shiftFocus(1);
55791
+ return;
55792
+ }
55793
+ case KEY.UP: {
55794
+ _this.shiftFocus(-1);
55795
+ return;
55796
+ }
55797
+ case KEY.RETURN: {
55798
+ _this.selectFocused();
55799
+ return;
55800
+ }
55801
+ case KEY.TAB: {
55802
+ _this.selectFocused();
55803
+ return;
55804
+ }
55805
+ default: {
55806
+ return;
55807
+ }
55808
+ }
55809
+ });
55810
+ _defineProperty(_assertThisInitialized(_this), "shiftFocus", function(delta) {
55811
+ var suggestionsCount = countSuggestions(_this.state.suggestions);
55812
+ _this.setState({
55813
+ focusIndex: (suggestionsCount + _this.state.focusIndex + delta) % suggestionsCount,
55814
+ scrollFocusedIntoView: true
55815
+ });
55816
+ });
55817
+ _defineProperty(_assertThisInitialized(_this), "selectFocused", function() {
55818
+ var _this$state2 = _this.state, suggestions = _this$state2.suggestions, focusIndex = _this$state2.focusIndex;
55819
+ var _Object$values$reduce = Object.values(suggestions).reduce(function(acc, _ref) {
55820
+ var results = _ref.results, queryInfo2 = _ref.queryInfo;
55821
+ return [].concat(_toConsumableArray(acc), _toConsumableArray(results.map(function(result2) {
55822
+ return {
55823
+ result: result2,
55824
+ queryInfo: queryInfo2
55825
+ };
55826
+ })));
55827
+ }, [])[focusIndex], result = _Object$values$reduce.result, queryInfo = _Object$values$reduce.queryInfo;
55828
+ _this.addMention(result, queryInfo);
55829
+ _this.setState({
55830
+ focusIndex: 0
55831
+ });
55832
+ });
55833
+ _defineProperty(_assertThisInitialized(_this), "handleBlur", function(ev) {
55834
+ var clickedSuggestion = _this._suggestionsMouseDown;
55835
+ _this._suggestionsMouseDown = false;
55836
+ if (!clickedSuggestion) {
55837
+ _this.setState({
55838
+ selectionStart: null,
55839
+ selectionEnd: null
55840
+ });
55841
+ }
55842
+ window.setTimeout(function() {
55843
+ _this.updateHighlighterScroll();
55844
+ }, 1);
55845
+ _this.props.onBlur(ev, clickedSuggestion);
55846
+ });
55847
+ _defineProperty(_assertThisInitialized(_this), "handleSuggestionsMouseDown", function(ev) {
55848
+ _this._suggestionsMouseDown = true;
55849
+ });
55850
+ _defineProperty(_assertThisInitialized(_this), "handleSuggestionsMouseEnter", function(focusIndex) {
55851
+ _this.setState({
55852
+ focusIndex,
55853
+ scrollFocusedIntoView: false
55854
+ });
55855
+ });
55856
+ _defineProperty(_assertThisInitialized(_this), "updateSuggestionsPosition", function() {
55857
+ var caretPosition = _this.state.caretPosition;
55858
+ var _this$props5 = _this.props, suggestionsPortalHost = _this$props5.suggestionsPortalHost, allowSuggestionsAboveCursor = _this$props5.allowSuggestionsAboveCursor, forceSuggestionsAboveCursor = _this$props5.forceSuggestionsAboveCursor;
55859
+ if (!caretPosition || !_this.suggestionsElement) {
55860
+ return;
55861
+ }
55862
+ var suggestions = _this.suggestionsElement;
55863
+ var highlighter2 = _this.highlighterElement;
55864
+ var caretOffsetParentRect = highlighter2.getBoundingClientRect();
55865
+ var caretHeight = getComputedStyleLengthProp(highlighter2, "font-size");
55866
+ var viewportRelative = {
55867
+ left: caretOffsetParentRect.left + caretPosition.left,
55868
+ top: caretOffsetParentRect.top + caretPosition.top + caretHeight
55869
+ };
55870
+ var viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
55871
+ if (!suggestions) {
55872
+ return;
55873
+ }
55874
+ var position2 = {};
55875
+ if (suggestionsPortalHost) {
55876
+ position2.position = "fixed";
55877
+ var left = viewportRelative.left;
55878
+ var top = viewportRelative.top;
55879
+ left -= getComputedStyleLengthProp(suggestions, "margin-left");
55880
+ top -= getComputedStyleLengthProp(suggestions, "margin-top");
55881
+ left -= highlighter2.scrollLeft;
55882
+ top -= highlighter2.scrollTop;
55883
+ var viewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
55884
+ if (left + suggestions.offsetWidth > viewportWidth) {
55885
+ position2.left = Math.max(0, viewportWidth - suggestions.offsetWidth);
55886
+ } else {
55887
+ position2.left = left;
55888
+ }
55889
+ if (allowSuggestionsAboveCursor && top + suggestions.offsetHeight > viewportHeight && suggestions.offsetHeight < top - caretHeight || forceSuggestionsAboveCursor) {
55890
+ position2.top = Math.max(0, top - suggestions.offsetHeight - caretHeight);
55891
+ } else {
55892
+ position2.top = top;
55893
+ }
55894
+ } else {
55895
+ var _left = caretPosition.left - highlighter2.scrollLeft;
55896
+ var _top = caretPosition.top - highlighter2.scrollTop;
55897
+ if (_left + suggestions.offsetWidth > _this.containerElement.offsetWidth) {
55898
+ position2.right = 0;
55899
+ } else {
55900
+ position2.left = _left;
55901
+ }
55902
+ if (allowSuggestionsAboveCursor && viewportRelative.top - highlighter2.scrollTop + suggestions.offsetHeight > viewportHeight && suggestions.offsetHeight < caretOffsetParentRect.top - caretHeight - highlighter2.scrollTop || forceSuggestionsAboveCursor) {
55903
+ position2.top = _top - suggestions.offsetHeight - caretHeight;
55904
+ } else {
55905
+ position2.top = _top;
55906
+ }
55907
+ }
55908
+ if (position2.left === _this.state.suggestionsPosition.left && position2.top === _this.state.suggestionsPosition.top && position2.position === _this.state.suggestionsPosition.position) {
55909
+ return;
55910
+ }
55911
+ _this.setState({
55912
+ suggestionsPosition: position2
55913
+ });
55914
+ });
55915
+ _defineProperty(_assertThisInitialized(_this), "updateHighlighterScroll", function() {
55916
+ var input = _this.inputElement;
55917
+ var highlighter2 = _this.highlighterElement;
55918
+ if (!input || !highlighter2) {
55919
+ return;
55920
+ }
55921
+ highlighter2.scrollLeft = input.scrollLeft;
55922
+ highlighter2.scrollTop = input.scrollTop;
55923
+ highlighter2.height = input.height;
55924
+ });
55925
+ _defineProperty(_assertThisInitialized(_this), "handleCompositionStart", function() {
55926
+ isComposing = true;
55927
+ });
55928
+ _defineProperty(_assertThisInitialized(_this), "handleCompositionEnd", function() {
55929
+ isComposing = false;
55930
+ });
55931
+ _defineProperty(_assertThisInitialized(_this), "setSelection", function(selectionStart, selectionEnd) {
55932
+ if (selectionStart === null || selectionEnd === null) return;
55933
+ var el = _this.inputElement;
55934
+ if (el.setSelectionRange) {
55935
+ el.setSelectionRange(selectionStart, selectionEnd);
55936
+ } else if (el.createTextRange) {
55937
+ var range = el.createTextRange();
55938
+ range.collapse(true);
55939
+ range.moveEnd("character", selectionEnd);
55940
+ range.moveStart("character", selectionStart);
55941
+ range.select();
55942
+ }
55943
+ });
55944
+ _defineProperty(_assertThisInitialized(_this), "updateMentionsQueries", function(plainTextValue, caretPosition) {
55945
+ _this._queryId++;
55946
+ _this.suggestions = {};
55947
+ _this.setState({
55948
+ suggestions: {}
55949
+ });
55950
+ var value = _this.props.value || "";
55951
+ var children = _this.props.children;
55952
+ var config = readConfigFromChildren(children);
55953
+ var positionInValue = mapPlainTextIndex(value, config, caretPosition, "NULL");
55954
+ if (positionInValue === null) {
55955
+ return;
55956
+ }
55957
+ var substringStartIndex = getEndOfLastMention(value.substring(0, positionInValue), config);
55958
+ var substring = plainTextValue.substring(substringStartIndex, caretPosition);
55959
+ React.Children.forEach(children, function(child, childIndex) {
55960
+ if (!child) {
55961
+ return;
55962
+ }
55963
+ var regex = makeTriggerRegex(child.props.trigger, _this.props);
55964
+ var match = substring.match(regex);
55965
+ if (match) {
55966
+ var querySequenceStart = substringStartIndex + substring.indexOf(match[1], match.index);
55967
+ _this.queryData(match[2], childIndex, querySequenceStart, querySequenceStart + match[1].length, plainTextValue);
55968
+ }
55969
+ });
55970
+ });
55971
+ _defineProperty(_assertThisInitialized(_this), "clearSuggestions", function() {
55972
+ _this._queryId++;
55973
+ _this.suggestions = {};
55974
+ _this.setState({
55975
+ suggestions: {},
55976
+ focusIndex: 0
55977
+ });
55978
+ });
55979
+ _defineProperty(_assertThisInitialized(_this), "queryData", function(query, childIndex, querySequenceStart, querySequenceEnd, plainTextValue) {
55980
+ var _this$props6 = _this.props, children = _this$props6.children, ignoreAccents = _this$props6.ignoreAccents;
55981
+ var mentionChild = reactExports.Children.toArray(children)[childIndex];
55982
+ var provideData = getDataProvider(mentionChild.props.data, ignoreAccents);
55983
+ var syncResult = provideData(query, _this.updateSuggestions.bind(null, _this._queryId, childIndex, query, querySequenceStart, querySequenceEnd, plainTextValue));
55984
+ if (syncResult instanceof Array) {
55985
+ _this.updateSuggestions(_this._queryId, childIndex, query, querySequenceStart, querySequenceEnd, plainTextValue, syncResult);
55986
+ }
55987
+ });
55988
+ _defineProperty(_assertThisInitialized(_this), "updateSuggestions", function(queryId, childIndex, query, querySequenceStart, querySequenceEnd, plainTextValue, results) {
55989
+ if (queryId !== _this._queryId) return;
55990
+ _this.suggestions = _objectSpread$1(_objectSpread$1({}, _this.suggestions), {}, _defineProperty({}, childIndex, {
55991
+ queryInfo: {
55992
+ childIndex,
55993
+ query,
55994
+ querySequenceStart,
55995
+ querySequenceEnd,
55996
+ plainTextValue
55997
+ },
55998
+ results
55999
+ }));
56000
+ var focusIndex = _this.state.focusIndex;
56001
+ var suggestionsCount = countSuggestions(_this.suggestions);
56002
+ _this.setState({
56003
+ suggestions: _this.suggestions,
56004
+ focusIndex: focusIndex >= suggestionsCount ? Math.max(suggestionsCount - 1, 0) : focusIndex
56005
+ });
56006
+ });
56007
+ _defineProperty(_assertThisInitialized(_this), "addMention", function(_ref2, _ref3) {
56008
+ var id = _ref2.id, display = _ref2.display;
56009
+ var childIndex = _ref3.childIndex, querySequenceStart = _ref3.querySequenceStart, querySequenceEnd = _ref3.querySequenceEnd, plainTextValue = _ref3.plainTextValue;
56010
+ var value = _this.props.value || "";
56011
+ var config = readConfigFromChildren(_this.props.children);
56012
+ var mentionsChild = reactExports.Children.toArray(_this.props.children)[childIndex];
56013
+ var _mentionsChild$props = mentionsChild.props, markup = _mentionsChild$props.markup, displayTransform2 = _mentionsChild$props.displayTransform, appendSpaceOnAdd = _mentionsChild$props.appendSpaceOnAdd, onAdd2 = _mentionsChild$props.onAdd;
56014
+ var start = mapPlainTextIndex(value, config, querySequenceStart, "START");
56015
+ var end = start + querySequenceEnd - querySequenceStart;
56016
+ var insert = makeMentionsMarkup(markup, id, display);
56017
+ if (appendSpaceOnAdd) {
56018
+ insert += " ";
56019
+ }
56020
+ var newValue = spliceString(value, start, end, insert);
56021
+ _this.inputElement.focus();
56022
+ var displayValue = displayTransform2(id, display);
56023
+ if (appendSpaceOnAdd) {
56024
+ displayValue += " ";
56025
+ }
56026
+ var newCaretPosition = querySequenceStart + displayValue.length;
56027
+ _this.setState({
56028
+ selectionStart: newCaretPosition,
56029
+ selectionEnd: newCaretPosition,
56030
+ setSelectionAfterMentionChange: true
56031
+ });
56032
+ var eventMock = {
56033
+ target: {
56034
+ value: newValue
56035
+ }
56036
+ };
56037
+ var mentions = getMentions(newValue, config);
56038
+ var newPlainTextValue = spliceString(plainTextValue, querySequenceStart, querySequenceEnd, displayValue);
56039
+ _this.executeOnChange(eventMock, newValue, newPlainTextValue, mentions);
56040
+ if (onAdd2) {
56041
+ onAdd2(id, display, start, end);
56042
+ }
56043
+ _this.clearSuggestions();
56044
+ });
56045
+ _defineProperty(_assertThisInitialized(_this), "isLoading", function() {
56046
+ var isLoading = false;
56047
+ React.Children.forEach(_this.props.children, function(child) {
56048
+ isLoading = isLoading || child && child.props.isLoading;
56049
+ });
56050
+ return isLoading;
56051
+ });
56052
+ _defineProperty(_assertThisInitialized(_this), "isOpened", function() {
56053
+ return isNumber(_this.state.selectionStart) && (countSuggestions(_this.state.suggestions) !== 0 || _this.isLoading());
56054
+ });
56055
+ _defineProperty(_assertThisInitialized(_this), "_queryId", 0);
56056
+ _this.suggestions = {};
56057
+ _this.uuidSuggestionsOverlay = Math.random().toString(16).substring(2);
56058
+ _this.handleCopy = _this.handleCopy.bind(_assertThisInitialized(_this));
56059
+ _this.handleCut = _this.handleCut.bind(_assertThisInitialized(_this));
56060
+ _this.handlePaste = _this.handlePaste.bind(_assertThisInitialized(_this));
56061
+ _this.state = {
56062
+ focusIndex: 0,
56063
+ selectionStart: null,
56064
+ selectionEnd: null,
56065
+ suggestions: {},
56066
+ caretPosition: null,
56067
+ suggestionsPosition: {},
56068
+ setSelectionAfterHandlePaste: false
56069
+ };
56070
+ return _this;
56071
+ }
56072
+ _createClass(MentionsInput2, [{
56073
+ key: "componentDidMount",
56074
+ value: function componentDidMount() {
56075
+ document.addEventListener("copy", this.handleCopy);
56076
+ document.addEventListener("cut", this.handleCut);
56077
+ document.addEventListener("paste", this.handlePaste);
56078
+ this.updateSuggestionsPosition();
56079
+ }
56080
+ }, {
56081
+ key: "componentDidUpdate",
56082
+ value: function componentDidUpdate(prevProps, prevState) {
56083
+ if (prevState.suggestionsPosition === this.state.suggestionsPosition) {
56084
+ this.updateSuggestionsPosition();
56085
+ }
56086
+ if (this.state.setSelectionAfterMentionChange) {
56087
+ this.setState({
56088
+ setSelectionAfterMentionChange: false
56089
+ });
56090
+ this.setSelection(this.state.selectionStart, this.state.selectionEnd);
56091
+ }
56092
+ if (this.state.setSelectionAfterHandlePaste) {
56093
+ this.setState({
56094
+ setSelectionAfterHandlePaste: false
56095
+ });
56096
+ this.setSelection(this.state.selectionStart, this.state.selectionEnd);
56097
+ }
56098
+ }
56099
+ }, {
56100
+ key: "componentWillUnmount",
56101
+ value: function componentWillUnmount() {
56102
+ document.removeEventListener("copy", this.handleCopy);
56103
+ document.removeEventListener("cut", this.handleCut);
56104
+ document.removeEventListener("paste", this.handlePaste);
56105
+ }
56106
+ }, {
56107
+ key: "render",
56108
+ value: function render() {
56109
+ return /* @__PURE__ */ React.createElement("div", _extends({
56110
+ ref: this.setContainerElement
56111
+ }, this.props.style), this.renderControl(), this.renderSuggestionsOverlay());
56112
+ }
56113
+ }, {
56114
+ key: "handlePaste",
56115
+ value: function handlePaste(event) {
56116
+ if (event.target !== this.inputElement) {
56117
+ return;
56118
+ }
56119
+ if (!this.supportsClipboardActions(event)) {
56120
+ return;
56121
+ }
56122
+ event.preventDefault();
56123
+ var _this$state3 = this.state, selectionStart = _this$state3.selectionStart, selectionEnd = _this$state3.selectionEnd;
56124
+ var _this$props7 = this.props, value = _this$props7.value, children = _this$props7.children;
56125
+ var config = readConfigFromChildren(children);
56126
+ var markupStartIndex = mapPlainTextIndex(value, config, selectionStart, "START");
56127
+ var markupEndIndex = mapPlainTextIndex(value, config, selectionEnd, "END");
56128
+ var pastedMentions = event.clipboardData.getData("text/react-mentions");
56129
+ var pastedData = event.clipboardData.getData("text/plain");
56130
+ var newValue = spliceString(value, markupStartIndex, markupEndIndex, pastedMentions || pastedData).replace(/\r/g, "");
56131
+ var newPlainTextValue = getPlainText(newValue, config);
56132
+ var eventMock = {
56133
+ target: _objectSpread$1(_objectSpread$1({}, event.target), {}, {
56134
+ value: newValue
56135
+ })
56136
+ };
56137
+ this.executeOnChange(eventMock, newValue, newPlainTextValue, getMentions(newValue, config));
56138
+ var startOfMention = findStartOfMentionInPlainText(value, config, selectionStart);
56139
+ var nextPos = (startOfMention || selectionStart) + getPlainText(pastedMentions || pastedData, config).length;
56140
+ this.setState({
56141
+ selectionStart: nextPos,
56142
+ selectionEnd: nextPos,
56143
+ setSelectionAfterHandlePaste: true
56144
+ });
56145
+ }
56146
+ }, {
56147
+ key: "saveSelectionToClipboard",
56148
+ value: function saveSelectionToClipboard(event) {
56149
+ var selectionStart = this.inputElement.selectionStart;
56150
+ var selectionEnd = this.inputElement.selectionEnd;
56151
+ var _this$props8 = this.props, children = _this$props8.children, value = _this$props8.value;
56152
+ var config = readConfigFromChildren(children);
56153
+ var markupStartIndex = mapPlainTextIndex(value, config, selectionStart, "START");
56154
+ var markupEndIndex = mapPlainTextIndex(value, config, selectionEnd, "END");
56155
+ event.clipboardData.setData("text/plain", event.target.value.slice(selectionStart, selectionEnd));
56156
+ event.clipboardData.setData("text/react-mentions", value.slice(markupStartIndex, markupEndIndex));
56157
+ }
56158
+ }, {
56159
+ key: "supportsClipboardActions",
56160
+ value: function supportsClipboardActions(event) {
56161
+ return !!event.clipboardData;
56162
+ }
56163
+ }, {
56164
+ key: "handleCopy",
56165
+ value: function handleCopy(event) {
56166
+ if (event.target !== this.inputElement) {
56167
+ return;
56168
+ }
56169
+ if (!this.supportsClipboardActions(event)) {
56170
+ return;
56171
+ }
56172
+ event.preventDefault();
56173
+ this.saveSelectionToClipboard(event);
56174
+ }
56175
+ }, {
56176
+ key: "handleCut",
56177
+ value: function handleCut(event) {
56178
+ if (event.target !== this.inputElement) {
56179
+ return;
56180
+ }
56181
+ if (!this.supportsClipboardActions(event)) {
56182
+ return;
56183
+ }
56184
+ event.preventDefault();
56185
+ this.saveSelectionToClipboard(event);
56186
+ var _this$state4 = this.state, selectionStart = _this$state4.selectionStart, selectionEnd = _this$state4.selectionEnd;
56187
+ var _this$props9 = this.props, children = _this$props9.children, value = _this$props9.value;
56188
+ var config = readConfigFromChildren(children);
56189
+ var markupStartIndex = mapPlainTextIndex(value, config, selectionStart, "START");
56190
+ var markupEndIndex = mapPlainTextIndex(value, config, selectionEnd, "END");
56191
+ var newValue = [value.slice(0, markupStartIndex), value.slice(markupEndIndex)].join("");
56192
+ var newPlainTextValue = getPlainText(newValue, config);
56193
+ var eventMock = {
56194
+ target: _objectSpread$1(_objectSpread$1({}, event.target), {}, {
56195
+ value: newPlainTextValue
56196
+ })
56197
+ };
56198
+ this.executeOnChange(eventMock, newValue, newPlainTextValue, getMentions(value, config));
56199
+ }
56200
+ // Handle input element's change event
56201
+ }]);
56202
+ return MentionsInput2;
56203
+ })(React.Component);
56204
+ _defineProperty(MentionsInput, "propTypes", propTypes);
56205
+ _defineProperty(MentionsInput, "defaultProps", {
56206
+ ignoreAccents: false,
56207
+ singleLine: false,
56208
+ allowSuggestionsAboveCursor: false,
56209
+ onKeyDown: function onKeyDown() {
56210
+ return null;
56211
+ },
56212
+ onSelect: function onSelect() {
56213
+ return null;
56214
+ },
56215
+ onBlur: function onBlur() {
56216
+ return null;
56217
+ }
56218
+ });
56219
+ var getComputedStyleLengthProp = function getComputedStyleLengthProp2(forElement, propertyName) {
56220
+ var length = parseFloat(window.getComputedStyle(forElement, null).getPropertyValue(propertyName));
56221
+ return isFinite(length) ? length : 0;
56222
+ };
56223
+ var isMobileSafari = typeof navigator !== "undefined" && /iPhone|iPad|iPod/i.test(navigator.userAgent);
56224
+ var styled$3 = createDefaultStyle({
56225
+ position: "relative",
56226
+ overflowY: "visible",
56227
+ input: {
56228
+ display: "block",
56229
+ width: "100%",
56230
+ position: "absolute",
56231
+ margin: 0,
56232
+ top: 0,
56233
+ left: 0,
56234
+ boxSizing: "border-box",
56235
+ backgroundColor: "transparent",
56236
+ fontFamily: "inherit",
56237
+ fontSize: "inherit",
56238
+ letterSpacing: "inherit"
56239
+ },
56240
+ "&multiLine": {
56241
+ input: _objectSpread$1({
56242
+ height: "100%",
56243
+ bottom: 0,
56244
+ overflow: "hidden",
56245
+ resize: "none"
56246
+ }, isMobileSafari ? {
56247
+ marginTop: 1,
56248
+ marginLeft: -3
56249
+ } : null)
56250
+ }
56251
+ }, function(_ref4) {
56252
+ var singleLine = _ref4.singleLine;
56253
+ return {
56254
+ "&singleLine": singleLine,
56255
+ "&multiLine": !singleLine
56256
+ };
56257
+ });
56258
+ var MentionsInput$1 = styled$3(MentionsInput);
56259
+ var defaultStyle = {
56260
+ fontWeight: "inherit"
56261
+ };
56262
+ var Mention = function Mention2(_ref) {
56263
+ var display = _ref.display, style = _ref.style, className = _ref.className, classNames = _ref.classNames;
56264
+ var styles = useStyles(defaultStyle, {
56265
+ style,
56266
+ className,
56267
+ classNames
56268
+ });
56269
+ return /* @__PURE__ */ React.createElement("strong", styles, display);
56270
+ };
56271
+ Mention.propTypes = {
56272
+ /**
56273
+ * Called when a new mention is added in the input
56274
+ *
56275
+ * Example:
56276
+ *
56277
+ * ```js
56278
+ * function(id, display) {
56279
+ * console.log("user " + display + " was mentioned!");
56280
+ * }
56281
+ * ```
56282
+ */
56283
+ onAdd: PropTypes.func,
56284
+ onRemove: PropTypes.func,
56285
+ renderSuggestion: PropTypes.func,
56286
+ trigger: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)]),
56287
+ markup: PropTypes.string,
56288
+ displayTransform: PropTypes.func,
56289
+ /**
56290
+ * If set to `true` spaces will not interrupt matching suggestions
56291
+ */
56292
+ allowSpaceInQuery: PropTypes.bool,
56293
+ isLoading: PropTypes.bool
56294
+ };
56295
+ Mention.defaultProps = {
56296
+ trigger: "@",
56297
+ markup: "@[__display__](__id__)",
56298
+ displayTransform: function displayTransform(id, display) {
56299
+ return display || id;
56300
+ },
56301
+ onAdd: function onAdd() {
56302
+ return null;
56303
+ },
56304
+ onRemove: function onRemove() {
56305
+ return null;
56306
+ },
56307
+ renderSuggestion: null,
56308
+ isLoading: false,
56309
+ appendSpaceOnAdd: false
56310
+ };
53570
56311
  function ok$1() {
53571
56312
  }
53572
56313
  function unreachable() {
53573
56314
  }
53574
- function stringify$1(values, options) {
56315
+ function stringify$1(values3, options) {
53575
56316
  const settings = {};
53576
- const input = values[values.length - 1] === "" ? [...values, ""] : values;
56317
+ const input = values3[values3.length - 1] === "" ? [...values3, ""] : values3;
53577
56318
  return input.join(
53578
56319
  (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
53579
56320
  ).trim();
@@ -53615,7 +56356,7 @@ class Schema {
53615
56356
  Schema.prototype.normal = {};
53616
56357
  Schema.prototype.property = {};
53617
56358
  Schema.prototype.space = void 0;
53618
- function merge(definitions, space2) {
56359
+ function merge2(definitions, space2) {
53619
56360
  const property = {};
53620
56361
  const normal = {};
53621
56362
  for (const definition2 of definitions) {
@@ -53705,9 +56446,9 @@ class DefinedInfo extends Info {
53705
56446
  }
53706
56447
  }
53707
56448
  DefinedInfo.prototype.defined = true;
53708
- function mark(values, key, value) {
56449
+ function mark(values3, key, value) {
53709
56450
  if (value) {
53710
- values[key] = value;
56451
+ values3[key] = value;
53711
56452
  }
53712
56453
  }
53713
56454
  function create(definition2) {
@@ -54794,10 +57535,10 @@ function kebab($0) {
54794
57535
  function camelcase($0) {
54795
57536
  return $0.charAt(1).toUpperCase();
54796
57537
  }
54797
- const html$2 = merge([aria, html$3, xlink, xmlns, xml$1], "html");
54798
- const svg = merge([aria, svg$1, xlink, xmlns, xml$1], "svg");
54799
- function stringify(values) {
54800
- return values.join(" ").trim();
57538
+ const html$2 = merge2([aria, html$3, xlink, xmlns, xml$1], "html");
57539
+ const svg = merge2([aria, svg$1, xlink, xmlns, xml$1], "svg");
57540
+ function stringify(values3) {
57541
+ return values3.join(" ").trim();
54801
57542
  }
54802
57543
  var cjs$2 = {};
54803
57544
  var cjs$1;
@@ -55642,11 +58383,11 @@ function one(value, includeImageAlt, includeHtml) {
55642
58383
  }
55643
58384
  return "";
55644
58385
  }
55645
- function all(values, includeImageAlt, includeHtml) {
58386
+ function all(values3, includeImageAlt, includeHtml) {
55646
58387
  const result = [];
55647
58388
  let index2 = -1;
55648
- while (++index2 < values.length) {
55649
- result[index2] = one(values[index2], includeImageAlt, includeHtml);
58389
+ while (++index2 < values3.length) {
58390
+ result[index2] = one(values3[index2], includeImageAlt, includeHtml);
55650
58391
  }
55651
58392
  return result.join("");
55652
58393
  }
@@ -60907,7 +63648,7 @@ const deserializer = ($, _) => {
60907
63648
  const deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);
60908
63649
  const EMPTY = "";
60909
63650
  const { toString } = {};
60910
- const { keys } = Object;
63651
+ const { keys: keys3 } = Object;
60911
63652
  const typeOf = (value) => {
60912
63653
  const type = typeof value;
60913
63654
  if (type !== "object" || !value)
@@ -60996,7 +63737,7 @@ const serializer = (strict, json2, $, _) => {
60996
63737
  return pair(value.toJSON());
60997
63738
  const entries = [];
60998
63739
  const index2 = as([TYPE, entries], value);
60999
- for (const key of keys(value)) {
63740
+ for (const key of keys3(value)) {
61000
63741
  if (strict || !shouldSkip(typeOf(value[key])))
61001
63742
  entries.push([pair(key), pair(value[key])]);
61002
63743
  }
@@ -61393,7 +64134,7 @@ function createState(tree, options) {
61393
64134
  return unknown(state, node2, parent);
61394
64135
  }
61395
64136
  function all2(parent) {
61396
- const values = [];
64137
+ const values3 = [];
61397
64138
  if ("children" in parent) {
61398
64139
  const nodes = parent.children;
61399
64140
  let index2 = -1;
@@ -61412,14 +64153,14 @@ function createState(tree, options) {
61412
64153
  }
61413
64154
  }
61414
64155
  if (Array.isArray(result)) {
61415
- values.push(...result);
64156
+ values3.push(...result);
61416
64157
  } else {
61417
- values.push(result);
64158
+ values3.push(result);
61418
64159
  }
61419
64160
  }
61420
64161
  }
61421
64162
  }
61422
- return values;
64163
+ return values3;
61423
64164
  }
61424
64165
  }
61425
64166
  function patch(from, to) {
@@ -61530,7 +64271,7 @@ function requireExtend() {
61530
64271
  }
61531
64272
  return toStr.call(arr) === "[object Array]";
61532
64273
  };
61533
- var isPlainObject2 = function isPlainObject3(obj) {
64274
+ var isPlainObject3 = function isPlainObject4(obj) {
61534
64275
  if (!obj || toStr.call(obj) !== "[object Object]") {
61535
64276
  return false;
61536
64277
  }
@@ -61587,12 +64328,12 @@ function requireExtend() {
61587
64328
  src = getProperty(target, name2);
61588
64329
  copy2 = getProperty(options, name2);
61589
64330
  if (target !== copy2) {
61590
- if (deep && copy2 && (isPlainObject2(copy2) || (copyIsArray = isArray(copy2)))) {
64331
+ if (deep && copy2 && (isPlainObject3(copy2) || (copyIsArray = isArray(copy2)))) {
61591
64332
  if (copyIsArray) {
61592
64333
  copyIsArray = false;
61593
64334
  clone = src && isArray(src) ? src : [];
61594
64335
  } else {
61595
- clone = src && isPlainObject2(src) ? src : {};
64336
+ clone = src && isPlainObject3(src) ? src : {};
61596
64337
  }
61597
64338
  setProperty(target, { name: name2, newValue: extend2(deep, clone, copy2) });
61598
64339
  } else if (typeof copy2 !== "undefined") {
@@ -61608,7 +64349,7 @@ function requireExtend() {
61608
64349
  }
61609
64350
  var extendExports = requireExtend();
61610
64351
  const extend = /* @__PURE__ */ getDefaultExportFromCjs(extendExports);
61611
- function isPlainObject(value) {
64352
+ function isPlainObject2(value) {
61612
64353
  if (typeof value !== "object" || value === null) {
61613
64354
  return false;
61614
64355
  }
@@ -61619,13 +64360,13 @@ function trough() {
61619
64360
  const fns = [];
61620
64361
  const pipeline = { run, use };
61621
64362
  return pipeline;
61622
- function run(...values) {
64363
+ function run(...values3) {
61623
64364
  let middlewareIndex = -1;
61624
- const callback = values.pop();
64365
+ const callback = values3.pop();
61625
64366
  if (typeof callback !== "function") {
61626
64367
  throw new TypeError("Expected function as last argument, not " + callback);
61627
64368
  }
61628
- next(null, ...values);
64369
+ next(null, ...values3);
61629
64370
  function next(error, ...output) {
61630
64371
  const fn = fns[++middlewareIndex];
61631
64372
  let index2 = -1;
@@ -61633,12 +64374,12 @@ function trough() {
61633
64374
  callback(error);
61634
64375
  return;
61635
64376
  }
61636
- while (++index2 < values.length) {
64377
+ while (++index2 < values3.length) {
61637
64378
  if (output[index2] === null || output[index2] === void 0) {
61638
- output[index2] = values[index2];
64379
+ output[index2] = values3[index2];
61639
64380
  }
61640
64381
  }
61641
- values = output;
64382
+ values3 = output;
61642
64383
  if (fn) {
61643
64384
  wrap(fn, next)(...output);
61644
64385
  } else {
@@ -61828,7 +64569,7 @@ function join(...segments) {
61828
64569
  function normalize(path2) {
61829
64570
  assertPath$1(path2);
61830
64571
  const absolute = path2.codePointAt(0) === 47;
61831
- let value = normalizeString(path2, !absolute);
64572
+ let value = normalizeString2(path2, !absolute);
61832
64573
  if (value.length === 0 && !absolute) {
61833
64574
  value = ".";
61834
64575
  }
@@ -61837,7 +64578,7 @@ function normalize(path2) {
61837
64578
  }
61838
64579
  return absolute ? "/" + value : value;
61839
64580
  }
61840
- function normalizeString(path2, allowAboveRoot) {
64581
+ function normalizeString2(path2, allowAboveRoot) {
61841
64582
  let result = "";
61842
64583
  let lastSegmentLength = 0;
61843
64584
  let lastSlash = -1;
@@ -63012,7 +65753,7 @@ class Processor extends CallableInstance {
63012
65753
  } else if (parameters2.length > 0) {
63013
65754
  let [primary, ...rest] = parameters2;
63014
65755
  const currentPrimary = attachers[entryIndex][1];
63015
- if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
65756
+ if (isPlainObject2(currentPrimary) && isPlainObject2(primary)) {
63016
65757
  primary = extend(true, currentPrimary, primary);
63017
65758
  }
63018
65759
  attachers[entryIndex] = [plugin, primary, ...rest];
@@ -63039,7 +65780,7 @@ function assertUnfrozen(name2, frozen) {
63039
65780
  }
63040
65781
  }
63041
65782
  function assertNode(node2) {
63042
- if (!isPlainObject(node2) || typeof node2.type !== "string") {
65783
+ if (!isPlainObject2(node2) || typeof node2.type !== "string") {
63043
65784
  throw new TypeError("Expected node, got `" + node2 + "`");
63044
65785
  }
63045
65786
  }
@@ -79522,7 +82263,7 @@ function xml(hljs) {
79522
82263
  function yaml(hljs) {
79523
82264
  const LITERALS2 = "true false yes no null";
79524
82265
  const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
79525
- const KEY = {
82266
+ const KEY2 = {
79526
82267
  className: "attr",
79527
82268
  variants: [
79528
82269
  // added brackets support and special char support
@@ -79627,7 +82368,7 @@ function yaml(hljs) {
79627
82368
  relevance: 0
79628
82369
  };
79629
82370
  const MODES2 = [
79630
- KEY,
82371
+ KEY2,
79631
82372
  {
79632
82373
  className: "meta",
79633
82374
  begin: "^---\\s*$",
@@ -81680,6 +84421,58 @@ function MarkdownRenderer({ content: content2, className = "" }) {
81680
84421
  );
81681
84422
  }
81682
84423
  const TASK_PROPOSAL_REGEX = /\[TASK_PROPOSAL\]\r?\nFILENAME:\s*(\S+)\r?\nTASKNAME:\s*(\S+)\r?\nCODE:\s*```javascript\s*([\s\S]*?)\s*```\s*\[\/TASK_PROPOSAL\]/;
84424
+ const MENTION_REGEX = /@\[([^\]]+)\]\([^)]+\)/g;
84425
+ function renderWithMentions(content2) {
84426
+ const parts = [];
84427
+ let lastIndex = 0;
84428
+ let match;
84429
+ const regex = new RegExp(MENTION_REGEX.source, "g");
84430
+ while ((match = regex.exec(content2)) !== null) {
84431
+ if (match.index > lastIndex) {
84432
+ parts.push(content2.slice(lastIndex, match.index));
84433
+ }
84434
+ parts.push(
84435
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
84436
+ "span",
84437
+ {
84438
+ className: "bg-primary/20 text-primary rounded-md px-1",
84439
+ children: [
84440
+ "@",
84441
+ match[1]
84442
+ ]
84443
+ },
84444
+ match.index
84445
+ )
84446
+ );
84447
+ lastIndex = regex.lastIndex;
84448
+ }
84449
+ if (lastIndex < content2.length) {
84450
+ parts.push(content2.slice(lastIndex));
84451
+ }
84452
+ return parts.length > 0 ? parts : content2;
84453
+ }
84454
+ const mentionsInputStyle = {
84455
+ control: {
84456
+ backgroundColor: "var(--background)",
84457
+ border: "1px solid var(--border)"
84458
+ },
84459
+ highlighter: {
84460
+ overflow: "hidden"
84461
+ },
84462
+ input: {
84463
+ padding: "0.5rem 0.75rem"
84464
+ },
84465
+ suggestions: {
84466
+ marginTop: "1.5rem",
84467
+ list: {
84468
+ backgroundColor: "var(--card)",
84469
+ border: "1px solid var(--border)"
84470
+ },
84471
+ item: {
84472
+ padding: "0.5rem"
84473
+ }
84474
+ }
84475
+ };
81683
84476
  function parseTaskProposal(content2) {
81684
84477
  const match = content2.match(TASK_PROPOSAL_REGEX);
81685
84478
  if (!match) return null;
@@ -81732,7 +84525,26 @@ function TaskCreationSidebar({ isOpen, onClose, pipelineSlug }) {
81732
84525
  const [error, setError] = reactExports.useState(null);
81733
84526
  const [taskProposals, setTaskProposals] = reactExports.useState({});
81734
84527
  const [creatingTask, setCreatingTask] = reactExports.useState({});
84528
+ const [artifacts, setArtifacts] = reactExports.useState([]);
84529
+ const [activeTab, setActiveTab] = reactExports.useState("conversation");
81735
84530
  const messagesEndRef = reactExports.useRef(null);
84531
+ reactExports.useEffect(() => {
84532
+ if (!pipelineSlug) return;
84533
+ const fetchArtifacts = async () => {
84534
+ try {
84535
+ const response = await fetch(
84536
+ `/api/pipelines/${pipelineSlug}/artifacts`
84537
+ );
84538
+ if (response.ok) {
84539
+ const data = await response.json();
84540
+ setArtifacts(data.artifacts || []);
84541
+ }
84542
+ } catch (err) {
84543
+ console.error("[TaskCreationSidebar] Failed to fetch artifacts:", err);
84544
+ }
84545
+ };
84546
+ fetchArtifacts();
84547
+ }, [pipelineSlug]);
81736
84548
  reactExports.useEffect(() => {
81737
84549
  messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
81738
84550
  }, [messages]);
@@ -81768,6 +84580,10 @@ function TaskCreationSidebar({ isOpen, onClose, pipelineSlug }) {
81768
84580
  setCreatingTask({});
81769
84581
  onClose();
81770
84582
  };
84583
+ const insertMention = (fileName) => {
84584
+ setInput((prev) => prev + "@" + fileName + " ");
84585
+ setActiveTab("conversation");
84586
+ };
81771
84587
  const handleSend = (e2) => {
81772
84588
  e2.preventDefault();
81773
84589
  if (!input.trim()) return;
@@ -81950,47 +84766,91 @@ function TaskCreationSidebar({ isOpen, onClose, pipelineSlug }) {
81950
84766
  description: "Describe the task you want to create",
81951
84767
  contentClassName: "flex flex-col max-h-screen",
81952
84768
  children: [
84769
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex border-b border-border", children: [
84770
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
84771
+ "button",
84772
+ {
84773
+ type: "button",
84774
+ onClick: () => setActiveTab("conversation"),
84775
+ className: `flex-1 px-4 py-2 text-sm font-medium ${activeTab === "conversation" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:text-foreground"}`,
84776
+ children: "Conversation"
84777
+ }
84778
+ ),
84779
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
84780
+ "button",
84781
+ {
84782
+ type: "button",
84783
+ onClick: () => setActiveTab("files"),
84784
+ className: `flex-1 px-4 py-2 text-sm font-medium ${activeTab === "files" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground hover:text-foreground"}`,
84785
+ children: [
84786
+ "Files (",
84787
+ artifacts.length,
84788
+ ")"
84789
+ ]
84790
+ }
84791
+ )
84792
+ ] }),
81953
84793
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
81954
- messages.map((msg, i2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
81955
- /* @__PURE__ */ jsxRuntimeExports.jsx(
81956
- "div",
84794
+ activeTab === "files" ? (
84795
+ /* File List */
84796
+ artifacts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-muted-foreground text-sm", children: "No artifact files available." }) : artifacts.map((artifact, i2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
84797
+ "button",
81957
84798
  {
81958
- className: `flex ${msg.role === "user" ? "justify-end" : "justify-start"}`,
81959
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
84799
+ type: "button",
84800
+ onClick: () => insertMention(artifact.fileName),
84801
+ className: "w-full text-left p-3 rounded-lg border border-border hover:bg-muted transition-colors",
84802
+ children: [
84803
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium text-foreground", children: artifact.fileName }),
84804
+ artifact.sources && artifact.sources.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: artifact.sources.map((s2) => s2.taskName).join(", ") })
84805
+ ]
84806
+ },
84807
+ i2
84808
+ ))
84809
+ ) : (
84810
+ /* Conversation Messages */
84811
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
84812
+ messages.map((msg, i2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
84813
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
81960
84814
  "div",
81961
84815
  {
81962
- className: `rounded-lg p-3 max-w-full ${msg.role === "user" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
81963
- children: msg.role === "assistant" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
81964
- /* @__PURE__ */ jsxRuntimeExports.jsx(
81965
- MarkdownRenderer,
81966
- {
81967
- content: msg.content.replace(TASK_PROPOSAL_REGEX, "")
81968
- }
81969
- ),
81970
- isWaiting && !msg.content && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-1 text-muted-foreground mt-2", children: Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
81971
- "span",
81972
- {
81973
- className: "animate-bounce-wave",
81974
- style: { animationDelay: `${idx * 0.1}s` },
81975
- children: ""
81976
- },
81977
- idx
81978
- )) })
81979
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "whitespace-pre-wrap", children: msg.content })
84816
+ className: `flex ${msg.role === "user" ? "justify-end" : "justify-start"}`,
84817
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
84818
+ "div",
84819
+ {
84820
+ className: `rounded-lg p-3 max-w-full ${msg.role === "user" ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
84821
+ children: msg.role === "assistant" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
84822
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
84823
+ MarkdownRenderer,
84824
+ {
84825
+ content: msg.content.replace(TASK_PROPOSAL_REGEX, "")
84826
+ }
84827
+ ),
84828
+ isWaiting && !msg.content && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-1 text-muted-foreground mt-2", children: Array.from({ length: 5 }).map((_, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
84829
+ "span",
84830
+ {
84831
+ className: "animate-bounce-wave",
84832
+ style: { animationDelay: `${idx * 0.1}s` },
84833
+ children: ""
84834
+ },
84835
+ idx
84836
+ )) })
84837
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "whitespace-pre-wrap", children: renderWithMentions(msg.content) })
84838
+ }
84839
+ )
84840
+ }
84841
+ ),
84842
+ taskProposals[i2] && /* @__PURE__ */ jsxRuntimeExports.jsx(
84843
+ TaskProposalCard,
84844
+ {
84845
+ proposal: taskProposals[i2],
84846
+ isCreating: creatingTask[i2],
84847
+ onCreate: () => handleCreateTask(i2, taskProposals[i2])
81980
84848
  }
81981
84849
  )
81982
- }
81983
- ),
81984
- taskProposals[i2] && /* @__PURE__ */ jsxRuntimeExports.jsx(
81985
- TaskProposalCard,
81986
- {
81987
- proposal: taskProposals[i2],
81988
- isCreating: creatingTask[i2],
81989
- onCreate: () => handleCreateTask(i2, taskProposals[i2])
81990
- }
81991
- )
81992
- ] }, i2)),
81993
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: messagesEndRef }),
84850
+ ] }, i2)),
84851
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: messagesEndRef })
84852
+ ] })
84853
+ ),
81994
84854
  error && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 p-4 bg-destructive/10 border border-destructive/20 rounded-lg", children: [
81995
84855
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-destructive font-medium mb-2", children: error }),
81996
84856
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -82020,15 +84880,29 @@ function TaskCreationSidebar({ isOpen, onClose, pipelineSlug }) {
82020
84880
  ] }),
82021
84881
  /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarFooter, { className: "bg-card", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSend, className: "w-full", children: [
82022
84882
  /* @__PURE__ */ jsxRuntimeExports.jsx(
82023
- "textarea",
84883
+ MentionsInput$1,
82024
84884
  {
82025
84885
  value: input,
82026
- onChange: (e2) => setInput(e2.target.value),
84886
+ onChange: (e2, newValue) => setInput(newValue),
82027
84887
  disabled: isSending || isWaiting || isReceiving,
82028
84888
  placeholder: "Describe the task you want to create...",
82029
84889
  rows: 3,
82030
84890
  className: "w-full border rounded-md px-3 py-2 resize-none disabled:bg-muted disabled:cursor-not-allowed mb-3 focus:outline-none focus:ring-2 focus:ring-ring bg-background",
82031
- "aria-label": "Task description input"
84891
+ "aria-label": "Task description input",
84892
+ style: mentionsInputStyle,
84893
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
84894
+ Mention,
84895
+ {
84896
+ trigger: "@",
84897
+ markup: "@[__display__](__id__)",
84898
+ data: artifacts.map((a2) => ({
84899
+ id: a2.fileName,
84900
+ display: a2.fileName
84901
+ })),
84902
+ displayTransform: (id, display) => `@${display}`,
84903
+ className: "bg-primary/20 text-primary rounded-md px-1"
84904
+ }
84905
+ )
82032
84906
  }
82033
84907
  ),
82034
84908
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -82515,11 +85389,11 @@ function ToastProvider({ children }) {
82515
85389
  /* @__PURE__ */ jsxRuntimeExports.jsx(ToastContainer, { toasts, onRemove: removeToast })
82516
85390
  ] });
82517
85391
  }
82518
- function ToastContainer({ toasts, onRemove }) {
85392
+ function ToastContainer({ toasts, onRemove: onRemove2 }) {
82519
85393
  if (toasts.length === 0) return null;
82520
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed top-4 right-4 z-50 space-y-2", children: toasts.map((toast) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToastItem, { toast, onRemove }, toast.id)) });
85394
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed top-4 right-4 z-50 space-y-2", children: toasts.map((toast) => /* @__PURE__ */ jsxRuntimeExports.jsx(ToastItem, { toast, onRemove: onRemove2 }, toast.id)) });
82521
85395
  }
82522
- function ToastItem({ toast, onRemove }) {
85396
+ function ToastItem({ toast, onRemove: onRemove2 }) {
82523
85397
  const getToastStyles = (type) => {
82524
85398
  switch (type) {
82525
85399
  case "success":
@@ -82558,7 +85432,7 @@ function ToastItem({ toast, onRemove }) {
82558
85432
  /* @__PURE__ */ jsxRuntimeExports.jsx(
82559
85433
  "button",
82560
85434
  {
82561
- onClick: () => onRemove(toast.id),
85435
+ onClick: () => onRemove2(toast.id),
82562
85436
  className: "flex-shrink-0 ml-4 text-sm opacity-60 hover:opacity-100 focus:outline-none focus:opacity-100",
82563
85437
  "aria-label": "Dismiss notification",
82564
85438
  children: "✕"