@bagelink/vue 0.0.511 → 0.0.522

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 (33) hide show
  1. package/dist/components/Btn.vue.d.ts +2 -0
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Carousel.vue.d.ts +29 -2
  4. package/dist/components/Carousel.vue.d.ts.map +1 -1
  5. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  6. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/DateInput.vue.d.ts +8 -0
  8. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  9. package/dist/components/layout/TabsNav.vue.d.ts +3 -1
  10. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  11. package/dist/index.cjs +262 -357
  12. package/dist/index.mjs +262 -357
  13. package/dist/style.css +247 -187
  14. package/dist/utils/BagelFormUtils.d.ts +2 -0
  15. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/src/components/Btn.vue +8 -1
  18. package/src/components/Card.vue +0 -1
  19. package/src/components/Carousel.vue +134 -117
  20. package/src/components/ListItem.vue +2 -2
  21. package/src/components/ListView.vue +1 -1
  22. package/src/components/MapEmbed.vue +6 -4
  23. package/src/components/Modal.vue +1 -2
  24. package/src/components/TableSchema.vue +4 -4
  25. package/src/components/form/inputs/CheckInput.vue +46 -70
  26. package/src/components/form/inputs/DateInput.vue +9 -0
  27. package/src/components/layout/TabsNav.vue +2 -2
  28. package/src/styles/appearance.css +66 -0
  29. package/src/styles/bagel.css +1 -1
  30. package/src/styles/layout.css +14 -0
  31. package/src/styles/mobilLayout.css +14 -0
  32. package/src/styles/scrollbar.css +2 -4
  33. package/src/utils/BagelFormUtils.ts +23 -0
package/dist/index.cjs CHANGED
@@ -112,21 +112,12 @@ function getPaddingObject(padding) {
112
112
  };
113
113
  }
114
114
  function rectToClientRect$1(rect) {
115
- const {
116
- x: x2,
117
- y: y2,
118
- width,
119
- height
120
- } = rect;
121
115
  return {
122
- width,
123
- height,
124
- top: y2,
125
- left: x2,
126
- right: x2 + width,
127
- bottom: y2 + height,
128
- x: x2,
129
- y: y2
116
+ ...rect,
117
+ top: rect.y,
118
+ left: rect.x,
119
+ right: rect.x + rect.width,
120
+ bottom: rect.y + rect.height
130
121
  };
131
122
  }
132
123
  function computeCoordsFromPlacement(_ref, placement, rtl) {
@@ -297,10 +288,9 @@ async function detectOverflow$1(state2, options) {
297
288
  strategy
298
289
  }));
299
290
  const rect = elementContext === "floating" ? {
291
+ ...rects.floating,
300
292
  x: x2,
301
- y: y2,
302
- width: rects.floating.width,
303
- height: rects.floating.height
293
+ y: y2
304
294
  } : rects.reference;
305
295
  const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
306
296
  const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
@@ -747,16 +737,16 @@ const size = function(options) {
747
737
  widthSide = side;
748
738
  heightSide = alignment === "end" ? "top" : "bottom";
749
739
  }
750
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
751
- const maximumClippingWidth = width - overflow.left - overflow.right;
752
- const overflowAvailableHeight = min$3(height - overflow[heightSide], maximumClippingHeight);
753
- const overflowAvailableWidth = min$3(width - overflow[widthSide], maximumClippingWidth);
740
+ const overflowAvailableHeight = height - overflow[heightSide];
741
+ const overflowAvailableWidth = width - overflow[widthSide];
754
742
  const noShift = !state2.middlewareData.shift;
755
743
  let availableHeight = overflowAvailableHeight;
756
744
  let availableWidth = overflowAvailableWidth;
757
745
  if (isYAxis) {
746
+ const maximumClippingWidth = width - overflow.left - overflow.right;
758
747
  availableWidth = alignment || noShift ? min$3(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
759
748
  } else {
749
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
760
750
  availableHeight = alignment || noShift ? min$3(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
761
751
  }
762
752
  if (noShift && !alignment) {
@@ -5130,6 +5120,7 @@ function txtField(id, label, options) {
5130
5120
  required: options == null ? void 0 : options.required,
5131
5121
  id,
5132
5122
  label,
5123
+ disabled: options == null ? void 0 : options.disabled,
5133
5124
  placeholder: options == null ? void 0 : options.placeholder,
5134
5125
  defaultValue: options == null ? void 0 : options.defaultValue,
5135
5126
  attrs: {
@@ -5165,6 +5156,20 @@ function checkField(id, label, options) {
5165
5156
  label
5166
5157
  };
5167
5158
  }
5159
+ function dateField(id, label, options) {
5160
+ return {
5161
+ $el: "date",
5162
+ class: options == null ? void 0 : options.class,
5163
+ required: options == null ? void 0 : options.required,
5164
+ id,
5165
+ disabled: options == null ? void 0 : options.disabled,
5166
+ label,
5167
+ defaultValue: options == null ? void 0 : options.defaultValue,
5168
+ attrs: {
5169
+ disabled: options == null ? void 0 : options.disabled
5170
+ }
5171
+ };
5172
+ }
5168
5173
  function numField(id, label, options) {
5169
5174
  return {
5170
5175
  $el: "text",
@@ -5173,6 +5178,7 @@ function numField(id, label, options) {
5173
5178
  defaultValue: options == null ? void 0 : options.defaultValue,
5174
5179
  id,
5175
5180
  label,
5181
+ disabled: options == null ? void 0 : options.disabled,
5176
5182
  placeholder: options == null ? void 0 : options.placeholder,
5177
5183
  helptext: options == null ? void 0 : options.helptext,
5178
5184
  attrs: {
@@ -5195,6 +5201,7 @@ function frmRow(...children2) {
5195
5201
  const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5196
5202
  __proto__: null,
5197
5203
  checkField,
5204
+ dateField,
5198
5205
  frmRow,
5199
5206
  numField,
5200
5207
  richText,
@@ -5381,7 +5388,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
5381
5388
  const _hoisted_1$H = { class: "full-nav" };
5382
5389
  const _hoisted_2$y = { class: "nav-scroll" };
5383
5390
  const _hoisted_3$n = { class: "nav-links-wrapper" };
5384
- const _hoisted_4$g = { class: "tooltip" };
5391
+ const _hoisted_4$f = { class: "tooltip" };
5385
5392
  const _hoisted_5$c = { class: "bot-buttons-wrapper" };
5386
5393
  const _hoisted_6$8 = { class: "tooltip" };
5387
5394
  const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
@@ -5430,7 +5437,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
5430
5437
  vue.createVNode(vue.unref(_sfc_main$M), {
5431
5438
  icon: link.icon
5432
5439
  }, null, 8, ["icon"]),
5433
- vue.createElementVNode("div", _hoisted_4$g, vue.toDisplayString(link.label), 1)
5440
+ vue.createElementVNode("div", _hoisted_4$f, vue.toDisplayString(link.label), 1)
5434
5441
  ]),
5435
5442
  _: 2
5436
5443
  }, 1032, ["to", "onClick"]);
@@ -5496,16 +5503,22 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
5496
5503
  role: { default: "button" },
5497
5504
  value: {},
5498
5505
  to: {},
5506
+ href: {},
5499
5507
  round: { type: Boolean, default: false },
5500
5508
  is: { default: "button" },
5501
5509
  onClick: { type: Function, default: () => "" }
5502
5510
  },
5503
5511
  setup(__props) {
5504
5512
  vue.useCssVars((_ctx) => ({
5505
- "23db5d74": computedBackgroundColor.value,
5506
- "82322962": cumputedTextColor.value
5513
+ "38764c20": computedBackgroundColor.value,
5514
+ "63554afb": cumputedTextColor.value
5507
5515
  }));
5508
5516
  const props2 = __props;
5517
+ const isComponent = vue.computed(() => {
5518
+ if (props2.to) return "router-link";
5519
+ if (props2.href) return "a";
5520
+ return props2.is;
5521
+ });
5509
5522
  const slots = vue.useSlots();
5510
5523
  const computedTheme = vue.computed(
5511
5524
  () => {
@@ -5550,7 +5563,8 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
5550
5563
  }
5551
5564
  );
5552
5565
  return (_ctx, _cache) => {
5553
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.to ? "router-link" : _ctx.is), {
5566
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(isComponent.value), {
5567
+ href: _ctx.href,
5554
5568
  to: _ctx.to,
5555
5569
  type: _ctx.type,
5556
5570
  role: _ctx.role,
@@ -5582,11 +5596,11 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
5582
5596
  ]))
5583
5597
  ]),
5584
5598
  _: 3
5585
- }, 8, ["to", "type", "role", "disabled", "class", "onClick"]);
5599
+ }, 8, ["href", "to", "type", "role", "disabled", "class", "onClick"]);
5586
5600
  };
