@bagelink/vue 0.0.322 → 0.0.335

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.
Files changed (72) hide show
  1. package/dist/components/ComboBox.vue.d.ts.map +1 -1
  2. package/dist/components/MaterialIcon.vue.d.ts +4 -2
  3. package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
  4. package/dist/components/Modal.vue.d.ts +0 -1
  5. package/dist/components/ModalBglForm.vue.d.ts.map +1 -1
  6. package/dist/components/Popover.vue.d.ts +10 -0
  7. package/dist/components/Popover.vue.d.ts.map +1 -0
  8. package/dist/components/form/BglForm.vue.d.ts +1 -9
  9. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/DateInput.vue.d.ts +0 -1
  11. package/dist/components/form/inputs/SelectInput.vue.d.ts +22 -16
  12. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/TextArea.vue.d.ts +3 -1
  14. package/dist/components/form/inputs/TextArea.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  16. package/dist/components/formkit/index.d.ts +1 -14
  17. package/dist/components/formkit/index.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +0 -2
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/components/layout/Layout.vue.d.ts +8 -0
  21. package/dist/components/layout/Layout.vue.d.ts.map +1 -1
  22. package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
  23. package/dist/components/layout/TabbedLayout.vue.d.ts +38 -0
  24. package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -0
  25. package/dist/components/layout/Tabs.vue.d.ts +24 -0
  26. package/dist/components/layout/Tabs.vue.d.ts.map +1 -0
  27. package/dist/components/layout/TabsBody.vue.d.ts +21 -0
  28. package/dist/components/layout/TabsBody.vue.d.ts.map +1 -0
  29. package/dist/components/layout/TabsNav.vue.d.ts +25 -0
  30. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -0
  31. package/dist/components/layout/index.d.ts +4 -0
  32. package/dist/components/layout/index.d.ts.map +1 -1
  33. package/dist/components/layout/tabsManager.d.ts +4 -0
  34. package/dist/components/layout/tabsManager.d.ts.map +1 -0
  35. package/dist/index.cjs +783 -2035
  36. package/dist/index.d.ts +0 -1
  37. package/dist/index.mjs +785 -2037
  38. package/dist/style.css +2129 -695
  39. package/dist/types/index.d.ts +7 -1
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/dist/types/materialIcon.d.ts +2 -0
  42. package/dist/types/materialIcon.d.ts.map +1 -0
  43. package/dist/types/materialIcons.d.ts +1 -1
  44. package/dist/types/materialIcons.d.ts.map +1 -1
  45. package/dist/utils/index.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/src/components/MaterialIcon.vue +3 -2
  48. package/src/components/PageTitle.vue +10 -20
  49. package/src/components/form/BglField.vue +2 -2
  50. package/src/components/form/BglForm.vue +49 -53
  51. package/src/components/form/inputs/SelectInput.vue +128 -484
  52. package/src/components/form/inputs/TextInput.vue +158 -112
  53. package/src/components/index.ts +0 -2
  54. package/src/components/layout/Layout.vue +34 -13
  55. package/src/components/layout/SidebarMenu.vue +22 -22
  56. package/src/components/layout/TabbedLayout.vue +79 -0
  57. package/src/components/layout/Tabs.vue +19 -0
  58. package/src/components/layout/TabsBody.vue +15 -0
  59. package/src/components/layout/TabsNav.vue +48 -0
  60. package/src/components/layout/index.ts +4 -0
  61. package/src/components/layout/tabsManager.ts +18 -0
  62. package/src/styles/appearance.css +81 -0
  63. package/src/styles/bagel.css +2 -0
  64. package/src/styles/layout.css +162 -17
  65. package/src/styles/mobilLayout.css +1476 -0
  66. package/src/styles/text.css +153 -1
  67. package/src/types/index.ts +9 -1
  68. package/src/types/materialIcons.ts +1180 -1178
  69. package/src/utils/BagelFormUtils.ts +1 -1
  70. package/src/utils/index.ts +0 -1
  71. package/src/components/ComboBox.vue +0 -165
  72. package/src/components/TabbedLayout.vue +0 -87
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField2 = (obj, key, value) => {
4
4
  __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, watch, onMounted, withModifiers, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, createTextVNode, onUnmounted, mergeModels, useModel, createSlots, Transition, isRef, reactive, provide, withDirectives, vModelText, vModelCheckbox, toRef, Teleport, render as render$f, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, TransitionGroup, vModelDynamic, vModelRadio, resolveDirective } from "vue";
7
+ import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, inject, watch, onMounted, withModifiers, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, computed, createTextVNode, onUnmounted, mergeModels, useModel, createSlots, Transition, isRef, reactive, provide, withDirectives, vModelCheckbox, toRef, Teleport, render as render$e, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, vModelText, TransitionGroup, vModelDynamic, vModelRadio, resolveDirective } from "vue";
8
8
  const sides = ["top", "right", "bottom", "left"];
9
9
  const alignments = ["start", "end"];
10
10
  const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
@@ -260,7 +260,7 @@ const computePosition = async (reference, floating, config) => {
260
260
  middlewareData
261
261
  };
262
262
  };
263
- async function detectOverflow(state, options) {
263
+ async function detectOverflow(state2, options) {
264
264
  var _await$platform$isEle;
265
265
  if (options === void 0) {
266
266
  options = {};
@@ -272,14 +272,14 @@ async function detectOverflow(state, options) {
272
272
  rects,
273
273
  elements,
274
274
  strategy
275
- } = state;
275
+ } = state2;
276
276
  const {
277
277
  boundary = "clippingAncestors",
278
278
  rootBoundary = "viewport",
279
279
  elementContext = "floating",
280
280
  altBoundary = false,
281
281
  padding = 0
282
- } = evaluate(options, state);
282
+ } = evaluate(options, state2);
283
283
  const paddingObject = getPaddingObject(padding);
284
284
  const altContext = elementContext === "floating" ? "reference" : "floating";
285
285
  const element = elements[altBoundary ? altContext : elementContext];
@@ -318,7 +318,7 @@ async function detectOverflow(state, options) {
318
318
  const arrow = (options) => ({
319
319
  name: "arrow",
320
320
  options,
321
- async fn(state) {
321
+ async fn(state2) {
322
322
  const {
323
323
  x: x2,
324
324
  y: y2,
@@ -327,11 +327,11 @@ const arrow = (options) => ({
327
327
  platform: platform2,
328
328
  elements,
329
329
  middlewareData
330
- } = state;
330
+ } = state2;
331
331
  const {
332
332
  element,
333
333
  padding = 0
334
- } = evaluate(options, state) || {};
334
+ } = evaluate(options, state2) || {};
335
335
  if (element == null) {
336
336
  return {};
337
337
  }
@@ -393,7 +393,7 @@ const autoPlacement = function(options) {
393
393
  return {
394
394
  name: "autoPlacement",
395
395
  options,
396
- async fn(state) {
396
+ async fn(state2) {
397
397
  var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
398
398
  const {
399
399
  rects,
@@ -401,16 +401,16 @@ const autoPlacement = function(options) {
401
401
  placement,
402
402
  platform: platform2,
403
403
  elements
404
- } = state;
404
+ } = state2;
405
405
  const {
406
406
  crossAxis = false,
407
407
  alignment,
408
408
  allowedPlacements = placements,
409
409
  autoAlignment = true,
410
410
  ...detectOverflowOptions
411
- } = evaluate(options, state);
411
+ } = evaluate(options, state2);
412
412
  const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
413
- const overflow = await detectOverflow(state, detectOverflowOptions);
413
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
414
414
  const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
415
415
  const currentPlacement = placements$1[currentIndex];
416
416
  if (currentPlacement == null) {
@@ -480,7 +480,7 @@ const flip = function(options) {
480
480
  return {
481
481
  name: "flip",
482
482
  options,
483
- async fn(state) {
483
+ async fn(state2) {
484
484
  var _middlewareData$arrow, _middlewareData$flip;
485
485
  const {
486
486
  placement,
@@ -489,7 +489,7 @@ const flip = function(options) {
489
489
  initialPlacement,
490
490
  platform: platform2,
491
491
  elements
492
- } = state;
492
+ } = state2;
493
493
  const {
494
494
  mainAxis: checkMainAxis = true,
495
495
  crossAxis: checkCrossAxis = true,
@@ -498,7 +498,7 @@ const flip = function(options) {
498
498
  fallbackAxisSideDirection = "none",
499
499
  flipAlignment = true,
500
500
  ...detectOverflowOptions
501
- } = evaluate(options, state);
501
+ } = evaluate(options, state2);
502
502
  if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
503
503
  return {};
504
504
  }
@@ -510,7 +510,7 @@ const flip = function(options) {
510
510
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
511
511
  }
512
512
  const placements2 = [initialPlacement, ...fallbackPlacements];
513
- const overflow = await detectOverflow(state, detectOverflowOptions);
513
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
514
514
  const overflows = [];
515
515
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
516
516
  if (checkMainAxis) {
@@ -567,19 +567,19 @@ const flip = function(options) {
567
567
  }
568
568
  };
569
569
  };
570
- async function convertValueToCoords(state, options) {
570
+ async function convertValueToCoords(state2, options) {
571
571
  const {
572
572
  placement,
573
573
  platform: platform2,
574
574
  elements
575
- } = state;
575
+ } = state2;
576
576
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
577
577
  const side = getSide$1(placement);
578
578
  const alignment = getAlignment(placement);
579
579
  const isVertical = getSideAxis(placement) === "y";
580
580
  const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
581
581
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
582
- const rawValue = evaluate(options, state);
582
+ const rawValue = evaluate(options, state2);
583
583
  let {
584
584
  mainAxis,
585
585
  crossAxis,
@@ -612,15 +612,15 @@ const offset = function(options) {
612
612
  return {
613
613
  name: "offset",
614
614
  options,
615
- async fn(state) {
615
+ async fn(state2) {
616
616
  var _middlewareData$offse, _middlewareData$arrow;
617
617
  const {
618
618
  x: x2,
619
619
  y: y2,
620
620
  placement,
621
621
  middlewareData
622
- } = state;
623
- const diffCoords = await convertValueToCoords(state, options);
622
+ } = state2;
623
+ const diffCoords = await convertValueToCoords(state2, options);
624
624
  if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
625
625
  return {};
626
626
  }
@@ -642,12 +642,12 @@ const shift$1 = function(options) {
642
642
  return {
643
643
  name: "shift",
644
644
  options,
645
- async fn(state) {
645
+ async fn(state2) {
646
646
  const {
647
647
  x: x2,
648
648
  y: y2,
649
649
  placement
650
- } = state;
650
+ } = state2;
651
651
  const {
652
652
  mainAxis: checkMainAxis = true,
653
653
  crossAxis: checkCrossAxis = false,
@@ -664,12 +664,12 @@ const shift$1 = function(options) {
664
664
  }
665
665
  },
666
666
  ...detectOverflowOptions
667
- } = evaluate(options, state);
667
+ } = evaluate(options, state2);
668
668
  const coords = {
669
669
  x: x2,
670
670
  y: y2
671
671
  };
672
- const overflow = await detectOverflow(state, detectOverflowOptions);
672
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
673
673
  const crossAxis = getSideAxis(getSide$1(placement));
674
674
  const mainAxis = getOppositeAxis(crossAxis);
675
675
  let mainAxisCoord = coords[mainAxis];
@@ -689,7 +689,7 @@ const shift$1 = function(options) {
689
689
  crossAxisCoord = clamp(min2, crossAxisCoord, max2);
690
690
  }
691
691
  const limitedCoords = limiter.fn({
692
- ...state,
692
+ ...state2,
693
693
  [mainAxis]: mainAxisCoord,
694
694
  [crossAxis]: crossAxisCoord
695
695
  });
@@ -710,19 +710,19 @@ const size = function(options) {
710
710
  return {
711
711
  name: "size",
712
712
  options,
713
- async fn(state) {
713
+ async fn(state2) {
714
714
  const {
715
715
  placement,
716
716
  rects,
717
717
  platform: platform2,
718
718
  elements
719
- } = state;
719
+ } = state2;
720
720
  const {
721
721
  apply: apply2 = () => {
722
722
  },
723
723
  ...detectOverflowOptions
724
- } = evaluate(options, state);
725
- const overflow = await detectOverflow(state, detectOverflowOptions);
724
+ } = evaluate(options, state2);
725
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
726
726
  const side = getSide$1(placement);
727
727
  const alignment = getAlignment(placement);
728
728
  const isYAxis = getSideAxis(placement) === "y";
@@ -741,7 +741,7 @@ const size = function(options) {
741
741
  }
742
742
  const overflowAvailableHeight = height - overflow[heightSide];
743
743
  const overflowAvailableWidth = width - overflow[widthSide];
744
- const noShift = !state.middlewareData.shift;
744
+ const noShift = !state2.middlewareData.shift;
745
745
  let availableHeight = overflowAvailableHeight;
746
746
  let availableWidth = overflowAvailableWidth;
747
747
  if (isYAxis) {
@@ -763,7 +763,7 @@ const size = function(options) {
763
763
  }
764
764
  }
765
765
  await apply2({
766
- ...state,
766
+ ...state2,
767
767
  availableWidth,
768
768
  availableHeight
769
769
  });
@@ -4017,7 +4017,7 @@ const adapters = {
4017
4017
  }
4018
4018
  if (!adapter) {
4019
4019
  const reasons = Object.entries(rejectedReasons).map(
4020
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
4020
+ ([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build")
4021
4021
  );
4022
4022
  let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
4023
4023
  throw new AxiosError(
@@ -4878,7 +4878,7 @@ const ModalPlugin = {
4878
4878
  const props2 = { ...modal.modalOptions, visible: true, "onUpdate:visible": () => hideModal(index2) };
4879
4879
  if (modal.modalType === "modalForm")
4880
4880
  return h$2(ModalForm, props2, modal.componentSlots);
4881
- return h$2(_sfc_main$C, props2, modal.componentSlots);
4881
+ return h$2(_sfc_main$E, props2, modal.componentSlots);
4882
4882
  });
4883
4883
  }
4884
4884
  });
@@ -4943,7 +4943,7 @@ function numField(id, label, options) {
4943
4943
  function frmRow(...children2) {
4944
4944
  return {
4945
4945
  $el: "div",
4946
- class: "flex gap-1",
4946
+ class: "flex gap-1 m_block",
4947
4947
  children: children2
4948
4948
  };
4949
4949
  }
@@ -4989,8 +4989,6 @@ function bindAttrs(attrs, fieldVal, row) {
4989
4989
  key,
4990
4990
  typeof value === "function" ? value(fieldVal, row) : value
4991
4991
  ]);
4992
- if (attrs.options)
4993
- console.log("arr", arr);
4994
4992
  const resolvedAttrs = Object.fromEntries(arr);
4995
4993
  return resolvedAttrs;
4996
4994
  }
@@ -6968,19 +6966,19 @@ function dfa(nfa2) {
6968
6966
  });
6969
6967
  });
6970
6968
  });
6971
- let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1);
6969
+ let state2 = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1);
6972
6970
  for (let i2 = 0; i2 < out.length; i2++) {
6973
6971
  let states2 = out[i2][1].sort(cmp);
6974
- state.next.push({ type: out[i2][0], next: labeled[states2.join(",")] || explore(states2) });
6972
+ state2.next.push({ type: out[i2][0], next: labeled[states2.join(",")] || explore(states2) });
6975
6973
  }
6976
- return state;
6974
+ return state2;
6977
6975
  }
6978
6976
  }
6979
6977
  function checkForDeadEnds(match2, stream) {
6980
6978
  for (let i2 = 0, work = [match2]; i2 < work.length; i2++) {
6981
- let state = work[i2], dead = !state.validEnd, nodes2 = [];
6982
- for (let j = 0; j < state.next.length; j++) {
6983
- let { type: type3, next } = state.next[j];
6979
+ let state2 = work[i2], dead = !state2.validEnd, nodes2 = [];
6980
+ for (let j = 0; j < state2.next.length; j++) {
6981
+ let { type: type3, next } = state2.next[j];
6984
6982
  nodes2.push(type3.name);
6985
6983
  if (dead && !(type3.isText || type3.hasRequiredAttrs()))
6986
6984
  dead = false;
@@ -10377,14 +10375,14 @@ class Transaction extends Transform {
10377
10375
  /**
10378
10376
  @internal
10379
10377
  */
10380
- constructor(state) {
10381
- super(state.doc);
10378
+ constructor(state2) {
10379
+ super(state2.doc);
10382
10380
  this.curSelectionFor = 0;
10383
10381
  this.updated = 0;
10384
10382
  this.meta = /* @__PURE__ */ Object.create(null);
10385
10383
  this.time = Date.now();
10386
- this.curSelection = state.selection;
10387
- this.storedMarks = state.storedMarks;
10384
+ this.curSelection = state2.selection;
10385
+ this.storedMarks = state2.storedMarks;
10388
10386
  }
10389
10387
  /**
10390
10388
  The transaction's current selection. This defaults to the editor
@@ -10591,8 +10589,8 @@ const baseFields = [
10591
10589
  init(config) {
10592
10590
  return config.storedMarks || null;
10593
10591
  },
10594
- apply(tr2, _marks, _old, state) {
10595
- return state.selection.$cursor ? tr2.storedMarks : null;
10592
+ apply(tr2, _marks, _old, state2) {
10593
+ return state2.selection.$cursor ? tr2.storedMarks : null;
10596
10594
  }
10597
10595
  }),
10598
10596
  new FieldDesc("scrollToSelection", {
@@ -10756,9 +10754,9 @@ class EditorState {
10756
10754
  for (let prop3 in pluginFields) {
10757
10755
  if (prop3 == "doc" || prop3 == "selection")
10758
10756
  throw new RangeError("The JSON fields `doc` and `selection` are reserved");
10759
- let plugin = pluginFields[prop3], state = plugin.spec.state;
10760
- if (state && state.toJSON)
10761
- result[prop3] = state.toJSON.call(plugin, this[plugin.key]);
10757
+ let plugin = pluginFields[prop3], state2 = plugin.spec.state;
10758
+ if (state2 && state2.toJSON)
10759
+ result[prop3] = state2.toJSON.call(plugin, this[plugin.key]);
10762
10760
  }
10763
10761
  return result;
10764
10762
  }
@@ -10787,9 +10785,9 @@ class EditorState {
10787
10785
  } else {
10788
10786
  if (pluginFields)
10789
10787
  for (let prop3 in pluginFields) {
10790
- let plugin = pluginFields[prop3], state = plugin.spec.state;
10791
- if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop3)) {
10792
- instance[field.name] = state.fromJSON.call(plugin, config, json[prop3], instance);
10788
+ let plugin = pluginFields[prop3], state2 = plugin.spec.state;
10789
+ if (plugin.key == field.name && state2 && state2.fromJSON && Object.prototype.hasOwnProperty.call(json, prop3)) {
10790
+ instance[field.name] = state2.fromJSON.call(plugin, config, json[prop3], instance);
10793
10791
  return;
10794
10792
  }
10795
10793
  }
@@ -10824,8 +10822,8 @@ class Plugin {
10824
10822
  /**
10825
10823
  Extract the plugin's state field from an editor state.
10826
10824
  */
10827
- getState(state) {
10828
- return state[this.key];
10825
+ getState(state2) {
10826
+ return state2[this.key];
10829
10827
  }
10830
10828
  }
10831
10829
  const keys$1 = /* @__PURE__ */ Object.create(null);
@@ -10846,14 +10844,14 @@ class PluginKey {
10846
10844
  Get the active plugin with this key, if any, from an editor
10847
10845
  state.
10848
10846
  */
10849
- get(state) {
10850
- return state.config.pluginsByKey[this.key];
10847
+ get(state2) {
10848
+ return state2.config.pluginsByKey[this.key];
10851
10849
  }
10852
10850
  /**
10853
10851
  Get the plugin's state from an editor state.
10854
10852
  */
10855
- getState(state) {
10856
- return state[this.key];
10853
+ getState(state2) {
10854
+ return state2[this.key];
10857
10855
  }
10858
10856
  }
10859
10857
  const domIndex = function(node) {
@@ -11339,25 +11337,25 @@ function flattenH(rect, top2) {
11339
11337
  let y2 = top2 ? rect.top : rect.bottom;
11340
11338
  return { top: y2, bottom: y2, left: rect.left, right: rect.right };
11341
11339
  }
11342
- function withFlushedState(view, state, f2) {
11340
+ function withFlushedState(view, state2, f2) {
11343
11341
  let viewState = view.state, active = view.root.activeElement;
11344
- if (viewState != state)
11345
- view.updateState(state);
11342
+ if (viewState != state2)
11343
+ view.updateState(state2);
11346
11344
  if (active != view.dom)
11347
11345
  view.focus();
11348
11346
  try {
11349
11347
  return f2();
11350
11348
  } finally {
11351
- if (viewState != state)
11349
+ if (viewState != state2)
11352
11350
  view.updateState(viewState);
11353
11351
  if (active != view.dom && active)
11354
11352
  active.focus();
11355
11353
  }
11356
11354
  }
11357
- function endOfTextblockVertical(view, state, dir) {
11358
- let sel = state.selection;
11355
+ function endOfTextblockVertical(view, state2, dir) {
11356
+ let sel = state2.selection;
11359
11357
  let $pos = dir == "up" ? sel.$from : sel.$to;
11360
- return withFlushedState(view, state, () => {
11358
+ return withFlushedState(view, state2, () => {
11361
11359
  let { node: dom } = view.docView.domFromPos($pos.pos, dir == "up" ? -1 : 1);
11362
11360
  for (; ; ) {
11363
11361
  let nearest = view.docView.nearestDesc(dom, true);
@@ -11388,15 +11386,15 @@ function endOfTextblockVertical(view, state, dir) {
11388
11386
  });
11389
11387
  }
11390
11388
  const maybeRTL = /[\u0590-\u08ac]/;
11391
- function endOfTextblockHorizontal(view, state, dir) {
11392
- let { $head } = state.selection;
11389
+ function endOfTextblockHorizontal(view, state2, dir) {
11390
+ let { $head } = state2.selection;
11393
11391
  if (!$head.parent.isTextblock)
11394
11392
  return false;
11395
11393
  let offset2 = $head.parentOffset, atStart = !offset2, atEnd = offset2 == $head.parent.content.size;
11396
11394
  let sel = view.domSelection();
11397
11395
  if (!maybeRTL.test($head.parent.textContent) || !sel.modify)
11398
11396
  return dir == "left" || dir == "backward" ? atStart : atEnd;
11399
- return withFlushedState(view, state, () => {
11397
+ return withFlushedState(view, state2, () => {
11400
11398
  let { focusNode: oldNode, focusOffset: oldOff, anchorNode, anchorOffset } = view.domSelectionRange();
11401
11399
  let oldBidiLevel = sel.caretBidiLevel;
11402
11400
  sel.modify("move", dir, "character");
@@ -11417,12 +11415,12 @@ function endOfTextblockHorizontal(view, state, dir) {
11417
11415
  let cachedState = null;
11418
11416
  let cachedDir = null;
11419
11417
  let cachedResult = false;
11420
- function endOfTextblock(view, state, dir) {
11421
- if (cachedState == state && cachedDir == dir)
11418
+ function endOfTextblock(view, state2, dir) {
11419
+ if (cachedState == state2 && cachedDir == dir)
11422
11420
  return cachedResult;
11423
- cachedState = state;
11421
+ cachedState = state2;
11424
11422
  cachedDir = dir;
11425
- return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);
11423
+ return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state2, dir) : endOfTextblockHorizontal(view, state2, dir);
11426
11424
  }
11427
11425
  const NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;
11428
11426
  class ViewDesc {
@@ -12927,10 +12925,10 @@ function anchorInRightPlace(view) {
12927
12925
  let domSel = view.domSelectionRange();
12928
12926
  return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);
12929
12927
  }
12930
- function moveSelectionBlock(state, dir) {
12931
- let { $anchor, $head } = state.selection;
12928
+ function moveSelectionBlock(state2, dir) {
12929
+ let { $anchor, $head } = state2.selection;
12932
12930
  let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);
12933
- let $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;
12931
+ let $start = !$side.parent.inlineContent ? $side : $side.depth ? state2.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;
12934
12932
  return $start && Selection$1.findFrom($start, dir);
12935
12933
  }
12936
12934
  function apply(view, sel) {
@@ -13132,9 +13130,9 @@ function setSelFocus(view, node, offset2) {
13132
13130
  sel.extend(node, offset2);
13133
13131
  }
13134
13132
  view.domObserver.setCurSelection();
13135
- let { state } = view;
13133
+ let { state: state2 } = view;
13136
13134
  setTimeout(() => {
13137
- if (view.state == state)
13135
+ if (view.state == state2)
13138
13136
  selectionToDOM(view);
13139
13137
  }, 50);
13140
13138
  }
@@ -13199,9 +13197,9 @@ function stopNativeHorizontalDelete(view, dir) {
13199
13197
  }
13200
13198
  return false;
13201
13199
  }
13202
- function switchEditable(view, node, state) {
13200
+ function switchEditable(view, node, state2) {
13203
13201
  view.domObserver.stop();
13204
- node.contentEditable = state;
13202
+ node.contentEditable = state2;
13205
13203
  view.domObserver.start();
13206
13204
  }
13207
13205
  function safariDownArrowBug(view) {
@@ -13848,14 +13846,14 @@ const timeoutComposition = android ? 5e3 : -1;
13848
13846
  editHandlers.compositionstart = editHandlers.compositionupdate = (view) => {
13849
13847
  if (!view.composing) {
13850
13848
  view.domObserver.flush();
13851
- let { state } = view, $pos = state.selection.$from;
13852
- if (state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m2) => m2.type.spec.inclusive === false))) {
13849
+ let { state: state2 } = view, $pos = state2.selection.$from;
13850
+ if (state2.selection.empty && (state2.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m2) => m2.type.spec.inclusive === false))) {
13853
13851
  view.markCursor = view.state.storedMarks || $pos.marks();
13854
13852
  endComposition(view, true);
13855
13853
  view.markCursor = null;
13856
13854
  } else {
13857
13855
  endComposition(view);
13858
- if (gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {
13856
+ if (gecko && state2.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {
13859
13857
  let sel = view.domSelectionRange();
13860
13858
  for (let node = sel.focusNode, offset2 = sel.focusOffset; node && node.nodeType == 1 && offset2 != 0; ) {
13861
13859
  let before = offset2 < 0 ? node.lastChild : node.childNodes[offset2 - 1];
@@ -15427,18 +15425,18 @@ class EditorView {
15427
15425
  Update the editor's `state` prop, without touching any of the
15428
15426
  other props.
15429
15427
  */
15430
- updateState(state) {
15431
- this.updateStateInner(state, this._props);
15428
+ updateState(state2) {
15429
+ this.updateStateInner(state2, this._props);
15432
15430
  }
15433
- updateStateInner(state, prevProps) {
15431
+ updateStateInner(state2, prevProps) {
15434
15432
  var _a2;
15435
15433
  let prev = this.state, redraw = false, updateSel = false;
15436
- if (state.storedMarks && this.composing) {
15434
+ if (state2.storedMarks && this.composing) {
15437
15435
  clearComposition(this);
15438
15436
  updateSel = true;
15439
15437
  }
15440
- this.state = state;
15441
- let pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;
15438
+ this.state = state2;
15439
+ let pluginsChanged = prev.plugins != state2.plugins || this._props.plugins != prevProps.plugins;
15442
15440
  if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {
15443
15441
  let nodeViews = buildNodeViews(this);
15444
15442
  if (changedNodeViews(nodeViews, this.nodeViews)) {
@@ -15452,20 +15450,20 @@ class EditorView {
15452
15450
  this.editable = getEditable(this);
15453
15451
  updateCursorWrapper(this);
15454
15452
  let innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);
15455
- let scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? "reset" : state.scrollToSelection > prev.scrollToSelection ? "to selection" : "preserve";
15456
- let updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);
15457
- if (updateDoc || !state.selection.eq(prev.selection))
15453
+ let scroll = prev.plugins != state2.plugins && !prev.doc.eq(state2.doc) ? "reset" : state2.scrollToSelection > prev.scrollToSelection ? "to selection" : "preserve";
15454
+ let updateDoc = redraw || !this.docView.matchesNode(state2.doc, outerDeco, innerDeco);
15455
+ if (updateDoc || !state2.selection.eq(prev.selection))
15458
15456
  updateSel = true;
15459
15457
  let oldScrollPos = scroll == "preserve" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);
15460
15458
  if (updateSel) {
15461
15459
  this.domObserver.stop();
15462
- let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);
15460
+ let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state2.selection.empty && selectionContextChanged(prev.selection, state2.selection);
15463
15461
  if (updateDoc) {
15464
15462
  let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;
15465
- if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {
15463
+ if (redraw || !this.docView.update(state2.doc, outerDeco, innerDeco, this)) {
15466
15464
  this.docView.updateOuterDeco([]);
15467
15465
  this.docView.destroy();
15468
- this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);
15466
+ this.docView = docViewDesc(state2.doc, outerDeco, innerDeco, this.dom, this);
15469
15467
  }
15470
15468
  if (chromeKludge && !this.trackWrites)
15471
15469
  forceSelUpdate = true;
@@ -15473,13 +15471,13 @@ class EditorView {
15473
15471
  if (forceSelUpdate || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && anchorInRightPlace(this))) {
15474
15472
  selectionToDOM(this, forceSelUpdate);
15475
15473
  } else {
15476
- syncNodeSelection(this, state.selection);
15474
+ syncNodeSelection(this, state2.selection);
15477
15475
  this.domObserver.setCurSelection();
15478
15476
  }
15479
15477
  this.domObserver.start();
15480
15478
  }
15481
15479
  this.updatePluginViews(prev);
15482
- if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(state.doc))
15480
+ if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(state2.doc))
15483
15481
  this.updateDraggedNode(this.dragging, prev);
15484
15482
  if (scroll == "reset") {
15485
15483
  this.dom.scrollTop = 0;
@@ -15689,8 +15687,8 @@ class EditorView {
15689
15687
  to the view's current state by default, but it is possible to
15690
15688
  pass a different state.
15691
15689
  */
15692
- endOfTextblock(dir, state) {
15693
- return endOfTextblock(this, state || this.state, dir);
15690
+ endOfTextblock(dir, state2) {
15691
+ return endOfTextblock(this, state2 || this.state, dir);
15694
15692
  }
15695
15693
  /**
15696
15694
  Run the editor's paste logic with the given HTML string. The
@@ -16017,21 +16015,21 @@ function keydownHandler(bindings) {
16017
16015
  return false;
16018
16016
  };
16019
16017
  }
16020
- const deleteSelection = (state, dispatch) => {
16021
- if (state.selection.empty)
16018
+ const deleteSelection = (state2, dispatch) => {
16019
+ if (state2.selection.empty)
16022
16020
  return false;
16023
16021
  if (dispatch)
16024
- dispatch(state.tr.deleteSelection().scrollIntoView());
16022
+ dispatch(state2.tr.deleteSelection().scrollIntoView());
16025
16023
  return true;
16026
16024
  };
16027
- function atBlockStart(state, view) {
16028
- let { $cursor } = state.selection;
16029
- if (!$cursor || (view ? !view.endOfTextblock("backward", state) : $cursor.parentOffset > 0))
16025
+ function atBlockStart(state2, view) {
16026
+ let { $cursor } = state2.selection;
16027
+ if (!$cursor || (view ? !view.endOfTextblock("backward", state2) : $cursor.parentOffset > 0))
16030
16028
  return null;
16031
16029
  return $cursor;
16032
16030
  }
16033
- const joinBackward = (state, dispatch, view) => {
16034
- let $cursor = atBlockStart(state, view);
16031
+ const joinBackward = (state2, dispatch, view) => {
16032
+ let $cursor = atBlockStart(state2, view);
16035
16033
  if (!$cursor)
16036
16034
  return false;
16037
16035
  let $cut = findCutBefore($cursor);
@@ -16040,17 +16038,17 @@ const joinBackward = (state, dispatch, view) => {
16040
16038
  if (target == null)
16041
16039
  return false;
16042
16040
  if (dispatch)
16043
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16041
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16044
16042
  return true;
16045
16043
  }
16046
16044
  let before = $cut.nodeBefore;
16047
- if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch))
16045
+ if (!before.type.spec.isolating && deleteBarrier(state2, $cut, dispatch))
16048
16046
  return true;
16049
16047
  if ($cursor.parent.content.size == 0 && (textblockAt(before, "end") || NodeSelection.isSelectable(before))) {
16050
- let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty);
16048
+ let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
16051
16049
  if (delStep && delStep.slice.size < delStep.to - delStep.from) {
16052
16050
  if (dispatch) {
16053
- let tr2 = state.tr.step(delStep);
16051
+ let tr2 = state2.tr.step(delStep);
16054
16052
  tr2.setSelection(textblockAt(before, "end") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos, -1)), -1) : NodeSelection.create(tr2.doc, $cut.pos - before.nodeSize));
16055
16053
  dispatch(tr2.scrollIntoView());
16056
16054
  }
@@ -16059,7 +16057,7 @@ const joinBackward = (state, dispatch, view) => {
16059
16057
  }
16060
16058
  if (before.isAtom && $cut.depth == $cursor.depth - 1) {
16061
16059
  if (dispatch)
16062
- dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());
16060
+ dispatch(state2.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());
16063
16061
  return true;
16064
16062
  }
16065
16063
  return false;
@@ -16073,12 +16071,12 @@ function textblockAt(node, side, only = false) {
16073
16071
  }
16074
16072
  return false;
16075
16073
  }
16076
- const selectNodeBackward = (state, dispatch, view) => {
16077
- let { $head, empty: empty2 } = state.selection, $cut = $head;
16074
+ const selectNodeBackward = (state2, dispatch, view) => {
16075
+ let { $head, empty: empty2 } = state2.selection, $cut = $head;
16078
16076
  if (!empty2)
16079
16077
  return false;
16080
16078
  if ($head.parent.isTextblock) {
16081
- if (view ? !view.endOfTextblock("backward", state) : $head.parentOffset > 0)
16079
+ if (view ? !view.endOfTextblock("backward", state2) : $head.parentOffset > 0)
16082
16080
  return false;
16083
16081
  $cut = findCutBefore($head);
16084
16082
  }
@@ -16086,7 +16084,7 @@ const selectNodeBackward = (state, dispatch, view) => {
16086
16084
  if (!node || !NodeSelection.isSelectable(node))
16087
16085
  return false;
16088
16086
  if (dispatch)
16089
- dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());
16087
+ dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos - node.nodeSize)).scrollIntoView());
16090
16088
  return true;
16091
16089
  };
16092
16090
  function findCutBefore($pos) {
@@ -16099,27 +16097,27 @@ function findCutBefore($pos) {
16099
16097
  }
16100
16098
  return null;
16101
16099
  }
16102
- function atBlockEnd(state, view) {
16103
- let { $cursor } = state.selection;
16104
- if (!$cursor || (view ? !view.endOfTextblock("forward", state) : $cursor.parentOffset < $cursor.parent.content.size))
16100
+ function atBlockEnd(state2, view) {
16101
+ let { $cursor } = state2.selection;
16102
+ if (!$cursor || (view ? !view.endOfTextblock("forward", state2) : $cursor.parentOffset < $cursor.parent.content.size))
16105
16103
  return null;
16106
16104
  return $cursor;
16107
16105
  }
16108
- const joinForward = (state, dispatch, view) => {
16109
- let $cursor = atBlockEnd(state, view);
16106
+ const joinForward = (state2, dispatch, view) => {
16107
+ let $cursor = atBlockEnd(state2, view);
16110
16108
  if (!$cursor)
16111
16109
  return false;
16112
16110
  let $cut = findCutAfter($cursor);
16113
16111
  if (!$cut)
16114
16112
  return false;
16115
16113
  let after = $cut.nodeAfter;
16116
- if (deleteBarrier(state, $cut, dispatch))
16114
+ if (deleteBarrier(state2, $cut, dispatch))
16117
16115
  return true;
16118
16116
  if ($cursor.parent.content.size == 0 && (textblockAt(after, "start") || NodeSelection.isSelectable(after))) {
16119
- let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty);
16117
+ let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
16120
16118
  if (delStep && delStep.slice.size < delStep.to - delStep.from) {
16121
16119
  if (dispatch) {
16122
- let tr2 = state.tr.step(delStep);
16120
+ let tr2 = state2.tr.step(delStep);
16123
16121
  tr2.setSelection(textblockAt(after, "start") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos)), 1) : NodeSelection.create(tr2.doc, tr2.mapping.map($cut.pos)));
16124
16122
  dispatch(tr2.scrollIntoView());
16125
16123
  }
@@ -16128,17 +16126,17 @@ const joinForward = (state, dispatch, view) => {
16128
16126
  }
16129
16127
  if (after.isAtom && $cut.depth == $cursor.depth - 1) {
16130
16128
  if (dispatch)
16131
- dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());
16129
+ dispatch(state2.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());
16132
16130
  return true;
16133
16131
  }
16134
16132
  return false;
16135
16133
  };
16136
- const selectNodeForward = (state, dispatch, view) => {
16137
- let { $head, empty: empty2 } = state.selection, $cut = $head;
16134
+ const selectNodeForward = (state2, dispatch, view) => {
16135
+ let { $head, empty: empty2 } = state2.selection, $cut = $head;
16138
16136
  if (!empty2)
16139
16137
  return false;
16140
16138
  if ($head.parent.isTextblock) {
16141
- if (view ? !view.endOfTextblock("forward", state) : $head.parentOffset < $head.parent.content.size)
16139
+ if (view ? !view.endOfTextblock("forward", state2) : $head.parentOffset < $head.parent.content.size)
16142
16140
  return false;
16143
16141
  $cut = findCutAfter($head);
16144
16142
  }
@@ -16146,7 +16144,7 @@ const selectNodeForward = (state, dispatch, view) => {
16146
16144
  if (!node || !NodeSelection.isSelectable(node))
16147
16145
  return false;
16148
16146
  if (dispatch)
16149
- dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos)).scrollIntoView());
16147
+ dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos)).scrollIntoView());
16150
16148
  return true;
16151
16149
  };
16152
16150
  function findCutAfter($pos) {
@@ -16160,12 +16158,12 @@ function findCutAfter($pos) {
16160
16158
  }
16161
16159
  return null;
16162
16160
  }
16163
- const newlineInCode = (state, dispatch) => {
16164
- let { $head, $anchor } = state.selection;
16161
+ const newlineInCode = (state2, dispatch) => {
16162
+ let { $head, $anchor } = state2.selection;
16165
16163
  if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
16166
16164
  return false;
16167
16165
  if (dispatch)
16168
- dispatch(state.tr.insertText("\n").scrollIntoView());
16166
+ dispatch(state2.tr.insertText("\n").scrollIntoView());
16169
16167
  return true;
16170
16168
  };
16171
16169
  function defaultBlockAt(match2) {
@@ -16176,22 +16174,22 @@ function defaultBlockAt(match2) {
16176
16174
  }
16177
16175
  return null;
16178
16176
  }
16179
- const exitCode = (state, dispatch) => {
16180
- let { $head, $anchor } = state.selection;
16177
+ const exitCode = (state2, dispatch) => {
16178
+ let { $head, $anchor } = state2.selection;
16181
16179
  if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
16182
16180
  return false;
16183
16181
  let above = $head.node(-1), after = $head.indexAfter(-1), type3 = defaultBlockAt(above.contentMatchAt(after));
16184
16182
  if (!type3 || !above.canReplaceWith(after, after, type3))
16185
16183
  return false;
16186
16184
  if (dispatch) {
16187
- let pos = $head.after(), tr2 = state.tr.replaceWith(pos, pos, type3.createAndFill());
16185
+ let pos = $head.after(), tr2 = state2.tr.replaceWith(pos, pos, type3.createAndFill());
16188
16186
  tr2.setSelection(Selection$1.near(tr2.doc.resolve(pos), 1));
16189
16187
  dispatch(tr2.scrollIntoView());
16190
16188
  }
16191
16189
  return true;
16192
16190
  };
16193
- const createParagraphNear = (state, dispatch) => {
16194
- let sel = state.selection, { $from, $to } = sel;
16191
+ const createParagraphNear = (state2, dispatch) => {
16192
+ let sel = state2.selection, { $from, $to } = sel;
16195
16193
  if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent)
16196
16194
  return false;
16197
16195
  let type3 = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));
@@ -16199,21 +16197,21 @@ const createParagraphNear = (state, dispatch) => {
16199
16197
  return false;
16200
16198
  if (dispatch) {
16201
16199
  let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;
16202
- let tr2 = state.tr.insert(side, type3.createAndFill());
16200
+ let tr2 = state2.tr.insert(side, type3.createAndFill());
16203
16201
  tr2.setSelection(TextSelection.create(tr2.doc, side + 1));
16204
16202
  dispatch(tr2.scrollIntoView());
16205
16203
  }
16206
16204
  return true;
16207
16205
  };
16208
- const liftEmptyBlock = (state, dispatch) => {
16209
- let { $cursor } = state.selection;
16206
+ const liftEmptyBlock = (state2, dispatch) => {
16207
+ let { $cursor } = state2.selection;
16210
16208
  if (!$cursor || $cursor.parent.content.size)
16211
16209
  return false;
16212
16210
  if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {
16213
16211
  let before = $cursor.before();
16214
- if (canSplit(state.doc, before)) {
16212
+ if (canSplit(state2.doc, before)) {
16215
16213
  if (dispatch)
16216
- dispatch(state.tr.split(before).scrollIntoView());
16214
+ dispatch(state2.tr.split(before).scrollIntoView());
16217
16215
  return true;
16218
16216
  }
16219
16217
  }
@@ -16221,25 +16219,25 @@ const liftEmptyBlock = (state, dispatch) => {
16221
16219
  if (target == null)
16222
16220
  return false;
16223
16221
  if (dispatch)
16224
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16222
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16225
16223
  return true;
16226
16224
  };
16227
16225
  function splitBlockAs(splitNode) {
16228
- return (state, dispatch) => {
16229
- let { $from, $to } = state.selection;
16230
- if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
16231
- if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
16226
+ return (state2, dispatch) => {
16227
+ let { $from, $to } = state2.selection;
16228
+ if (state2.selection instanceof NodeSelection && state2.selection.node.isBlock) {
16229
+ if (!$from.parentOffset || !canSplit(state2.doc, $from.pos))
16232
16230
  return false;
16233
16231
  if (dispatch)
16234
- dispatch(state.tr.split($from.pos).scrollIntoView());
16232
+ dispatch(state2.tr.split($from.pos).scrollIntoView());
16235
16233
  return true;
16236
16234
  }
16237
16235
  if (!$from.parent.isBlock)
16238
16236
  return false;
16239
16237
  if (dispatch) {
16240
16238
  let atEnd = $to.parentOffset == $to.parent.content.size;
16241
- let tr2 = state.tr;
16242
- if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
16239
+ let tr2 = state2.tr;
16240
+ if (state2.selection instanceof TextSelection || state2.selection instanceof AllSelection)
16243
16241
  tr2.deleteSelection();
16244
16242
  let deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));
16245
16243
  let splitType = splitNode && splitNode($to.parent, atEnd);
@@ -16264,31 +16262,31 @@ function splitBlockAs(splitNode) {
16264
16262
  };
16265
16263
  }
16266
16264
  const splitBlock = splitBlockAs();
16267
- const selectAll = (state, dispatch) => {
16265
+ const selectAll = (state2, dispatch) => {
16268
16266
  if (dispatch)
16269
- dispatch(state.tr.setSelection(new AllSelection(state.doc)));
16267
+ dispatch(state2.tr.setSelection(new AllSelection(state2.doc)));
16270
16268
  return true;
16271
16269
  };
16272
- function joinMaybeClear(state, $pos, dispatch) {
16270
+ function joinMaybeClear(state2, $pos, dispatch) {
16273
16271
  let before = $pos.nodeBefore, after = $pos.nodeAfter, index2 = $pos.index();
16274
16272
  if (!before || !after || !before.type.compatibleContent(after.type))
16275
16273
  return false;
16276
16274
  if (!before.content.size && $pos.parent.canReplace(index2 - 1, index2)) {
16277
16275
  if (dispatch)
16278
- dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());
16276
+ dispatch(state2.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());
16279
16277
  return true;
16280
16278
  }
16281
- if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos)))
16279
+ if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state2.doc, $pos.pos)))
16282
16280
  return false;
16283
16281
  if (dispatch)
16284
- dispatch(state.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());
16282
+ dispatch(state2.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());
16285
16283
  return true;
16286
16284
  }
16287
- function deleteBarrier(state, $cut, dispatch) {
16285
+ function deleteBarrier(state2, $cut, dispatch) {
16288
16286
  let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match2;
16289
16287
  if (before.type.spec.isolating || after.type.spec.isolating)
16290
16288
  return false;
16291
- if (joinMaybeClear(state, $cut, dispatch))
16289
+ if (joinMaybeClear(state2, $cut, dispatch))
16292
16290
  return true;
16293
16291
  let canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1);
16294
16292
  if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
@@ -16297,7 +16295,7 @@ function deleteBarrier(state, $cut, dispatch) {
16297
16295
  for (let i2 = conn.length - 1; i2 >= 0; i2--)
16298
16296
  wrap2 = Fragment.from(conn[i2].create(null, wrap2));
16299
16297
  wrap2 = Fragment.from(before.copy(wrap2));
16300
- let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
16298
+ let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
16301
16299
  let joinAt = end + 2 * conn.length;
16302
16300
  if (canJoin(tr2.doc, joinAt))
16303
16301
  tr2.join(joinAt);
@@ -16309,7 +16307,7 @@ function deleteBarrier(state, $cut, dispatch) {
16309
16307
  let range2 = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range2 && liftTarget(range2);
16310
16308
  if (target != null && target >= $cut.depth) {
16311
16309
  if (dispatch)
16312
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16310
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16313
16311
  return true;
16314
16312
  }
16315
16313
  if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) {
@@ -16328,7 +16326,7 @@ function deleteBarrier(state, $cut, dispatch) {
16328
16326
  let end = Fragment.empty;
16329
16327
  for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
16330
16328
  end = Fragment.from(wrap2[i2].copy(end));
16331
- let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
16329
+ let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
16332
16330
  dispatch(tr2.scrollIntoView());
16333
16331
  }
16334
16332
  return true;
@@ -16337,8 +16335,8 @@ function deleteBarrier(state, $cut, dispatch) {
16337
16335
  return false;
16338
16336
  }
16339
16337
  function selectTextblockSide(side) {
16340
- return function(state, dispatch) {
16341
- let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to;
16338
+ return function(state2, dispatch) {
16339
+ let sel = state2.selection, $pos = side < 0 ? sel.$from : sel.$to;
16342
16340
  let depth = $pos.depth;
16343
16341
  while ($pos.node(depth).isInline) {
16344
16342
  if (!depth)
@@ -16348,16 +16346,16 @@ function selectTextblockSide(side) {
16348
16346
  if (!$pos.node(depth).isTextblock)
16349
16347
  return false;
16350
16348
  if (dispatch)
16351
- dispatch(state.tr.setSelection(TextSelection.create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));
16349
+ dispatch(state2.tr.setSelection(TextSelection.create(state2.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));
16352
16350
  return true;
16353
16351
  };
16354
16352
  }
16355
16353
  const selectTextblockStart = selectTextblockSide(-1);
16356
16354
  const selectTextblockEnd = selectTextblockSide(1);
16357
16355
  function chainCommands(...commands) {
16358
- return function(state, dispatch, view) {
16356
+ return function(state2, dispatch, view) {
16359
16357
  for (let i2 = 0; i2 < commands.length; i2++)
16360
- if (commands[i2](state, dispatch, view))
16358
+ if (commands[i2](state2, dispatch, view))
16361
16359
  return true;
16362
16360
  return false;
16363
16361
  };
@@ -16584,7 +16582,7 @@ class Branch {
16584
16582
  }
16585
16583
  // Pop the latest event off the branch's history and apply it
16586
16584
  // to a document transform.
16587
- popEvent(state, preserveItems) {
16585
+ popEvent(state2, preserveItems) {
16588
16586
  if (this.eventCount == 0)
16589
16587
  return null;
16590
16588
  let end = this.items.length;
@@ -16600,7 +16598,7 @@ class Branch {
16600
16598
  remap = this.remapping(end, this.items.length);
16601
16599
  mapFrom = remap.maps.length;
16602
16600
  }
16603
- let transform = state.tr;
16601
+ let transform = state2.tr;
16604
16602
  let selection, remaining;
16605
16603
  let addAfter = [], addBefore = [];
16606
16604
  this.items.forEach((item, i2) => {
@@ -16797,7 +16795,7 @@ class HistoryState {
16797
16795
  }
16798
16796
  }
16799
16797
  const DEPTH_OVERFLOW = 20;
16800
- function applyTransaction(history2, state, tr2, options) {
16798
+ function applyTransaction(history2, state2, tr2, options) {
16801
16799
  let historyTr = tr2.getMeta(historyKey), rebased;
16802
16800
  if (historyTr)
16803
16801
  return historyTr.historyState;
@@ -16808,14 +16806,14 @@ function applyTransaction(history2, state, tr2, options) {
16808
16806
  return history2;
16809
16807
  } else if (appended && appended.getMeta(historyKey)) {
16810
16808
  if (appended.getMeta(historyKey).redo)
16811
- return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(state)), history2.undone, rangesFor(tr2.mapping.maps[tr2.steps.length - 1]), history2.prevTime, history2.prevComposition);
16809
+ return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(state2)), history2.undone, rangesFor(tr2.mapping.maps[tr2.steps.length - 1]), history2.prevTime, history2.prevComposition);
16812
16810
  else
16813
- return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(state)), null, history2.prevTime, history2.prevComposition);
16811
+ return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(state2)), null, history2.prevTime, history2.prevComposition);
16814
16812
  } else if (tr2.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
16815
16813
  let composition = tr2.getMeta("composition");
16816
16814
  let newGroup = history2.prevTime == 0 || !appended && history2.prevComposition != composition && (history2.prevTime < (tr2.time || 0) - options.newGroupDelay || !isAdjacentTo(tr2, history2.prevRanges));
16817
16815
  let prevRanges = appended ? mapRanges(history2.prevRanges, tr2.mapping) : rangesFor(tr2.mapping.maps[tr2.steps.length - 1]);
16818
- return new HistoryState(history2.done.addTransform(tr2, newGroup ? state.selection.getBookmark() : void 0, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr2.time, composition == null ? history2.prevComposition : composition);
16816
+ return new HistoryState(history2.done.addTransform(tr2, newGroup ? state2.selection.getBookmark() : void 0, options, mustPreserveItems(state2)), Branch.empty, prevRanges, tr2.time, composition == null ? history2.prevComposition : composition);
16819
16817
  } else if (rebased = tr2.getMeta("rebased")) {
16820
16818
  return new HistoryState(history2.done.rebased(tr2, rebased), history2.undone.rebased(tr2, rebased), mapRanges(history2.prevRanges, tr2.mapping), history2.prevTime, history2.prevComposition);
16821
16819
  } else {
@@ -16851,20 +16849,20 @@ function mapRanges(ranges, mapping) {
16851
16849
  }
16852
16850
  return result;
16853
16851
  }
16854
- function histTransaction(history2, state, dispatch, redo2) {
16855
- let preserveItems = mustPreserveItems(state);
16856
- let histOptions = historyKey.get(state).spec.config;
16857
- let pop = (redo2 ? history2.undone : history2.done).popEvent(state, preserveItems);
16852
+ function histTransaction(history2, state2, dispatch, redo2) {
16853
+ let preserveItems = mustPreserveItems(state2);
16854
+ let histOptions = historyKey.get(state2).spec.config;
16855
+ let pop = (redo2 ? history2.undone : history2.done).popEvent(state2, preserveItems);
16858
16856
  if (!pop)
16859
16857
  return;
16860
16858
  let selection = pop.selection.resolve(pop.transform.doc);
16861
- let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);
16859
+ let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state2.selection.getBookmark(), histOptions, preserveItems);
16862
16860
  let newHist = new HistoryState(redo2 ? added : pop.remaining, redo2 ? pop.remaining : added, null, 0, -1);
16863
16861
  dispatch(pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist }).scrollIntoView());
16864
16862
  }
16865
16863
  let cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
16866
- function mustPreserveItems(state) {
16867
- let plugins2 = state.plugins;
16864
+ function mustPreserveItems(state2) {
16865
+ let plugins2 = state2.plugins;
16868
16866
  if (cachedPreserveItemsPlugins != plugins2) {
16869
16867
  cachedPreserveItems = false;
16870
16868
  cachedPreserveItemsPlugins = plugins2;
@@ -16889,8 +16887,8 @@ function history(config = {}) {
16889
16887
  init() {
16890
16888
  return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);
16891
16889
  },
16892
- apply(tr2, hist, state) {
16893
- return applyTransaction(hist, state, tr2, config);
16890
+ apply(tr2, hist, state2) {
16891
+ return applyTransaction(hist, state2, tr2, config);
16894
16892
  }
16895
16893
  },
16896
16894
  config,
@@ -16908,20 +16906,20 @@ function history(config = {}) {
16908
16906
  }
16909
16907
  });
16910
16908
  }
16911
- const undo = (state, dispatch) => {
16912
- let hist = historyKey.getState(state);
16909
+ const undo = (state2, dispatch) => {
16910
+ let hist = historyKey.getState(state2);
16913
16911
  if (!hist || hist.done.eventCount == 0)
16914
16912
  return false;
16915
16913
  if (dispatch)
16916
- histTransaction(hist, state, dispatch, false);
16914
+ histTransaction(hist, state2, dispatch, false);
16917
16915
  return true;
16918
16916
  };
16919
- const redo = (state, dispatch) => {
16920
- let hist = historyKey.getState(state);
16917
+ const redo = (state2, dispatch) => {
16918
+ let hist = historyKey.getState(state2);
16921
16919
  if (!hist || hist.undone.eventCount == 0)
16922
16920
  return false;
16923
16921
  if (dispatch)
16924
- histTransaction(hist, state, dispatch, true);
16922
+ histTransaction(hist, state2, dispatch, true);
16925
16923
  return true;
16926
16924
  };
16927
16925
  const pDOM = ["p", 0], blockquoteDOM = ["blockquote", 0], hrDOM = ["hr"], preDOM = ["pre", ["code", 0]], brDOM = ["br"];
@@ -17114,8 +17112,8 @@ const marks = {
17114
17112
  }
17115
17113
  };
17116
17114
  const schema = new Schema({ nodes, marks });
17117
- const _hoisted_1$I = ["id"];
17118
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
17115
+ const _hoisted_1$F = ["id"];
17116
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
17119
17117
  __name: "RTXEditor",
17120
17118
  props: {
17121
17119
  elementId: { default: Math.random().toString(36).substr(2, 9) },
@@ -17136,7 +17134,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17136
17134
  } catch (err) {
17137
17135
  content = { type: "doc", content: [] };
17138
17136
  }
17139
- const state = EditorState.create({
17137
+ const state2 = EditorState.create({
17140
17138
  doc: DOMParser.fromSchema(schema).schema.nodeFromJSON(content),
17141
17139
  plugins: [
17142
17140
  history(),
@@ -17144,7 +17142,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17144
17142
  keymap(baseKeymap)
17145
17143
  ]
17146
17144
  });
17147
- return state;
17145
+ return state2;
17148
17146
  };
17149
17147
  function handleChange(newState) {
17150
17148
  const dom = document.createElement("div");
@@ -17153,10 +17151,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17153
17151
  html.value = (dom == null ? void 0 : dom.innerHTML) || "";
17154
17152
  emit2("update:modelValue", html.value);
17155
17153
  }
17156
- const createEditorView = (state) => {
17154
+ const createEditorView = (state2) => {
17157
17155
  const editorDiv = document.getElementById(`canvas-${props2.elementId}`);
17158
17156
  view = new EditorView(editorDiv, {
17159
- state,
17157
+ state: state2,
17160
17158
  // editable: () => props.editable,
17161
17159
  dispatchTransaction(transaction) {
17162
17160
  const newState = view.state.apply(transaction);
@@ -17169,8 +17167,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17169
17167
  });
17170
17168
  };
17171
17169
  function loadContent() {
17172
- const state = createEditorStateFromHTML(props2.modelValue);
17173
- createEditorView(state);
17170
+ const state2 = createEditorStateFromHTML(props2.modelValue);
17171
+ createEditorView(state2);
17174
17172
  }
17175
17173
  watch(
17176
17174
  () => props2.modelValue,
@@ -17192,14 +17190,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17192
17190
  onClick: focusEditor,
17193
17191
  id: `canvas-${_ctx.elementId}`,
17194
17192
  onKeydown: _cache[0] || (_cache[0] = withKeys(withModifiers(($event) => _ctx.$emit("keydown.meta.enter"), ["meta"]), ["enter"]))
17195
- }, null, 40, _hoisted_1$I);
17193
+ }, null, 40, _hoisted_1$F);
17196
17194
  };
17197
17195
  }
17198
17196
  });
17199
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
17197
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
17200
17198
  __name: "MaterialIcon",
17201
17199
  props: {
17202
17200
  icon: {},
17201
+ name: {},
17203
17202
  size: {},
17204
17203
  color: {}
17205
17204
  },
@@ -17208,17 +17207,17 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
17208
17207
  return openBlock(), createElementBlock("div", {
17209
17208
  class: "bgl_icon-font",
17210
17209
  style: normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color })
17211
- }, toDisplayString(_ctx.icon), 5);
17210
+ }, toDisplayString(_ctx.icon || _ctx.name), 5);
17212
17211
  };
17213
17212
  }
17214
17213
  });
17215
- const _hoisted_1$H = { class: "full-nav" };
17216
- const _hoisted_2$y = { class: "nav-scroll" };
17217
- const _hoisted_3$o = { class: "nav-links-wrapper" };
17218
- const _hoisted_4$g = { class: "tooltip" };
17219
- const _hoisted_5$d = { class: "bot-buttons-wrapper" };
17220
- const _hoisted_6$9 = { class: "tooltip" };
17221
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
17214
+ const _hoisted_1$E = { class: "full-nav" };
17215
+ const _hoisted_2$x = { class: "nav-scroll" };
17216
+ const _hoisted_3$n = { class: "nav-links-wrapper" };
17217
+ const _hoisted_4$f = { class: "tooltip" };
17218
+ const _hoisted_5$c = { class: "bot-buttons-wrapper" };
17219
+ const _hoisted_6$8 = { class: "tooltip" };
17220
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
17222
17221
  __name: "NavBar",
17223
17222
  props: {
17224
17223
  footerLinks: { default: () => [] },
@@ -17242,14 +17241,14 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
17242
17241
  "aria-label": "Toggle Navigation",
17243
17242
  tabindex: "0"
17244
17243
  }, [
17245
- createVNode(unref(_sfc_main$F), {
17244
+ createVNode(unref(_sfc_main$H), {
17246
17245
  icon: "chevron_right",
17247
17246
  class: "top-arrow"
17248
17247
  })
17249
17248
  ], 32),
17250
- createElementVNode("div", _hoisted_1$H, [
17251
- createElementVNode("div", _hoisted_2$y, [
17252
- createElementVNode("div", _hoisted_3$o, [
17249
+ createElementVNode("div", _hoisted_1$E, [
17250
+ createElementVNode("div", _hoisted_2$x, [
17251
+ createElementVNode("div", _hoisted_3$n, [
17253
17252
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.links, (link) => {
17254
17253
  return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
17255
17254
  class: "nav-button",
@@ -17261,17 +17260,17 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
17261
17260
  }
17262
17261
  }, {
17263
17262
  default: withCtx(() => [
17264
- createVNode(unref(_sfc_main$F), {
17263
+ createVNode(unref(_sfc_main$H), {
17265
17264
  icon: link.icon
17266
17265
  }, null, 8, ["icon"]),
17267
- createElementVNode("div", _hoisted_4$g, toDisplayString(link.label), 1)
17266
+ createElementVNode("div", _hoisted_4$f, toDisplayString(link.label), 1)
17268
17267
  ]),
17269
17268
  _: 2
17270
17269
  }, 1032, ["to", "onClick"]);
17271
17270
  }), 128))
17272
17271
  ])
17273
17272
  ]),
17274
- createElementVNode("div", _hoisted_5$d, [
17273
+ createElementVNode("div", _hoisted_5$c, [
17275
17274
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.footerLinks, (link) => {
17276
17275
  return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
17277
17276
  class: "nav-button",
@@ -17283,10 +17282,10 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
17283
17282
  key: link.label
17284
17283
  }, {
17285
17284
  default: withCtx(() => [
17286
- createVNode(unref(_sfc_main$F), {
17285
+ createVNode(unref(_sfc_main$H), {
17287
17286
  icon: link.icon
17288
17287
  }, null, 8, ["icon"]),
17289
- createElementVNode("div", _hoisted_6$9, toDisplayString(link.label), 1)
17288
+ createElementVNode("div", _hoisted_6$8, toDisplayString(link.label), 1)
17290
17289
  ]),
17291
17290
  _: 2
17292
17291
  }, 1032, ["to", "onClick"]);
@@ -17305,16 +17304,16 @@ const _export_sfc = (sfc, props2) => {
17305
17304
  }
17306
17305
  return target;
17307
17306
  };
17308
- const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-727b754a"]]);
17309
- const _hoisted_1$G = {
17307
+ const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-727b754a"]]);
17308
+ const _hoisted_1$D = {
17310
17309
  key: 0,
17311
17310
  class: "loading"
17312
17311
  };
17313
- const _hoisted_2$x = {
17312
+ const _hoisted_2$w = {
17314
17313
  key: 1,
17315
17314
  class: "bgl_btn-flex"
17316
17315
  };
17317
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
17316
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
17318
17317
  __name: "Btn",
17319
17318
  props: {
17320
17319
  disabled: { type: Boolean, default: false },
@@ -17400,8 +17399,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
17400
17399
  })
17401
17400
  }, {
17402
17401
  default: withCtx(() => [
17403
- _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$G)) : (openBlock(), createElementBlock("div", _hoisted_2$x, [
17404
- _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$F), {
17402
+ _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_1$D)) : (openBlock(), createElementBlock("div", _hoisted_2$w, [
17403
+ _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
17405
17404
  key: 0,
17406
17405
  icon: _ctx.icon
17407
17406
  }, null, 8, ["icon"])) : createCommentVNode("", true),
@@ -17409,7 +17408,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
17409
17408
  !unref(slots)["default"] && _ctx.value ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
17410
17409
  createTextVNode(toDisplayString(_ctx.value), 1)
17411
17410
  ], 64)) : createCommentVNode("", true),
17412
- props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$F), {
17411
+ props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$H), {
17413
17412
  key: 2,
17414
17413
  icon: props2["icon.end"]
17415
17414
  }, null, 8, ["icon"])) : createCommentVNode("", true)
@@ -17420,10 +17419,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
17420
17419
  };
17421
17420
  }
17422
17421
  });
17423
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-0c8d9a95"]]);
17424
- const _hoisted_1$F = { class: "tool-bar" };
17425
- const _hoisted_2$w = { class: "modal-footer mt-3" };
17426
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
17422
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-0c8d9a95"]]);
17423
+ const _hoisted_1$C = { class: "tool-bar" };
17424
+ const _hoisted_2$v = { class: "modal-footer mt-3" };
17425
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
17427
17426
  __name: "Modal",
17428
17427
  props: {
17429
17428
  side: { type: Boolean },
@@ -17464,13 +17463,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
17464
17463
  onClick: _cache[1] || (_cache[1] = () => _ctx.dismissable ? closeModal() : ""),
17465
17464
  onKeydown: withKeys(closeModal, ["esc"])
17466
17465
  }, [
17467
- createVNode(unref(_sfc_main$q), {
17466
+ createVNode(unref(_sfc_main$t), {
17468
17467
  class: "modal",
17469
17468
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
17470
17469
  }, ["stop"]))
17471
17470
  }, {
17472
17471
  default: withCtx(() => [
17473
- createElementVNode("header", _hoisted_1$F, [
17472
+ createElementVNode("header", _hoisted_1$C, [
17474
17473
  renderSlot(_ctx.$slots, "toolbar"),
17475
17474
  createVNode(unref(Btn), {
17476
17475
  style: normalizeStyle({ float: _ctx.side ? "left" : "right" }),
@@ -17478,7 +17477,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
17478
17477
  icon: "close",
17479
17478
  onClick: closeModal
17480
17479
  }, null, 8, ["style"]),
17481
- _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$o), {
17480
+ _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$r), {
17482
17481
  key: 0,
17483
17482
  class: "modal-title",
17484
17483
  tag: "h3",
@@ -17486,7 +17485,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
17486
17485
  }, null, 8, ["label"])) : createCommentVNode("", true)
17487
17486
  ]),
17488
17487
  renderSlot(_ctx.$slots, "default"),
17489
- createElementVNode("footer", _hoisted_2$w, [
17488
+ createElementVNode("footer", _hoisted_2$v, [
17490
17489
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.actions, (action, i2) => {
17491
17490
  return openBlock(), createBlock(unref(Btn), mergeProps({
17492
17491
  key: i2,
@@ -17503,7 +17502,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
17503
17502
  };
17504
17503
  }
17505
17504
  });
17506
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
17505
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
17507
17506
  __name: "ModalForm",
17508
17507
  props: /* @__PURE__ */ mergeModels({
17509
17508
  side: { type: Boolean },
@@ -17560,7 +17559,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
17560
17559
  }
17561
17560
  __expose({ setFormValues });
17562
17561
  return (_ctx, _cache) => {
17563
- return openBlock(), createBlock(unref(_sfc_main$C), {
17562
+ return openBlock(), createBlock(unref(_sfc_main$E), {
17564
17563
  "onOnUpdate:isModalVisible": props2["onUpdate:isModalVisible"],
17565
17564
  side: _ctx.side,
17566
17565
  ref_key: "modal",
@@ -17569,7 +17568,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
17569
17568
  title: _ctx.title
17570
17569
  }, createSlots({
17571
17570
  default: withCtx(() => [
17572
- createVNode(unref(_sfc_main$h), {
17571
+ createVNode(unref(_sfc_main$l), {
17573
17572
  onSubmit: runSubmit,
17574
17573
  ref_key: "form",
17575
17574
  ref: form,
@@ -17611,12 +17610,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
17611
17610
  };
17612
17611
  }
17613
17612
  });
17614
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-7e6899c7"]]);
17615
- const _hoisted_1$E = { class: "accordion-item" };
17616
- const _hoisted_2$v = ["aria-expanded", "aria-controls"];
17617
- const _hoisted_3$n = { class: "accordion-label" };
17618
- const _hoisted_4$f = ["id", "aria-hidden"];
17619
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
17613
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
17614
+ const _hoisted_1$B = { class: "accordion-item" };
17615
+ const _hoisted_2$u = ["aria-expanded", "aria-controls"];
17616
+ const _hoisted_3$m = { class: "accordion-label" };
17617
+ const _hoisted_4$e = ["id", "aria-hidden"];
17618
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
17620
17619
  __name: "AccordionItem",
17621
17620
  props: {
17622
17621
  label: {},
@@ -17640,20 +17639,20 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
17640
17639
  accordionState.openItem = null;
17641
17640
  }
17642
17641
  return (_ctx, _cache) => {
17643
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
17642
+ return openBlock(), createElementBlock("div", _hoisted_1$B, [
17644
17643
  createElementVNode("button", {
17645
17644
  onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
17646
17645
  "aria-expanded": unref(open) ? "true" : "false",
17647
17646
  class: "accordion-head",
17648
17647
  "aria-controls": `accordion-body-${unref(id)}`
17649
17648
  }, [
17650
- createElementVNode("span", _hoisted_3$n, toDisplayString(_ctx.label), 1),
17649
+ createElementVNode("span", _hoisted_3$m, toDisplayString(_ctx.label), 1),
17651
17650
  createElementVNode("div", {
17652
17651
  class: normalizeClass(["accordion-icon", { open: unref(open) }])
17653
17652
  }, [
17654
- createVNode(unref(_sfc_main$F), { icon: "expand_more" })
17653
+ createVNode(unref(_sfc_main$H), { icon: "expand_more" })
17655
17654
  ], 2)
17656
- ], 8, _hoisted_2$v),
17655
+ ], 8, _hoisted_2$u),
17657
17656
  createVNode(Transition, { name: "expand" }, {
17658
17657
  default: withCtx(() => [
17659
17658
  unref(open) ? (openBlock(), createElementBlock("div", {
@@ -17663,7 +17662,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
17663
17662
  "aria-hidden": unref(open) ? "false" : "true"
17664
17663
  }, [
17665
17664
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
17666
- ], 8, _hoisted_4$f)) : createCommentVNode("", true)
17665
+ ], 8, _hoisted_4$e)) : createCommentVNode("", true)
17667
17666
  ]),
17668
17667
  _: 3
17669
17668
  })
@@ -17671,28 +17670,28 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
17671
17670
  };
17672
17671
  }
17673
17672
  });
17674
- const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-bf74738b"]]);
17675
- const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
17676
- const _hoisted_2$u = { class: "p-1" };
17677
- const _hoisted_3$m = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
17678
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
17673
+ const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
17674
+ const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
17675
+ const _hoisted_2$t = { class: "p-1" };
17676
+ const _hoisted_3$l = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
17677
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
17679
17678
  __name: "ListView",
17680
17679
  setup(__props) {
17681
17680
  return (_ctx, _cache) => {
17682
- return openBlock(), createElementBlock("div", _hoisted_1$D, [
17683
- createElementVNode("div", _hoisted_2$u, [
17681
+ return openBlock(), createElementBlock("div", _hoisted_1$A, [
17682
+ createElementVNode("div", _hoisted_2$t, [
17684
17683
  renderSlot(_ctx.$slots, "header")
17685
17684
  ]),
17686
- createElementVNode("div", _hoisted_3$m, [
17685
+ createElementVNode("div", _hoisted_3$l, [
17687
17686
  renderSlot(_ctx.$slots, "default")
17688
17687
  ])
17689
17688
  ]);
17690
17689
  };
17691
17690
  }
17692
17691
  });
17693
- const _hoisted_1$C = { class: "txt16 no-margin ellipsis" };
17694
- const _hoisted_2$t = { class: "txt14 no-margin txt-gray ellipsis" };
17695
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
17692
+ const _hoisted_1$z = { class: "txt16 no-margin ellipsis" };
17693
+ const _hoisted_2$s = { class: "txt14 no-margin txt-gray ellipsis" };
17694
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
17696
17695
  __name: "ListItem",
17697
17696
  props: {
17698
17697
  src: {},
@@ -17716,11 +17715,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17716
17715
  size: 40
17717
17716
  }, null, 8, ["name", "src"])) : createCommentVNode("", true),
17718
17717
  createElementVNode("div", null, [
17719
- createElementVNode("p", _hoisted_1$C, [
17718
+ createElementVNode("p", _hoisted_1$z, [
17720
17719
  createTextVNode(toDisplayString(_ctx.title) + " ", 1),
17721
17720
  renderSlot(_ctx.$slots, "default")
17722
17721
  ]),
17723
- createElementVNode("p", _hoisted_2$t, [
17722
+ createElementVNode("p", _hoisted_2$s, [
17724
17723
  createTextVNode(toDisplayString(_ctx.subtitle) + " ", 1),
17725
17724
  renderSlot(_ctx.$slots, "subtitle")
17726
17725
  ])
@@ -17731,81 +17730,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17731
17730
  };
17732
17731
  }
17733
17732
  });
17734
- const _hoisted_1$B = { class: "bgl_card tabs-top" };
17735
- const _hoisted_2$s = { class: "tabs grid auto-flow-columns fit-content" };
17736
- const _hoisted_3$l = ["onClick"];
17737
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
17738
- __name: "TabbedLayout",
17739
- props: {
17740
- title: {},
17741
- tabs: {},
17742
- modelValue: {},
17743
- router: {},
17744
- sideTabs: { type: Boolean }
17745
- },
17746
- emits: ["update:modelValue"],
17747
- setup(__props, { emit: __emit }) {
17748
- const emit2 = __emit;
17749
- let activeTab = ref();
17750
- const props2 = __props;
17751
- function changeTab(tab) {
17752
- var _a2;
17753
- activeTab.value = tab;
17754
- emit2("update:modelValue", activeTab.value);
17755
- if (!props2.router)
17756
- return;
17757
- void ((_a2 = props2.router) == null ? void 0 : _a2.push({
17758
- path: props2.router.currentRoute.value.path,
17759
- query: { ...props2.router.currentRoute.value.query, t: tab },
17760
- hash: props2.router.currentRoute.value.hash
17761
- }));
17762
- }
17763
- onMounted(() => {
17764
- var _a2;
17765
- const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
17766
- activeTab.value = firstTab;
17767
- });
17768
- return (_ctx, _cache) => {
17769
- return openBlock(), createElementBlock("div", {
17770
- class: normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
17771
- }, [
17772
- createElementVNode("div", _hoisted_1$B, [
17773
- renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
17774
- createElementVNode("div", _hoisted_2$s, [
17775
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab) => {
17776
- var _a2;
17777
- return openBlock(), createElementBlock("div", {
17778
- class: normalizeClass([{
17779
- active: tab === unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
17780
- }, "tab"]),
17781
- key: tab,
17782
- onClick: ($event) => changeTab(tab)
17783
- }, toDisplayString(tab), 11, _hoisted_3$l);
17784
- }), 128))
17785
- ])
17786
- ]),
17787
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs.filter((item) => item === unref(activeTab)), (tab) => {
17788
- return openBlock(), createElementBlock("div", {
17789
- class: "list-content",
17790
- key: tab
17791
- }, [
17792
- renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
17793
- ]);
17794
- }), 128))
17795
- ], 2);
17796
- };
17797
- }
17798
- });
17799
- const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-37337215"]]);
17800
- const _hoisted_1$A = { class: "comments-wrap" };
17733
+ const _hoisted_1$y = { class: "comments-wrap" };
17801
17734
  const _hoisted_2$r = { class: "comment-list" };
17802
17735
  const _hoisted_3$k = { class: "comment-top" };
17803
- const _hoisted_4$e = { class: "comment-owner" };
17804
- const _hoisted_5$c = { class: "comment-time" };
17805
- const _hoisted_6$8 = { class: "comment-actions" };
17806
- const _hoisted_7$4 = ["innerHTML"];
17807
- const _hoisted_8$2 = { class: "new-comment" };
17808
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
17736
+ const _hoisted_4$d = { class: "comment-owner" };
17737
+ const _hoisted_5$b = { class: "comment-time" };
17738
+ const _hoisted_6$7 = { class: "comment-actions" };
17739
+ const _hoisted_7$3 = ["innerHTML"];
17740
+ const _hoisted_8$1 = { class: "new-comment" };
17741
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
17809
17742
  __name: "Comments",
17810
17743
  props: {
17811
17744
  ref_table: {},
@@ -17848,7 +17781,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
17848
17781
  void fetchData();
17849
17782
  };
17850
17783
  return (_ctx, _cache) => {
17851
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
17784
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
17852
17785
  createElementVNode("div", _hoisted_2$r, [
17853
17786
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(comments), (comment) => {
17854
17787
  var _a2, _b, _c;
@@ -17860,22 +17793,22 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
17860
17793
  key: comment.id
17861
17794
  }, [
17862
17795
  createElementVNode("div", _hoisted_3$k, [
17863
- createElementVNode("div", _hoisted_4$e, toDisplayString(comment.sender.first_name) + " " + toDisplayString(comment.sender.last_name), 1),
17864
- createElementVNode("div", _hoisted_5$c, toDisplayString(comment.updated_at.split("T")[0]), 1),
17865
- createElementVNode("div", _hoisted_6$8, [
17866
- createVNode(unref(_sfc_main$F), {
17796
+ createElementVNode("div", _hoisted_4$d, toDisplayString(comment.sender.first_name) + " " + toDisplayString(comment.sender.last_name), 1),
17797
+ createElementVNode("div", _hoisted_5$b, toDisplayString(comment.updated_at.split("T")[0]), 1),
17798
+ createElementVNode("div", _hoisted_6$7, [
17799
+ createVNode(unref(_sfc_main$H), {
17867
17800
  size: 1,
17868
17801
  class: "edit",
17869
17802
  icon: "edit",
17870
17803
  onClick: ($event) => isRef(editComment) ? editComment.value = comment : editComment = comment
17871
17804
  }, null, 8, ["onClick"]),
17872
- createVNode(unref(_sfc_main$F), {
17805
+ createVNode(unref(_sfc_main$H), {
17873
17806
  size: 1.2,
17874
17807
  class: "delete",
17875
17808
  icon: "delete",
17876
17809
  onClick: ($event) => deleteComment(comment.id)
17877
17810
  }, null, 8, ["onClick"]),
17878
- createVNode(unref(_sfc_main$F), {
17811
+ createVNode(unref(_sfc_main$H), {
17879
17812
  size: 1.2,
17880
17813
  class: "save",
17881
17814
  icon: "save",
@@ -17883,7 +17816,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
17883
17816
  })
17884
17817
  ])
17885
17818
  ]),
17886
- unref(editComment) !== null && ((_c = unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (openBlock(), createBlock(unref(_sfc_main$G), {
17819
+ unref(editComment) !== null && ((_c = unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (openBlock(), createBlock(unref(_sfc_main$I), {
17887
17820
  key: 0,
17888
17821
  modelValue: unref(editComment).body_html,
17889
17822
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(editComment).body_html = $event),
@@ -17892,12 +17825,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
17892
17825
  key: 1,
17893
17826
  class: "editor-wrapper",
17894
17827
  innerHTML: comment.body_html
17895
- }, null, 8, _hoisted_7$4))
17828
+ }, null, 8, _hoisted_7$3))
17896
17829
  ], 2);
17897
17830
  }), 128))
17898
17831
  ]),
17899
- createElementVNode("div", _hoisted_8$2, [
17900
- createVNode(unref(_sfc_main$G), {
17832
+ createElementVNode("div", _hoisted_8$1, [
17833
+ createVNode(unref(_sfc_main$I), {
17901
17834
  class: "comment-input",
17902
17835
  modelValue: unref(bodyHtml),
17903
17836
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(bodyHtml) ? bodyHtml.value = $event : bodyHtml = $event),
@@ -17917,10 +17850,10 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
17917
17850
  };
17918
17851
  }
17919
17852
  });
17920
- const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-c4b41dc0"]]);
17921
- const _hoisted_1$z = { class: "page-top" };
17853
+ const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-c4b41dc0"]]);
17854
+ const _hoisted_1$x = { class: "page-top" };
17922
17855
  const _hoisted_2$q = { class: "top-title" };
17923
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
17856
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
17924
17857
  __name: "PageTitle",
17925
17858
  props: {
17926
17859
  value: {
@@ -17930,7 +17863,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
17930
17863
  },
17931
17864
  setup(__props) {
17932
17865
  return (_ctx, _cache) => {
17933
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
17866
+ return openBlock(), createElementBlock("div", _hoisted_1$x, [
17934
17867
  createElementVNode("h1", _hoisted_2$q, [
17935
17868
  renderSlot(_ctx.$slots, "default"),
17936
17869
  createTextVNode(" " + toDisplayString(__props.value), 1)
@@ -17939,14 +17872,14 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
17939
17872
  };
17940
17873
  }
17941
17874
  });
17942
- const _hoisted_1$y = { class: "table-list-wrap h-100" };
17875
+ const _hoisted_1$w = { class: "table-list-wrap h-100" };
17943
17876
  const _hoisted_2$p = { class: "infinite-wrapper" };
17944
17877
  const _hoisted_3$j = { class: "row first-row" };
17945
- const _hoisted_4$d = ["onClick"];
17946
- const _hoisted_5$b = { class: "flex" };
17947
- const _hoisted_6$7 = ["onClick"];
17948
- const _hoisted_7$3 = { key: 1 };
17949
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
17878
+ const _hoisted_4$c = ["onClick"];
17879
+ const _hoisted_5$a = { class: "flex" };
17880
+ const _hoisted_6$6 = ["onClick"];
17881
+ const _hoisted_7$2 = { key: 1 };
17882
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
17950
17883
  __name: "TableSchema",
17951
17884
  props: {
17952
17885
  data: {},
@@ -17980,7 +17913,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
17980
17913
  emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
17981
17914
  };
17982
17915
  return (_ctx, _cache) => {
17983
- return openBlock(), createElementBlock("div", _hoisted_1$y, [
17916
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
17984
17917
  createElementVNode("table", _hoisted_2$p, [
17985
17918
  createElementVNode("thead", _hoisted_3$j, [
17986
17919
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (field) => {
@@ -17989,18 +17922,18 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
17989
17922
  key: field.id,
17990
17923
  onClick: ($event) => sort2((field == null ? void 0 : field.id) || "")
17991
17924
  }, [
17992
- createElementVNode("div", _hoisted_5$b, [
17925
+ createElementVNode("div", _hoisted_5$a, [
17993
17926
  createTextVNode(toDisplayString(field.label || unref(keyToLabel)(field.id)) + " ", 1),
17994
17927
  createElementVNode("div", {
17995
17928
  class: normalizeClass(["list-arrows", { sorted: unref(sortField) === field.id }])
17996
17929
  }, [
17997
- createVNode(unref(_sfc_main$F), {
17930
+ createVNode(unref(_sfc_main$H), {
17998
17931
  class: normalizeClass({ desc: unref(sortDirection) === "DESC" }),
17999
17932
  icon: "keyboard_arrow_up"
18000
17933
  }, null, 8, ["class"])
18001
17934
  ], 2)
18002
17935
  ])
18003
- ], 8, _hoisted_4$d);
17936
+ ], 8, _hoisted_4$c);
18004
17937
  }), 128))
18005
17938
  ]),
18006
17939
  createElementVNode("tbody", {
@@ -18022,15 +17955,15 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
18022
17955
  key: 0,
18023
17956
  row,
18024
17957
  field
18025
- }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$3, [
18026
- createVNode(unref(_sfc_main$g), {
17958
+ }, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_7$2, [
17959
+ createVNode(unref(_sfc_main$k), {
18027
17960
  field,
18028
17961
  modelValue: row
18029
17962
  }, null, 8, ["field", "modelValue"])
18030
17963
  ]))
18031
17964
  ]);
18032
17965
  }), 128))
18033
- ], 8, _hoisted_6$7);
17966
+ ], 8, _hoisted_6$6);
18034
17967
  }), 128))
18035
17968
  ], 2)
18036
17969
  ])
@@ -18038,16 +17971,16 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
18038
17971
  };
18039
17972
  }
18040
17973
  });
18041
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-f3641508"]]);
18042
- const _sfc_main$t = {};
18043
- const _hoisted_1$x = { class: "flex space-between" };
17974
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f3641508"]]);
17975
+ const _sfc_main$w = {};
17976
+ const _hoisted_1$v = { class: "flex space-between" };
18044
17977
  function _sfc_render$1(_ctx, _cache) {
18045
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
17978
+ return openBlock(), createElementBlock("div", _hoisted_1$v, [
18046
17979
  renderSlot(_ctx.$slots, "default")
18047
17980
  ]);
18048
17981
  }
18049
- const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$1]]);
18050
- const _sfc_main$s = {};
17982
+ const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$1]]);
17983
+ const _sfc_main$v = {};
18051
17984
  function _sfc_render(_ctx, _cache) {
18052
17985
  const _component_router_view = resolveComponent("router-view");
18053
17986
  return openBlock(), createBlock(_component_router_view, null, {
@@ -18069,8 +18002,8 @@ function _sfc_render(_ctx, _cache) {
18069
18002
  _: 1
18070
18003
  });
18071
18004
  }
18072
- const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render]]);
18073
- const _hoisted_1$w = {
18005
+ const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render]]);
18006
+ const _hoisted_1$u = {
18074
18007
  key: 0,
18075
18008
  class: "data"
18076
18009
  };
@@ -18079,10 +18012,10 @@ const _hoisted_2$o = {
18079
18012
  class: "data-row"
18080
18013
  };
18081
18014
  const _hoisted_3$i = { class: "key" };
18082
- const _hoisted_4$c = { key: 1 };
18083
- const _hoisted_5$a = { class: "key" };
18084
- const _hoisted_6$6 = { class: "vlue" };
18085
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
18015
+ const _hoisted_4$b = { key: 1 };
18016
+ const _hoisted_5$9 = { class: "key" };
18017
+ const _hoisted_6$5 = { class: "vlue" };
18018
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
18086
18019
  __name: "DataPreview",
18087
18020
  props: /* @__PURE__ */ mergeModels({
18088
18021
  schema: {},
@@ -18096,8 +18029,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
18096
18029
  const itemData = useModel(__props, "data");
18097
18030
  return (_ctx, _cache) => {
18098
18031
  var _a2;
18099
- return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
18100
- _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$o), {
18032
+ return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$u, [
18033
+ _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$r), {
18101
18034
  key: 0,
18102
18035
  label: _ctx.title
18103
18036
  }, null, 8, ["label"])) : createCommentVNode("", true),
@@ -18107,7 +18040,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
18107
18040
  }, [
18108
18041
  unref(iffer)(field, itemData.value) ? (openBlock(), createElementBlock("div", _hoisted_2$o, [
18109
18042
  createElementVNode("div", _hoisted_3$i, toDisplayString((field == null ? void 0 : field.label) || unref(keyToLabel)(field.id)), 1),
18110
- createVNode(unref(_sfc_main$g), {
18043
+ createVNode(unref(_sfc_main$k), {
18111
18044
  field,
18112
18045
  modelValue: itemData.value,
18113
18046
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => itemData.value = $event)
@@ -18115,14 +18048,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
18115
18048
  ])) : createCommentVNode("", true)
18116
18049
  ], 64);
18117
18050
  }), 128)),
18118
- !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
18051
+ !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
18119
18052
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(Object.entries(itemData.value), ([key, value]) => {
18120
18053
  return openBlock(), createElementBlock("div", {
18121
18054
  class: "data-row",
18122
18055
  key
18123
18056
  }, [
18124
- createElementVNode("div", _hoisted_5$a, toDisplayString(unref(keyToLabel)(key)), 1),
18125
- createElementVNode("div", _hoisted_6$6, toDisplayString(value), 1)
18057
+ createElementVNode("div", _hoisted_5$9, toDisplayString(unref(keyToLabel)(key)), 1),
18058
+ createElementVNode("div", _hoisted_6$5, toDisplayString(value), 1)
18126
18059
  ]);
18127
18060
  }), 128))
18128
18061
  ])) : createCommentVNode("", true),
@@ -18131,8 +18064,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
18131
18064
  };
18132
18065
  }
18133
18066
  });
18134
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-bb2526f9"]]);
18135
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
18067
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-bb2526f9"]]);
18068
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
18136
18069
  __name: "Card",
18137
18070
  props: {
18138
18071
  thin: { type: Boolean },
@@ -18159,8 +18092,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
18159
18092
  };
18160
18093
  }
18161
18094
  });
18162
- const _hoisted_1$v = ["src", "alt"];
18163
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
18095
+ const _hoisted_1$t = ["src", "alt"];
18096
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
18164
18097
  __name: "Avatar",
18165
18098
  props: {
18166
18099
  fallback: {},
@@ -18178,7 +18111,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
18178
18111
  key: 0,
18179
18112
  src: _ctx.src,
18180
18113
  alt: _ctx.name
18181
- }, null, 8, _hoisted_1$v)) : (openBlock(), createElementBlock("p", {
18114
+ }, null, 8, _hoisted_1$t)) : (openBlock(), createElementBlock("p", {
18182
18115
  key: 1,
18183
18116
  style: normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
18184
18117
  }, toDisplayString(_ctx.fallback || unref(initials)(_ctx.name || "")), 5))
@@ -18186,8 +18119,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
18186
18119
  };
18187
18120
  }
18188
18121
  });
18189
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c38bc02a"]]);
18190
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
18122
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-c38bc02a"]]);
18123
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
18191
18124
  __name: "Title",
18192
18125
  props: {
18193
18126
  value: {
@@ -18215,13 +18148,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
18215
18148
  };
18216
18149
  }
18217
18150
  });
18218
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
18151
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
18219
18152
  __name: "Accordion",
18220
18153
  setup(__props) {
18221
- const state = reactive({
18154
+ const state2 = reactive({
18222
18155
  openItem: null
18223
18156
  });
18224
- provide("accordionState", state);
18157
+ provide("accordionState", state2);
18225
18158
  return (_ctx, _cache) => {
18226
18159
  return openBlock(), createElementBlock("div", null, [
18227
18160
  renderSlot(_ctx.$slots, "default")
@@ -18229,155 +18162,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18229
18162
  };
18230
18163
  }
18231
18164
  });
18232
- const _hoisted_1$u = ["onClick"];
18233
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
18234
- __name: "ComboBox",
18235
- props: {
18236
- options: {},
18237
- placeholder: {},
18238
- disabled: { type: Boolean },
18239
- modelValue: {},
18240
- searchable: { type: Boolean },
18241
- required: { type: Boolean },
18242
- label: {},
18243
- fullWidth: { type: Boolean }
18244
- },
18245
- emits: ["update:modelValue"],
18246
- setup(__props, { emit: __emit }) {
18247
- let open = ref(false);
18248
- const searchInput = ref(null);
18249
- const props2 = __props;
18250
- let selectedItem = ref();
18251
- let search = ref("");
18252
- const toggle = () => {
18253
- open.value = !open.value;
18254
- if (!open.value)
18255
- search.value = "";
18256
- if (open.value)
18257
- setTimeout(() => {
18258
- var _a2, _b, _c;
18259
- return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
18260
- }, 100);
18261
- };
18262
- const valueToLabel = (value) => {
18263
- if (!value)
18264
- return "";
18265
- const option2 = props2.options.find((option22) => {
18266
- if (typeof option22 === "string" || typeof option22 === "number")
18267
- return option22 === value;
18268
- return option22.value === value;
18269
- });
18270
- if (!option2)
18271
- return value;
18272
- return getLabel(option2);
18273
- };
18274
- const emit2 = __emit;
18275
- const getLabel = (option2) => {
18276
- if (typeof option2 === "string")
18277
- return option2;
18278
- if (typeof option2 === "number")
18279
- return `${option2}`;
18280
- return option2.label;
18281
- };
18282
- const isSelected = (option2) => {
18283
- if (typeof option2 === "string" || typeof option2 === "number")
18284
- return option2 === selectedItem.value;
18285
- return option2.value === selectedItem.value;
18286
- };
18287
- const filteredOptions = computed(() => props2.options.filter((option2) => {
18288
- const searchTerm = new RegExp(search.value, "gi");
18289
- if (typeof option2 === "string")
18290
- return option2.match(searchTerm);
18291
- if (typeof option2 === "number")
18292
- return `${option2}`.match(searchTerm);
18293
- return option2.label.match(searchTerm);
18294
- }));
18295
- const select2 = (option2) => {
18296
- if (typeof option2 === "string")
18297
- selectedItem.value = option2;
18298
- else if (typeof option2 === "number")
18299
- selectedItem.value = option2;
18300
- else
18301
- selectedItem.value = option2.value;
18302
- emit2("update:modelValue", selectedItem.value);
18303
- open.value = false;
18304
- };
18305
- watch(() => props2.modelValue, (value) => {
18306
- if (value !== selectedItem.value)
18307
- selectedItem.value = value;
18308
- }, { immediate: true });
18309
- return (_ctx, _cache) => {
18310
- return openBlock(), createBlock(unref(kt$1), {
18311
- placement: "bottom-start",
18312
- class: "bagel-input combobox"
18313
- }, {
18314
- popper: withCtx(({ hide }) => [
18315
- createVNode(unref(_sfc_main$q), {
18316
- thin: "",
18317
- class: "combobox-options",
18318
- style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
18319
- }, {
18320
- default: withCtx(() => [
18321
- _ctx.searchable ? (openBlock(), createBlock(unref(TextInput), {
18322
- key: 0,
18323
- ref_key: "searchInput",
18324
- ref: searchInput,
18325
- dense: "",
18326
- placeholder: "Search",
18327
- icon: "search",
18328
- modelValue: unref(search),
18329
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(search) ? search.value = $event : search = $event)
18330
- }, null, 8, ["modelValue"])) : createCommentVNode("", true),
18331
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option2, i2) => {
18332
- return openBlock(), createElementBlock("div", {
18333
- class: normalizeClass(["combobox-option", { selected: option2 === unref(selectedItem) }]),
18334
- key: `${option2}${i2}`,
18335
- onClick: () => {
18336
- select2(option2);
18337
- hide();
18338
- }
18339
- }, [
18340
- createElementVNode("span", null, toDisplayString(getLabel(option2)), 1),
18341
- isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$F), {
18342
- key: 0,
18343
- icon: "check"
18344
- })) : createCommentVNode("", true)
18345
- ], 10, _hoisted_1$u);
18346
- }), 128)),
18347
- renderSlot(_ctx.$slots, "last", {}, void 0, true)
18348
- ]),
18349
- _: 2
18350
- }, 1032, ["style"])
18351
- ]),
18352
- default: withCtx(() => [
18353
- createElementVNode("label", null, [
18354
- createTextVNode(toDisplayString(_ctx.label) + " ", 1),
18355
- createElementVNode("button", {
18356
- type: "button",
18357
- class: "combobox-btn",
18358
- onClick: toggle
18359
- }, [
18360
- createTextVNode(toDisplayString(valueToLabel(unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
18361
- createVNode(unref(_sfc_main$F), normalizeProps(guardReactiveProps({ "icon": unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
18362
- ]),
18363
- _ctx.required ? withDirectives((openBlock(), createElementBlock("input", {
18364
- key: 0,
18365
- style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
18366
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
18367
- required: ""
18368
- }, null, 512)), [
18369
- [vModelText, unref(selectedItem)]
18370
- ]) : createCommentVNode("", true)
18371
- ])
18372
- ]),
18373
- _: 3
18374
- });
18375
- };
18376
- }
18377
- });
18378
- const ComboBox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-220e98d7"]]);
18379
- const _hoisted_1$t = ["dismissable"];
18380
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
18165
+ const _hoisted_1$s = ["dismissable"];
18166
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
18381
18167
  __name: "Alert",
18382
18168
  props: {
18383
18169
  message: {},
@@ -18397,7 +18183,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
18397
18183
  class: normalizeClass(["alert", [_ctx.type]]),
18398
18184
  dismissable: _ctx.dismissable
18399
18185
  }, [
18400
- createVNode(unref(_sfc_main$F), {
18186
+ createVNode(unref(_sfc_main$H), {
18401
18187
  class: "alert_icon",
18402
18188
  icon: _ctx.type,
18403
18189
  size: 2,
@@ -18411,12 +18197,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
18411
18197
  class: "alert_close",
18412
18198
  icon: "close"
18413
18199
  })
18414
- ], 10, _hoisted_1$t)) : createCommentVNode("", true);
18200
+ ], 10, _hoisted_1$s)) : createCommentVNode("", true);
18415
18201
  };