5587
5601
  }
5588
5602
  });
5589
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-957b4083"]]);
5603
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-d5201df6"]]);
5590
5604
  const _hoisted_1$F = {
5591
5605
  key: 0,
5592
5606
  class: "tool-bar"
@@ -5680,13 +5694,12 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
5680
5694
  }, null, 8, ["label"])) : vue.createCommentVNode("", true)
5681
5695
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$w, [
5682
5696
  vue.createVNode(vue.unref(Btn), {
5683
- class: "color-black",
5684
- style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
5697
+ class: "color-black position-start",
5685
5698
  icon: "close",
5686
5699
  thin: "",
5687
5700
  color: "white",
5688
5701
  onClick: closeModal
5689
- }, null, 8, ["style"])
5702
+ })
5690
5703
  ])),
5691
5704
  vue.renderSlot(_ctx.$slots, "default"),
5692
5705
  vue.unref(slots).footer || ((_a2 = _ctx.actions) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_3$m, [
@@ -5821,7 +5834,7 @@ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-
5821
5834
  const _hoisted_1$E = { class: "accordion-item" };
5822
5835
  const _hoisted_2$v = ["aria-expanded", "aria-controls"];
5823
5836
  const _hoisted_3$l = { class: "accordion-label" };
5824
- const _hoisted_4$f = ["id", "aria-hidden"];
5837
+ const _hoisted_4$e = ["id", "aria-hidden"];
5825
5838
  const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5826
5839
  __name: "AccordionItem",
5827
5840
  props: {
@@ -5884,7 +5897,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5884
5897
  "aria-hidden": vue.unref(isOpen) ? "false" : "true"
5885
5898
  }, [
5886
5899
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
5887
- ], 8, _hoisted_4$f)) : vue.createCommentVNode("", true)
5900
+ ], 8, _hoisted_4$e)) : vue.createCommentVNode("", true)
5888
5901
  ]),
5889
5902
  _: 3
5890
5903
  })
@@ -5894,7 +5907,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5894
5907
  });
5895
5908
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-b862dfb8"]]);
5896
5909
  const _sfc_main$G = {};
5897
- const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5910
+ const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 pt-0 pb-05 px-0" };
5898
5911
  const _hoisted_2$u = { class: "p-1" };
5899
5912
  const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5900
5913
  function _sfc_render$2(_ctx, _cache) {
@@ -5908,8 +5921,8 @@ function _sfc_render$2(_ctx, _cache) {
5908
5921
  ]);
5909
5922
  }
5910
5923
  const ListView = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$2]]);
5911
- const _hoisted_1$C = { class: "txt16 no-margin ellipsis line-height-14" };
5912
- const _hoisted_2$t = { class: "txt14 no-margin txt-gray ellipsis" };
5924
+ const _hoisted_1$C = { class: "no-margin ellipsis line-height-14 pb-025" };
5925
+ const _hoisted_2$t = { class: "txt12 no-margin txt-gray ellipsis" };
5913
5926
  const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5914
5927
  __name: "ListItem",
5915
5928
  props: {
@@ -5973,7 +5986,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5973
5986
  const _hoisted_1$A = { class: "table-list-wrap h-100" };
5974
5987
  const _hoisted_2$r = { class: "infinite-wrapper" };
5975
5988
  const _hoisted_3$j = { class: "row first-row" };
5976
- const _hoisted_4$e = ["onClick"];
5989
+ const _hoisted_4$d = ["onClick"];
5977
5990
  const _hoisted_5$b = { class: "flex" };
5978
5991
  const _hoisted_6$7 = ["onClick"];
5979
5992
  const _hoisted_7$2 = { key: 1 };
@@ -6096,7 +6109,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
6096
6109
  }, null, 8, ["class"])
6097
6110
  ], 2)
6098
6111
  ])
6099
- ], 8, _hoisted_4$e);
6112
+ ], 8, _hoisted_4$d);
6100
6113
  }), 128))
6101
6114
  ]),
6102
6115
  vue.createElementVNode("tbody", {
@@ -6139,7 +6152,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
6139
6152
  };
6140
6153
  }
6141
6154
  });
6142
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ae8770a6"]]);
6155
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-8113163b"]]);
6143
6156
  const _sfc_main$C = {};
6144
6157
  const _hoisted_1$z = { class: "flex space-between" };
6145
6158
  function _sfc_render$1(_ctx, _cache) {
@@ -6180,7 +6193,7 @@ const _hoisted_2$q = {
6180
6193
  class: "data-row"
6181
6194
  };
6182
6195
  const _hoisted_3$i = { class: "key" };
6183
- const _hoisted_4$d = { key: 1 };
6196
+ const _hoisted_4$c = { key: 1 };
6184
6197
  const _hoisted_5$a = { class: "key" };
6185
6198
  const _hoisted_6$6 = { class: "vlue" };
6186
6199
  const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
@@ -6232,7 +6245,7 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
6232
6245
  ])) : vue.createCommentVNode("", true)
6233
6246
  ], 64);
6234
6247
  }), 128)),