18416
18202
  }
18417
18203
  });
18418
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-94bfcb05"]]);
18419
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
18204
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-94bfcb05"]]);
18205
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
18420
18206
  __name: "Badge",
18421
18207
  props: {
18422
18208
  color: {},
@@ -18431,13 +18217,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
18431
18217
  return openBlock(), createElementBlock("div", {
18432
18218
  class: normalizeClass(["pill", [_ctx.color]])
18433
18219
  }, [
18434
- _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$F), {
18220
+ _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
18435
18221
  key: 0,
18436
18222
  class: "inline",
18437
18223
  icon: _ctx.icon
18438
18224
  }, null, 8, ["icon"])) : createCommentVNode("", true),
18439
18225
  createTextVNode(" " + toDisplayString(_ctx.text) + " ", 1),
18440
- props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$F), {
18226
+ props2["icon.end"] ? (openBlock(), createBlock(unref(_sfc_main$H), {
18441
18227
  key: 1,
18442
18228
  class: "inline",
18443
18229
  icon: props2["icon.end"]
@@ -18446,11 +18232,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
18446
18232
  };
18447
18233
  }
18448
18234
  });
18449
- const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-10743b06"]]);
18450
- const _hoisted_1$s = { class: "bgl_vid" };
18235
+ const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-10743b06"]]);
18236
+ const _hoisted_1$r = { class: "bgl_vid" };
18451
18237
  const _hoisted_2$n = ["src"];
18452
18238
  const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
18453
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
18239
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18454
18240
  __name: "BglVideo",
18455
18241
  props: {
18456
18242
  src: {},
@@ -18489,7 +18275,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
18489
18275
  });
18490
18276
  console.log("Video URL:", videoUrl.value);
18491
18277
  return (_ctx, _cache) => {
18492
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
18278
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
18493
18279
  embedType.value ? (openBlock(), createElementBlock("iframe", {
18494
18280
  key: 0,
18495
18281
  src: videoUrl.value,
@@ -18511,13 +18297,13 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
18511
18297
  };
18512
18298
  }
18513
18299
  });
18514
- const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-23835d69"]]);
18515
- const _hoisted_1$r = {
18300
+ const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-23835d69"]]);
18301
+ const _hoisted_1$q = {
18516
18302
  key: 0,
18517
18303
  class: "blocker"
18518
18304
  };
18519
18305
  const _hoisted_2$m = { class: "Handlers" };
18520
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
18306
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18521
18307
  __name: "Carousel",
18522
18308
  props: {
18523
18309
  autoHeight: {
@@ -18667,7 +18453,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18667
18453
  ref_key: "bglSlider",
18668
18454
  ref: bglSlider
18669
18455
  }, [
18670
- unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$r)) : createCommentVNode("", true),
18456
+ unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$q)) : createCommentVNode("", true),
18671
18457
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
18672
18458
  ], 34),