6235
- !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$d, [
6248
+ !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
6236
6249
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (key) => {
6237
6250
  return vue.openBlock(), vue.createElementBlock("div", {
6238
6251
  key,
@@ -6511,37 +6524,28 @@ const _hoisted_2$n = { class: "Handlers" };
6511
6524
  const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6512
6525
  __name: "Carousel",
6513
6526
  props: {
6514
- autoHeight: {
6515
- type: Boolean,
6516
- default: false
6517
- },
6518
- allowScroll: {
6519
- type: Boolean,
6520
- default: true
6521
- },
6522
- freeDrag: {
6523
- type: Boolean,
6524
- default: true
6525
- },
6526
- items: {
6527
- type: Number,
6528
- default: 4
6529
- },
6530
- index: {
6531
- type: Number,
6532
- default: 0
6533
- }
6527
+ autoHeight: { type: Boolean, default: false },
6528
+ allowScroll: { type: Boolean, default: true },
6529
+ freeDrag: { type: Boolean, default: true },
6530
+ items: { type: Number, default: 4 },
6531
+ index: { type: Number, default: 0 },
6532
+ autoplay: { type: Boolean, default: false },
6533
+ autoplaySpeed: { type: Number, default: 3e3 },
6534
+ loop: { type: Boolean, default: false }
6534
6535
  },
6535
6536
  emits: ["update:index"],
6536
6537
  setup(__props, { emit: __emit }) {
6537
6538
  const props2 = __props;
6538
6539
  const emit2 = __emit;
6539
- const bglSlider = vue.ref();
6540
+ const bglSlider = vue.ref(null);
6540
6541
  let activeSlideIndex = vue.ref(0);
6541
6542
  let isDragging = vue.ref(false);
6542
6543
  let startX = vue.ref(0);
6543
6544
  let scrollLeft = vue.ref(0);
6544
6545
  let isPressed = vue.ref(false);
6546
+ let yHeight = vue.ref("auto");
6547
+ let autoplayInterval = vue.ref(null);
6548
+ let originalSlideCount = vue.ref(0);
6545
6549
  function disableDrag() {
6546
6550
  var _a2, _b;
6547
6551
  (_a2 = bglSlider.value) == null ? void 0 : _a2.querySelectorAll("img").forEach((e) => {
@@ -6549,36 +6553,40 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6549
6553
  });
6550
6554
  for (const e of ((_b = bglSlider.value) == null ? void 0 : _b.children) || []) {
6551
6555
  e.setAttribute("draggable", "false");
6552
- e.addEventListener("click", (e22) => e22.preventDefault());
6556
+ e.addEventListener("click", (el) => el.preventDefault());
6553
6557
  }
6554
6558
  }
6555
- let yHeight = vue.ref("auto");
6556
6559
  function evalHeight() {
6557
6560
  if (!props2.autoHeight || !bglSlider.value) return;
6558
- const slidChildren = bglSlider.value.children[activeSlideIndex.value].children;
6559
- const height = Array.from(slidChildren).map((el) => el.clientHeight).reduce((a2, b2) => a2 + b2, 0);
6561
+ const height = Array.from(bglSlider.value.children[activeSlideIndex.value].children).map((el) => el.clientHeight).reduce((a2, b2) => a2 + b2, 0);
6560
6562
  yHeight.value = `${height}px`;
6561
6563
  }
6562
- function goToSlide(index2) {
6563
- if (!bglSlider.value || index2 < 0 || index2 > bglSlider.value.children.length - 1) return;
6564
- const slider = bglSlider.value;
6564
+ function goToSlide(index2, behavior = "smooth") {
6565
+ if (!bglSlider.value) return;
6566
+ if (props2.loop) {
6567
+ if (index2 >= originalSlideCount.value) {
6568
+ index2 = index2 % originalSlideCount.value;
6569
+ behavior = "auto";
6570
+ } else if (index2 < 0) {
6571
+ index2 = originalSlideCount.value - -index2 % originalSlideCount.value;
6572
+ behavior = "auto";
6573
+ }
6574
+ }
6565
6575
  const isRTL = getComputedStyle(bglSlider.value).direction === "rtl";
6566
- const scrollX = slider.offsetWidth * index2 * (isRTL ? -1 : 1);
6567
- slider.scrollTo({ left: scrollX, behavior: "smooth" });
6576
+ const scrollX = bglSlider.value.offsetWidth * index2 * (isRTL ? -1 : 1);
6577
+ bglSlider.value.scrollTo({ left: scrollX, behavior });
6568
6578
  activeSlideIndex.value = index2;
6569
6579
  evalHeight();
6570
6580
  }
6571
- vue.watch(() => props2.index, goToSlide);
6572
- vue.watch(
6573
- () => activeSlideIndex.value,
6574
- (index2) => {
6575
- emit2("update:index", index2);
6576
- }
6577
- );
6581
+ vue.watch(() => props2.index, (index2) => {
6582
+ goToSlide(index2);
6583
+ });
6584
+ vue.watch(() => activeSlideIndex.value, (index2) => {
6585
+ emit2("update:index", index2);
6586
+ });
6578
6587
  function scrollEnd() {
6579
- const slider = bglSlider.value;
6580
- if (!slider || props2.items !== 1) return;
6581
- const nextSlide = Math.round(slider.scrollLeft / slider.offsetWidth);
6588
+ if (props2.items !== 1 || !bglSlider.value) return;
6589
+ const nextSlide = Math.round(bglSlider.value.scrollLeft / bglSlider.value.offsetWidth);
6582
6590
  goToSlide(nextSlide);
6583
6591
  }
6584
6592
  function stopDragging(e) {
@@ -6586,11 +6594,8 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6586
6594
  const slider = bglSlider.value;
6587
6595
  if (!slider) return;
6588
6596
  const isDragForward = startX.value > e.pageX + slider.offsetLeft;
6589
- if (isDragForward)
6590
- activeSlideIndex.value = Math.ceil(slider.scrollLeft / slider.offsetWidth);
6591
- else activeSlideIndex.value = Math.floor(slider.scrollLeft / slider.offsetWidth);
6597
+ activeSlideIndex.value = isDragForward ? Math.ceil(slider.scrollLeft / slider.offsetWidth) : Math.floor(slider.scrollLeft / slider.offsetWidth);
6592
6598
  if (props2.items === 1) goToSlide(activeSlideIndex.value);
6593
- startX.value = 0;
6594
6599
  document.removeEventListener("mousemove", move);
6595
6600
  document.removeEventListener("mouseup", stopDragging);
6596
6601
  document.removeEventListener("dragend", stopDragging);
@@ -6599,11 +6604,9 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6599
6604
  function move(e) {
6600
6605
  if (!bglSlider.value) return;
6601
6606
  const x2 = e.pageX - bglSlider.value.offsetLeft;
6602
- const walk = x2 - startX.value;
6603
- if (walk > 20 || walk < -20) isDragging.value = true;
6607
+ if (Math.abs(x2 - startX.value) > 20) isDragging.value = true;
6604
6608
  if (!isDragging.value) return;
6605
- const scroll = x2 - startX.value;
6606
- bglSlider.value.scrollLeft = scrollLeft.value - scroll;
6609
+ bglSlider.value.scrollLeft = scrollLeft.value - (x2 - startX.value);
6607
6610
  }
6608
6611
  function startDragging(e) {
6609
6612
  if (e.button !== 0 || !props2.freeDrag || !bglSlider.value) return;
@@ -6615,46 +6618,70 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6615
6618
  document.addEventListener("dragend", stopDragging);
6616
6619
  }
6617
6620
  function next() {
6618
- if (!bglSlider.value) return;
6619
- const slideCount = bglSlider.value.children.length;
6620
- const isLastSlide = activeSlideIndex.value >= slideCount - 1;
6621
- if (isLastSlide) goToSlide(0);
6622
- else goToSlide(activeSlideIndex.value + 1);
6621
+ if (bglSlider.value) {
6622
+ goToSlide(activeSlideIndex.value + 1);
6623
+ }
6623
6624
  }
6624
6625
  function prev() {
6625
- if (!bglSlider.value) return;
6626
- const slideCount = bglSlider.value.children.length;
6627
- if (activeSlideIndex.value === 0) goToSlide(slideCount - 1);
6628
- else goToSlide(activeSlideIndex.value - 1);
6626
+ if (bglSlider.value) {
6627
+ goToSlide(activeSlideIndex.value - 1);
6628
+ }
6629
6629
  }
6630
6630
  function evalWidth() {
6631
- if (!bglSlider.value) return;
6632
- goToSlide(activeSlideIndex.value);
6631
+ if (bglSlider.value) goToSlide(activeSlideIndex.value);
6632
+ }
6633
+ function startAutoplay() {
6634
+ if (props2.autoplay) {
6635
+ autoplayInterval.value = setInterval(next, props2.autoplaySpeed);
6636
+ }
6637
+ }
6638
+ function stopAutoplay() {
6639
+ if (autoplayInterval.value) {
6640
+ clearInterval(autoplayInterval.value);
6641
+ autoplayInterval.value = null;
6642
+ }
6643
+ }
6644
+ function cloneSlides() {
6645
+ if (!bglSlider.value || !props2.loop) return;
6646
+ const slides = Array.from(bglSlider.value.children);
6647
+ originalSlideCount.value = slides.length;
6648
+ slides.forEach((slide) => {
6649
+ const clone2 = slide.cloneNode(true);
6650
+ bglSlider.value.appendChild(clone2);
6651
+ });
6652
+ slides.forEach((slide) => {
6653
+ const clone2 = slide.cloneNode(true);
6654
+ bglSlider.value.insertBefore(clone2, bglSlider.value.firstChild);
6655
+ });
6633
6656
  }
6634
6657
  vue.onMounted(() => {
6658
+ cloneSlides();
6635
6659
  window.addEventListener("resize", evalWidth);
6636
6660
  evalHeight();
6637
6661
  disableDrag();
6662
+ startAutoplay();
6638
6663
  });
6639
6664
  vue.onUnmounted(() => {
6640
6665
  window.removeEventListener("resize", evalWidth);
6666
+ stopAutoplay();
6641
6667
  });
6642
6668
  return (_ctx, _cache) => {
6643
6669
  return vue.openBlock(), vue.createElementBlock("div", {
6644
- class: vue.normalizeClass(["BglCarousel", { autoHeight: __props.autoHeight }]),
6670
+ class: vue.normalizeClass(["BglCarousel", { autoHeight: props2.autoHeight }]),
6645
6671
  style: vue.normalizeStyle({ height: vue.unref(yHeight) })
6646
6672
  }, [
6647
6673
  vue.createElementVNode("div", {
6648
6674
  ref_key: "bglSlider",
6649
6675
  ref: bglSlider,
6650
- class: vue.normalizeClass([{
6651
- dragging: vue.unref(isDragging),
6652
- clicking: vue.unref(isPressed),
6653
- [`slides-${__props.items}`]: true,
6654
- allowScroll: __props.allowScroll
6655
- }, "bgl-slider"]),
6676
+ class: vue.normalizeClass(["bgl-slider", [
6677
+ { dragging: vue.unref(isDragging), clicking: vue.unref(isPressed), [`slides-${props2.items}`]: true, allowScroll: props2.allowScroll }
6678
+ ]]),
6656
6679
  onScrollend: scrollEnd,
6657
- onMousedown: startDragging
6680
+ onMousedown: startDragging,
6681
+ onMouseenter: stopAutoplay,
6682
+ onMouseleave: startAutoplay,
6683
+ onFocusin: stopAutoplay,
6684
+ onFocusout: startAutoplay
6658
6685
  }, [
6659
6686
  vue.unref(isDragging) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t)) : vue.createCommentVNode("", true),
6660
6687
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -6662,14 +6689,14 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6662
6689
  vue.createElementVNode("div", _hoisted_2$n, [
6663
6690
  vue.createElementVNode("span", { onClick: prev }, [
6664
6691
  vue.renderSlot(_ctx.$slots, "prev", {
6665
- prev,
6666
- index: vue.unref(activeSlideIndex)
6692
+ index: vue.unref(activeSlideIndex),
6693
+ prev
6667
6694
  }, void 0, true)
6668
6695
  ]),
6669
6696
  vue.createElementVNode("span", { onClick: next }, [
6670
6697
  vue.renderSlot(_ctx.$slots, "next", {
6671
- next,
6672
- index: vue.unref(activeSlideIndex)
6698
+ index: vue.unref(activeSlideIndex),
6699
+ next
6673
6700
  }, void 0, true)
6674
6701
  ])
6675
6702
  ])
@@ -6677,7 +6704,7 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6677
6704
  };
6678
6705
  }
6679
6706
  });
6680
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-1f9c6644"]]);
6707
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f21373a1"]]);
6681
6708
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
6682
6709
  __name: "ModalConfirm",
6683
6710
  props: {
@@ -16302,6 +16329,7 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
16302
16329
  iconUrl: `data:image/svg+xml;utf8,${encodeURIComponent(markerSVG)}`,
16303
16330
  iconSize: [32, 32]
16304
16331
  });
16332
+ if (!map4.value) initializeMap();
16305
16333
  const marker = L$1.marker(latlng, { icon: customIcon }).addTo(map4.value);
16306
16334
  markers.value.push(marker);
16307
16335
  }
@@ -16565,20 +16593,9 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
16565
16593
  };
16566
16594
  }
16567
16595
  });