18673
18459
  createElementVNode("div", _hoisted_2$m, [
@@ -18682,8 +18468,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18682
18468
  };
18683
18469
  }
18684
18470
  });
18685
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-7e8d16cb"]]);
18686
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
18471
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-7e8d16cb"]]);
18472
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
18687
18473
  __name: "BglForm",
18688
18474
  props: {
18689
18475
  label: {},
@@ -18722,10 +18508,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
18722
18508
  const clearForm = () => Object.assign(data2.value, {});
18723
18509
  let formStatus = ref("idle");
18724
18510
  const runSubmit = () => {
18725
- console.log("runSubmit");
18511
+ var _a2;
18726
18512
  try {
18727
18513
  validateForm();
18728
- props2.onSubmit(data2.value);
18514
+ (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
18729
18515
  clearForm();
18730
18516
  formStatus.value = "success";
18731
18517
  } catch (e) {
@@ -18757,7 +18543,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
18757
18543
  return (_ctx, _cache) => {
18758
18544
  return openBlock(), createElementBlock(Fragment$1, null, [
18759
18545
  _ctx.id ? (openBlock(true), createElementBlock(Fragment$1, { key: 0 }, renderList(_ctx.schema, (field, i2) => {
18760
- return openBlock(), createBlock(unref(_sfc_main$g), {
18546
+ return openBlock(), createBlock(unref(_sfc_main$k), {
18761
18547
  key: field.id || `${i2}p`,
18762
18548
  field,
18763
18549
  modelValue: data2.value,
@@ -18769,32 +18555,28 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
18769
18555
  ref: form,
18770
18556
  onSubmit: withModifiers(runSubmit, ["prevent"])
18771
18557
  }, [
18772
- _ctx.label ? (openBlock(), createBlock(unref(_sfc_main$o), {
18558
+ _ctx.label ? (openBlock(), createBlock(unref(_sfc_main$r), {
18773
18559
  key: 0,
18774
18560
  tag: "h4",
18775
18561
  label: _ctx.label
18776
18562
  }, null, 8, ["label"])) : createCommentVNode("", true),
18777
18563
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.schema, (field, i2) => {
18778
- return openBlock(), createBlock(unref(_sfc_main$g), {
18564
+ return openBlock(), createBlock(unref(_sfc_main$k), {
18779
18565
  key: field.id || `${i2}p`,
18780
18566
  field,
18781
18567
  modelValue: data2.value,
18782
18568
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data2.value = $event)
18783
18569
  }, null, 8, ["field", "modelValue"]);
18784
18570
  }), 128)),
18785
- renderSlot(_ctx.$slots, "submit"),
18786
- createElementVNode("button", { onClick: runSubmit }, " Click ")
18571
+ renderSlot(_ctx.$slots, "submit")
18787
18572
  ], 544)) : createCommentVNode("", true),
18788
18573
  unref(formStatus) === "success" ? renderSlot(_ctx.$slots, "success", { key: 2 }) : createCommentVNode("", true),
18789
- unref(formStatus) === "error" ? renderSlot(_ctx.$slots, "error", {
18790
- key: 3,
18791
- message: _ctx.error
18792
- }) : createCommentVNode("", true)
18574
+ unref(formStatus) === "error" ? renderSlot(_ctx.$slots, "error", { key: 3 }) : createCommentVNode("", true)
18793
18575
  ], 64);
18794
18576
  };
18795
18577
  }
18796
18578
  });
18797
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
18579
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
18798
18580
  __name: "BglField",
18799
18581
  props: {
18800
18582
  field: {},
@@ -18807,7 +18589,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
18807
18589
  if (props2.field.$el === "text")
18808
18590
  return TextInput;
18809
18591
  if (props2.field.$el === "select")
18810
- return ComboBox;
18592
+ return SelectInput;
18811
18593
  if (props2.field.$el === "toggle")
18812
18594
  return ToggleInput;
18813
18595
  if (props2.field.$el === "check")
@@ -18885,7 +18667,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
18885
18667
  }
18886
18668
  });
18887
18669
  const _withScopeId$1 = (n2) => (pushScopeId("data-v-e8219826"), n2 = n2(), popScopeId(), n2);
18888
- const _hoisted_1$q = ["title"];
18670
+ const _hoisted_1$p = ["title"];
18889
18671
  const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("svg", {
18890
18672
  xmlns: "http://www.w3.org/2000/svg",
18891
18673
  height: "24",
@@ -18897,8 +18679,8 @@ const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ create
18897
18679
  const _hoisted_3$g = [
18898
18680
  _hoisted_2$l
18899
18681
  ];
18900
- const _hoisted_4$b = ["required", "id"];
18901
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
18682
+ const _hoisted_4$a = ["required", "id"];
18683
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
18902
18684
  __name: "CheckInput",
18903
18685
  props: /* @__PURE__ */ mergeModels({
18904
18686
  label: {},
@@ -18928,18 +18710,18 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
18928
18710
  id: _ctx.id,
18929
18711
  type: "checkbox",
18930
18712
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => checked.value = $event)
18931
- }, null, 8, _hoisted_4$b), [
18713
+ }, null, 8, _hoisted_4$a), [
18932
18714
  [vModelCheckbox, checked.value]
18933
18715
  ]),
18934
18716
  renderSlot(_ctx.$slots, "label", {}, () => [
18935
18717
  createTextVNode(toDisplayString(_ctx.label), 1)
18936
18718
  ], true)
18937
18719
  ])
18938
- ], 10, _hoisted_1$q);
18720
+ ], 10, _hoisted_1$p);
18939
18721
  };
18940
18722
  }
18941
18723
  });
18942
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-e8219826"]]);
18724
+ const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e8219826"]]);
18943
18725
  function toDate(argument) {
18944
18726
  const argStr = Object.prototype.toString.call(argument);
18945
18727
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
@@ -23809,7 +23591,7 @@ const ar = ({
23809
23591
  Object.keys(d2).filter((p2) => ["right-sidebar", "left-sidebar"].includes(p2)).map((p2) => [p2, d2[p2]])
23810
23592
  )
23811
23593
  );
23812
- render$f(o2, z2), M.value = (B2 = o2.el) == null ? void 0 : B2.getBoundingClientRect(), render$f(null, z2), s2.removeChild(z2);
23594
+ render$e(o2, z2), M.value = (B2 = o2.el) == null ? void 0 : B2.getBoundingClientRect(), render$e(null, z2), s2.removeChild(z2);
23813
23595
  }
23814
23596
  };
23815
23597
  }, ft = [
@@ -27548,9 +27330,9 @@ const ar = ({
27548
27330
  Object.entries(Mo).forEach(([e, t]) => {
27549
27331
  e !== "default" && (Va[e] = t);
27550
27332
  });
27551
- const _hoisted_1$p = ["title"];
27333
+ const _hoisted_1$o = ["title"];
27552
27334
  const _hoisted_2$k = { key: 0 };
27553
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
27335
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
27554
27336
  __name: "DateInput",
27555
27337
  props: {
27556
27338
  label: {},
@@ -27596,14 +27378,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
27596
27378
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
27597
27379
  "enable-time-picker": _ctx.enableTime
27598
27380
  }, _ctx.extraProps), null, 16, ["modelValue", "enable-time-picker"])
27599
- ], 10, _hoisted_1$p);
27381
+ ], 10, _hoisted_1$o);
27600
27382
  };
27601
27383
  }
27602
27384
  });
27603
- const _hoisted_1$o = ["title"];
27385
+ const _hoisted_1$n = ["title"];
27604
27386
  const _hoisted_2$j = { key: 0 };
27605
27387
  const _hoisted_3$f = ["value", "placeholder"];
27606
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
27388
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
27607
27389
  __name: "JSONInput",
27608
27390
  props: {
27609
27391
  description: { default: "" },
@@ -27635,1384 +27417,168 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
27635
27417
  class: normalizeClass({ "no-edit": !_ctx.editMode }),
27636
27418
  placeholder: _ctx.placeholder
27637
27419
  }, null, 42, _hoisted_3$f)
27638
- ], 10, _hoisted_1$o);
27420
+ ], 10, _hoisted_1$n);
27639
27421
  };
27640
27422
  }
27641
27423
  });
27642
- const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-1fc4f739"]]);
27643
- function isEmpty(opt) {
27644
- if (opt === 0)
27645
- return false;
27646
- if (Array.isArray(opt) && opt.length === 0)
27647
- return true;
27648
- return !opt;
27649
- }
27650
- function not(fun) {
27651
- return (...params) => !fun(...params);
27652
- }
27653
- function includes(str, query) {
27654
- if (str === void 0)
27655
- str = "undefined";
27656
- if (str === null)
27657
- str = "null";
27658
- if (str === false)
27659
- str = "false";
27660
- const text = str.toString().toLowerCase();
27661
- return text.indexOf(query.trim()) !== -1;
27662
- }
27663
- function filterOptions(options, search, label, customLabel) {
27664
- return search ? options.filter((option2) => includes(customLabel(option2, label), search)).sort((a2, b2) => customLabel(a2, label).length - customLabel(b2, label).length) : options;
27665
- }
27666
- function stripGroups(options) {
27667
- return options.filter((option2) => !option2.$isLabel);
27668
- }
27669
- function flattenOptions(values3, label) {
27670
- return (options) => options.reduce((prev, curr) => {
27671
- if (curr[values3] && curr[values3].length) {
27672
- prev.push({
27673
- $groupLabel: curr[label],
27674
- $isLabel: true
27675
- });
27676
- return prev.concat(curr[values3]);
27677
- }
27678
- return prev;
27679
- }, []);
27680
- }
27681
- function filterGroups(search, label, values3, groupLabel, customLabel) {
27682
- return (groups) => groups.map((group) => {
27683
- if (!group[values3]) {
27684
- console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`);
27685
- return [];
27686
- }
27687
- const groupOptions = filterOptions(group[values3], search, label, customLabel);
27688
- return groupOptions.length ? {
27689
- [groupLabel]: group[groupLabel],
27690
- [values3]: groupOptions
27691
- } : [];
27692
- });
27693
- }
27694
- const flow = (...fns) => (x2) => fns.reduce((v2, f2) => f2(v2), x2);
27695
- var multiselectMixin = {
27696
- data() {
27697
- return {
27698
- search: "",
27699
- isOpen: false,
27700
- preferredOpenDirection: "below",
27701
- optimizedHeight: this.maxHeight
27702
- };
27703
- },
27704
- props: {
27705
- /**
27706
- * Decide whether to filter the results based on search query.
27707
- * Useful for async filtering, where we search through more complex data.
27708
- * @type {Boolean}
27709
- */
27710
- internalSearch: {
27711
- type: Boolean,
27712
- default: true
27713
- },
27714
- /**
27715
- * Array of available options: Objects, Strings or Integers.
27716
- * If array of objects, visible label will default to option.label.
27717
- * If `labal` prop is passed, label will equal option['label']
27718
- * @type {Array}
27719
- */
27720
- options: {
27721
- type: Array,
27722
- required: true
27723
- },
27724
- /**
27725
- * Equivalent to the `multiple` attribute on a `<select>` input.
27726
- * @default false
27727
- * @type {Boolean}
27728
- */
27729
- multiple: {
27730
- type: Boolean,
27731
- default: false
27732
- },
27733
- /**
27734
- * Key to compare objects
27735
- * @default 'id'
27736
- * @type {String}
27737
- */
27738
- trackBy: {
27739
- type: String
27740
- },
27741
- /**
27742
- * Label to look for in option Object
27743
- * @default 'label'
27744
- * @type {String}
27745
- */
27746
- label: {
27747
- type: String
27748
- },
27749
- /**
27750
- * Enable/disable search in options
27751
- * @default true
27752
- * @type {Boolean}
27753
- */
27754
- searchable: {
27755
- type: Boolean,
27756
- default: true
27757
- },
27758
- /**
27759
- * Clear the search input after `)
27760
- * @default true
27761
- * @type {Boolean}
27762
- */
27763
- clearOnSelect: {
27764
- type: Boolean,
27765
- default: true
27766
- },
27767
- /**
27768
- * Hide already selected options
27769
- * @default false
27770
- * @type {Boolean}
27771
- */
27772
- hideSelected: {
27773
- type: Boolean,
27774
- default: false
27775
- },
27776
- /**
27777
- * Equivalent to the `placeholder` attribute on a `<select>` input.
27778
- * @default 'Select option'
27779
- * @type {String}
27780
- */
27781
- placeholder: {
27782
- type: String,
27783
- default: "Select option"
27784
- },
27785
- /**
27786
- * Allow to remove all selected values
27787
- * @default true
27788
- * @type {Boolean}
27789
- */
27790
- allowEmpty: {
27791
- type: Boolean,
27792
- default: true
27793
- },
27794
- /**
27795
- * Reset this.internalValue, this.search after this.internalValue changes.
27796
- * Useful if want to create a stateless dropdown.
27797
- * @default false
27798
- * @type {Boolean}
27799
- */
27800
- resetAfter: {
27801
- type: Boolean,
27802
- default: false
27803
- },
27804
- /**
27805
- * Enable/disable closing after selecting an option
27806
- * @default true
27807
- * @type {Boolean}
27808
- */
27809
- closeOnSelect: {
27810
- type: Boolean,
27811
- default: true
27812
- },
27813
- /**
27814
- * Function to interpolate the custom label
27815
- * @default false
27816
- * @type {Function}
27817
- */
27818
- customLabel: {
27819
- type: Function,
27820
- default(option2, label) {
27821
- if (isEmpty(option2))
27822
- return "";
27823
- return label ? option2[label] : option2;
27824
- }
27825
- },
27826
- /**
27827
- * Disable / Enable tagging
27828
- * @default false
27829
- * @type {Boolean}
27830
- */
27831
- taggable: {
27832
- type: Boolean,
27833
- default: false
27834
- },
27835
- /**
27836
- * String to show when highlighting a potential tag
27837
- * @default 'Press enter to create a tag'
27838
- * @type {String}
27839
- */
27840
- tagPlaceholder: {
27841
- type: String,
27842
- default: "Press enter to create a tag"
27843
- },
27844
- /**
27845
- * By default new tags will appear above the search results.
27846
- * Changing to 'bottom' will revert this behaviour
27847
- * and will proritize the search results
27848
- * @default 'top'
27849
- * @type {String}
27850
- */
27851
- tagPosition: {
27852
- type: String,
27853
- default: "top"
27854
- },
27855
- /**
27856
- * Number of allowed selected options. No limit if 0.
27857
- * @default 0
27858
- * @type {Number}
27859
- */
27860
- max: {
27861
- type: [Number, Boolean],
27862
- default: false
27863
- },
27864
- /**
27865
- * Will be passed with all events as second param.
27866
- * Useful for identifying events origin.
27867
- * @default null
27868
- * @type {String|Integer}
27869
- */
27870
- id: {
27871
- default: null
27872
- },
27873
- /**
27874
- * Limits the options displayed in the dropdown
27875
- * to the first X options.
27876
- * @default 1000
27877
- * @type {Integer}
27878
- */
27879
- optionsLimit: {
27880
- type: Number,
27881
- default: 1e3
27882
- },
27883
- /**
27884
- * Name of the property containing
27885
- * the group values
27886
- * @default 1000
27887
- * @type {String}
27888
- */
27889
- groupValues: {
27890
- type: String
27891
- },
27892
- /**
27893
- * Name of the property containing
27894
- * the group label
27895
- * @default 1000
27896
- * @type {String}
27897
- */
27898
- groupLabel: {
27899
- type: String
27900
- },
27901
- /**
27902
- * Allow to select all group values
27903
- * by selecting the group label
27904
- * @default false
27905
- * @type {Boolean}
27906
- */
27907
- groupSelect: {
27908
- type: Boolean,
27909
- default: false
27910
- },
27911
- /**
27912
- * Array of keyboard keys to block
27913
- * when selecting
27914
- * @default 1000
27915
- * @type {String}
27916
- */
27917
- blockKeys: {
27918
- type: Array,
27919
- default() {
27920
- return [];
27921
- }
27922
- },
27923
- /**
27924
- * Prevent from wiping up the search value
27925
- * @default false
27926
- * @type {Boolean}
27927
- */
27928
- preserveSearch: {
27929
- type: Boolean,
27930
- default: false
27931
- },
27932
- /**
27933
- * Select 1st options if value is empty
27934
- * @default false
27935
- * @type {Boolean}
27936
- */
27937
- preselectFirst: {
27938
- type: Boolean,
27939
- default: false
27940
- },
27941
- /**
27942
- * Prevent autofocus
27943
- * @default false
27944
- * @type {Boolean}
27945
- */
27946
- preventAutofocus: {
27947
- type: Boolean,
27948
- default: false
27949
- }
27950
- },
27951
- mounted() {
27952
- if (!this.multiple && this.max) {
27953
- console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.");
27954
- }
27955
- if (this.preselectFirst && !this.internalValue.length && this.options.length) {
27956
- this.select(this.filteredOptions[0]);
27957
- }
27958
- },
27959
- computed: {
27960
- internalValue() {
27961
- return this.modelValue || this.modelValue === 0 ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] : [];
27962
- },
27963
- filteredOptions() {
27964
- const search = this.search || "";
27965
- const normalizedSearch = search.toLowerCase().trim();
27966
- let options = this.options.concat();
27967
- if (this.internalSearch) {
27968
- options = this.groupValues ? this.filterAndFlat(options, normalizedSearch, this.label) : filterOptions(options, normalizedSearch, this.label, this.customLabel);
27969
- } else {
27970
- options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options;
27971
- }
27972
- options = this.hideSelected ? options.filter(not(this.isSelected)) : options;
27973
- if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {
27974
- if (this.tagPosition === "bottom") {
27975
- options.push({ isTag: true, label: search });
27976
- } else {
27977
- options.unshift({ isTag: true, label: search });
27978
- }
27979
- }
27980
- return options.slice(0, this.optionsLimit);
27981
- },
27982
- valueKeys() {
27983
- if (this.trackBy) {
27984
- return this.internalValue.map((element) => element[this.trackBy]);
27985
- } else {
27986
- return this.internalValue;
27987
- }
27988
- },
27989
- optionKeys() {
27990
- const options = this.groupValues ? this.flatAndStrip(this.options) : this.options;
27991
- return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase());
27992
- },
27993
- currentOptionLabel() {
27994
- return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
27995
- }
27996
- },
27997
- watch: {
27998
- internalValue: {
27999
- handler() {
28000
- if (this.resetAfter && this.internalValue.length) {
28001
- this.search = "";
28002
- this.$emit("update:modelValue", this.multiple ? [] : null);
28003
- }
28004
- },
28005
- deep: true
28006
- },
28007
- search() {
28008
- this.$emit("search-change", this.search);
28009
- }
28010
- },
28011
- emits: ["open", "search-change", "close", "select", "update:modelValue", "remove", "tag"],
28012
- methods: {
28013
- /**
28014
- * Returns the internalValue in a way it can be emited to the parent
28015
- * @returns {Object||Array||String||Integer}
28016
- */
28017
- getValue() {
28018
- return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
28019
- },
28020
- /**
28021
- * Filters and then flattens the options list
28022
- * @param {Array}
28023
- * @return {Array} returns a filtered and flat options list
28024
- */
28025
- filterAndFlat(options, search, label) {
28026
- return flow(
28027
- filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),
28028
- flattenOptions(this.groupValues, this.groupLabel)
28029
- )(options);
28030
- },
28031
- /**
28032
- * Flattens and then strips the group labels from the options list
28033
- * @param {Array}
28034
- * @return {Array} returns a flat options list without group labels
28035
- */
28036
- flatAndStrip(options) {
28037
- return flow(
28038
- flattenOptions(this.groupValues, this.groupLabel),
28039
- stripGroups
28040
- )(options);
28041
- },
28042
- /**
28043
- * Updates the search value
28044
- * @param {String}
28045
- */
28046
- updateSearch(query) {
28047
- this.search = query;
28048
- },
28049
- /**
28050
- * Finds out if the given query is already present
28051
- * in the available options
28052
- * @param {String}
28053
- * @return {Boolean} returns true if element is available
28054
- */
28055
- isExistingOption(query) {
28056
- return !this.options ? false : this.optionKeys.indexOf(query) > -1;
28057
- },
28058
- /**
28059
- * Finds out if the given element is already present
28060
- * in the result value
28061
- * @param {Object||String||Integer} option passed element to check
28062
- * @returns {Boolean} returns true if element is selected
28063
- */
28064
- isSelected(option2) {
28065
- const opt = this.trackBy ? option2[this.trackBy] : option2;
28066
- return this.valueKeys.indexOf(opt) > -1;
28067
- },
28068
- /**
28069
- * Finds out if the given option is disabled
28070
- * @param {Object||String||Integer} option passed element to check
28071
- * @returns {Boolean} returns true if element is disabled
28072
- */
28073
- isOptionDisabled(option2) {
28074
- return !!option2.$isDisabled;
28075
- },
28076
- /**
28077
- * Returns empty string when options is null/undefined
28078
- * Returns tag query if option is tag.
28079
- * Returns the customLabel() results and casts it to string.
28080
- *
28081
- * @param {Object||String||Integer} Passed option
28082
- * @returns {Object||String}
28083
- */
28084
- getOptionLabel(option2) {
28085
- if (isEmpty(option2))
28086
- return "";
28087
- if (option2.isTag)
28088
- return option2.label;
28089
- if (option2.$isLabel)
28090
- return option2.$groupLabel;
28091
- const label = this.customLabel(option2, this.label);
28092
- if (isEmpty(label))
28093
- return "";
28094
- return label;
28095
- },
28096
- /**
28097
- * Add the given option to the list of selected options
28098
- * or sets the option as the selected option.
28099
- * If option is already selected -> remove it from the results.
28100
- *
28101
- * @param {Object||String||Integer} option to select/deselect
28102
- * @param {Boolean} block removing
28103
- */
28104
- select(option2, key) {
28105
- if (option2.$isLabel && this.groupSelect) {
28106
- this.selectGroup(option2);
28107
- return;
28108
- }
28109
- if (this.blockKeys.indexOf(key) !== -1 || this.disabled || option2.$isDisabled || option2.$isLabel)
28110
- return;
28111
- if (this.max && this.multiple && this.internalValue.length === this.max)
28112
- return;
28113
- if (key === "Tab" && !this.pointerDirty)
28114
- return;
28115
- if (option2.isTag) {
28116
- this.$emit("tag", option2.label, this.id);
28117
- this.search = "";
28118
- if (this.closeOnSelect && !this.multiple)
28119
- this.deactivate();
28120
- } else {
28121
- const isSelected = this.isSelected(option2);
28122
- if (isSelected) {
28123
- if (key !== "Tab")
28124
- this.removeElement(option2);
28125
- return;
28126
- }
28127
- if (this.multiple) {
28128
- this.$emit("update:modelValue", this.internalValue.concat([option2]));
28129
- } else {
28130
- this.$emit("update:modelValue", option2);
28131
- }
28132
- this.$emit("select", option2, this.id);
28133
- if (this.clearOnSelect)
28134
- this.search = "";
28135
- }
28136
- if (this.closeOnSelect)
28137
- this.deactivate();
28138
- },
28139
- /**
28140
- * Add the given group options to the list of selected options
28141
- * If all group optiona are already selected -> remove it from the results.
28142
- *
28143
- * @param {Object||String||Integer} group to select/deselect
28144
- */
28145
- selectGroup(selectedGroup) {
28146
- const group = this.options.find((option2) => {
28147
- return option2[this.groupLabel] === selectedGroup.$groupLabel;
28148
- });
28149
- if (!group)
28150
- return;
28151
- if (this.wholeGroupSelected(group)) {
28152
- this.$emit("remove", group[this.groupValues], this.id);
28153
- const newValue = this.internalValue.filter(
28154
- (option2) => group[this.groupValues].indexOf(option2) === -1
28155
- );
28156
- this.$emit("update:modelValue", newValue);
28157
- } else {
28158
- let optionsToAdd = group[this.groupValues].filter(
28159
- (option2) => !(this.isOptionDisabled(option2) || this.isSelected(option2))
28160
- );
28161
- if (this.max) {
28162
- optionsToAdd.splice(this.max - this.internalValue.length);
28163
- }
28164
- this.$emit("select", optionsToAdd, this.id);
28165
- this.$emit(
28166
- "update:modelValue",
28167
- this.internalValue.concat(optionsToAdd)
28168
- );
28169
- }
28170
- if (this.closeOnSelect)
28171
- this.deactivate();
28172
- },
28173
- /**
28174
- * Helper to identify if all values in a group are selected
28175
- *
28176
- * @param {Object} group to validated selected values against
28177
- */
28178
- wholeGroupSelected(group) {
28179
- return group[this.groupValues].every(
28180
- (option2) => this.isSelected(option2) || this.isOptionDisabled(option2)
28181
- );
28182
- },
28183
- /**
28184
- * Helper to identify if all values in a group are disabled
28185
- *
28186
- * @param {Object} group to check for disabled values
28187
- */
28188
- wholeGroupDisabled(group) {
28189
- return group[this.groupValues].every(this.isOptionDisabled);
28190
- },
28191
- /**
28192
- * Removes the given option from the selected options.
28193
- * Additionally checks this.allowEmpty prop if option can be removed when
28194
- * it is the last selected option.
28195
- *
28196
- * @param {type} option description
28197
- * @return {type} description
28198
- */
28199
- removeElement(option2, shouldClose = true) {
28200
- if (this.disabled)
28201
- return;
28202
- if (option2.$isDisabled)
28203
- return;
28204
- if (!this.allowEmpty && this.internalValue.length <= 1) {
28205
- this.deactivate();
28206
- return;
28207
- }
28208
- const index2 = typeof option2 === "object" ? this.valueKeys.indexOf(option2[this.trackBy]) : this.valueKeys.indexOf(option2);
28209
- if (this.multiple) {
28210
- const newValue = this.internalValue.slice(0, index2).concat(this.internalValue.slice(index2 + 1));
28211
- this.$emit("update:modelValue", newValue);
28212
- } else {
28213
- this.$emit("update:modelValue", null);
28214
- }
28215
- this.$emit("remove", option2, this.id);
28216
- if (this.closeOnSelect && shouldClose)
28217
- this.deactivate();
28218
- },
28219
- /**
28220
- * Calls this.removeElement() with the last element
28221
- * from this.internalValue (selected element Array)
28222
- *
28223
- * @fires this#removeElement
28224
- */
28225
- removeLastElement() {
28226
- if (this.blockKeys.indexOf("Delete") !== -1)
28227
- return;
28228
- if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {
28229
- this.removeElement(this.internalValue[this.internalValue.length - 1], false);
28230
- }
28231
- },
28232
- /**
28233
- * Opens the multiselect’s dropdown.
28234
- * Sets this.isOpen to TRUE
28235
- */
28236
- activate() {
28237
- if (this.isOpen || this.disabled)
28238
- return;
28239
- this.adjustPosition();
28240
- if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {
28241
- this.pointer = 1;
28242
- }
28243
- this.isOpen = true;
28244
- if (this.searchable) {
28245
- if (!this.preserveSearch)
28246
- this.search = "";
28247
- if (!this.preventAutofocus)
28248
- this.$nextTick(() => this.$refs.search && this.$refs.search.focus());
28249
- } else if (!this.preventAutofocus) {
28250
- if (typeof this.$el !== "undefined")
28251
- this.$el.focus();
28252
- }
28253
- this.$emit("open", this.id);
28254
- },
28255
- /**
28256
- * Closes the multiselect’s dropdown.
28257
- * Sets this.isOpen to FALSE
28258
- */
28259
- deactivate() {
28260
- if (!this.isOpen)
28261
- return;
28262
- this.isOpen = false;
28263
- if (this.searchable) {
28264
- if (this.$refs.search !== null && typeof this.$refs.search !== "undefined")
28265
- this.$refs.search.blur();
28266
- } else {
28267
- if (typeof this.$el !== "undefined")
28268
- this.$el.blur();
28269
- }
28270
- if (!this.preserveSearch)
28271
- this.search = "";
28272
- this.$emit("close", this.getValue(), this.id);
28273
- },
28274
- /**
28275
- * Call this.activate() or this.deactivate()
28276
- * depending on this.isOpen value.
28277
- *
28278
- * @fires this#activate || this#deactivate
28279
- * @property {Boolean} isOpen indicates if dropdown is open
28280
- */
28281
- toggle() {
28282
- this.isOpen ? this.deactivate() : this.activate();
28283
- },
28284
- /**
28285
- * Updates the hasEnoughSpace variable used for
28286
- * detecting where to expand the dropdown
28287
- */
28288
- adjustPosition() {
28289
- if (typeof window === "undefined")
28290
- return;
28291
- const spaceAbove = this.$el.getBoundingClientRect().top;
28292
- const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom;
28293
- const hasEnoughSpaceBelow = spaceBelow > this.maxHeight;
28294
- if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === "below" || this.openDirection === "bottom") {
28295
- this.preferredOpenDirection = "below";
28296
- this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight);
28297
- } else {
28298
- this.preferredOpenDirection = "above";
28299
- this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight);
28300
- }
28301
- }
28302
- }
28303
- };
28304
- var pointerMixin = {
28305
- data() {
28306
- return {
28307
- pointer: 0,
28308
- pointerDirty: false
28309
- };
28310
- },
28311
- props: {
28312
- /**
28313
- * Enable/disable highlighting of the pointed value.
28314
- * @type {Boolean}
28315
- * @default true
28316
- */
28317
- showPointer: {
28318
- type: Boolean,
28319
- default: true
28320
- },
28321
- optionHeight: {
28322
- type: Number,
28323
- default: 40
28324
- }
28325
- },
28326
- computed: {
28327
- pointerPosition() {
28328
- return this.pointer * this.optionHeight;
28329
- },
28330
- visibleElements() {
28331
- return this.optimizedHeight / this.optionHeight;
28332
- }
28333
- },
28334
- watch: {
28335
- filteredOptions() {
28336
- this.pointerAdjust();
28337
- },
28338
- isOpen() {
28339
- this.pointerDirty = false;
28340
- },
28341
- pointer() {
28342
- this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
28343
- }
28344
- },
28345
- methods: {
28346
- optionHighlight(index2, option2) {
28347
- return {
28348
- "multiselect__option--highlight": index2 === this.pointer && this.showPointer,
28349
- "multiselect__option--selected": this.isSelected(option2)
28350
- };
28351
- },
28352
- groupHighlight(index2, selectedGroup) {
28353
- if (!this.groupSelect) {
28354
- return [
28355
- "multiselect__option--disabled",
28356
- { "multiselect__option--group": selectedGroup.$isLabel }
28357
- ];
28358
- }
28359
- const group = this.options.find((option2) => {
28360
- return option2[this.groupLabel] === selectedGroup.$groupLabel;
28361
- });
28362
- return group && !this.wholeGroupDisabled(group) ? [
28363
- "multiselect__option--group",
28364
- { "multiselect__option--highlight": index2 === this.pointer && this.showPointer },
28365
- { "multiselect__option--group-selected": this.wholeGroupSelected(group) }
28366
- ] : "multiselect__option--disabled";
28367
- },
28368
- addPointerElement({ key } = "Enter") {
28369
- if (this.filteredOptions.length > 0) {
28370
- this.select(this.filteredOptions[this.pointer], key);
28371
- }
28372
- this.pointerReset();
28373
- },
28374
- pointerForward() {
28375
- if (this.pointer < this.filteredOptions.length - 1) {
28376
- this.pointer++;
28377
- if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {
28378
- this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight;
28379
- }
28380
- if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
28381
- this.pointerForward();
28382
- }
28383
- this.pointerDirty = true;
28384
- },
28385
- pointerBackward() {
28386
- if (this.pointer > 0) {
28387
- this.pointer--;
28388
- if (this.$refs.list.scrollTop >= this.pointerPosition) {
28389
- this.$refs.list.scrollTop = this.pointerPosition;
28390
- }
28391
- if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
28392
- this.pointerBackward();
28393
- } else {
28394
- if (this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect)
28395
- this.pointerForward();
28396
- }
28397
- this.pointerDirty = true;
28398
- },
28399
- pointerReset() {
28400
- if (!this.closeOnSelect)
28401
- return;
28402
- this.pointer = 0;
28403
- if (this.$refs.list) {
28404
- this.$refs.list.scrollTop = 0;
28405
- }
28406
- },
28407
- pointerAdjust() {
28408
- if (this.pointer >= this.filteredOptions.length - 1) {
28409
- this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0;
28410
- }
28411
- if (this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect) {
28412
- this.pointerForward();
28413
- }
28414
- },
28415
- pointerSet(index2) {
28416
- this.pointer = index2;
28417
- this.pointerDirty = true;
28418
- }
28419
- }
28420
- };
28421
- var script$e = {
28422
- name: "vue-multiselect",
28423
- mixins: [multiselectMixin, pointerMixin],
28424
- compatConfig: {
28425
- MODE: 3,
28426
- ATTR_ENUMERATED_COERCION: false
28427
- },
28428
- props: {
28429
- /**
28430
- * name attribute to match optional label element
28431
- * @default ''
28432
- * @type {String}
28433
- */
28434
- name: {
28435
- type: String,
28436
- default: ""
28437
- },
28438
- /**
28439
- * Presets the selected options value.
28440
- * @type {Object||Array||String||Integer}
28441
- */
28442
- modelValue: {
28443
- type: null,
28444
- default() {
28445
- return [];
28446
- }
28447
- },
28448
- /**
28449
- * String to show when pointing to an option
28450
- * @default 'Press enter to select'
28451
- * @type {String}
28452
- */
28453
- selectLabel: {
28454
- type: String,
28455
- default: "Press enter to select"
28456
- },
28457
- /**
28458
- * String to show when pointing to an option
28459
- * @default 'Press enter to select'
28460
- * @type {String}
28461
- */
28462
- selectGroupLabel: {
28463
- type: String,
28464
- default: "Press enter to select group"
28465
- },
28466
- /**
28467
- * String to show next to selected option
28468
- * @default 'Selected'
28469
- * @type {String}
28470
- */
28471
- selectedLabel: {
28472
- type: String,
28473
- default: "Selected"
28474
- },
28475
- /**
28476
- * String to show when pointing to an already selected option
28477
- * @default 'Press enter to remove'
28478
- * @type {String}
28479
- */
28480
- deselectLabel: {
28481
- type: String,
28482
- default: "Press enter to remove"
28483
- },
28484
- /**
28485
- * String to show when pointing to an already selected option
28486
- * @default 'Press enter to remove'
28487
- * @type {String}
28488
- */
28489
- deselectGroupLabel: {
28490
- type: String,
28491
- default: "Press enter to deselect group"
28492
- },
28493
- /**
28494
- * Decide whether to show pointer labels
28495
- * @default true
28496
- * @type {Boolean}
28497
- */
28498
- showLabels: {
28499
- type: Boolean,
28500
- default: true
28501
- },
28502
- /**
28503
- * Limit the display of selected options. The rest will be hidden within the limitText string.
28504
- * @default 99999
28505
- * @type {Integer}
28506
- */
28507
- limit: {
28508
- type: Number,
28509
- default: 99999
28510
- },
28511
- /**
28512
- * Sets maxHeight style value of the dropdown
28513
- * @default 300
28514
- * @type {Integer}
28515
- */
28516
- maxHeight: {
28517
- type: Number,
28518
- default: 300
28519
- },
28520
- /**
28521
- * Function that process the message shown when selected
28522
- * elements pass the defined limit.
28523
- * @default 'and * more'
28524
- * @param {Int} count Number of elements more than limit
28525
- * @type {Function}
28526
- */
28527
- limitText: {
28528
- type: Function,
28529
- default: (count2) => `and ${count2} more`
28530
- },
28531
- /**
28532
- * Set true to trigger the loading spinner.
28533
- * @default False
28534
- * @type {Boolean}
28535
- */
28536
- loading: {
28537
- type: Boolean,
28538
- default: false
28539
- },
28540
- /**
28541
- * Disables the multiselect if true.
28542
- * @default false
28543
- * @type {Boolean}
28544
- */
28545
- disabled: {
28546
- type: Boolean,
28547
- default: false
28548
- },
28549
- /**
28550
- * Fixed opening direction
28551
- * @default ''
28552
- * @type {String}
28553
- */
28554
- openDirection: {
28555
- type: String,
28556
- default: ""
28557
- },
28558
- /**
28559
- * Shows slot with message about empty options
28560
- * @default true
28561
- * @type {Boolean}
28562
- */
28563
- showNoOptions: {
28564
- type: Boolean,
28565
- default: true
28566
- },
28567
- showNoResults: {
28568
- type: Boolean,
28569
- default: true
28570
- },
28571
- tabindex: {
28572
- type: Number,
28573
- default: 0
28574
- }
28575
- },
28576
- computed: {
28577
- hasOptionGroup() {
28578
- return this.groupValues && this.groupLabel && this.groupSelect;
28579
- },
28580
- isSingleLabelVisible() {
28581
- return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
28582
- },
28583
- isPlaceholderVisible() {
28584
- return !this.internalValue.length && (!this.searchable || !this.isOpen);
28585
- },
28586
- visibleValues() {
28587
- return this.multiple ? this.internalValue.slice(0, this.limit) : [];
28588
- },
28589
- singleValue() {
28590
- return this.internalValue[0];
28591
- },
28592
- deselectLabelText() {
28593
- return this.showLabels ? this.deselectLabel : "";
28594
- },
28595
- deselectGroupLabelText() {
28596
- return this.showLabels ? this.deselectGroupLabel : "";
28597
- },
28598
- selectLabelText() {
28599
- return this.showLabels ? this.selectLabel : "";
28600
- },
28601
- selectGroupLabelText() {
28602
- return this.showLabels ? this.selectGroupLabel : "";
28603
- },
28604
- selectedLabelText() {
28605
- return this.showLabels ? this.selectedLabel : "";
28606
- },
28607
- inputStyle() {
28608
- if (this.searchable || this.multiple && this.modelValue && this.modelValue.length) {
28609
- return this.isOpen ? { width: "100%" } : { width: "0", position: "absolute", padding: "0" };
28610
- }
28611
- return "";
28612
- },
28613
- contentStyle() {
28614
- return this.options.length ? { display: "inline-block" } : { display: "block" };
28615
- },
28616
- isAbove() {
28617
- if (this.openDirection === "above" || this.openDirection === "top") {
28618
- return true;
28619
- } else if (this.openDirection === "below" || this.openDirection === "bottom") {
28620
- return false;
28621
- } else {
28622
- return this.preferredOpenDirection === "above";
28623
- }
28624
- },
28625
- showSearchInput() {
28626
- return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : true);
28627
- }
28628
- }
28629
- };
28630
- const _hoisted_1$n = {
28631
- ref: "tags",
28632
- class: "multiselect__tags"
28633
- };
28634
- const _hoisted_2$i = { class: "multiselect__tags-wrap" };
28635
- const _hoisted_3$e = { class: "multiselect__spinner" };
28636
- const _hoisted_4$a = { key: 0 };
28637
- const _hoisted_5$9 = { class: "multiselect__option" };
28638
- const _hoisted_6$5 = { class: "multiselect__option" };
28639
- const _hoisted_7$2 = /* @__PURE__ */ createTextVNode("No elements found. Consider changing the search query.");
28640
- const _hoisted_8$1 = { class: "multiselect__option" };
28641
- const _hoisted_9$1 = /* @__PURE__ */ createTextVNode("List is empty.");
28642
- function render$e(_ctx, _cache, $props, $setup, $data, $options) {
28643
- return openBlock(), createBlock("div", {
28644
- tabindex: _ctx.searchable ? -1 : $props.tabindex,
28645
- class: [{ "multiselect--active": _ctx.isOpen, "multiselect--disabled": $props.disabled, "multiselect--above": $options.isAbove, "multiselect--has-options-group": $options.hasOptionGroup }, "multiselect"],
28646
- onFocus: _cache[14] || (_cache[14] = ($event) => _ctx.activate()),
28647
- onBlur: _cache[15] || (_cache[15] = ($event) => _ctx.searchable ? false : _ctx.deactivate()),
28648
- onKeydown: [
28649
- _cache[16] || (_cache[16] = withKeys(withModifiers(($event) => _ctx.pointerForward(), ["self", "prevent"]), ["down"])),
28650
- _cache[17] || (_cache[17] = withKeys(withModifiers(($event) => _ctx.pointerBackward(), ["self", "prevent"]), ["up"]))
28651
- ],
28652
- onKeypress: _cache[18] || (_cache[18] = withKeys(withModifiers(($event) => _ctx.addPointerElement($event), ["stop", "self"]), ["enter", "tab"])),
28653
- onKeyup: _cache[19] || (_cache[19] = withKeys(($event) => _ctx.deactivate(), ["esc"])),
28654
- role: "combobox",
28655
- "aria-owns": "listbox-" + _ctx.id
28656
- }, [
28657
- renderSlot(_ctx.$slots, "caret", { toggle: _ctx.toggle }, () => [
28658
- createVNode(
28659
- "div",
28660
- {
28661
- onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.toggle(), ["prevent", "stop"])),
28662
- class: "multiselect__select"
28663
- },
28664
- null,
28665
- 32
28666
- /* HYDRATE_EVENTS */
28667
- )
28668
- ]),
28669
- renderSlot(_ctx.$slots, "clear", { search: _ctx.search }),
28670
- createVNode(
28671
- "div",
28672
- _hoisted_1$n,
28673
- [
28674
- renderSlot(_ctx.$slots, "selection", {
28675
- search: _ctx.search,
28676
- remove: _ctx.removeElement,
28677
- values: $options.visibleValues,
28678
- isOpen: _ctx.isOpen
28679
- }, () => [
28680
- withDirectives(createVNode(
28681
- "div",
28682
- _hoisted_2$i,
28683
- [
28684
- (openBlock(true), createBlock(
28685
- Fragment$1,
28686
- null,
28687
- renderList($options.visibleValues, (option2, index2) => {
28688
- return renderSlot(_ctx.$slots, "tag", {
28689
- option: option2,
28690
- search: _ctx.search,
28691
- remove: _ctx.removeElement
28692
- }, () => [
28693
- (openBlock(), createBlock("span", {
28694
- class: "multiselect__tag",
28695
- key: index2
28696
- }, [
28697
- createVNode("span", {
28698
- textContent: toDisplayString(_ctx.getOptionLabel(option2))
28699
- }, null, 8, ["textContent"]),
28700
- createVNode("i", {
28701
- tabindex: "1",
28702
- onKeypress: withKeys(withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]), ["enter"]),
28703
- onMousedown: withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]),
28704
- class: "multiselect__tag-icon"
28705
- }, null, 40, ["onKeypress", "onMousedown"])
28706
- ]))
28707
- ]);
28708
- }),
28709
- 256
28710
- /* UNKEYED_FRAGMENT */
28711
- ))
28712
- ],
28713
- 512
28714
- /* NEED_PATCH */
28715
- ), [
28716
- [vShow, $options.visibleValues.length > 0]
28717
- ]),
28718
- _ctx.internalValue && _ctx.internalValue.length > $props.limit ? renderSlot(_ctx.$slots, "limit", { key: 0 }, () => [
28719
- createVNode("strong", {
28720
- class: "multiselect__strong",
28721
- textContent: toDisplayString($props.limitText(_ctx.internalValue.length - $props.limit))
28722
- }, null, 8, ["textContent"])
28723
- ]) : createCommentVNode("v-if", true)
28724
- ]),
28725
- createVNode(Transition, { name: "multiselect__loading" }, {
28726
- default: withCtx(() => [
28727
- renderSlot(_ctx.$slots, "loading", {}, () => [
28728
- withDirectives(createVNode(
28729
- "div",
28730
- _hoisted_3$e,
28731
- null,
28732
- 512
28733
- /* NEED_PATCH */
28734
- ), [
28735
- [vShow, $props.loading]
28736
- ])
28737
- ])
28738
- ]),
28739
- _: 3
28740
- /* FORWARDED */
28741
- }),
28742
- _ctx.searchable ? (openBlock(), createBlock("input", {
28743
- key: 0,
28744
- ref: "search",
28745
- name: $props.name,
28746
- id: _ctx.id,
28747
- type: "text",
28748
- autocomplete: "off",
28749
- spellcheck: false,
28750
- placeholder: _ctx.placeholder,
28751
- style: $options.inputStyle,
28752
- value: _ctx.search,
28753
- disabled: $props.disabled,
28754
- tabindex: $props.tabindex,
28755
- onInput: _cache[2] || (_cache[2] = ($event) => _ctx.updateSearch($event.target.value)),
28756
- onFocus: _cache[3] || (_cache[3] = withModifiers(($event) => _ctx.activate(), ["prevent"])),
28757
- onBlur: _cache[4] || (_cache[4] = withModifiers(($event) => _ctx.deactivate(), ["prevent"])),
28758
- onKeyup: _cache[5] || (_cache[5] = withKeys(($event) => _ctx.deactivate(), ["esc"])),
28759
- onKeydown: [
28760
- _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.pointerForward(), ["prevent"]), ["down"])),
28761
- _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.pointerBackward(), ["prevent"]), ["up"])),
28762
- _cache[9] || (_cache[9] = withKeys(withModifiers(($event) => _ctx.removeLastElement(), ["stop"]), ["delete"]))
28763
- ],
28764
- onKeypress: _cache[8] || (_cache[8] = withKeys(withModifiers(($event) => _ctx.addPointerElement($event), ["prevent", "stop", "self"]), ["enter"])),
28765
- class: "multiselect__input",
28766
- "aria-controls": "listbox-" + _ctx.id
28767
- }, null, 44, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"])) : createCommentVNode("v-if", true),
28768
- $options.isSingleLabelVisible ? (openBlock(), createBlock(
28769
- "span",
28770
- {
28771
- key: 1,
28772
- class: "multiselect__single",
28773
- onMousedown: _cache[10] || (_cache[10] = withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
28774
- },
28775
- [
28776
- renderSlot(_ctx.$slots, "singleLabel", { option: $options.singleValue }, () => [
28777
- createTextVNode(
28778
- toDisplayString(_ctx.currentOptionLabel),
28779
- 1
28780
- /* TEXT */
28781
- )
28782
- ])
28783
- ],
28784
- 32
28785
- /* HYDRATE_EVENTS */
28786
- )) : createCommentVNode("v-if", true),
28787
- $options.isPlaceholderVisible ? (openBlock(), createBlock(
28788
- "span",
28789
- {
28790
- key: 2,
28791
- class: "multiselect__placeholder",
28792
- onMousedown: _cache[11] || (_cache[11] = withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
28793
- },
28794
- [
28795
- renderSlot(_ctx.$slots, "placeholder", {}, () => [
28796
- createTextVNode(
28797
- toDisplayString(_ctx.placeholder),
28798
- 1
28799
- /* TEXT */
28800
- )
28801
- ])
28802
- ],
28803
- 32
28804
- /* HYDRATE_EVENTS */
28805
- )) : createCommentVNode("v-if", true)
28806
- ],
28807
- 512
28808
- /* NEED_PATCH */
28809
- ),
28810
- createVNode(Transition, { name: "multiselect" }, {
28811
- default: withCtx(() => [
28812
- withDirectives(createVNode(
28813
- "div",
28814
- {
28815
- class: "multiselect__content-wrapper",
28816
- onFocus: _cache[12] || (_cache[12] = (...args) => _ctx.activate && _ctx.activate(...args)),
28817
- tabindex: "-1",
28818
- onMousedown: _cache[13] || (_cache[13] = withModifiers(() => {
28819
- }, ["prevent"])),
28820
- style: { maxHeight: _ctx.optimizedHeight + "px" },
28821
- ref: "list"
28822
- },
28823
- [
28824
- createVNode("ul", {
28825
- class: "multiselect__content",
28826
- style: $options.contentStyle,
28827
- role: "listbox",
28828
- id: "listbox-" + _ctx.id
28829
- }, [
28830
- renderSlot(_ctx.$slots, "beforeList"),
28831
- _ctx.multiple && _ctx.max === _ctx.internalValue.length ? (openBlock(), createBlock("li", _hoisted_4$a, [
28832
- createVNode("span", _hoisted_5$9, [
28833
- renderSlot(_ctx.$slots, "maxElements", {}, () => [
28834
- createTextVNode(
28835
- "Maximum of " + toDisplayString(_ctx.max) + " options selected. First remove a selected option to select another.",
28836
- 1
28837
- /* TEXT */
28838
- )
28839
- ])
28840
- ])
28841
- ])) : createCommentVNode("v-if", true),
28842
- !_ctx.max || _ctx.internalValue.length < _ctx.max ? (openBlock(true), createBlock(
28843
- Fragment$1,
28844
- { key: 1 },
28845
- renderList(_ctx.filteredOptions, (option2, index2) => {
28846
- return openBlock(), createBlock("li", {
28847
- class: "multiselect__element",
28848
- key: index2,
28849
- id: _ctx.id + "-" + index2,
28850
- role: !(option2 && (option2.$isLabel || option2.$isDisabled)) ? "option" : null
28851
- }, [
28852
- !(option2 && (option2.$isLabel || option2.$isDisabled)) ? (openBlock(), createBlock("span", {
28853
- key: 0,
28854
- class: [_ctx.optionHighlight(index2, option2), "multiselect__option"],
28855
- onClick: withModifiers(($event) => _ctx.select(option2), ["stop"]),
28856
- onMouseenter: withModifiers(($event) => _ctx.pointerSet(index2), ["self"]),
28857
- "data-select": option2 && option2.isTag ? _ctx.tagPlaceholder : $options.selectLabelText,
28858
- "data-selected": $options.selectedLabelText,
28859
- "data-deselect": $options.deselectLabelText
28860
- }, [
28861
- renderSlot(_ctx.$slots, "option", {
28862
- option: option2,
28863
- search: _ctx.search,
28864
- index: index2
28865
- }, () => [
28866
- createVNode(
28867
- "span",
28868
- null,
28869
- toDisplayString(_ctx.getOptionLabel(option2)),
28870
- 1
28871
- /* TEXT */
28872
- )
28873
- ])
28874
- ], 42, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"])) : createCommentVNode("v-if", true),
28875
- option2 && (option2.$isLabel || option2.$isDisabled) ? (openBlock(), createBlock("span", {
28876
- key: 1,
28877
- "data-select": _ctx.groupSelect && $options.selectGroupLabelText,
28878
- "data-deselect": _ctx.groupSelect && $options.deselectGroupLabelText,
28879
- class: [_ctx.groupHighlight(index2, option2), "multiselect__option"],
28880
- onMouseenter: withModifiers(($event) => _ctx.groupSelect && _ctx.pointerSet(index2), ["self"]),
28881
- onMousedown: withModifiers(($event) => _ctx.selectGroup(option2), ["prevent"])
28882
- }, [
28883
- renderSlot(_ctx.$slots, "option", {
28884
- option: option2,
28885
- search: _ctx.search,
28886
- index: index2
28887
- }, () => [
28888
- createVNode(
28889
- "span",
28890
- null,
28891
- toDisplayString(_ctx.getOptionLabel(option2)),
28892
- 1
28893
- /* TEXT */
28894
- )
28895
- ])
28896
- ], 42, ["data-select", "data-deselect", "onMouseenter", "onMousedown"])) : createCommentVNode("v-if", true)
28897
- ], 8, ["id", "role"]);
28898
- }),
28899
- 128
28900
- /* KEYED_FRAGMENT */
28901
- )) : createCommentVNode("v-if", true),
28902
- withDirectives(createVNode(
28903
- "li",
28904
- null,
28905
- [
28906
- createVNode("span", _hoisted_6$5, [
28907
- renderSlot(_ctx.$slots, "noResult", { search: _ctx.search }, () => [
28908
- _hoisted_7$2
28909
- ])
28910
- ])
28911
- ],
28912
- 512
28913
- /* NEED_PATCH */
28914
- ), [
28915
- [vShow, $props.showNoResults && (_ctx.filteredOptions.length === 0 && _ctx.search && !$props.loading)]
28916
- ]),
28917
- withDirectives(createVNode(
28918
- "li",
28919
- null,
28920
- [
28921
- createVNode("span", _hoisted_8$1, [
28922
- renderSlot(_ctx.$slots, "noOptions", {}, () => [
28923
- _hoisted_9$1
28924
- ])
28925
- ])
28926
- ],
28927
- 512
28928
- /* NEED_PATCH */
28929
- ), [
28930
- [vShow, $props.showNoOptions && ((_ctx.options.length === 0 || $options.hasOptionGroup === true && _ctx.filteredOptions.length === 0) && !_ctx.search && !$props.loading)]
28931
- ]),
28932
- renderSlot(_ctx.$slots, "afterList")
28933
- ], 12, ["id"])
28934
- ],
28935
- 36
28936
- /* STYLE, HYDRATE_EVENTS */
28937
- ), [
28938
- [vShow, _ctx.isOpen]
28939
- ])
28940
- ]),
28941
- _: 3
28942
- /* FORWARDED */
28943
- })
28944
- ], 42, ["tabindex", "aria-owns"]);
28945
- }
28946
- script$e.render = render$e;
28947
- const Multiselect = script$e;
28948
- const _hoisted_1$m = ["for"];
28949
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
27424
+ const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-1fc4f739"]]);
27425
+ const _hoisted_1$m = ["disabled"];
27426
+ const _hoisted_2$i = ["onClick"];
27427
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
28950
27428
  __name: "SelectInput",