16568
- const _withScopeId$3 = (n2) => (vue.pushScopeId("data-v-62e7637b"), n2 = n2(), vue.popScopeId(), n2);
16569
16596
  const _hoisted_1$r = ["title"];
16570
- const _hoisted_2$m = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ vue.createElementVNode("svg", {
16571
- xmlns: "http://www.w3.org/2000/svg",
16572
- height: "24",
16573
- viewBox: "0 -960 960 960",
16574
- width: "24"
16575
- }, [
16576
- /* @__PURE__ */ vue.createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
16577
- ], -1));
16578
- const _hoisted_3$h = [
16579
- _hoisted_2$m
16580
- ];
16581
- const _hoisted_4$c = ["id", "required"];
16597
+ const _hoisted_2$m = ["id", "required"];
16598
+ const _hoisted_3$h = ["for"];
16582
16599
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16583
16600
  __name: "CheckInput",
16584
16601
  props: /* @__PURE__ */ vue.mergeModels({
@@ -16593,34 +16610,33 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16593
16610
  }),
16594
16611
  emits: ["update:modelValue"],
16595
16612
  setup(__props) {
16613
+ const props2 = __props;
16614
+ const inputId = vue.ref(props2.id || Math.random().toString(36).substring(7));
16596
16615
  const checked = vue.useModel(__props, "modelValue");
16597
16616
  return (_ctx, _cache) => {
16598
16617
  return vue.openBlock(), vue.createElementBlock("div", {
16599
- class: vue.normalizeClass(["bagel-input bgl-checkbox", { small: _ctx.small }]),
16618
+ class: vue.normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025", { small: _ctx.small }]),
16600
16619
  title: _ctx.title
16601
16620
  }, [
16602
- vue.createElementVNode("div", {
16603
- class: vue.normalizeClass(["check-square", { checked: checked.value }]),
16604
- onClick: _cache[0] || (_cache[0] = ($event) => checked.value = !checked.value)
16605
- }, _hoisted_3$h, 2),
16606
- vue.createElementVNode("label", null, [
16607
- vue.withDirectives(vue.createElementVNode("input", {
16608
- id: _ctx.id,
16609
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => checked.value = $event),
16610
- required: _ctx.required,
16611
- type: "checkbox"
16612
- }, null, 8, _hoisted_4$c), [
16613
- [vue.vModelCheckbox, checked.value]
16614
- ]),
16621
+ vue.withDirectives(vue.createElementVNode("input", {
16622
+ id: inputId.value,
16623
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
16624
+ required: _ctx.required,
16625
+ type: "checkbox",
16626
+ class: "me-05"
16627
+ }, null, 8, _hoisted_2$m), [
16628
+ [vue.vModelCheckbox, checked.value]
16629
+ ]),
16630
+ vue.createElementVNode("label", { for: inputId.value }, [
16615
16631
  vue.renderSlot(_ctx.$slots, "label", {}, () => [
16616
16632
  vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
16617
16633
  ], true)
16618
- ])
16634
+ ], 8, _hoisted_3$h)
16619
16635
  ], 10, _hoisted_1$r);
16620
16636
  };
16621
16637
  }
16622
16638
  });
16623
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-62e7637b"]]);
16639
+ const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-ac068f18"]]);
16624
16640
  function toDate(argument) {
16625
16641
  const argStr = Object.prototype.toString.call(argument);
16626
16642
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
@@ -25055,7 +25071,11 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
25055
25071
  enableTime: { type: Boolean, default: false },
25056
25072
  modelValue: {},
25057
25073
  defaultValue: {},
25058
- extraProps: {}
25074
+ extraProps: {},
25075
+ allowedDates: {},
25076
+ timePickerInline: { type: Boolean },
25077
+ minutesIncrement: {},
25078
+ minutesGridIncrement: {}
25059
25079
  },
25060
25080
  emits: ["update:modelValue"],
25061
25081
  setup(__props, { emit: __emit }) {
@@ -25090,8 +25110,14 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
25090
25110
  modelValue: date2.value,
25091
25111
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
25092
25112
  "auto-apply": true,
25093
- "enable-time-picker": _ctx.enableTime
25094
- }, _ctx.extraProps), null, 16, ["modelValue", "enable-time-picker"])
25113
+ "enable-time-picker": _ctx.enableTime,
25114
+ "allowed-dates": _ctx.allowedDates
25115
+ }, _ctx.extraProps, {
25116
+ "time-picker-inline": _ctx.timePickerInline,
25117
+ "minutes-increment": _ctx.minutesIncrement,
25118
+ "minutes-grid-increment": _ctx.minutesGridIncrement,
25119
+ "start-time": { hours: 8, minutes: 0 }
25120
+ }), null, 16, ["modelValue", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
25095
25121
  ], 10, _hoisted_1$q);
25096
25122
  };
25097
25123
  }