28951
27429
  props: {
27430
+ options: {},
27431
+ placeholder: {},
27432
+ disabled: { type: Boolean },
27433
+ modelValue: {},
27434
+ searchable: { type: Boolean },
28952
27435
  required: { type: Boolean },
28953
27436
  label: {},
28954
- id: {},
28955
- modelValue: {},
28956
- placeholder: {},
28957
- defaultValue: {},
28958
- options: {},
28959
- extraProps: {}
27437
+ fullWidth: { type: Boolean }
28960
27438
  },
28961
27439
  emits: ["update:modelValue"],
28962
27440
  setup(__props, { emit: __emit }) {
27441
+ let open = ref(false);
27442
+ const searchInput = ref(null);
28963
27443
  const props2 = __props;
28964
- let dataValue = ref(props2.modelValue || props2.defaultValue);
28965
- const multiselect = ref();
27444
+ let selectedItem = ref();
27445
+ let search = ref("");
27446
+ const toggle = () => {
27447
+ open.value = !open.value;
27448
+ if (!open.value)
27449
+ search.value = "";
27450
+ if (open.value)
27451
+ setTimeout(() => {
27452
+ var _a2, _b, _c;
27453
+ return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
27454
+ }, 100);
27455
+ };
27456
+ const valueToLabel = (value) => {
27457
+ if (!value)
27458
+ return "";
27459
+ const option2 = props2.options.find((option22) => {
27460
+ if (typeof option22 === "string" || typeof option22 === "number")
27461
+ return option22 === value;
27462
+ return option22.value === value;
27463
+ });
27464
+ if (!option2)
27465
+ return value;
27466
+ return getLabel(option2);
27467
+ };
28966
27468
  const emit2 = __emit;
28967
- const optionList = ref([]);
28968
- const seletValue = computed({
28969
- get: () => optionList.value.find((opt) => opt.value === dataValue.value),
28970
- set: (val) => {
28971
- dataValue.value = val == null ? void 0 : val.value;
28972
- emit2("update:modelValue", dataValue.value);
28973
- }
28974
- });
28975
- function optnToValueLabel(option2) {
28976
- if (typeof option2 === "string" || typeof option2 === "number") {
28977
- return { label: `${option2}`, value: option2 };
28978
- }
28979
- return option2;
28980
- }
28981
- function updateOptionList() {
28982
- const { options } = props2;
28983
- const optnLst = typeof options === "string" ? options.split("\n|,") : options || [];
28984
- optionList.value.push(...optnLst.map(optnToValueLabel));
28985
- }
28986
- watch(() => props2.options, updateOptionList, { immediate: true });
27469
+ const getLabel = (option2) => {
27470
+ if (typeof option2 === "string")
27471
+ return option2;
27472
+ if (typeof option2 === "number")
27473
+ return `${option2}`;
27474
+ return option2.label;
27475
+ };
27476
+ const isSelected = (option2) => {
27477
+ if (typeof option2 === "string" || typeof option2 === "number")
27478
+ return option2 === selectedItem.value;
27479
+ return option2.value === selectedItem.value;
27480
+ };
27481
+ const filteredOptions = computed(() => props2.options.filter((option2) => {
27482
+ const searchTerm = new RegExp(search.value, "gi");
27483
+ if (typeof option2 === "string")
27484
+ return option2.match(searchTerm);
27485
+ if (typeof option2 === "number")
27486
+ return `${option2}`.match(searchTerm);
27487
+ return option2.label.match(searchTerm);
27488
+ }));
27489
+ const select2 = (option2) => {
27490
+ if (typeof option2 === "string")
27491
+ selectedItem.value = option2;
27492
+ else if (typeof option2 === "number")
27493
+ selectedItem.value = option2;
27494
+ else
27495
+ selectedItem.value = option2.value;
27496
+ emit2("update:modelValue", selectedItem.value);
27497
+ open.value = false;
27498
+ };
27499
+ watch(() => props2.modelValue, (value) => {
27500
+ if (value !== selectedItem.value)
27501
+ selectedItem.value = value;
27502
+ }, { immediate: true });
28987
27503
  return (_ctx, _cache) => {
28988
- return openBlock(), createElementBlock("div", null, [
28989
- createElementVNode("label", {
28990
- class: "txt-start",
28991
- for: _ctx.id
28992
- }, [
28993
- createTextVNode(toDisplayString(_ctx.label) + " ", 1),
28994
- createVNode(unref(Multiselect), mergeProps({
28995
- ref_key: "multiselect",
28996
- ref: multiselect,
28997
- id: _ctx.id,
28998
- label: "label",
28999
- trackBy: "value",
29000
- options: optionList.value,
29001
- required: _ctx.required,
29002
- placeholder: _ctx.placeholder,
29003
- modelValue: seletValue.value,
29004
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seletValue.value = $event),
29005
- "close-on-select": true
29006
- }, _ctx.extraProps), null, 16, ["id", "options", "required", "placeholder", "modelValue"])
29007
- ], 8, _hoisted_1$m)
29008
- ]);
27504
+ return openBlock(), createBlock(unref(kt$1), {
27505
+ placement: "bottom-start",
27506
+ class: "bagel-input selectinput"
27507
+ }, {
27508
+ popper: withCtx(({ hide }) => [
27509
+ createVNode(unref(_sfc_main$t), {
27510
+ class: "selectinput-options p-05",
27511
+ style: normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
27512
+ }, {
27513
+ default: withCtx(() => [
27514
+ _ctx.searchable ? (openBlock(), createBlock(unref(TextInput), {
27515
+ key: 0,
27516
+ ref_key: "searchInput",
27517
+ ref: searchInput,
27518
+ dense: "",
27519
+ placeholder: "Search",
27520
+ icon: "search",
27521
+ modelValue: unref(search),
27522
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(search) ? search.value = $event : search = $event)
27523
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true),
27524
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option2, i2) => {
27525
+ return openBlock(), createElementBlock("div", {
27526
+ class: normalizeClass(["selectinput-option hover gap-1", { selected: option2 === unref(selectedItem) }]),
27527
+ key: `${option2}${i2}`,
27528
+ onClick: () => {
27529
+ select2(option2);
27530
+ hide();
27531
+ }
27532
+ }, [
27533
+ isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$H), {
27534
+ key: 0,
27535
+ icon: "check"
27536
+ })) : createCommentVNode("", true),
27537
+ !isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$H), {
27538
+ key: 1,
27539
+ class: "opacity-3",
27540
+ icon: "fiber_manual_record"
27541
+ })) : createCommentVNode("", true),
27542
+ createElementVNode("span", null, toDisplayString(getLabel(option2)), 1)
27543
+ ], 10, _hoisted_2$i);
27544
+ }), 128)),
27545
+ renderSlot(_ctx.$slots, "last", {}, void 0, true)
27546
+ ]),
27547
+ _: 2
27548
+ }, 1032, ["style"])
27549
+ ]),
27550
+ default: withCtx(() => [
27551
+ createElementVNode("label", null, [
27552
+ createTextVNode(toDisplayString(_ctx.label) + " ", 1),
27553
+ createElementVNode("button", {
27554
+ disabled: _ctx.disabled,
27555
+ type: "button",
27556
+ class: "selectinput-btn",
27557
+ onClick: toggle
27558
+ }, [
27559
+ createTextVNode(toDisplayString(valueToLabel(unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
27560
+ createVNode(unref(_sfc_main$H), normalizeProps(guardReactiveProps({ "icon": unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
27561
+ ], 8, _hoisted_1$m),
27562
+ _ctx.required ? withDirectives((openBlock(), createElementBlock("input", {
27563
+ key: 0,
27564
+ style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
27565
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
27566
+ required: ""
27567
+ }, null, 512)), [
27568
+ [vModelText, unref(selectedItem)]
27569
+ ]) : createCommentVNode("", true)
27570
+ ])
27571
+ ]),
27572
+ _: 3
27573
+ });
29009
27574
  };
29010
27575
  }
29011
27576
  });
27577
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8845266b"]]);
29012
27578
  const _hoisted_1$l = ["title"];
29013
27579
  const _hoisted_2$h = { key: 0 };
29014
- const _hoisted_3$d = ["value", "placeholder"];
29015
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
27580
+ const _hoisted_3$e = ["value", "placeholder"];
27581
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
29016
27582
  __name: "RichTextEditor",
29017
27583
  props: {
29018
27584
  description: { default: "" },
@@ -29043,12 +27609,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
29043
27609
  onInput: handleInput,
29044
27610
  placeholder: _ctx.placeholder,
29045
27611
  class: normalizeClass({ "no-edit": !_ctx.editMode })
29046
- }, null, 42, _hoisted_3$d)
27612
+ }, null, 42, _hoisted_3$e)
29047
27613
  ], 10, _hoisted_1$l);
29048
27614
  };
29049
27615
  }
29050
27616
  });
29051
- const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-69a60381"]]);
27617
+ const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-69a60381"]]);
29052
27618
  /*!
29053
27619
  * vue-draggable-next v2.2.0
29054
27620
  * (c) 2023 Anish George
@@ -29220,13 +27786,13 @@ function closest(el, selector2, ctx, includeCTX) {
29220
27786
  return null;
29221
27787
  }
29222
27788
  var R_SPACE = /\s+/g;
29223
- function toggleClass(el, name, state) {
27789
+ function toggleClass(el, name, state2) {
29224
27790
  if (el && name) {
29225
27791
  if (el.classList) {
29226
- el.classList[state ? "add" : "remove"](name);
27792
+ el.classList[state2 ? "add" : "remove"](name);
29227
27793
  } else {
29228
27794
  var className = (" " + el.className + " ").replace(R_SPACE, " ").replace(" " + name + " ", " ");
29229
- el.className = (className + (state ? " " + name : "")).replace(R_SPACE, " ");
27795
+ el.className = (className + (state2 ? " " + name : "")).replace(R_SPACE, " ");
29230
27796
  }
29231
27797
  }
29232
27798
  }
@@ -29503,8 +28069,8 @@ function AnimationStateManager() {
29503
28069
  child.fromRect = fromRect;
29504
28070
  });
29505
28071
  },
29506
- addAnimationState: function addAnimationState(state) {
29507
- animationStates.push(state);
28072
+ addAnimationState: function addAnimationState(state2) {
28073
+ animationStates.push(state2);
29508
28074
  },
29509
28075
  removeAnimationState: function removeAnimationState(target) {
29510
28076
  animationStates.splice(indexOfObject(animationStates, {
@@ -29520,8 +28086,8 @@ function AnimationStateManager() {
29520
28086
  return;
29521
28087
  }
29522
28088
  var animating = false, animationTime = 0;
29523
- animationStates.forEach(function(state) {
29524
- var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);
28089
+ animationStates.forEach(function(state2) {
28090
+ var time = 0, target = state2.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state2.rect, targetMatrix = matrix(target, true);
29525
28091
  if (targetMatrix) {
29526
28092
  toRect.top -= targetMatrix.f;
29527
28093
  toRect.left -= targetMatrix.e;
@@ -31573,11 +30139,11 @@ const VueDraggableNext = defineComponent({
31573
30139
  });
31574
30140
  const _hoisted_1$k = ["title"];
31575
30141
  const _hoisted_2$g = { class: "bagel-input" };
31576
- const _hoisted_3$c = { class: "table-side-scroll" };
30142
+ const _hoisted_3$d = { class: "table-side-scroll" };
31577
30143
  const _hoisted_4$9 = { class: "table-header" };
31578
30144
  const _hoisted_5$8 = { class: "table-reorder" };
31579
30145
  const _hoisted_6$4 = { class: "table-action" };
31580
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
30146
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31581
30147
  __name: "TableField",
31582
30148
  props: {
31583
30149
  description: { default: "" },
@@ -31645,7 +30211,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31645
30211
  createElementVNode("div", _hoisted_2$g, [
31646
30212
  createElementVNode("label", null, toDisplayString((_a2 = unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
31647
30213
  ]),
31648
- createElementVNode("div", _hoisted_3$c, [
30214
+ createElementVNode("div", _hoisted_3$d, [
31649
30215
  createElementVNode("div", _hoisted_4$9, [
31650
30216
  (openBlock(true), createElementBlock(Fragment$1, null, renderList((_b = unref(entityMeta)) == null ? void 0 : _b.fields, (field) => {
31651
30217
  return openBlock(), createElementBlock("div", {
@@ -31674,7 +30240,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31674
30240
  key: row.id
31675
30241
  }, [
31676
30242
  createElementVNode("div", _hoisted_5$8, [
31677
- createVNode(unref(_sfc_main$F), { icon: "more_vert" })
30243
+ createVNode(unref(_sfc_main$H), { icon: "more_vert" })
31678
30244
  ]),
31679
30245
  (openBlock(true), createElementBlock(Fragment$1, null, renderList((_a3 = unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
31680
30246
  return openBlock(), createElementBlock("div", {
@@ -31691,7 +30257,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31691
30257
  ], 2);
31692
30258
  }), 128)),
31693
30259
  createElementVNode("div", _hoisted_6$4, [
31694
- createVNode(unref(_sfc_main$F), {
30260
+ createVNode(unref(_sfc_main$H), {
31695
30261
  icon: "delete",
31696
30262
  onClick: ($event) => removeRow(index2)
31697
30263
  }, null, 8, ["onClick"])
@@ -31721,13 +30287,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31721
30287
  };
31722
30288
  }
31723
30289
  });
31724
- const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-cdacf10e"]]);
30290
+ const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cdacf10e"]]);
31725
30291
  const _hoisted_1$j = ["title"];
31726
30292
  const _hoisted_2$f = ["for"];
31727
- const _hoisted_3$b = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
30293
+ const _hoisted_3$c = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
31728
30294
  const _hoisted_4$8 = ["title", "id", "type", "rows", "placeholder", "disabled", "required", "pattern"];
31729
30295
  const _hoisted_5$7 = { key: 2 };
31730
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
30296
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
31731
30297
  __name: "TextInput",
31732
30298
  props: {
31733
30299
  id: {},
@@ -31841,7 +30407,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
31841
30407
  disabled: !unref(editMode),
31842
30408
  required: _ctx.required,
31843
30409
  pattern: _ctx.pattern
31844
- }, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$b)), [
30410
+ }, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$c)), [
31845
30411
  [vModelDynamic, unref(inputVal)]
31846
30412
  ]) : withDirectives((openBlock(), createElementBlock("textarea", mergeProps({
31847
30413
  key: 1,
@@ -31861,12 +30427,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
31861
30427
  ]),
31862
30428
  _ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$7, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true)
31863
30429
  ], 8, _hoisted_2$f),
31864
- _ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$F), {
30430
+ _ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$H), {
31865
30431
  key: 0,
31866
30432
  class: "iconStart",
31867
30433
  icon: _ctx.iconStart
31868
30434
  }, null, 8, ["icon"])) : createCommentVNode("", true),
31869
- _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$F), {
30435
+ _ctx.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
31870
30436
  key: 1,
31871
30437
  icon: _ctx.icon
31872
30438
  }, null, 8, ["icon"])) : createCommentVNode("", true),
@@ -31882,9 +30448,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
31882
30448
  };
31883
30449
  }
31884
30450
  });
31885
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-25f868b2"]]);
30451
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cd4c27ad"]]);
31886
30452
  const _hoisted_1$i = { class: "primary-checkbox" };
31887
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
30453
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
31888
30454
  __name: "Checkbox",
31889
30455
  props: {
31890
30456
  "modelValue": {
@@ -31905,16 +30471,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
31905
30471
  [vModelCheckbox, val.value]
31906
30472
  ]),
31907
30473
  createElementVNode("span", null, [
31908
- createVNode(unref(_sfc_main$F), { icon: "check" })
30474
+ createVNode(unref(_sfc_main$H), { icon: "check" })
31909
30475
  ])
31910
30476
  ]);
31911
30477
  };
31912
30478
  }
31913
30479
  });
31914
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e4cbb088"]]);
30480
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-e4cbb088"]]);
31915
30481
  const _hoisted_1$h = ["title"];
31916
30482
  const _hoisted_2$e = ["id", "placeholder", "required"];
31917
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
30483
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
31918
30484
  __name: "ColorPicker",
31919
30485
  props: {
31920
30486
  label: {},
@@ -31960,13 +30526,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
31960
30526
  });
31961
30527
  const _hoisted_1$g = { class: "datetime-wrap" };
31962
30528
  const _hoisted_2$d = { class: "date-wrap" };
31963
- const _hoisted_3$a = {
30529
+ const _hoisted_3$b = {
31964
30530
  key: 0,
31965
30531
  class: "time-wrap"
31966
30532
  };
31967
30533
  const _hoisted_4$7 = ["id", "name", "value"];
31968
30534
  const _hoisted_5$6 = ["for"];
31969
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30535
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
31970
30536
  __name: "DatePicker",
31971
30537
  props: {
31972
30538
  name: {},
@@ -31998,7 +30564,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
31998
30564
  _: 1
31999
30565
  }, 16, ["modelValue"])
32000
30566
  ]),
32001
- _ctx.showTimeWrap ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
30567
+ _ctx.showTimeWrap ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
32002
30568
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(hours), (hr2) => {
32003
30569
  return openBlock(), createElementBlock(Fragment$1, { key: hr2 }, [
32004
30570
  withDirectives(createElementVNode("input", {
@@ -32022,10 +30588,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
32022
30588
  });
32023
30589
  const _hoisted_1$f = { class: "bagel-input" };
32024
30590
  const _hoisted_2$c = { class: "pb-025" };
32025
- const _hoisted_3$9 = { class: "flex gap-05 flex-wrap" };
30591
+ const _hoisted_3$a = { class: "flex gap-05 flex-wrap" };
32026
30592
  const _hoisted_4$6 = ["id", "name", "value", "checked"];
32027
30593
  const _hoisted_5$5 = ["for"];
32028
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
30594
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
32029
30595
  __name: "RadioPillsInput",
32030
30596
  props: {
32031
30597
  options: {},
@@ -32066,7 +30632,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
32066
30632
  return (_ctx, _cache) => {
32067
30633
  return openBlock(), createElementBlock("div", _hoisted_1$f, [
32068
30634
  createElementVNode("label", _hoisted_2$c, toDisplayString(_ctx.label), 1),
32069
- createElementVNode("div", _hoisted_3$9, [
30635
+ createElementVNode("div", _hoisted_3$a, [
32070
30636
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(cumputedOptions.value, ({ optioId, label, value }, index2) => {
32071
30637
  return openBlock(), createElementBlock("div", {
32072
30638
  class: "radio-pill",
@@ -32088,13 +30654,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
32088
30654
  };
32089
30655
  }
32090
30656
  });
32091
- const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e47ae8b5"]]);
30657
+ const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e47ae8b5"]]);
32092
30658
  const _hoisted_1$e = { class: "bagel-input" };
32093
30659
  const _hoisted_2$b = {
32094
30660
  key: 0,
32095
30661
  class: "imagePreviewWrap"
32096
30662
  };
32097
- const _hoisted_3$8 = ["src"];
30663
+ const _hoisted_3$9 = ["src"];
32098
30664
  const _hoisted_4$5 = { class: "previewName" };
32099
30665
  const _hoisted_5$4 = ["src"];
32100
30666
  const _hoisted_6$3 = { class: "no-margin" };
@@ -32110,7 +30676,7 @@ const _hoisted_12 = {
32110
30676
  key: 0,
32111
30677
  class: "progress"
32112
30678
  };
32113
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
30679
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
32114
30680
  __name: "FileUpload",
32115
30681
  props: /* @__PURE__ */ mergeModels({
32116
30682
  label: {},
@@ -32224,7 +30790,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
32224
30790
  class: "preview",
32225
30791
  src: file.url,
32226
30792
  alt: ""
32227
- }, null, 8, _hoisted_3$8)
30793
+ }, null, 8, _hoisted_3$9)
32228
30794
  ])) : createCommentVNode("", true),
32229
30795
  createElementVNode("div", _hoisted_4$5, [
32230
30796
  _ctx.multiple ? (openBlock(), createElementBlock("img", {
@@ -32270,7 +30836,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
32270
30836
  style: normalizeStyle([`--p:${fileQ.progress}`, { "--b": "2px" }])
32271
30837
  }, [
32272
30838
  fileQ.progress < 100 ? (openBlock(), createElementBlock("span", _hoisted_12, toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : createCommentVNode("", true),
32273
- createVNode(unref(_sfc_main$F), {
30839
+ createVNode(unref(_sfc_main$H), {
32274
30840
  class: "success",
32275
30841
  icon: "check"
32276
30842
  })
@@ -32283,15 +30849,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
32283
30849
  };
32284
30850
  }
32285
30851
  });
32286
- const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1be8d7b1"]]);
30852
+ const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-1be8d7b1"]]);
32287
30853
  const _withScopeId = (n2) => (pushScopeId("data-v-b87221d6"), n2 = n2(), popScopeId(), n2);
32288
30854
  const _hoisted_1$d = ["title"];
32289
30855
  const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
32290
- const _hoisted_3$7 = [
30856
+ const _hoisted_3$8 = [
32291
30857
  _hoisted_2$a
32292
30858
  ];
32293
30859
  const _hoisted_4$4 = ["id"];
32294
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
30860
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
32295
30861
  __name: "ToggleInput",
32296
30862
  props: /* @__PURE__ */ mergeModels({
32297
30863
  label: {},
@@ -32312,7 +30878,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
32312
30878
  }, [
32313
30879
  createElementVNode("div", {
32314
30880
  class: normalizeClass(["switch", { checked: checked.value }])
32315
- }, _hoisted_3$7, 2),
30881
+ }, _hoisted_3$8, 2),
32316
30882
  createElementVNode("label", null, [
32317
30883
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
32318
30884
  withDirectives(createElementVNode("input", {
@@ -32327,7 +30893,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
32327
30893
  };
32328
30894
  }
32329
30895
  });
32330
- const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b87221d6"]]);
30896
+ const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-b87221d6"]]);
32331
30897
  function _isPlaceholder(a2) {
32332
30898
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
32333
30899
  }
@@ -37358,11 +35924,11 @@ var script$6 = defineComponent({
37358
35924
  return { el, width, height };
37359
35925
  }
37360
35926
  });
37361
- const _hoisted_1$5 = { ref: "el" };
35927
+ const _hoisted_1$5$1 = { ref: "el" };
37362
35928
  function render$6(_ctx, _cache, $props, $setup, $data, $options) {
37363
35929
  return openBlock(), createElementBlock(
37364
35930
  "div",
37365
- _hoisted_1$5,
35931
+ _hoisted_1$5$1,
37366
35932
  [
37367
35933
  renderSlot(_ctx.$slots, "main", {
37368
35934
  width: _ctx.width,
@@ -37434,7 +36000,7 @@ var script$5 = defineComponent({
37434
36000
  return { data: data2, canvas, xLines, yLines };
37435
36001
  }
37436
36002
  });
37437
- const _hoisted_1$4 = ["stroke-dasharray"];
36003
+ const _hoisted_1$4$1 = ["stroke-dasharray"];
37438
36004
  const _hoisted_2$3 = {
37439
36005
  key: 0,
37440
36006
  class: "grid-x"
@@ -37504,7 +36070,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
37504
36070
  y2: _ctx.canvas.height
37505
36071
  }, null, 8, _hoisted_7)
37506
36072
  ])
37507
- ], 8, _hoisted_1$4)) : createCommentVNode("v-if", true);
36073
+ ], 8, _hoisted_1$4$1)) : createCommentVNode("v-if", true);
37508
36074
  }
37509
36075
  script$5.render = render$5;
37510
36076
  script$5.__file = "src/components/Grid/index.vue";
@@ -37597,7 +36163,7 @@ var script$4 = defineComponent({
37597
36163
  return { el, show, canvas, direction, style, styleContent, position, items, isRight };
37598
36164
  }
37599
36165
  });
37600
- const _hoisted_1$3 = { key: 0 };
36166
+ const _hoisted_1$3$1 = { key: 0 };
37601
36167
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
37602
36168
  return _ctx.show ? (openBlock(), createElementBlock(
37603
36169
  "div",
@@ -37662,7 +36228,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
37662
36228
  4
37663
36229
  /* STYLE */
37664
36230
  ),
37665
- !_ctx.hideLine ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
36231
+ !_ctx.hideLine ? (openBlock(), createElementBlock("div", _hoisted_1$3$1, [
37666
36232
  _ctx.direction === "horizontal" ? (openBlock(), createElementBlock(
37667
36233
  "div",
37668
36234
  {
@@ -37766,11 +36332,11 @@ var script$2 = defineComponent({
37766
36332
  return { y: y2, canvas, direction };
37767
36333
  }
37768
36334
  });
37769
- const _hoisted_1$2 = {
36335
+ const _hoisted_1$2$1 = {
37770
36336
  key: 0,
37771
36337
  class: "layer-marker"
37772
36338
  };
37773
- const _hoisted_2$2 = ["x", "y", "fill"];
36339
+ const _hoisted_2$2$1 = ["x", "y", "fill"];
37774
36340
  const _hoisted_3$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
37775
36341
  const _hoisted_4$1 = {
37776
36342
  key: 1,
@@ -37779,13 +36345,13 @@ const _hoisted_4$1 = {
37779
36345
  const _hoisted_5$1 = ["x", "y", "fill"];
37780
36346
  const _hoisted_6$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
37781
36347
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
37782
- return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("g", _hoisted_1$2, [
36348
+ return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("g", _hoisted_1$2$1, [
37783
36349
  createElementVNode("text", {
37784
36350
  x: _ctx.canvas.x + 5,
37785
36351
  y: _ctx.y - 5,
37786
36352
  "text-anchor": "start",
37787
36353
  fill: _ctx.color
37788
- }, toDisplayString(_ctx.label), 9, _hoisted_2$2),
36354
+ }, toDisplayString(_ctx.label), 9, _hoisted_2$2$1),
37789
36355
  createElementVNode("line", {
37790
36356
  x1: _ctx.canvas.x,
37791
36357
  y1: _ctx.y,
@@ -38399,8 +36965,8 @@ const _hoisted_1$1$1 = {
38399
36965
  class: "treemap",
38400
36966
  style: { display: "flex", position: "relative" }
38401
36967
  };
38402
- const _hoisted_2$1 = ["width", "height", "viewBox"];
38403
- const _hoisted_3 = { class: "layer-rectangles" };
36968
+ const _hoisted_2$1$1 = ["width", "height", "viewBox"];
36969
+ const _hoisted_3$7 = { class: "layer-rectangles" };
38404
36970
  const _hoisted_4 = ["transform", "onMouseover"];
38405
36971
  const _hoisted_5 = ["width", "height"];
38406
36972
  const _hoisted_6 = {
@@ -38418,7 +36984,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
38418
36984
  viewBox: `0 0 ${_ctx.size.width} ${_ctx.size.height}`,
38419
36985
  ref: "el"
38420
36986
  }, [
38421
- createElementVNode("g", _hoisted_3, [
36987
+ createElementVNode("g", _hoisted_3$7, [
38422
36988
  (openBlock(true), createElementBlock(
38423
36989
  Fragment$1,
38424
36990
  null,
@@ -38459,7 +37025,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
38459
37025
  /* KEYED_FRAGMENT */
38460
37026
  ))
38461
37027
  ])
38462
- ], 8, _hoisted_2$1)),
37028
+ ], 8, _hoisted_2$1$1)),
38463
37029
  renderSlot(_ctx.$slots, "widgets")
38464
37030
  ]);
38465
37031
  }
@@ -38527,13 +37093,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
38527
37093
  }
38528
37094
  script.render = render;
38529
37095
  script.__file = "src/components/HoverBar/index.vue";
38530
- const _hoisted_1$1 = /* @__PURE__ */ createElementVNode("stop", {
37096
+ const _hoisted_1$5 = /* @__PURE__ */ createElementVNode("stop", {
38531
37097
  offset: "100%",
38532
37098
  "stop-color": "white",
38533
37099
  "stop-opacity": "0.4"
38534
37100
  }, null, -1);
38535
37101
  const BRAND_COLOR = "var(--bgl-primary)";
38536
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
37102
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
38537
37103
  __name: "Lineart",
38538
37104
  props: {
38539
37105
  data: {},
@@ -38662,7 +37228,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
38662
37228
  "stop-color": BRAND_COLOR,
38663
37229
  "stop-opacity": "1"
38664
37230
  }),
38665
- _hoisted_1$1
37231
+ _hoisted_1$5
38666
37232
  ])
38667
37233
  ])
38668
37234
  ]),
@@ -38678,37 +37244,53 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
38678
37244
  };
38679
37245
  }
38680
37246
  });
38681
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
37247
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
38682
37248
  __name: "Layout",
38683
37249
  props: {
38684
37250
  gap: { default: 1 },
38685
37251
  h100: { type: Boolean, default: false },
38686
37252
  columns: { default: () => [] },
37253
+ mColumns: { default: () => [] },
37254
+ mRows: { default: () => [] },
38687
37255
  rows: { default: () => [] }
38688
37256
  },
38689
37257
  setup(__props) {
37258
+ useCssVars((_ctx) => ({
37259
+ "7a00a82c": gapSize.value,
37260
+ "30493178": gridTemplateRows.value,
37261
+ "5b203692": gridTemplateColumns.value,
37262
+ "7cba085b": mGridTemplateRows.value,
37263
+ "7abc6a1b": mGridTemplateColumns.value
37264
+ }));
38690
37265
  const props2 = __props;
38691
- const style = computed(() => {
38692
- const obj = { gap: `${props2.gap}rem` };
38693
- if (props2.columns.length)
38694
- obj["grid-template-columns"] = props2.columns.join(" ");
38695
- if (props2.rows.length)
38696
- obj["grid-template-rows"] = props2.rows.join(" ");
38697
- return obj;
37266
+ const gridTemplateRows = computed(() => props2.rows.length ? props2.rows.join(" ") : "auto");
37267
+ const gapSize = computed(() => `${props2.gap}rem`);
37268
+ const mGridTemplateRows = computed(() => {
37269
+ var _a2;
37270
+ if ((_a2 = props2.mRows) == null ? void 0 : _a2.length)
37271
+ return props2.mRows.join(" ");
37272
+ return gridTemplateRows.value;
37273
+ });
37274
+ const gridTemplateColumns = computed(() => props2.columns.length ? props2.columns.join(" ") : "auto");
37275
+ const mGridTemplateColumns = computed(() => {
37276
+ var _a2;
37277
+ if ((_a2 = props2.mColumns) == null ? void 0 : _a2.length)
37278
+ return props2.mColumns.join(" ");
37279
+ return gridTemplateColumns.value;
38698
37280
  });
38699
37281
  return (_ctx, _cache) => {
38700
37282
  return openBlock(), createElementBlock("div", {
38701
- class: normalizeClass(["layout", { "layout-h-100": _ctx.h100 }]),
38702
- style: normalizeStyle(style.value)
37283
+ class: normalizeClass(["layout", { "layout-h-100": _ctx.h100 }])
38703
37284
  }, [
38704
- renderSlot(_ctx.$slots, "default")
38705
- ], 6);
37285
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
37286
+ ], 2);
38706
37287
  };
38707
37288
  }
38708
37289
  });
38709
- const _hoisted_1 = { class: "w-100 px-075" };
38710
- const _hoisted_2 = { key: 0 };
38711
- const _sfc_main = /* @__PURE__ */ defineComponent({
37290
+ const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-977dfbf4"]]);
37291
+ const _hoisted_1$4 = { class: "w-100 px-075" };
37292
+ const _hoisted_2$2 = { key: 0 };
37293
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
38712
37294
  __name: "SidebarMenu",
38713
37295
  props: {
38714
37296
  navLinks: {},
@@ -38726,13 +37308,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38726
37308
  emit2("update:open", isOpen.value);
38727
37309
  }
38728
37310
  return (_ctx, _cache) => {
38729
- const _component_Card = resolveComponent("Card");
38730
37311
  const _directive_tooltip = resolveDirective("tooltip");
38731
- return openBlock(), createBlock(_component_Card, {
37312
+ return openBlock(), createBlock(unref(_sfc_main$t), {
38732
37313
  class: normalizeClass(["flex column gap-05 pt-1 bgl_sidebar", { "wideNav": unref(isOpen) }])
38733
37314
  }, {
38734
37315
  default: withCtx(() => [
38735
- createElementVNode("div", _hoisted_1, [
37316
+ createElementVNode("div", _hoisted_1$4, [
38736
37317
  createVNode(unref(Btn), {
38737
37318
  thin: "",
38738
37319
  color: "light",
@@ -38741,7 +37322,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38741
37322
  onClick: toggleMenu
38742
37323
  })
38743
37324
  ]),
38744
- createTextVNode(),
38745
37325
  !unref(isOpen) || !unref(slots)["brand-open"] ? renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : createCommentVNode("", true),
38746
37326
  unref(isOpen) ? renderSlot(_ctx.$slots, "brand-open", { key: 1 }, void 0, true) : createCommentVNode("", true),
38747
37327
  !_ctx.navLinks ? renderSlot(_ctx.$slots, "default", { key: 2 }, void 0, true) : createCommentVNode("", true),
@@ -38752,11 +37332,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38752
37332
  class: "nav-button px-075"
38753
37333
  }, {
38754
37334
  default: withCtx(() => [
38755
- createVNode(unref(_sfc_main$F), {
37335
+ createVNode(unref(_sfc_main$H), {
38756
37336
  icon: nav2.icon,
38757
37337
  size: 1.4
38758
37338
  }, null, 8, ["icon"]),
38759
- _ctx.open ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(nav2.label), 1)) : createCommentVNode("", true)
37339
+ _ctx.open ? (openBlock(), createElementBlock("p", _hoisted_2$2, toDisplayString(nav2.label), 1)) : createCommentVNode("", true)
38760
37340
  ]),
38761
37341
  _: 2
38762
37342
  }, 1032, ["to"])), [
@@ -38775,53 +37355,221 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38775
37355
  };
38776
37356
  }
38777
37357
  });
38778
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d6bd3d8"]]);
37358
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-8713ae4a"]]);
37359
+ const state = reactive(/* @__PURE__ */ new Map());
37360
+ function useTabs(group) {
37361
+ if (!state.has(group)) {
37362
+ state.set(group, reactive({ currentTab: null }));
37363
+ }
37364
+ const currentTab = computed({
37365
+ get: () => state.get(group).currentTab,
37366
+ set: (val) => {
37367
+ state.get(group).currentTab = val;
37368
+ }
37369
+ });
37370
+ return { currentTab };
37371
+ }
37372
+ const _hoisted_1$3 = { key: 0 };
37373
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
37374
+ __name: "Tabs",
37375
+ props: {
37376
+ tabs: {},
37377
+ modelValue: {}
37378
+ },
37379
+ setup(__props) {
37380
+ const group = Math.random().toString(36).substring(7);
37381
+ const { currentTab } = useTabs(group);
37382
+ return (_ctx, _cache) => {
37383
+ return openBlock(), createElementBlock(Fragment$1, null, [
37384
+ createVNode(unref(TabsNav), {
37385
+ tabs: _ctx.tabs,
37386
+ group: unref(group)
37387
+ }, null, 8, ["tabs", "group"]),
37388
+ unref(currentTab) ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
37389
+ renderSlot(_ctx.$slots, unref(currentTab))
37390
+ ])) : createCommentVNode("", true)
37391
+ ], 64);
37392
+ };
37393
+ }
37394
+ });
37395
+ const _hoisted_1$2 = { class: "tabs grid auto-flow-columns fit-content" };
37396
+ const _hoisted_2$1 = ["onClick"];
37397
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
37398
+ __name: "TabsNav",
37399
+ props: {
37400
+ title: {},
37401
+ tabs: {},
37402
+ modelValue: {},
37403
+ sideTabs: { type: Boolean },
37404
+ group: {}
37405
+ },
37406
+ setup(__props) {
37407
+ const props2 = __props;
37408
+ const { currentTab } = useTabs(props2.group);
37409
+ currentTab.value = props2.modelValue || typeof props2.tabs[0] === "string" ? props2.tabs[0] : props2.tabs[0].id;
37410
+ const selectTab = (tab) => {
37411
+ currentTab.value = typeof tab === "string" ? tab : tab.id;
37412
+ };
37413
+ const isActive = (tab) => {
37414
+ if (typeof tab === "string")
37415
+ return currentTab.value === tab;
37416
+ return currentTab.value === tab.id;
37417
+ };
37418
+ const tabLabel = (tab) => {
37419
+ if (typeof tab === "string")
37420
+ return tab;
37421
+ return tab.label;
37422
+ };
37423
+ return (_ctx, _cache) => {
37424
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
37425
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab, i2) => {
37426
+ return openBlock(), createElementBlock("button", {
37427
+ class: normalizeClass([{ active: isActive(tab) }, "tab"]),
37428
+ onClick: ($event) => selectTab(tab),
37429
+ key: i2
37430
+ }, [
37431
+ typeof tab !== "string" && tab.icon ? (openBlock(), createBlock(unref(_sfc_main$H), {
37432
+ key: 0,
37433
+ icon: tab.icon
37434
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
37435
+ createTextVNode(" " + toDisplayString(tabLabel(tab)), 1)
37436
+ ], 10, _hoisted_2$1);
37437
+ }), 128))
37438
+ ]);
37439
+ };
37440
+ }
37441
+ });
37442
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f737d297"]]);
37443
+ const _hoisted_1$1 = { key: 0 };
37444
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
37445
+ __name: "TabsBody",
37446
+ props: {
37447
+ group: {}
37448
+ },
37449
+ setup(__props) {
37450
+ const props2 = __props;
37451
+ const { currentTab } = useTabs(props2.group);
37452
+ return (_ctx, _cache) => {
37453
+ return unref(currentTab) ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
37454
+ renderSlot(_ctx.$slots, unref(currentTab))
37455
+ ])) : createCommentVNode("", true);
37456
+ };
37457
+ }
37458
+ });
37459
+ const _hoisted_1 = { class: "bgl_card tabs-top" };
37460
+ const _hoisted_2 = { class: "tabs grid auto-flow-columns fit-content" };
37461
+ const _hoisted_3 = ["onClick"];
37462
+ const _sfc_main = /* @__PURE__ */ defineComponent({
37463
+ __name: "TabbedLayout",
37464
+ props: {
37465
+ title: {},
37466
+ tabs: {},
37467
+ modelValue: {},
37468
+ router: {},
37469
+ sideTabs: { type: Boolean }
37470
+ },
37471
+ emits: ["update:modelValue"],
37472
+ setup(__props, { emit: __emit }) {
37473
+ const emit2 = __emit;
37474
+ let activeTab = ref();
37475
+ const props2 = __props;
37476
+ function changeTab(tab) {
37477
+ var _a2;
37478
+ activeTab.value = tab;
37479
+ emit2("update:modelValue", activeTab.value);
37480
+ if (!props2.router)
37481
+ return;
37482
+ void ((_a2 = props2.router) == null ? void 0 : _a2.push({
37483
+ path: props2.router.currentRoute.value.path,
37484
+ query: { ...props2.router.currentRoute.value.query, t: tab },
37485
+ hash: props2.router.currentRoute.value.hash
37486
+ }));
37487
+ }
37488
+ onMounted(() => {
37489
+ var _a2;
37490
+ const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
37491
+ activeTab.value = firstTab;
37492
+ });
37493
+ return (_ctx, _cache) => {
37494
+ return openBlock(), createElementBlock("div", {
37495
+ class: normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
37496
+ }, [
37497
+ createElementVNode("div", _hoisted_1, [
37498
+ renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
37499
+ createElementVNode("div", _hoisted_2, [
37500
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs, (tab) => {
37501
+ var _a2;
37502
+ return openBlock(), createElementBlock("div", {
37503
+ class: normalizeClass([{
37504
+ active: tab === unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
37505
+ }, "tab"]),
37506
+ key: tab,
37507
+ onClick: ($event) => changeTab(tab)
37508
+ }, toDisplayString(tab), 11, _hoisted_3);
37509
+ }), 128))
37510
+ ])
37511
+ ]),
37512
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.tabs.filter((item) => item === unref(activeTab)), (tab) => {
37513
+ return openBlock(), createElementBlock("div", {
37514
+ class: "list-content",
37515
+ key: tab
37516
+ }, [
37517
+ renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
37518
+ ]);
37519
+ }), 128))
37520
+ ], 2);
37521
+ };
37522
+ }
37523
+ });
37524
+ const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd61196d"]]);
38779
37525
  export {
38780
- _sfc_main$n as Accordion,
37526
+ _sfc_main$q as Accordion,
38781
37527
  AccordionItem,
38782
37528
  Alert,
38783
37529
  Avatar,
38784
37530
  Badge,
38785
- _sfc_main$h as BagelForm,
37531
+ _sfc_main$l as BagelForm,
38786
37532
  BagelVue,
38787
- _sfc_main$g as BglField,
38788
- _sfc_main$h as BglForm,
37533
+ _sfc_main$k as BglField,
37534
+ _sfc_main$l as BglForm,
38789
37535
  BglVideo,
38790
37536
  Btn,
38791
- _sfc_main$q as Card,
37537
+ _sfc_main$t as Card,
38792
37538
  Carousel,
38793
37539
  CheckInput,
38794
37540
  Checkbox,
38795
- _sfc_main$7 as ColorPicker,
38796
- ComboBox,
37541
+ _sfc_main$b as ColorPicker,
38797
37542
  Comments,
38798
37543
  DataPreview,
38799
- _sfc_main$e as DateInput,
38800
- _sfc_main$6 as DatePicker,
37544
+ _sfc_main$i as DateInput,
37545
+ _sfc_main$a as DatePicker,
38801
37546
  FileUpload,
38802
- _sfc_main$F as Icon,
37547
+ _sfc_main$H as Icon,
38803
37548
  JSONInput,
38804
- _sfc_main$1 as Layout,
38805
- _sfc_main$2 as Lineart,
38806
- _sfc_main$y as ListItem,
38807
- _sfc_main$z as ListView,
38808
- _sfc_main$F as MaterialIcon,
38809
- _sfc_main$C as Modal,
37549
+ Layout,
37550
+ _sfc_main$6 as Lineart,
37551
+ _sfc_main$A as ListItem,
37552
+ _sfc_main$B as ListView,
37553
+ _sfc_main$H as MaterialIcon,
37554
+ _sfc_main$E as Modal,
38810
37555
  ModalForm,
38811
37556
  ModalPlugin,
38812
37557
  NavBar,
38813
- _sfc_main$v as PageTitle,
38814
- _sfc_main$G as RTXEditor,
37558
+ _sfc_main$y as PageTitle,
37559
+ _sfc_main$I as RTXEditor,
38815
37560
  RadioPillsInput,
38816
37561
  RichTextEditor,
38817
37562
  RouterWrapper,
38818
- _sfc_main$c as SelectInput,
37563
+ SelectInput,
38819
37564
  SidebarMenu,
38820
37565
  TabbedLayout,
38821
37566
  TableField,
38822
37567
  TableSchema,
37568
+ _sfc_main$3 as Tabs,
37569
+ _sfc_main$1 as TabsBody,
37570
+ TabsNav,
38823
37571
  TextInput,
38824
- _sfc_main$o as Title,
37572
+ _sfc_main$r as Title,
38825
37573
  ToggleInput,
38826
37574
  TopBar,
38827
37575
  BagelFormUtils as bagelFormUtils,