@@ -30744,7 +30770,7 @@ let NodeType$1 = class NodeType2 {
30744
30770
  }
30745
30771
  /**
30746
30772
  Returns true if the given fragment is valid content for this node
30747
- type.
30773
+ type with the given attributes.
30748
30774
  */
30749
30775
  validContent(content) {
30750
30776
  let result2 = this.contentMatch.matchFragment(content);
@@ -30888,7 +30914,6 @@ class Schema {
30888
30914
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
30889
30915
  */
30890
30916
  constructor(spec) {
30891
- this.linebreakReplacement = null;
30892
30917
  this.cached = /* @__PURE__ */ Object.create(null);
30893
30918
  let instanceSpec = this.spec = {};
30894
30919
  for (let prop3 in spec)
@@ -30902,13 +30927,6 @@ class Schema {
30902
30927
  let type3 = this.nodes[prop3], contentExpr = type3.spec.content || "", markExpr = type3.spec.marks;
30903
30928
  type3.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));
30904
30929
  type3.inlineContent = type3.contentMatch.inlineContent;
30905
- if (type3.spec.linebreakReplacement) {
30906
- if (this.linebreakReplacement)
30907
- throw new RangeError("Multiple linebreak nodes defined");
30908
- if (!type3.isInline || !type3.isLeaf)
30909
- throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");
30910
- this.linebreakReplacement = type3;
30911
- }
30912
30930
  type3.markSet = markExpr == "_" ? null : markExpr ? gatherMarks(this, markExpr.split(" ")) : markExpr == "" || !type3.inlineContent ? [] : null;
30913
30931
  }
30914
30932
  for (let prop3 in this.marks) {
@@ -30993,12 +31011,6 @@ function gatherMarks(schema, marks) {
30993
31011
  }
30994
31012
  return found2;
30995
31013
  }
30996
- function isTagRule(rule) {
30997
- return rule.tag != null;
30998
- }
30999
- function isStyleRule(rule) {
31000
- return rule.style != null;
31001
- }
31002
31014
  class DOMParser {
31003
31015
  /**
31004
31016
  Create a parser that targets the given schema, using the given
@@ -31010,9 +31022,9 @@ class DOMParser {
31010
31022
  this.tags = [];
31011
31023
  this.styles = [];
31012
31024
  rules.forEach((rule) => {
31013
- if (isTagRule(rule))
31025
+ if (rule.tag)
31014
31026
  this.tags.push(rule);
31015
- else if (isStyleRule(rule))
31027
+ else if (rule.style)
31016
31028
  this.styles.push(rule);
31017
31029
  });
31018
31030
  this.normalizeLists = !this.tags.some((r2) => {
@@ -31273,10 +31285,10 @@ class ParseContext {
31273
31285
  this.addElement(dom);
31274
31286
  }
31275
31287
  withStyleRules(dom, f2) {
31276
- let style2 = dom.style;
31277
- if (!style2 || !style2.length)
31288
+ let style2 = dom.getAttribute("style");
31289
+ if (!style2)
31278
31290
  return f2();
31279
- let marks = this.readStyles(dom.style);
31291
+ let marks = this.readStyles(parseStyles(style2));
31280
31292
  if (!marks)
31281
31293
  return;
31282
31294
  let [addMarks, removeMarks] = marks, top2 = this.top;
@@ -31370,10 +31382,9 @@ class ParseContext {
31370
31382
  // had a rule with `ignore` set.
31371
31383
  readStyles(styles) {
31372
31384
  let add2 = Mark$1.none, remove2 = Mark$1.none;
31373
- for (let i2 = 0, l2 = styles.length; i2 < l2; i2++) {
31374
- let name = styles.item(i2);
31385
+ for (let i2 = 0; i2 < styles.length; i2 += 2) {
31375
31386
  for (let after = void 0; ; ) {
31376
- let rule = this.parser.matchStyle(name, styles.getPropertyValue(name), this, after);
31387
+ let rule = this.parser.matchStyle(styles[i2], styles[i2 + 1], this, after);
31377
31388
  if (!rule)
31378
31389
  break;
31379
31390
  if (rule.ignore)
@@ -31660,6 +31671,12 @@ function normalizeList(dom) {
31660
31671
  function matches(dom, selector2) {
31661
31672
  return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector2);
31662
31673
  }
31674
+ function parseStyles(style2) {
31675
+ let re2 = /\s*([\w-]+)\s*:\s*([^;]+)/g, m2, result2 = [];
31676
+ while (m2 = re2.exec(style2))
31677
+ result2.push(m2[1], m2[2].trim());
31678
+ return result2;
31679
+ }
31663
31680
  function copy$2(obj) {
31664
31681
  let copy2 = {};
31665
31682
  for (let prop3 in obj)
@@ -32527,8 +32544,7 @@ class ReplaceAroundStep extends Step$1 {
32527
32544
  }
32528
32545
  map(mapping) {
32529
32546
  let from2 = mapping.mapResult(this.from, 1), to2 = mapping.mapResult(this.to, -1);
32530
- let gapFrom = this.from == this.gapFrom ? from2.pos : mapping.map(this.gapFrom, -1);
32531
- let gapTo = this.to == this.gapTo ? to2.pos : mapping.map(this.gapTo, 1);
32547
+ let gapFrom = mapping.map(this.gapFrom, -1), gapTo = mapping.map(this.gapTo, 1);
32532
32548
  if (from2.deletedAcross && to2.deletedAcross || gapFrom < from2.pos || gapTo > to2.pos)
32533
32549
  return null;
32534
32550
  return new ReplaceAroundStep(from2.pos, to2.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
@@ -32641,7 +32657,7 @@ function removeMark(tr2, from2, to2, mark) {
32641
32657
  });
32642
32658
  matched.forEach((m2) => tr2.step(new RemoveMarkStep(m2.from, m2.to, m2.style)));
32643
32659
  }
32644
- function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatch, clearNewlines = true) {
32660
+ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatch) {
32645
32661
  let node = tr2.doc.nodeAt(pos);
32646
32662
  let replSteps = [], cur = pos + 1;
32647
32663
  for (let i2 = 0; i2 < node.childCount; i2++) {
@@ -32654,7 +32670,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
32654
32670
  for (let j = 0; j < child.marks.length; j++)
32655
32671
  if (!parentType.allowsMarkType(child.marks[j].type))
32656
32672
  tr2.step(new RemoveMarkStep(cur, end2, child.marks[j]));
32657
- if (clearNewlines && child.isText && parentType.whitespace != "pre") {
32673
+ if (child.isText && !parentType.spec.code) {
32658
32674
  let m2, newline = /\r?\n|\r/g, slice4;
32659
32675
  while (m2 = newline.exec(child.text)) {
32660
32676
  if (!slice4)
@@ -32763,45 +32779,14 @@ function setBlockType$1(tr2, from2, to2, type3, attrs) {
32763
32779
  let mapFrom = tr2.steps.length;
32764
32780
  tr2.doc.nodesBetween(from2, to2, (node, pos) => {
32765
32781
  if (node.isTextblock && !node.hasMarkup(type3, attrs) && canChangeType(tr2.doc, tr2.mapping.slice(mapFrom).map(pos), type3)) {
32766
- let convertNewlines = null;
32767
- if (type3.schema.linebreakReplacement) {
32768
- let pre = type3.whitespace == "pre", supportLinebreak = !!type3.contentMatch.matchType(type3.schema.linebreakReplacement);
32769
- if (pre && !supportLinebreak)
32770
- convertNewlines = false;
32771
- else if (!pre && supportLinebreak)
32772
- convertNewlines = true;
32773
- }
32774
- if (convertNewlines === false)
32775
- replaceLinebreaks(tr2, node, pos, mapFrom);
32776
- clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type3, void 0, convertNewlines === null);
32782
+ tr2.clearIncompatible(tr2.mapping.slice(mapFrom).map(pos, 1), type3);
32777
32783
  let mapping = tr2.mapping.slice(mapFrom);
32778
32784
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
32779
32785
  tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type3.create(attrs, null, node.marks)), 0, 0), 1, true));
32780
- if (convertNewlines === true)
32781
- replaceNewlines(tr2, node, pos, mapFrom);
32782
32786
  return false;
32783
32787
  }
32784
32788
  });
32785
32789
  }
32786
- function replaceNewlines(tr2, node, pos, mapFrom) {
32787
- node.forEach((child, offset2) => {
32788
- if (child.isText) {
32789
- let m2, newline = /\r?\n|\r/g;
32790
- while (m2 = newline.exec(child.text)) {
32791
- let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset2 + m2.index);
32792
- tr2.replaceWith(start2, start2 + 1, node.type.schema.linebreakReplacement.create());
32793
- }
32794
- }
32795
- });
32796
- }
32797
- function replaceLinebreaks(tr2, node, pos, mapFrom) {
32798
- node.forEach((child, offset2) => {
32799
- if (child.type == child.type.schema.linebreakReplacement) {
32800
- let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset2);
32801
- tr2.replaceWith(start2, start2 + 1, node.type.schema.text("\n"));
32802
- }
32803
- });
32804
- }
32805
32790
  function canChangeType(doc2, pos, type3) {
32806
32791
  let $pos = doc2.resolve(pos), index2 = $pos.index();
32807
32792
  return $pos.parent.canReplaceWith(index2, index2 + 1, type3);
@@ -34567,9 +34552,6 @@ const textRange = function(node, from2, to2) {
34567
34552
  range2.setStart(node, from2 || 0);
34568
34553
  return range2;
34569
34554
  };
34570
- const clearReusedRange = function() {
34571
- reusedRange = null;
34572
- };
34573
34555
  const isEquivalentPosition = function(node, off2, targetNode, targetOff) {
34574
34556
  return targetNode && (scanFor(node, off2, targetNode, targetOff, -1) || scanFor(node, off2, targetNode, targetOff, 1));
34575
34557
  };
@@ -34597,40 +34579,6 @@ function scanFor(node, off2, targetNode, targetOff, dir) {
34597
34579
  function nodeSize(node) {
34598
34580
  return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;
34599
34581
  }
34600
- function textNodeBefore$1(node, offset2) {
34601
- for (; ; ) {
34602
- if (node.nodeType == 3 && offset2)
34603
- return node;
34604
- if (node.nodeType == 1 && offset2 > 0) {
34605
- if (node.contentEditable == "false")
34606
- return null;
34607
- node = node.childNodes[offset2 - 1];
34608
- offset2 = nodeSize(node);
34609
- } else if (node.parentNode && !hasBlockDesc(node)) {
34610
- offset2 = domIndex(node);
34611
- node = node.parentNode;
34612
- } else {
34613
- return null;
34614
- }
34615
- }
34616
- }
34617
- function textNodeAfter$1(node, offset2) {
34618
- for (; ; ) {
34619
- if (node.nodeType == 3 && offset2 < node.nodeValue.length)
34620
- return node;
34621
- if (node.nodeType == 1 && offset2 < node.childNodes.length) {
34622
- if (node.contentEditable == "false")
34623
- return null;
34624
- node = node.childNodes[offset2];
34625
- offset2 = 0;
34626
- } else if (node.parentNode && !hasBlockDesc(node)) {
34627
- offset2 = domIndex(node) + 1;
34628
- node = node.parentNode;
34629
- } else {
34630
- return null;
34631
- }
34632
- }
34633
- }
34634
34582
  function isOnEdge(node, offset2, parent) {
34635
34583
  for (let atStart = offset2 == 0, atEnd = offset2 == nodeSize(node); atStart || atEnd; ) {
34636
34584
  if (node == parent)
@@ -34702,14 +34650,6 @@ const android = /Android \d/.test(agent);
34702
34650
  const webkit = !!doc && "webkitFontSmoothing" in doc.documentElement.style;
34703
34651
  const webkit_version = webkit ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
34704
34652
  function windowRect(doc2) {
34705
- let vp = doc2.defaultView && doc2.defaultView.visualViewport;
34706
- if (vp)
34707
- return {
34708
- left: 0,
34709
- right: vp.width,
34710
- top: 0,
34711
- bottom: vp.height
34712
- };
34713
34653
  return {
34714
34654
  left: 0,
34715
34655
  right: doc2.documentElement.clientWidth,
@@ -34911,14 +34851,14 @@ function posFromCaret(view, node, offset2, coords) {
34911
34851
  let desc = view.docView.nearestDesc(cur, true);
34912
34852
  if (!desc)
34913
34853
  return null;
34914
- if (desc.dom.nodeType == 1 && (desc.node.isBlock && desc.parent || !desc.contentDOM)) {
34854
+ if (desc.dom.nodeType == 1 && (desc.node.isBlock && desc.parent && !sawBlock || !desc.contentDOM)) {
34915
34855
  let rect = desc.dom.getBoundingClientRect();
34916
- if (desc.node.isBlock && desc.parent) {
34917
- if (!sawBlock && rect.left > coords.left || rect.top > coords.top)
34856
+ if (desc.node.isBlock && desc.parent && !sawBlock) {
34857
+ sawBlock = true;
34858
+ if (rect.left > coords.left || rect.top > coords.top)
34918
34859
  outsideBlock = desc.posBefore;
34919
- else if (!sawBlock && rect.right < coords.left || rect.bottom < coords.top)
34860
+ else if (rect.right < coords.left || rect.bottom < coords.top)
34920
34861
  outsideBlock = desc.posAfter;
34921
- sawBlock = true;
34922
34862
  }
34923
34863
  if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) {
34924
34864
  let before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2 : coords.left < (rect.left + rect.right) / 2;
@@ -35533,9 +35473,6 @@ class ViewDesc {
35533
35473
  get ignoreForCoords() {
35534
35474
  return false;
35535
35475
  }
35536
- isText(text) {
35537
- return false;
35538
- }
35539
35476
  }
35540
35477
  class WidgetViewDesc extends ViewDesc {
35541
35478
  constructor(parent, widget, view, pos) {
@@ -35774,7 +35711,8 @@ class NodeViewDesc extends ViewDesc {
35774
35711
  let { from: from2, to: to2 } = view.state.selection;
35775
35712
  if (!(view.state.selection instanceof TextSelection) || from2 < pos || to2 > pos + this.node.content.size)
35776
35713
  return null;
35777
- let textNode = view.input.compositionNode;
35714
+ let sel = view.domSelectionRange();
35715
+ let textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);
35778
35716
  if (!textNode || !this.dom.contains(textNode.parentNode))
35779
35717
  return null;
35780
35718
  if (this.node.inlineContent) {
@@ -35840,11 +35778,10 @@ class NodeViewDesc extends ViewDesc {
35840
35778
  }
35841
35779
  // Remove selected node marking from this node.
35842
35780
  deselectNode() {
35843
- if (this.nodeDOM.nodeType == 1) {
35781
+ if (this.nodeDOM.nodeType == 1)
35844
35782
  this.nodeDOM.classList.remove("ProseMirror-selectednode");
35845
- if (this.contentDOM || !this.node.type.spec.draggable)
35846
- this.dom.removeAttribute("draggable");
35847
- }
35783
+ if (this.contentDOM || !this.node.type.spec.draggable)
35784
+ this.dom.removeAttribute("draggable");
35848
35785
  }
35849
35786
  get domAtom() {
35850
35787
  return this.node.isAtom;
@@ -35910,9 +35847,6 @@ class TextViewDesc extends NodeViewDesc {
35910
35847
  get domAtom() {
35911
35848
  return false;
35912
35849
  }
35913
- isText(text) {
35914
- return this.node.text == text;
35915
- }
35916
35850
  }
35917
35851
  class TrailingHackViewDesc extends ViewDesc {
35918
35852
  parseRule() {
@@ -36428,6 +36362,23 @@ function iosHacks(dom) {
36428
36362
  dom.style.cssText = oldCSS;
36429
36363
  }
36430
36364
  }
36365
+ function nearbyTextNode(node, offset2) {
36366
+ for (; ; ) {
36367
+ if (node.nodeType == 3)
36368
+ return node;
36369
+ if (node.nodeType == 1 && offset2 > 0) {
36370
+ if (node.childNodes.length > offset2 && node.childNodes[offset2].nodeType == 3)
36371
+ return node.childNodes[offset2];
36372
+ node = node.childNodes[offset2 - 1];
36373
+ offset2 = nodeSize(node);
36374
+ } else if (node.nodeType == 1 && offset2 < node.childNodes.length) {
36375
+ node = node.childNodes[offset2];
36376
+ offset2 = 0;
36377
+ } else {
36378
+ return null;
36379
+ }
36380
+ }
36381
+ }
36431
36382
  function findTextInFragment(frag, text, from2, to2) {
36432
36383
  for (let i2 = 0, pos = 0; i2 < frag.childCount && pos <= to2; ) {
36433
36384
  let child = frag.child(i2++), childStart = pos;
@@ -37002,7 +36953,7 @@ function serializeForClipboard(view, slice4) {
37002
36953
  if (firstChild && firstChild.nodeType == 1)
37003
36954
  firstChild.setAttribute("data-pm-slice", `${openStart} ${openEnd}${wrappers ? ` -${wrappers}` : ""} ${JSON.stringify(context)}`);
37004
36955
  let text = view.someProp("clipboardTextSerializer", (f2) => f2(slice4, view)) || slice4.content.textBetween(0, slice4.content.size, "\n\n");
37005
- return { dom: wrap2, text, slice: slice4 };
36956
+ return { dom: wrap2, text };
37006
36957
  }
37007
36958
  function parseFromClipboard(view, text, html, plainText, $context) {
37008
36959
  let inCode = $context.parent.type.spec.code;
@@ -37222,7 +37173,6 @@ class InputState {
37222
37173
  this.lastTouch = 0;
37223
37174
  this.lastAndroidDelete = 0;
37224
37175
  this.composing = false;
37225
- this.compositionNode = null;
37226
37176
  this.composingTimeout = -1;
37227
37177
  this.compositionNodes = [];
37228
37178
  this.compositionEndedAt = -2e8;
@@ -37471,7 +37421,7 @@ class MouseDown {
37471
37421
  }
37472
37422
  const target = flushed ? null : event.target;
37473
37423
  const targetDesc = target ? view.docView.nearestDesc(target, true) : null;
37474
- this.target = targetDesc && targetDesc.dom.nodeType == 1 ? targetDesc.dom : null;
37424
+ this.target = targetDesc ? targetDesc.dom : null;
37475
37425
  let { selection } = view.state;
37476
37426
  if (event.button == 0 && targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || selection instanceof NodeSelection && selection.from <= targetPos && selection.to > targetPos)
37477
37427
  this.mightDrag = {
@@ -37603,7 +37553,6 @@ editHandlers.compositionend = (view, event) => {
37603
37553
  view.input.composing = false;
37604
37554
  view.input.compositionEndedAt = event.timeStamp;
37605
37555
  view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;
37606
- view.input.compositionNode = null;
37607
37556
  if (view.input.compositionPendingChanges)
37608
37557
  Promise.resolve().then(() => view.domObserver.flush());
37609
37558
  view.input.compositionID++;
@@ -37623,24 +37572,6 @@ function clearComposition(view) {
37623
37572
  while (view.input.compositionNodes.length > 0)
37624
37573
  view.input.compositionNodes.pop().markParentsDirty();
37625
37574
  }
37626
- function findCompositionNode(view) {
37627
- let sel = view.domSelectionRange();
37628
- if (!sel.focusNode)
37629
- return null;
37630
- let textBefore = textNodeBefore$1(sel.focusNode, sel.focusOffset);
37631
- let textAfter = textNodeAfter$1(sel.focusNode, sel.focusOffset);
37632
- if (textBefore && textAfter && textBefore != textAfter) {
37633
- let descAfter = textAfter.pmViewDesc;
37634
- if (!descAfter || !descAfter.isText(textAfter.nodeValue)) {
37635
- return textAfter;
37636
- } else if (view.input.compositionNode == textAfter) {
37637
- let descBefore = textBefore.pmViewDesc;
37638
- if (!(!descBefore || !descBefore.isText(textBefore.nodeValue)))
37639
- return textAfter;
37640
- }
37641
- }
37642
- return textBefore || textAfter;
37643
- }
37644
37575
  function timestampFromCustomEvent() {
37645
37576
  let event = document.createEvent("Event");
37646
37577
  event.initEvent("event", true, true);
@@ -37775,8 +37706,7 @@ handlers.dragstart = (view, _event) => {
37775
37706
  if (desc && desc.node.type.spec.draggable && desc != view.docView)
37776
37707
  node = NodeSelection.create(view.state.doc, desc.posBefore);
37777
37708
  }
37778
- let draggedSlice = (node || view.state.selection).content();
37779
- let { dom, text, slice: slice4 } = serializeForClipboard(view, draggedSlice);
37709
+ let slice4 = (node || view.state.selection).content(), { dom, text } = serializeForClipboard(view, slice4);
37780
37710
  event.dataTransfer.clearData();
37781
37711
  event.dataTransfer.setData(brokenClipboardAPI ? "Text" : "text/html", dom.innerHTML);
37782
37712
  event.dataTransfer.effectAllowed = "copyMove";
@@ -38196,6 +38126,9 @@ class DecorationSet {
38196
38126
  return this;
38197
38127
  return local.length || children2.length ? new DecorationSet(local, children2) : empty$1;
38198
38128
  }
38129
+ /**
38130
+ @internal
38131
+ */
38199
38132
  forChild(offset2, node) {
38200
38133
  if (this == empty$1)
38201
38134
  return this;
@@ -38674,21 +38607,14 @@ class DOMObserver {
38674
38607
  }
38675
38608
  }
38676
38609
  }
38677
- if (gecko && added.length) {
38610
+ if (gecko && added.length > 1) {
38678
38611
  let brs = added.filter((n2) => n2.nodeName == "BR");
38679
38612
  if (brs.length == 2) {
38680
- let [a2, b2] = brs;
38613
+ let a2 = brs[0], b2 = brs[1];
38681
38614
  if (a2.parentNode && a2.parentNode.parentNode == b2.parentNode)
38682
38615
  b2.remove();
38683
38616
  else
38684
38617
  a2.remove();
38685
- } else {
38686
- let { focusNode } = this.currentSelection;
38687
- for (let br2 of brs) {
38688
- let parent = br2.parentNode;
38689
- if (parent && parent.nodeName == "LI" && (!focusNode || blockParent(view, focusNode) != parent))
38690
- br2.remove();
38691
- }
38692
38618
  }
38693
38619
  }
38694
38620
  let readSel = null;
@@ -38768,20 +38694,7 @@ function checkCSS(view) {
38768
38694
  cssCheckWarned = true;
38769
38695
  }
38770
38696
  }
38771
- function rangeToSelectionRange(view, range2) {
38772
- let anchorNode = range2.startContainer, anchorOffset = range2.startOffset;
38773
- let focusNode = range2.endContainer, focusOffset = range2.endOffset;
38774
- let currentAnchor = view.domAtPos(view.state.selection.anchor);
38775
- if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset))
38776
- [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];
38777
- return { anchorNode, anchorOffset, focusNode, focusOffset };
38778
- }
38779
- function safariShadowSelectionRange(view, selection) {
38780
- if (selection.getComposedRanges) {
38781
- let range2 = selection.getComposedRanges(view.root)[0];
38782
- if (range2)
38783
- return rangeToSelectionRange(view, range2);
38784
- }
38697
+ function safariShadowSelectionRange(view) {
38785
38698
  let found2;
38786
38699
  function read2(event) {
38787
38700
  event.preventDefault();
@@ -38791,15 +38704,12 @@ function safariShadowSelectionRange(view, selection) {
38791
38704
  view.dom.addEventListener("beforeinput", read2, true);
38792
38705
  document.execCommand("indent");
38793
38706
  view.dom.removeEventListener("beforeinput", read2, true);
38794
- return found2 ? rangeToSelectionRange(view, found2) : null;
38795
- }
38796
- function blockParent(view, node) {
38797
- for (let p2 = node.parentNode; p2 && p2 != view.dom; p2 = p2.parentNode) {
38798
- let desc = view.docView.nearestDesc(p2, true);
38799
- if (desc && desc.node.isBlock)
38800
- return p2;
38801
- }
38802
- return null;
38707
+ let anchorNode = found2.startContainer, anchorOffset = found2.startOffset;
38708
+ let focusNode = found2.endContainer, focusOffset = found2.endOffset;
38709
+ let currentAnchor = view.domAtPos(view.state.selection.anchor);
38710
+ if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset))
38711
+ [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];
38712
+ return { anchorNode, anchorOffset, focusNode, focusOffset };
38803
38713
  }
38804
38714
  function parseBetween(view, from_, to_) {
38805
38715
  let { node: parent, fromOffset, toOffset, from: from2, to: to2 } = view.docView.parseRange(from_, to_);
@@ -38919,6 +38829,10 @@ function readDOMChange(view, from2, to2, typeOver, addedNodes) {
38919
38829
  return;
38920
38830
  }
38921
38831
  }
38832
+ if (chrome && view.cursorWrapper && parse2.sel && parse2.sel.anchor == view.cursorWrapper.deco.from && parse2.sel.head == parse2.sel.anchor) {
38833
+ let size2 = change.endB - change.start;
38834
+ parse2.sel = { anchor: parse2.sel.anchor + size2, head: parse2.sel.anchor + size2 };
38835
+ }
38922
38836
  view.input.domChangeCount++;
38923
38837
  if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof TextSelection) {
38924
38838
  if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse2.from) {
@@ -38942,7 +38856,7 @@ function readDOMChange(view, from2, to2, typeOver, addedNodes) {
38942
38856
  view.input.lastIOSEnter = 0;
38943
38857
  return;
38944
38858
  }
38945
- if (view.state.selection.anchor > change.start && looksLikeBackspace(doc2, change.start, change.endA, $from, $to) && view.someProp("handleKeyDown", (f2) => f2(view, keyEvent(8, "Backspace")))) {
38859
+ if (view.state.selection.anchor > change.start && looksLikeJoin(doc2, change.start, change.endA, $from, $to) && view.someProp("handleKeyDown", (f2) => f2(view, keyEvent(8, "Backspace")))) {
38946
38860
  if (android && chrome)
38947
38861
  view.domObserver.suppressSelectionUpdates();
38948
38862
  return;
@@ -39026,18 +38940,12 @@ function isMarkChange(cur, prev) {
39026
38940
  if (Fragment.from(updated).eq(cur))
39027
38941
  return { mark, type: type3 };
39028
38942
  }
39029
- function looksLikeBackspace(old, start2, end2, $newStart, $newEnd) {
39030
- if (
39031
- // The content must have shrunk
39032
- end2 - start2 <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into
39033
- skipClosingAndOpening($newStart, true, false) < $newEnd.pos
39034
- )
38943
+ function looksLikeJoin(old, start2, end2, $newStart, $newEnd) {
38944
+ if (!$newStart.parent.isTextblock || // The content must have shrunk
38945
+ end2 - start2 <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into
38946
+ skipClosingAndOpening($newStart, true, false) < $newEnd.pos)
39035
38947
  return false;
39036
38948
  let $start = old.resolve(start2);
39037
- if (!$newStart.parent.isTextblock) {
39038
- let after = $start.nodeAfter;
39039
- return after != null && end2 == start2 + after.nodeSize;
39040
- }
39041
38949
  if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock)
39042
38950
  return false;
39043
38951
  let $next = old.resolve(skipClosingAndOpening($start, true, true));
@@ -39226,10 +39134,8 @@ class EditorView {
39226
39134
  let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state2.selection.empty && selectionContextChanged(prev.selection, state2.selection);
39227
39135
  if (updateDoc) {
39228
39136
  let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;
39229
- if (this.composing)
39230
- this.input.compositionNode = findCompositionNode(this);
39231
39137
  if (redraw || !this.docView.update(state2.doc, outerDeco, innerDeco, this)) {
39232
- this.docView.updateOuterDeco(outerDeco);
39138
+ this.docView.updateOuterDeco([]);
39233
39139
  this.docView.destroy();
39234
39140
  this.docView = docViewDesc(state2.doc, outerDeco, innerDeco, this.dom, this);
39235
39141
  }
@@ -39488,7 +39394,6 @@ class EditorView {
39488
39394
  }
39489
39395
  this.docView.destroy();
39490
39396
  this.docView = null;
39491
- clearReusedRange();
39492
39397
  }
39493
39398
  /**
39494
39399
  This is true when the view has been
@@ -39524,8 +39429,7 @@ class EditorView {
39524
39429
  @internal
39525
39430
  */
39526
39431
  domSelectionRange() {
39527
- let sel = this.domSelection();
39528
- return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom && safariShadowSelectionRange(this, sel) || sel;
39432
+ return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom ? safariShadowSelectionRange(this) : this.domSelection();
39529
39433
  }
39530
39434
  /**
39531
39435
  @internal
@@ -45488,16 +45392,16 @@ function mapRanges(ranges, mapping) {
45488
45392
  }
45489
45393
  return result2;
45490
45394
  }
45491
- function histTransaction(history2, state2, redo2) {
45395
+ function histTransaction(history2, state2, dispatch, redo2) {
45492
45396
  let preserveItems = mustPreserveItems(state2);
45493
45397
  let histOptions = historyKey.get(state2).spec.config;
45494
45398
  let pop = (redo2 ? history2.undone : history2.done).popEvent(state2, preserveItems);
45495
45399
  if (!pop)
45496
- return null;
45400
+ return;
45497
45401
  let selection = pop.selection.resolve(pop.transform.doc);
45498
45402
  let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state2.selection.getBookmark(), histOptions, preserveItems);
45499
45403
  let newHist = new HistoryState(redo2 ? added : pop.remaining, redo2 ? pop.remaining : added, null, 0, -1);
45500
- return pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist });
45404
+ dispatch(pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist }).scrollIntoView());
45501
45405
  }
45502
45406
  let cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
45503
45407
  function mustPreserveItems(state2) {
@@ -45545,21 +45449,22 @@ function history(config = {}) {
45545
45449
  }
45546
45450
  });
45547
45451
  }
45548
- function buildCommand(redo2, scroll) {
45549
- return (state2, dispatch) => {
45550
- let hist = historyKey.getState(state2);
45551
- if (!hist || (redo2 ? hist.undone : hist.done).eventCount == 0)
45552
- return false;
45553
- if (dispatch) {
45554
- let tr2 = histTransaction(hist, state2, redo2);
45555
- if (tr2)
45556
- dispatch(scroll ? tr2.scrollIntoView() : tr2);
45557
- }
45558
- return true;
45559
- };
45560
- }
45561
- const undo = buildCommand(false, true);
45562
- const redo = buildCommand(true, true);
45452
+ const undo = (state2, dispatch) => {
45453
+ let hist = historyKey.getState(state2);
45454
+ if (!hist || hist.done.eventCount == 0)
45455
+ return false;
45456
+ if (dispatch)
45457
+ histTransaction(hist, state2, dispatch, false);
45458
+ return true;
45459
+ };
45460
+ const redo = (state2, dispatch) => {
45461
+ let hist = historyKey.getState(state2);
45462
+ if (!hist || hist.undone.eventCount == 0)
45463
+ return false;
45464
+ if (dispatch)
45465
+ histTransaction(hist, state2, dispatch, true);
45466
+ return true;
45467
+ };
45563
45468
  const History = Extension.create({
45564
45469
  name: "history",
45565
45470
  addOptions() {
@@ -61980,7 +61885,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
61980
61885
  };
61981
61886
  }
61982
61887
  });
61983
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b6feec19"]]);
61888
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-718e118e"]]);
61984
61889
  const _hoisted_1$1 = { key: 0 };
61985
61890
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
61986
61891
  __name: "TabsBody",