@zipify/wysiwyg 4.2.2-0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wysiwyg.mjs CHANGED
@@ -6,6 +6,7 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  import { defineComponent, ref, onMounted, onBeforeUnmount, h, getCurrentInstance, watchEffect, nextTick, unref, Teleport, reactive, markRaw, customRef, openBlock, createElementBlock, renderSlot, computed, normalizeClass, toRef, watch, Fragment as Fragment$1, renderList, normalizeStyle, inject, onUnmounted, provide, createElementVNode, createVNode, toDisplayString, createCommentVNode, shallowRef, getCurrentScope, onScopeDispose, shallowReadonly, useCssVars, createBlock, Transition, withCtx, withDirectives, pushScopeId, popScopeId, createTextVNode, normalizeProps, guardReactiveProps, withModifiers, resolveComponent, resolveDynamicComponent, KeepAlive, mergeModels, useModel } from "vue";
8
8
  import { ColorModel, ColorPicker } from "@zipify/colorpicker";
9
+ import SimpleBar from "simplebar";
9
10
  function OrderedMap(content) {
10
11
  this.content = content;
11
12
  }
@@ -8402,10 +8403,10 @@ editHandlers.keydown = (view, _event) => {
8402
8403
  if (event.keyCode != 229)
8403
8404
  view.domObserver.forceFlush();
8404
8405
  if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
8405
- let now2 = Date.now();
8406
- view.input.lastIOSEnter = now2;
8406
+ let now = Date.now();
8407
+ view.input.lastIOSEnter = now;
8407
8408
  view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
8408
- if (view.input.lastIOSEnter == now2) {
8409
+ if (view.input.lastIOSEnter == now) {
8409
8410
  view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")));
8410
8411
  view.input.lastIOSEnter = 0;
8411
8412
  }
@@ -8536,14 +8537,14 @@ handlers.mousedown = (view, _event) => {
8536
8537
  let event = _event;
8537
8538
  view.input.shiftKey = event.shiftKey;
8538
8539
  let flushed = forceDOMFlush(view);
8539
- let now2 = Date.now(), type = "singleClick";
8540
- if (now2 - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
8540
+ let now = Date.now(), type = "singleClick";
8541
+ if (now - view.input.lastClick.time < 500 && isNear(event, view.input.lastClick) && !event[selectNodeModifier]) {
8541
8542
  if (view.input.lastClick.type == "singleClick")
8542
8543
  type = "doubleClick";
8543
8544
  else if (view.input.lastClick.type == "doubleClick")
8544
8545
  type = "tripleClick";
8545
8546
  }
8546
- view.input.lastClick = { time: now2, x: event.clientX, y: event.clientY, type };
8547
+ view.input.lastClick = { time: now, x: event.clientX, y: event.clientY, type };
8547
8548
  let pos = view.posAtCoords(eventCoords(event));
8548
8549
  if (!pos)
8549
8550
  return;
@@ -11618,10 +11619,10 @@ function cleanUpSchemaItem(data) {
11618
11619
  );
11619
11620
  }
11620
11621
  function getSchemaByResolvedExtensions(extensions2, editor) {
11621
- var _a2;
11622
+ var _a;
11622
11623
  const allAttributes = getAttributesFromExtensions(extensions2);
11623
11624
  const { nodeExtensions, markExtensions } = splitExtensions(extensions2);
11624
- const topNode = (_a2 = nodeExtensions.find((extension) => getExtensionField(extension, "topNode"))) === null || _a2 === void 0 ? void 0 : _a2.name;
11625
+ const topNode = (_a = nodeExtensions.find((extension) => getExtensionField(extension, "topNode"))) === null || _a === void 0 ? void 0 : _a.name;
11625
11626
  const nodes = Object.fromEntries(nodeExtensions.map((extension) => {
11626
11627
  const extensionAttributes = allAttributes.filter((attribute) => attribute.type === extension.name);
11627
11628
  const context = {
@@ -11650,8 +11651,8 @@ function getSchemaByResolvedExtensions(extensions2, editor) {
11650
11651
  defining: callOrReturn(getExtensionField(extension, "defining", context)),
11651
11652
  isolating: callOrReturn(getExtensionField(extension, "isolating", context)),
11652
11653
  attrs: Object.fromEntries(extensionAttributes.map((extensionAttribute) => {
11653
- var _a3;
11654
- return [extensionAttribute.name, { default: (_a3 = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a3 === void 0 ? void 0 : _a3.default }];
11654
+ var _a2;
11655
+ return [extensionAttribute.name, { default: (_a2 = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a2 === void 0 ? void 0 : _a2.default }];
11655
11656
  }))
11656
11657
  });
11657
11658
  const parseHTML = callOrReturn(getExtensionField(extension, "parseHTML", context));
@@ -11694,8 +11695,8 @@ function getSchemaByResolvedExtensions(extensions2, editor) {
11694
11695
  spanning: callOrReturn(getExtensionField(extension, "spanning", context)),
11695
11696
  code: callOrReturn(getExtensionField(extension, "code", context)),
11696
11697
  attrs: Object.fromEntries(extensionAttributes.map((extensionAttribute) => {
11697
- var _a3;
11698
- return [extensionAttribute.name, { default: (_a3 = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a3 === void 0 ? void 0 : _a3.default }];
11698
+ var _a2;
11699
+ return [extensionAttribute.name, { default: (_a2 = extensionAttribute === null || extensionAttribute === void 0 ? void 0 : extensionAttribute.attribute) === null || _a2 === void 0 ? void 0 : _a2.default }];
11699
11700
  }))
11700
11701
  });
11701
11702
  const parseHTML = callOrReturn(getExtensionField(extension, "parseHTML", context));
@@ -11733,8 +11734,8 @@ const getTextContentFromNodes = ($from, maxMatch = 500) => {
11733
11734
  let textBefore = "";
11734
11735
  const sliceEndPos = $from.parentOffset;
11735
11736
  $from.parent.nodesBetween(Math.max(0, sliceEndPos - maxMatch), sliceEndPos, (node, pos, parent, index) => {
11736
- var _a2, _b;
11737
- const chunk = ((_b = (_a2 = node.type.spec).toText) === null || _b === void 0 ? void 0 : _b.call(_a2, {
11737
+ var _a, _b;
11738
+ const chunk = ((_b = (_a = node.type.spec).toText) === null || _b === void 0 ? void 0 : _b.call(_a, {
11738
11739
  node,
11739
11740
  pos,
11740
11741
  parent,
@@ -11774,7 +11775,7 @@ const inputRuleMatcherHandler = (text, find2) => {
11774
11775
  return result;
11775
11776
  };
11776
11777
  function run$1$1(config) {
11777
- var _a2;
11778
+ var _a;
11778
11779
  const { editor, from: from2, to, text, rules, plugin } = config;
11779
11780
  const { view } = editor;
11780
11781
  if (view.composing) {
@@ -11783,7 +11784,7 @@ function run$1$1(config) {
11783
11784
  const $from = view.state.doc.resolve(from2);
11784
11785
  if (
11785
11786
  // check for code node
11786
- $from.parent.type.spec.code || !!((_a2 = $from.nodeBefore || $from.nodeAfter) === null || _a2 === void 0 ? void 0 : _a2.marks.find((mark) => mark.type.spec.code))
11787
+ $from.parent.type.spec.code || !!((_a = $from.nodeBefore || $from.nodeAfter) === null || _a === void 0 ? void 0 : _a.marks.find((mark) => mark.type.spec.code))
11787
11788
  ) {
11788
11789
  return false;
11789
11790
  }
@@ -11985,8 +11986,8 @@ function pasteRulesPlugin(props) {
11985
11986
  // we register a global drag handler to track the current drag source element
11986
11987
  view(view) {
11987
11988
  const handleDragstart = (event) => {
11988
- var _a2;
11989
- dragSourceElement = ((_a2 = view.dom.parentElement) === null || _a2 === void 0 ? void 0 : _a2.contains(event.target)) ? view.dom.parentElement : null;
11989
+ var _a;
11990
+ dragSourceElement = ((_a = view.dom.parentElement) === null || _a === void 0 ? void 0 : _a.contains(event.target)) ? view.dom.parentElement : null;
11990
11991
  };
11991
11992
  window.addEventListener("dragstart", handleDragstart);
11992
11993
  return {
@@ -12003,8 +12004,8 @@ function pasteRulesPlugin(props) {
12003
12004
  return false;
12004
12005
  },
12005
12006
  paste: (_view, event) => {
12006
- var _a2;
12007
- const html = (_a2 = event.clipboardData) === null || _a2 === void 0 ? void 0 : _a2.getData("text/html");
12007
+ var _a;
12008
+ const html = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("text/html");
12008
12009
  pasteEvent = event;
12009
12010
  isPastedFromProseMirror = !!(html === null || html === void 0 ? void 0 : html.includes("data-pm-slice"));
12010
12011
  return false;
@@ -12059,7 +12060,7 @@ class ExtensionManager {
12059
12060
  this.extensions = ExtensionManager.resolve(extensions2);
12060
12061
  this.schema = getSchemaByResolvedExtensions(this.extensions, editor);
12061
12062
  this.extensions.forEach((extension) => {
12062
- var _a2;
12063
+ var _a;
12063
12064
  this.editor.extensionStorage[extension.name] = extension.storage;
12064
12065
  const context = {
12065
12066
  name: extension.name,
@@ -12069,7 +12070,7 @@ class ExtensionManager {
12069
12070
  type: getSchemaTypeByName(extension.name, this.schema)
12070
12071
  };
12071
12072
  if (extension.type === "mark") {
12072
- const keepOnSplit = (_a2 = callOrReturn(getExtensionField(extension, "keepOnSplit", context))) !== null && _a2 !== void 0 ? _a2 : true;
12073
+ const keepOnSplit = (_a = callOrReturn(getExtensionField(extension, "keepOnSplit", context))) !== null && _a !== void 0 ? _a : true;
12073
12074
  if (keepOnSplit) {
12074
12075
  this.splittableMarks.push(extension.name);
12075
12076
  }
@@ -12342,7 +12343,7 @@ function getTextBetween(startNode, range, options) {
12342
12343
  let text = "";
12343
12344
  let separated = true;
12344
12345
  startNode.nodesBetween(from2, to, (node, pos, parent, index) => {
12345
- var _a2;
12346
+ var _a;
12346
12347
  const textSerializer = textSerializers === null || textSerializers === void 0 ? void 0 : textSerializers[node.type.name];
12347
12348
  if (textSerializer) {
12348
12349
  if (node.isBlock && !separated) {
@@ -12359,7 +12360,7 @@ function getTextBetween(startNode, range, options) {
12359
12360
  });
12360
12361
  }
12361
12362
  } else if (node.isText) {
12362
- text += (_a2 = node === null || node === void 0 ? void 0 : node.text) === null || _a2 === void 0 ? void 0 : _a2.slice(Math.max(from2, pos) - pos, to - pos);
12363
+ text += (_a = node === null || node === void 0 ? void 0 : node.text) === null || _a === void 0 ? void 0 : _a.slice(Math.max(from2, pos) - pos, to - pos);
12363
12364
  separated = false;
12364
12365
  } else if (node.isBlock && !separated) {
12365
12366
  text += blockSeparator;
@@ -12398,10 +12399,10 @@ const ClipboardTextSerializer = Extension.create({
12398
12399
  });
12399
12400
  const blur = () => ({ editor, view }) => {
12400
12401
  requestAnimationFrame(() => {
12401
- var _a2;
12402
+ var _a;
12402
12403
  if (!editor.isDestroyed) {
12403
12404
  view.dom.blur();
12404
- (_a2 = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a2 === void 0 ? void 0 : _a2.removeAllRanges();
12405
+ (_a = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
12405
12406
  }
12406
12407
  });
12407
12408
  return true;
@@ -13290,8 +13291,8 @@ function isList(name, extensions2) {
13290
13291
  return group.split(" ").includes("list");
13291
13292
  }
13292
13293
  function isNodeEmpty(node) {
13293
- var _a2;
13294
- const defaultContent = (_a2 = node.type.createAndFill()) === null || _a2 === void 0 ? void 0 : _a2.toJSON();
13294
+ var _a;
13295
+ const defaultContent = (_a = node.type.createAndFill()) === null || _a === void 0 ? void 0 : _a.toJSON();
13295
13296
  const content = node.toJSON();
13296
13297
  return JSON.stringify(defaultContent) === JSON.stringify(content);
13297
13298
  }
@@ -13329,14 +13330,14 @@ function posToDOMRect(view, from2, to) {
13329
13330
  };
13330
13331
  }
13331
13332
  function canSetMark(state, tr2, newMarkType) {
13332
- var _a2;
13333
+ var _a;
13333
13334
  const { selection } = tr2;
13334
13335
  let cursor = null;
13335
13336
  if (isTextSelection(selection)) {
13336
13337
  cursor = selection.$cursor;
13337
13338
  }
13338
13339
  if (cursor) {
13339
- const currentMarks = (_a2 = state.storedMarks) !== null && _a2 !== void 0 ? _a2 : cursor.marks();
13340
+ const currentMarks = (_a = state.storedMarks) !== null && _a !== void 0 ? _a : cursor.marks();
13340
13341
  return !!newMarkType.isInSet(currentMarks) || !currentMarks.some((mark) => mark.type.excludes(newMarkType));
13341
13342
  }
13342
13343
  const { ranges } = selection;
@@ -13506,7 +13507,7 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr: tr2, state, dispatch, e
13506
13507
  return true;
13507
13508
  };
13508
13509
  const splitListItem = (typeOrName) => ({ tr: tr2, state, dispatch, editor }) => {
13509
- var _a2;
13510
+ var _a;
13510
13511
  const type = getNodeType(typeOrName, state.schema);
13511
13512
  const { $from, $to } = state.selection;
13512
13513
  const node = state.selection.node;
@@ -13530,7 +13531,7 @@ const splitListItem = (typeOrName) => ({ tr: tr2, state, dispatch, editor }) =>
13530
13531
  }
13531
13532
  const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;
13532
13533
  const newNextTypeAttributes2 = getSplittedAttributes(extensionAttributes, $from.node().type.name, $from.node().attrs);
13533
- const nextType2 = ((_a2 = type.contentMatch.defaultType) === null || _a2 === void 0 ? void 0 : _a2.createAndFill(newNextTypeAttributes2)) || void 0;
13534
+ const nextType2 = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
13534
13535
  wrap2 = wrap2.append(Fragment.from(type.createAndFill(null, nextType2) || void 0));
13535
13536
  const start2 = $from.before($from.depth - (depthBefore - 1));
13536
13537
  tr2.replace(start2, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0));
@@ -13714,7 +13715,7 @@ const unsetAllMarks = () => ({ tr: tr2, dispatch }) => {
13714
13715
  return true;
13715
13716
  };
13716
13717
  const unsetMark = (typeOrName, options = {}) => ({ tr: tr2, state, dispatch }) => {
13717
- var _a2;
13718
+ var _a;
13718
13719
  const { extendEmptyMarkRange = false } = options;
13719
13720
  const { selection } = tr2;
13720
13721
  const type = getMarkType(typeOrName, state.schema);
@@ -13724,7 +13725,7 @@ const unsetMark = (typeOrName, options = {}) => ({ tr: tr2, state, dispatch }) =
13724
13725
  }
13725
13726
  if (empty2 && extendEmptyMarkRange) {
13726
13727
  let { from: from2, to } = selection;
13727
- const attrs = (_a2 = $from.marks().find((mark) => mark.type === type)) === null || _a2 === void 0 ? void 0 : _a2.attrs;
13728
+ const attrs = (_a = $from.marks().find((mark) => mark.type === type)) === null || _a === void 0 ? void 0 : _a.attrs;
13728
13729
  const range = getMarkRange($from, type, attrs);
13729
13730
  if (range) {
13730
13731
  from2 = range.from;
@@ -14348,8 +14349,8 @@ let Editor$1 = class Editor extends EventEmitter {
14348
14349
  return;
14349
14350
  }
14350
14351
  transaction.steps.forEach((step) => {
14351
- var _a2;
14352
- return (_a2 = this.capturedTransaction) === null || _a2 === void 0 ? void 0 : _a2.step(step);
14352
+ var _a;
14353
+ return (_a = this.capturedTransaction) === null || _a === void 0 ? void 0 : _a.step(step);
14353
14354
  });
14354
14355
  return;
14355
14356
  }
@@ -14455,8 +14456,8 @@ let Editor$1 = class Editor extends EventEmitter {
14455
14456
  * Check if the editor is already destroyed.
14456
14457
  */
14457
14458
  get isDestroyed() {
14458
- var _a2;
14459
- return !((_a2 = this.view) === null || _a2 === void 0 ? void 0 : _a2.docView);
14459
+ var _a;
14460
+ return !((_a = this.view) === null || _a === void 0 ? void 0 : _a.docView);
14460
14461
  }
14461
14462
  };
14462
14463
  function textblockTypeInputRule(config) {
@@ -15859,7 +15860,7 @@ function orderModifiers(modifiers2) {
15859
15860
  }));
15860
15861
  }, []);
15861
15862
  }
15862
- function debounce$2(fn2) {
15863
+ function debounce$1(fn2) {
15863
15864
  var pending;
15864
15865
  return function() {
15865
15866
  if (!pending) {
@@ -15980,7 +15981,7 @@ function popperGenerator(generatorOptions) {
15980
15981
  },
15981
15982
  // Async and optimistically optimized update – it will not be executed if
15982
15983
  // not necessary (debounced to run at most once-per-tick)
15983
- update: debounce$2(function() {
15984
+ update: debounce$1(function() {
15984
15985
  return new Promise(function(resolve) {
15985
15986
  instance.forceUpdate();
15986
15987
  resolve(state);
@@ -16040,7 +16041,7 @@ var TOUCH_OPTIONS = {
16040
16041
  var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO2() {
16041
16042
  return document.body;
16042
16043
  };
16043
- function hasOwnProperty$d(obj, key) {
16044
+ function hasOwnProperty$c(obj, key) {
16044
16045
  return {}.hasOwnProperty.call(obj, key);
16045
16046
  }
16046
16047
  function getValueAtIndexOrReturn(value, index, defaultValue) {
@@ -16057,7 +16058,7 @@ function isType(value, type) {
16057
16058
  function invokeWithArgsOrReturn(value, args) {
16058
16059
  return typeof value === "function" ? value.apply(void 0, args) : value;
16059
16060
  }
16060
- function debounce$1(fn2, ms) {
16061
+ function debounce(fn2, ms) {
16061
16062
  if (ms === 0) {
16062
16063
  return fn2;
16063
16064
  }
@@ -16206,12 +16207,12 @@ function onDocumentTouchStart() {
16206
16207
  }
16207
16208
  }
16208
16209
  function onDocumentMouseMove() {
16209
- var now2 = performance.now();
16210
- if (now2 - lastMouseMoveTime < 20) {
16210
+ var now = performance.now();
16211
+ if (now - lastMouseMoveTime < 20) {
16211
16212
  currentInput.isTouch = false;
16212
16213
  document.removeEventListener("mousemove", onDocumentMouseMove);
16213
16214
  }
16214
- lastMouseMoveTime = now2;
16215
+ lastMouseMoveTime = now;
16215
16216
  }
16216
16217
  function onWindowBlur() {
16217
16218
  var activeElement = document.activeElement;
@@ -16412,7 +16413,7 @@ function validateProps(partialProps, plugins) {
16412
16413
  var keys2 = Object.keys(partialProps);
16413
16414
  keys2.forEach(function(prop) {
16414
16415
  var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
16415
- var didPassUnknownProp = !hasOwnProperty$d(nonPluginProps, prop);
16416
+ var didPassUnknownProp = !hasOwnProperty$c(nonPluginProps, prop);
16416
16417
  if (didPassUnknownProp) {
16417
16418
  didPassUnknownProp = plugins.filter(function(plugin) {
16418
16419
  return plugin.name === prop;
@@ -16541,7 +16542,7 @@ function createTippy(reference2, passedProps) {
16541
16542
  var currentTransitionEndListener;
16542
16543
  var onFirstUpdate;
16543
16544
  var listeners = [];
16544
- var debouncedOnMouseMove = debounce$1(onMouseMove, props.interactiveDebounce);
16545
+ var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
16545
16546
  var currentTarget;
16546
16547
  var id = idCounter++;
16547
16548
  var popperInstance = null;
@@ -17076,7 +17077,7 @@ function createTippy(reference2, passedProps) {
17076
17077
  addListeners();
17077
17078
  if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
17078
17079
  cleanupInteractiveMouseListeners();
17079
- debouncedOnMouseMove = debounce$1(onMouseMove, nextProps.interactiveDebounce);
17080
+ debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
17080
17081
  }
17081
17082
  if (prevProps.triggerTarget && !nextProps.triggerTarget) {
17082
17083
  normalizeToArray(prevProps.triggerTarget).forEach(function(node) {
@@ -17330,12 +17331,12 @@ class BubbleMenuView {
17330
17331
  setTimeout(() => this.update(this.editor.view));
17331
17332
  };
17332
17333
  this.blurHandler = ({ event }) => {
17333
- var _a2;
17334
+ var _a;
17334
17335
  if (this.preventHide) {
17335
17336
  this.preventHide = false;
17336
17337
  return;
17337
17338
  }
17338
- if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a2 = this.element.parentNode) === null || _a2 === void 0 ? void 0 : _a2.contains(event.relatedTarget))) {
17339
+ if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget))) {
17339
17340
  return;
17340
17341
  }
17341
17342
  this.hide();
@@ -17357,7 +17358,7 @@ class BubbleMenuView {
17357
17358
  }, this.updateDelay);
17358
17359
  };
17359
17360
  this.updateHandler = (view2, selectionChanged, docChanged, oldState) => {
17360
- var _a2, _b, _c;
17361
+ var _a, _b, _c;
17361
17362
  const { state, composing } = view2;
17362
17363
  const { selection } = state;
17363
17364
  const isSame = !selectionChanged && !docChanged;
@@ -17368,7 +17369,7 @@ class BubbleMenuView {
17368
17369
  const { ranges } = selection;
17369
17370
  const from2 = Math.min(...ranges.map((range) => range.$from.pos));
17370
17371
  const to = Math.max(...ranges.map((range) => range.$to.pos));
17371
- const shouldShow2 = (_a2 = this.shouldShow) === null || _a2 === void 0 ? void 0 : _a2.call(this, {
17372
+ const shouldShow2 = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, {
17372
17373
  editor: this.editor,
17373
17374
  view: view2,
17374
17375
  state,
@@ -17444,16 +17445,16 @@ class BubbleMenuView {
17444
17445
  this.updateHandler(view, selectionChanged, docChanged, oldState);
17445
17446
  }
17446
17447
  show() {
17447
- var _a2;
17448
- (_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.show();
17448
+ var _a;
17449
+ (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.show();
17449
17450
  }
17450
17451
  hide() {
17451
- var _a2;
17452
- (_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.hide();
17452
+ var _a;
17453
+ (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.hide();
17453
17454
  }
17454
17455
  destroy() {
17455
- var _a2, _b;
17456
- if ((_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.popper.firstChild) {
17456
+ var _a, _b;
17457
+ if ((_a = this.tippy) === null || _a === void 0 ? void 0 : _a.popper.firstChild) {
17457
17458
  this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler);
17458
17459
  }
17459
17460
  (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.destroy();
@@ -17516,12 +17517,12 @@ class FloatingMenuView {
17516
17517
  setTimeout(() => this.update(this.editor.view));
17517
17518
  };
17518
17519
  this.blurHandler = ({ event }) => {
17519
- var _a2;
17520
+ var _a;
17520
17521
  if (this.preventHide) {
17521
17522
  this.preventHide = false;
17522
17523
  return;
17523
17524
  }
17524
- if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a2 = this.element.parentNode) === null || _a2 === void 0 ? void 0 : _a2.contains(event.relatedTarget))) {
17525
+ if ((event === null || event === void 0 ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget))) {
17525
17526
  return;
17526
17527
  }
17527
17528
  this.hide();
@@ -17563,7 +17564,7 @@ class FloatingMenuView {
17563
17564
  }
17564
17565
  }
17565
17566
  update(view, oldState) {
17566
- var _a2, _b, _c;
17567
+ var _a, _b, _c;
17567
17568
  const { state } = view;
17568
17569
  const { doc: doc2, selection } = state;
17569
17570
  const { from: from2, to } = selection;
@@ -17572,7 +17573,7 @@ class FloatingMenuView {
17572
17573
  return;
17573
17574
  }
17574
17575
  this.createTooltip();
17575
- const shouldShow = (_a2 = this.shouldShow) === null || _a2 === void 0 ? void 0 : _a2.call(this, {
17576
+ const shouldShow = (_a = this.shouldShow) === null || _a === void 0 ? void 0 : _a.call(this, {
17576
17577
  editor: this.editor,
17577
17578
  view,
17578
17579
  state,
@@ -17588,16 +17589,16 @@ class FloatingMenuView {
17588
17589
  this.show();
17589
17590
  }
17590
17591
  show() {
17591
- var _a2;
17592
- (_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.show();
17592
+ var _a;
17593
+ (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.show();
17593
17594
  }
17594
17595
  hide() {
17595
- var _a2;
17596
- (_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.hide();
17596
+ var _a;
17597
+ (_a = this.tippy) === null || _a === void 0 ? void 0 : _a.hide();
17597
17598
  }
17598
17599
  destroy() {
17599
- var _a2, _b;
17600
- if ((_a2 = this.tippy) === null || _a2 === void 0 ? void 0 : _a2.popper.firstChild) {
17600
+ var _a, _b;
17601
+ if ((_a = this.tippy) === null || _a === void 0 ? void 0 : _a.popper.firstChild) {
17601
17602
  this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler);
17602
17603
  }
17603
17604
  (_b = this.tippy) === null || _b === void 0 ? void 0 : _b.destroy();
@@ -17679,8 +17680,8 @@ defineComponent({
17679
17680
  editor.unregisterPlugin(pluginKey);
17680
17681
  });
17681
17682
  return () => {
17682
- var _a2;
17683
- return h("div", { ref: root2 }, (_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots));
17683
+ var _a;
17684
+ return h("div", { ref: root2 }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
17684
17685
  };
17685
17686
  }
17686
17687
  });
@@ -17846,8 +17847,8 @@ defineComponent({
17846
17847
  editor.unregisterPlugin(pluginKey);
17847
17848
  });
17848
17849
  return () => {
17849
- var _a2;
17850
- return h("div", { ref: root2 }, (_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots));
17850
+ var _a;
17851
+ return h("div", { ref: root2 }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
17851
17852
  };
17852
17853
  }
17853
17854
  });
@@ -17878,7 +17879,7 @@ defineComponent({
17878
17879
  },
17879
17880
  inject: ["onDragStart", "decorationClasses"],
17880
17881
  render() {
17881
- var _a2, _b;
17882
+ var _a, _b;
17882
17883
  return h(this.as, {
17883
17884
  // @ts-ignore
17884
17885
  class: this.decorationClasses,
@@ -17888,7 +17889,7 @@ defineComponent({
17888
17889
  "data-node-view-wrapper": "",
17889
17890
  // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
17890
17891
  onDragstart: this.onDragStart
17891
- }, (_b = (_a2 = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a2));
17892
+ }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a));
17892
17893
  }
17893
17894
  });
17894
17895
  const Devices = Object.freeze({
@@ -20141,71 +20142,71 @@ function stackHas$1(key) {
20141
20142
  return this.__data__.has(key);
20142
20143
  }
20143
20144
  var _stackHas = stackHas$1;
20144
- var freeGlobal$2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
20145
- var _freeGlobal = freeGlobal$2;
20146
- var freeGlobal$1 = _freeGlobal;
20147
- var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
20148
- var root$9 = freeGlobal$1 || freeSelf$1 || Function("return this")();
20149
- var _root = root$9;
20150
- var root$8 = _root;
20151
- var Symbol$6 = root$8.Symbol;
20152
- var _Symbol = Symbol$6;
20153
- var Symbol$5 = _Symbol;
20154
- var objectProto$g = Object.prototype;
20155
- var hasOwnProperty$c = objectProto$g.hasOwnProperty;
20156
- var nativeObjectToString$3 = objectProto$g.toString;
20157
- var symToStringTag$3 = Symbol$5 ? Symbol$5.toStringTag : void 0;
20158
- function getRawTag$2(value) {
20159
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$3), tag = value[symToStringTag$3];
20145
+ var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
20146
+ var _freeGlobal = freeGlobal$1;
20147
+ var freeGlobal = _freeGlobal;
20148
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
20149
+ var root$8 = freeGlobal || freeSelf || Function("return this")();
20150
+ var _root = root$8;
20151
+ var root$7 = _root;
20152
+ var Symbol$5 = root$7.Symbol;
20153
+ var _Symbol = Symbol$5;
20154
+ var Symbol$4 = _Symbol;
20155
+ var objectProto$e = Object.prototype;
20156
+ var hasOwnProperty$b = objectProto$e.hasOwnProperty;
20157
+ var nativeObjectToString$1 = objectProto$e.toString;
20158
+ var symToStringTag$1 = Symbol$4 ? Symbol$4.toStringTag : void 0;
20159
+ function getRawTag$1(value) {
20160
+ var isOwn = hasOwnProperty$b.call(value, symToStringTag$1), tag = value[symToStringTag$1];
20160
20161
  try {
20161
- value[symToStringTag$3] = void 0;
20162
+ value[symToStringTag$1] = void 0;
20162
20163
  var unmasked = true;
20163
20164
  } catch (e) {
20164
20165
  }
20165
- var result = nativeObjectToString$3.call(value);
20166
+ var result = nativeObjectToString$1.call(value);
20166
20167
  if (unmasked) {
20167
20168
  if (isOwn) {
20168
- value[symToStringTag$3] = tag;
20169
+ value[symToStringTag$1] = tag;
20169
20170
  } else {
20170
- delete value[symToStringTag$3];
20171
+ delete value[symToStringTag$1];
20171
20172
  }
20172
20173
  }
20173
20174
  return result;
20174
20175
  }
20175
- var _getRawTag = getRawTag$2;
20176
- var objectProto$f = Object.prototype;
20177
- var nativeObjectToString$2 = objectProto$f.toString;
20178
- function objectToString$2(value) {
20179
- return nativeObjectToString$2.call(value);
20180
- }
20181
- var _objectToString = objectToString$2;
20182
- var Symbol$4 = _Symbol, getRawTag$1 = _getRawTag, objectToString$1 = _objectToString;
20183
- var nullTag$1 = "[object Null]", undefinedTag$1 = "[object Undefined]";
20184
- var symToStringTag$2 = Symbol$4 ? Symbol$4.toStringTag : void 0;
20185
- function baseGetTag$5(value) {
20176
+ var _getRawTag = getRawTag$1;
20177
+ var objectProto$d = Object.prototype;
20178
+ var nativeObjectToString = objectProto$d.toString;
20179
+ function objectToString$1(value) {
20180
+ return nativeObjectToString.call(value);
20181
+ }
20182
+ var _objectToString = objectToString$1;
20183
+ var Symbol$3 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
20184
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
20185
+ var symToStringTag = Symbol$3 ? Symbol$3.toStringTag : void 0;
20186
+ function baseGetTag$4(value) {
20186
20187
  if (value == null) {
20187
- return value === void 0 ? undefinedTag$1 : nullTag$1;
20188
+ return value === void 0 ? undefinedTag : nullTag;
20188
20189
  }
20189
- return symToStringTag$2 && symToStringTag$2 in Object(value) ? getRawTag$1(value) : objectToString$1(value);
20190
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
20190
20191
  }
20191
- var _baseGetTag = baseGetTag$5;
20192
- function isObject$6(value) {
20192
+ var _baseGetTag = baseGetTag$4;
20193
+ function isObject$5(value) {
20193
20194
  var type = typeof value;
20194
20195
  return value != null && (type == "object" || type == "function");
20195
20196
  }
20196
- var isObject_1 = isObject$6;
20197
- var baseGetTag$4 = _baseGetTag, isObject$5 = isObject_1;
20197
+ var isObject_1 = isObject$5;
20198
+ var baseGetTag$3 = _baseGetTag, isObject$4 = isObject_1;
20198
20199
  var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
20199
20200
  function isFunction$2(value) {
20200
- if (!isObject$5(value)) {
20201
+ if (!isObject$4(value)) {
20201
20202
  return false;
20202
20203
  }
20203
- var tag = baseGetTag$4(value);
20204
+ var tag = baseGetTag$3(value);
20204
20205
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
20205
20206
  }
20206
20207
  var isFunction_1 = isFunction$2;
20207
- var root$7 = _root;
20208
- var coreJsData$1 = root$7["__core-js_shared__"];
20208
+ var root$6 = _root;
20209
+ var coreJsData$1 = root$6["__core-js_shared__"];
20209
20210
  var _coreJsData = coreJsData$1;
20210
20211
  var coreJsData = _coreJsData;
20211
20212
  var maskSrcKey = function() {
@@ -20232,17 +20233,17 @@ function toSource$2(func) {
20232
20233
  return "";
20233
20234
  }
20234
20235
  var _toSource = toSource$2;
20235
- var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$4 = isObject_1, toSource$1 = _toSource;
20236
+ var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$3 = isObject_1, toSource$1 = _toSource;
20236
20237
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
20237
20238
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
20238
- var funcProto = Function.prototype, objectProto$e = Object.prototype;
20239
+ var funcProto = Function.prototype, objectProto$c = Object.prototype;
20239
20240
  var funcToString = funcProto.toString;
20240
- var hasOwnProperty$b = objectProto$e.hasOwnProperty;
20241
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
20241
20242
  var reIsNative = RegExp(
20242
- "^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
20243
+ "^" + funcToString.call(hasOwnProperty$a).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
20243
20244
  );
20244
20245
  function baseIsNative$1(value) {
20245
- if (!isObject$4(value) || isMasked(value)) {
20246
+ if (!isObject$3(value) || isMasked(value)) {
20246
20247
  return false;
20247
20248
  }
20248
20249
  var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
@@ -20259,8 +20260,8 @@ function getNative$7(object, key) {
20259
20260
  return baseIsNative(value) ? value : void 0;
20260
20261
  }
20261
20262
  var _getNative = getNative$7;
20262
- var getNative$6 = _getNative, root$6 = _root;
20263
- var Map$4 = getNative$6(root$6, "Map");
20263
+ var getNative$6 = _getNative, root$5 = _root;
20264
+ var Map$4 = getNative$6(root$5, "Map");
20264
20265
  var _Map = Map$4;
20265
20266
  var getNative$5 = _getNative;
20266
20267
  var nativeCreate$4 = getNative$5(Object, "create");
@@ -20279,23 +20280,23 @@ function hashDelete$1(key) {
20279
20280
  var _hashDelete = hashDelete$1;
20280
20281
  var nativeCreate$2 = _nativeCreate;
20281
20282
  var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
20282
- var objectProto$d = Object.prototype;
20283
- var hasOwnProperty$a = objectProto$d.hasOwnProperty;
20283
+ var objectProto$b = Object.prototype;
20284
+ var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
20284
20285
  function hashGet$1(key) {
20285
20286
  var data = this.__data__;
20286
20287
  if (nativeCreate$2) {
20287
20288
  var result = data[key];
20288
20289
  return result === HASH_UNDEFINED$2 ? void 0 : result;
20289
20290
  }
20290
- return hasOwnProperty$a.call(data, key) ? data[key] : void 0;
20291
+ return hasOwnProperty$9.call(data, key) ? data[key] : void 0;
20291
20292
  }
20292
20293
  var _hashGet = hashGet$1;
20293
20294
  var nativeCreate$1 = _nativeCreate;
20294
- var objectProto$c = Object.prototype;
20295
- var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
20295
+ var objectProto$a = Object.prototype;
20296
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
20296
20297
  function hashHas$1(key) {
20297
20298
  var data = this.__data__;
20298
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$9.call(data, key);
20299
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$8.call(data, key);
20299
20300
  }
20300
20301
  var _hashHas = hashHas$1;
20301
20302
  var nativeCreate = _nativeCreate;
@@ -20447,11 +20448,11 @@ function baseAssignValue$2(object, key, value) {
20447
20448
  }
20448
20449
  var _baseAssignValue = baseAssignValue$2;
20449
20450
  var baseAssignValue$1 = _baseAssignValue, eq$1 = eq_1;
20450
- var objectProto$b = Object.prototype;
20451
- var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
20451
+ var objectProto$9 = Object.prototype;
20452
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
20452
20453
  function assignValue$2(object, key, value) {
20453
20454
  var objValue = object[key];
20454
- if (!(hasOwnProperty$8.call(object, key) && eq$1(objValue, value)) || value === void 0 && !(key in object)) {
20455
+ if (!(hasOwnProperty$7.call(object, key) && eq$1(objValue, value)) || value === void 0 && !(key in object)) {
20455
20456
  baseAssignValue$1(object, key, value);
20456
20457
  }
20457
20458
  }
@@ -20484,24 +20485,24 @@ function baseTimes$1(n, iteratee) {
20484
20485
  return result;
20485
20486
  }
20486
20487
  var _baseTimes = baseTimes$1;
20487
- function isObjectLike$7(value) {
20488
+ function isObjectLike$6(value) {
20488
20489
  return value != null && typeof value == "object";
20489
20490
  }
20490
- var isObjectLike_1 = isObjectLike$7;
20491
- var baseGetTag$3 = _baseGetTag, isObjectLike$6 = isObjectLike_1;
20491
+ var isObjectLike_1 = isObjectLike$6;
20492
+ var baseGetTag$2 = _baseGetTag, isObjectLike$5 = isObjectLike_1;
20492
20493
  var argsTag$3 = "[object Arguments]";
20493
20494
  function baseIsArguments$1(value) {
20494
- return isObjectLike$6(value) && baseGetTag$3(value) == argsTag$3;
20495
+ return isObjectLike$5(value) && baseGetTag$2(value) == argsTag$3;
20495
20496
  }
20496
20497
  var _baseIsArguments = baseIsArguments$1;
20497
- var baseIsArguments = _baseIsArguments, isObjectLike$5 = isObjectLike_1;
20498
- var objectProto$a = Object.prototype;
20499
- var hasOwnProperty$7 = objectProto$a.hasOwnProperty;
20500
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
20498
+ var baseIsArguments = _baseIsArguments, isObjectLike$4 = isObjectLike_1;
20499
+ var objectProto$8 = Object.prototype;
20500
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
20501
+ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
20501
20502
  var isArguments$1 = baseIsArguments(/* @__PURE__ */ function() {
20502
20503
  return arguments;
20503
20504
  }()) ? baseIsArguments : function(value) {
20504
- return isObjectLike$5(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
20505
+ return isObjectLike$4(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
20505
20506
  };
20506
20507
  var isArguments_1 = isArguments$1;
20507
20508
  var isArray$4 = Array.isArray;
@@ -20536,14 +20537,14 @@ function isLength$2(value) {
20536
20537
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
20537
20538
  }
20538
20539
  var isLength_1 = isLength$2;
20539
- var baseGetTag$2 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$4 = isObjectLike_1;
20540
+ var baseGetTag$1 = _baseGetTag, isLength$1 = isLength_1, isObjectLike$3 = isObjectLike_1;
20540
20541
  var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
20541
20542
  var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
20542
20543
  var typedArrayTags = {};
20543
20544
  typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
20544
20545
  typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
20545
20546
  function baseIsTypedArray$1(value) {
20546
- return isObjectLike$4(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$2(value)];
20547
+ return isObjectLike$3(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$1(value)];
20547
20548
  }
20548
20549
  var _baseIsTypedArray = baseIsTypedArray$1;
20549
20550
  function baseUnary$3(func) {
@@ -20578,12 +20579,12 @@ var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
20578
20579
  var isTypedArray$2 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
20579
20580
  var isTypedArray_1 = isTypedArray$2;
20580
20581
  var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$3 = isArray_1, isBuffer$2 = isBufferExports, isIndex = _isIndex, isTypedArray$1 = isTypedArray_1;
20581
- var objectProto$9 = Object.prototype;
20582
- var hasOwnProperty$6 = objectProto$9.hasOwnProperty;
20582
+ var objectProto$7 = Object.prototype;
20583
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
20583
20584
  function arrayLikeKeys$2(value, inherited) {
20584
20585
  var isArr = isArray$3(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType2 = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType2, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
20585
20586
  for (var key in value) {
20586
- if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
20587
+ if ((inherited || hasOwnProperty$5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
20587
20588
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
20588
20589
  isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
20589
20590
  isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
@@ -20594,9 +20595,9 @@ function arrayLikeKeys$2(value, inherited) {
20594
20595
  return result;
20595
20596
  }
20596
20597
  var _arrayLikeKeys = arrayLikeKeys$2;
20597
- var objectProto$8 = Object.prototype;
20598
+ var objectProto$6 = Object.prototype;
20598
20599
  function isPrototype$3(value) {
20599
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$8;
20600
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$6;
20600
20601
  return value === proto;
20601
20602
  }
20602
20603
  var _isPrototype = isPrototype$3;
@@ -20610,15 +20611,15 @@ var overArg$1 = _overArg;
20610
20611
  var nativeKeys$1 = overArg$1(Object.keys, Object);
20611
20612
  var _nativeKeys = nativeKeys$1;
20612
20613
  var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
20613
- var objectProto$7 = Object.prototype;
20614
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
20614
+ var objectProto$5 = Object.prototype;
20615
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
20615
20616
  function baseKeys$1(object) {
20616
20617
  if (!isPrototype$2(object)) {
20617
20618
  return nativeKeys(object);
20618
20619
  }
20619
20620
  var result = [];
20620
20621
  for (var key in Object(object)) {
20621
- if (hasOwnProperty$5.call(object, key) && key != "constructor") {
20622
+ if (hasOwnProperty$4.call(object, key) && key != "constructor") {
20622
20623
  result.push(key);
20623
20624
  }
20624
20625
  }
@@ -20650,16 +20651,16 @@ function nativeKeysIn$1(object) {
20650
20651
  return result;
20651
20652
  }
20652
20653
  var _nativeKeysIn = nativeKeysIn$1;
20653
- var isObject$3 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
20654
- var objectProto$6 = Object.prototype;
20655
- var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
20654
+ var isObject$2 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
20655
+ var objectProto$4 = Object.prototype;
20656
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
20656
20657
  function baseKeysIn$1(object) {
20657
- if (!isObject$3(object)) {
20658
+ if (!isObject$2(object)) {
20658
20659
  return nativeKeysIn(object);
20659
20660
  }
20660
20661
  var isProto = isPrototype$1(object), result = [];
20661
20662
  for (var key in object) {
20662
- if (!(key == "constructor" && (isProto || !hasOwnProperty$4.call(object, key)))) {
20663
+ if (!(key == "constructor" && (isProto || !hasOwnProperty$3.call(object, key)))) {
20663
20664
  result.push(key);
20664
20665
  }
20665
20666
  }
@@ -20720,8 +20721,8 @@ function stubArray$2() {
20720
20721
  }
20721
20722
  var stubArray_1 = stubArray$2;
20722
20723
  var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1;
20723
- var objectProto$5 = Object.prototype;
20724
- var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
20724
+ var objectProto$3 = Object.prototype;
20725
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
20725
20726
  var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
20726
20727
  var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
20727
20728
  if (object == null) {
@@ -20781,26 +20782,26 @@ function getAllKeysIn$1(object) {
20781
20782
  return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
20782
20783
  }
20783
20784
  var _getAllKeysIn = getAllKeysIn$1;
20784
- var getNative$3 = _getNative, root$5 = _root;
20785
- var DataView$1 = getNative$3(root$5, "DataView");
20785
+ var getNative$3 = _getNative, root$4 = _root;
20786
+ var DataView$1 = getNative$3(root$4, "DataView");
20786
20787
  var _DataView = DataView$1;
20787
- var getNative$2 = _getNative, root$4 = _root;
20788
- var Promise$2 = getNative$2(root$4, "Promise");
20788
+ var getNative$2 = _getNative, root$3 = _root;
20789
+ var Promise$2 = getNative$2(root$3, "Promise");
20789
20790
  var _Promise = Promise$2;
20790
- var getNative$1 = _getNative, root$3 = _root;
20791
- var Set$2 = getNative$1(root$3, "Set");
20791
+ var getNative$1 = _getNative, root$2 = _root;
20792
+ var Set$2 = getNative$1(root$2, "Set");
20792
20793
  var _Set = Set$2;
20793
- var getNative = _getNative, root$2 = _root;
20794
- var WeakMap$2 = getNative(root$2, "WeakMap");
20794
+ var getNative = _getNative, root$1 = _root;
20795
+ var WeakMap$2 = getNative(root$1, "WeakMap");
20795
20796
  var _WeakMap = WeakMap$2;
20796
- var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$1 = _WeakMap, baseGetTag$1 = _baseGetTag, toSource = _toSource;
20797
+ var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$1 = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource;
20797
20798
  var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
20798
20799
  var dataViewTag$3 = "[object DataView]";
20799
20800
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
20800
- var getTag$4 = baseGetTag$1;
20801
+ var getTag$4 = baseGetTag;
20801
20802
  if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag$4(new Map$1()) != mapTag$4 || Promise$1 && getTag$4(Promise$1.resolve()) != promiseTag || Set$1 && getTag$4(new Set$1()) != setTag$4 || WeakMap$1 && getTag$4(new WeakMap$1()) != weakMapTag$1) {
20802
20803
  getTag$4 = function(value) {
20803
- var result = baseGetTag$1(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
20804
+ var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
20804
20805
  if (ctorString) {
20805
20806
  switch (ctorString) {
20806
20807
  case dataViewCtorString:
@@ -20819,19 +20820,19 @@ if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || M
20819
20820
  };
20820
20821
  }
20821
20822
  var _getTag = getTag$4;
20822
- var objectProto$4 = Object.prototype;
20823
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
20823
+ var objectProto$2 = Object.prototype;
20824
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
20824
20825
  function initCloneArray$1(array) {
20825
20826
  var length = array.length, result = new array.constructor(length);
20826
- if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
20827
+ if (length && typeof array[0] == "string" && hasOwnProperty$2.call(array, "index")) {
20827
20828
  result.index = array.index;
20828
20829
  result.input = array.input;
20829
20830
  }
20830
20831
  return result;
20831
20832
  }
20832
20833
  var _initCloneArray = initCloneArray$1;
20833
- var root$1 = _root;
20834
- var Uint8Array$2 = root$1.Uint8Array;
20834
+ var root = _root;
20835
+ var Uint8Array$2 = root.Uint8Array;
20835
20836
  var _Uint8Array = Uint8Array$2;
20836
20837
  var Uint8Array$1 = _Uint8Array;
20837
20838
  function cloneArrayBuffer$3(arrayBuffer) {
@@ -20853,8 +20854,8 @@ function cloneRegExp$1(regexp) {
20853
20854
  return result;
20854
20855
  }
20855
20856
  var _cloneRegExp = cloneRegExp$1;
20856
- var Symbol$3 = _Symbol;
20857
- var symbolProto$1 = Symbol$3 ? Symbol$3.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
20857
+ var Symbol$2 = _Symbol;
20858
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
20858
20859
  function cloneSymbol$1(symbol) {
20859
20860
  return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
20860
20861
  }
@@ -20866,7 +20867,7 @@ function cloneTypedArray$1(typedArray, isDeep) {
20866
20867
  }
20867
20868
  var _cloneTypedArray = cloneTypedArray$1;
20868
20869
  var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
20869
- var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$3 = "[object Symbol]";
20870
+ var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
20870
20871
  var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
20871
20872
  function initCloneByTag$1(object, tag, isDeep) {
20872
20873
  var Ctor = object.constructor;
@@ -20897,18 +20898,18 @@ function initCloneByTag$1(object, tag, isDeep) {
20897
20898
  return cloneRegExp(object);
20898
20899
  case setTag$3:
20899
20900
  return new Ctor();
20900
- case symbolTag$3:
20901
+ case symbolTag$2:
20901
20902
  return cloneSymbol(object);
20902
20903
  }
20903
20904
  }
20904
20905
  var _initCloneByTag = initCloneByTag$1;
20905
- var isObject$2 = isObject_1;
20906
+ var isObject$1 = isObject_1;
20906
20907
  var objectCreate = Object.create;
20907
20908
  var baseCreate$1 = /* @__PURE__ */ function() {
20908
20909
  function object() {
20909
20910
  }
20910
20911
  return function(proto) {
20911
- if (!isObject$2(proto)) {
20912
+ if (!isObject$1(proto)) {
20912
20913
  return {};
20913
20914
  }
20914
20915
  if (objectCreate) {
@@ -20926,32 +20927,32 @@ function initCloneObject$1(object) {
20926
20927
  return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
20927
20928
  }
20928
20929
  var _initCloneObject = initCloneObject$1;
20929
- var getTag$3 = _getTag, isObjectLike$3 = isObjectLike_1;
20930
+ var getTag$3 = _getTag, isObjectLike$2 = isObjectLike_1;
20930
20931
  var mapTag$2 = "[object Map]";
20931
20932
  function baseIsMap$1(value) {
20932
- return isObjectLike$3(value) && getTag$3(value) == mapTag$2;
20933
+ return isObjectLike$2(value) && getTag$3(value) == mapTag$2;
20933
20934
  }
20934
20935
  var _baseIsMap = baseIsMap$1;
20935
20936
  var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtilExports;
20936
20937
  var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
20937
20938
  var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
20938
20939
  var isMap_1 = isMap$1;
20939
- var getTag$2 = _getTag, isObjectLike$2 = isObjectLike_1;
20940
+ var getTag$2 = _getTag, isObjectLike$1 = isObjectLike_1;
20940
20941
  var setTag$2 = "[object Set]";
20941
20942
  function baseIsSet$1(value) {
20942
- return isObjectLike$2(value) && getTag$2(value) == setTag$2;
20943
+ return isObjectLike$1(value) && getTag$2(value) == setTag$2;
20943
20944
  }
20944
20945
  var _baseIsSet = baseIsSet$1;
20945
20946
  var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtilExports;
20946
20947
  var nodeIsSet = nodeUtil && nodeUtil.isSet;
20947
20948
  var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
20948
20949
  var isSet_1 = isSet$1;
20949
- var Stack$1 = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBufferExports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys$1 = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag$1 = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray$1 = isArray_1, isBuffer$1 = isBufferExports, isMap = isMap_1, isObject$1 = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1;
20950
+ var Stack$1 = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBufferExports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys$1 = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag$1 = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray$1 = isArray_1, isBuffer$1 = isBufferExports, isMap = isMap_1, isObject = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1;
20950
20951
  var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG$1 = 4;
20951
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$2 = "[object Symbol]", weakMapTag = "[object WeakMap]";
20952
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
20952
20953
  var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
20953
20954
  var cloneableTags = {};
20954
- cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$2] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
20955
+ cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
20955
20956
  cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
20956
20957
  function baseClone$1(value, bitmask, customizer, key, object, stack) {
20957
20958
  var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
@@ -20961,7 +20962,7 @@ function baseClone$1(value, bitmask, customizer, key, object, stack) {
20961
20962
  if (result !== void 0) {
20962
20963
  return result;
20963
20964
  }
20964
- if (!isObject$1(value)) {
20965
+ if (!isObject(value)) {
20965
20966
  return value;
20966
20967
  }
20967
20968
  var isArr = isArray$1(value);
@@ -21039,10 +21040,10 @@ const NodeProcessor = Extension.create({
21039
21040
  });
21040
21041
  }),
21041
21042
  getBlockAttributes: createCommand(({ editor }, name, defaults2) => computed(() => {
21042
- var _a2;
21043
+ var _a;
21043
21044
  let attrs = Object.assign({}, defaults2 || {});
21044
21045
  for (const type of NodeTypes.blocks) {
21045
- Object.assign(attrs, ((_a2 = editor.getAttributes(type)) == null ? void 0 : _a2[name]) || {});
21046
+ Object.assign(attrs, ((_a = editor.getAttributes(type)) == null ? void 0 : _a[name]) || {});
21046
21047
  }
21047
21048
  return Object.keys(attrs).length ? attrs : null;
21048
21049
  })),
@@ -21113,8 +21114,8 @@ const NodeProcessor = Extension.create({
21113
21114
  getCommonSettingMark: createCommand(({ commands: commands2 }, name, defaultRef) => {
21114
21115
  const selectionRef = commands2.getMark(name);
21115
21116
  return computed(() => {
21116
- var _a2;
21117
- return ((_a2 = unref(selectionRef)) == null ? void 0 : _a2.value) ?? unref(defaultRef);
21117
+ var _a;
21118
+ return ((_a = unref(selectionRef)) == null ? void 0 : _a.value) ?? unref(defaultRef);
21118
21119
  });
21119
21120
  }),
21120
21121
  getDeviceSettingMark: createCommand(({ commands: commands2 }, name, defaultRef) => {
@@ -21533,10 +21534,10 @@ const StylePreset = Extension.create({
21533
21534
  });
21534
21535
  }),
21535
21536
  applyPreset: createCommand(({ commands: commands2, chain }, presetId) => {
21536
- var _a2;
21537
+ var _a;
21537
21538
  const presets = unref(commands2.getPresetList());
21538
21539
  const preset = findPresetById(presets, presetId);
21539
- const nodeType = ((_a2 = preset.node) == null ? void 0 : _a2.type) ?? NodeTypes.PARAGRAPH;
21540
+ const nodeType = ((_a = preset.node) == null ? void 0 : _a.type) ?? NodeTypes.PARAGRAPH;
21540
21541
  const attrs = {
21541
21542
  preset: { id: presetId }
21542
21543
  };
@@ -21566,8 +21567,8 @@ const StylePreset = Extension.create({
21566
21567
  const customization = commands2.getPresetCustomization();
21567
21568
  const group = TextSettings.presetAttributes.includes(name) ? "attributes" : "marks";
21568
21569
  return computed(() => {
21569
- var _a2;
21570
- return ((_a2 = unref(customization)[group]) == null ? void 0 : _a2.includes(name)) ?? false;
21570
+ var _a;
21571
+ return ((_a = unref(customization)[group]) == null ? void 0 : _a.includes(name)) ?? false;
21571
21572
  });
21572
21573
  }),
21573
21574
  getContentCustomization: createCommand(({ editor, commands: commands2 }) => {
@@ -21866,8 +21867,8 @@ const FontStyle = Mark2.create({
21866
21867
  const selectionRef = commands2.getMark(this.name);
21867
21868
  const defaultValueRef = commands2.getDefaultFontStyle();
21868
21869
  return computed(() => {
21869
- var _a2;
21870
- return ((_a2 = unref(selectionRef)) == null ? void 0 : _a2.italic) ?? unref(defaultValueRef).italic;
21870
+ var _a;
21871
+ return ((_a = unref(selectionRef)) == null ? void 0 : _a.italic) ?? unref(defaultValueRef).italic;
21871
21872
  });
21872
21873
  }),
21873
21874
  isItalicAvailable: createCommand(({ commands: commands2 }) => {
@@ -22117,8 +22118,8 @@ const Alignment = Extension.create({
22117
22118
  const device = commands2.getDevice();
22118
22119
  const defaultValue = commands2.getDefaultAlignment();
22119
22120
  return computed(() => {
22120
- var _a2;
22121
- return ((_a2 = unref(attribute)) == null ? void 0 : _a2[unref(device)]) ?? unref(defaultValue);
22121
+ var _a;
22122
+ return ((_a = unref(attribute)) == null ? void 0 : _a[unref(device)]) ?? unref(defaultValue);
22122
22123
  });
22123
22124
  }),
22124
22125
  getDefaultAlignment: createCommand(({ commands: commands2 }) => {
@@ -22184,8 +22185,8 @@ const LineHeight = Extension.create({
22184
22185
  const device = commands2.getDevice();
22185
22186
  const defaultValue = commands2.getDefaultLineHeight();
22186
22187
  return computed(() => {
22187
- var _a2;
22188
- return ((_a2 = unref(attribute)) == null ? void 0 : _a2[unref(device)]) ?? unref(defaultValue);
22188
+ var _a;
22189
+ return ((_a = unref(attribute)) == null ? void 0 : _a[unref(device)]) ?? unref(defaultValue);
22189
22190
  });
22190
22191
  }),
22191
22192
  getDefaultLineHeight: createCommand(({ commands: commands2 }) => {
@@ -22254,11 +22255,11 @@ const ListItem = ListItem$1.extend({
22254
22255
  }),
22255
22256
  addKeyboardShortcuts: () => ({
22256
22257
  Enter: (context) => {
22257
- var _a2;
22258
+ var _a;
22258
22259
  const { state, commands: commands2 } = context.editor;
22259
- const isListSelected = (_a2 = state.selection.$cursor) == null ? void 0 : _a2.path.some((node) => {
22260
- var _a3;
22261
- return ((_a3 = node.type) == null ? void 0 : _a3.name) === NodeTypes.LIST;
22260
+ const isListSelected = (_a = state.selection.$cursor) == null ? void 0 : _a.path.some((node) => {
22261
+ var _a2;
22262
+ return ((_a2 = node.type) == null ? void 0 : _a2.name) === NodeTypes.LIST;
22262
22263
  });
22263
22264
  if (isListSelected)
22264
22265
  return commands2.listItemNewline();
@@ -22480,7 +22481,7 @@ function clickHandler(options) {
22480
22481
  key: new PluginKey("handleClickLink"),
22481
22482
  props: {
22482
22483
  handleClick: (view, pos, event) => {
22483
- var _a2, _b;
22484
+ var _a, _b;
22484
22485
  if (event.button !== 0) {
22485
22486
  return false;
22486
22487
  }
@@ -22490,7 +22491,7 @@ function clickHandler(options) {
22490
22491
  }
22491
22492
  const attrs = getAttributes(view.state, options.type.name);
22492
22493
  const link = event.target;
22493
- const href = (_a2 = link === null || link === void 0 ? void 0 : link.href) !== null && _a2 !== void 0 ? _a2 : attrs.href;
22494
+ const href = (_a = link === null || link === void 0 ? void 0 : link.href) !== null && _a !== void 0 ? _a : attrs.href;
22494
22495
  const target = (_b = link === null || link === void 0 ? void 0 : link.target) !== null && _b !== void 0 ? _b : attrs.target;
22495
22496
  if (link && href) {
22496
22497
  if (view.editable) {
@@ -22508,7 +22509,7 @@ function pasteHandler(options) {
22508
22509
  key: new PluginKey("handlePasteLink"),
22509
22510
  props: {
22510
22511
  handlePaste: (view, event, slice2) => {
22511
- var _a2;
22512
+ var _a;
22512
22513
  const { state } = view;
22513
22514
  const { selection } = state;
22514
22515
  const { empty: empty2 } = selection;
@@ -22523,7 +22524,7 @@ function pasteHandler(options) {
22523
22524
  if (!textContent || !link) {
22524
22525
  return false;
22525
22526
  }
22526
- const html = (_a2 = event.clipboardData) === null || _a2 === void 0 ? void 0 : _a2.getData("text/html");
22527
+ const html = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("text/html");
22527
22528
  const hrefRegex = /href="([^"]*)"/;
22528
22529
  const existingLink = html === null || html === void 0 ? void 0 : html.match(hrefRegex);
22529
22530
  const url = existingLink ? existingLink[1] : link.href;
@@ -22588,8 +22589,8 @@ const Link$1 = Mark2.create({
22588
22589
  return [{ tag: 'a[href]:not([href *= "javascript:" i])' }];
22589
22590
  },
22590
22591
  renderHTML({ HTMLAttributes }) {
22591
- var _a2;
22592
- if ((_a2 = HTMLAttributes.href) === null || _a2 === void 0 ? void 0 : _a2.startsWith("javascript:")) {
22592
+ var _a;
22593
+ if ((_a = HTMLAttributes.href) === null || _a === void 0 ? void 0 : _a.startsWith("javascript:")) {
22593
22594
  return ["a", mergeAttributes(this.options.HTMLAttributes, { ...HTMLAttributes, href: "" }), 0];
22594
22595
  }
22595
22596
  return ["a", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
@@ -22622,8 +22623,8 @@ const Link$1 = Mark2.create({
22622
22623
  })),
22623
22624
  type: this.type,
22624
22625
  getAttributes: (match, pasteEvent) => {
22625
- var _a2, _b;
22626
- const html = (_a2 = pasteEvent === null || pasteEvent === void 0 ? void 0 : pasteEvent.clipboardData) === null || _a2 === void 0 ? void 0 : _a2.getData("text/html");
22626
+ var _a, _b;
22627
+ const html = (_a = pasteEvent === null || pasteEvent === void 0 ? void 0 : pasteEvent.clipboardData) === null || _a === void 0 ? void 0 : _a.getData("text/html");
22627
22628
  const hrefRegex = /href="([^"]*)"/;
22628
22629
  const existingLink = html === null || html === void 0 ? void 0 : html.match(hrefRegex);
22629
22630
  if (existingLink) {
@@ -22663,9 +22664,9 @@ const Link$1 = Mark2.create({
22663
22664
  const Link = Link$1.extend({
22664
22665
  name: TextSettings.LINK,
22665
22666
  addOptions() {
22666
- var _a2;
22667
+ var _a;
22667
22668
  return {
22668
- ...(_a2 = this.parent) == null ? void 0 : _a2.call(this),
22669
+ ...(_a = this.parent) == null ? void 0 : _a.call(this),
22669
22670
  openOnClick: false,
22670
22671
  linkOnPaste: false
22671
22672
  };
@@ -23204,11 +23205,11 @@ function setToArray$1(set) {
23204
23205
  return result;
23205
23206
  }
23206
23207
  var _setToArray = setToArray$1;
23207
- var Symbol$2 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
23208
+ var Symbol$1 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
23208
23209
  var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
23209
- var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag$1 = "[object Symbol]";
23210
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
23210
23211
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
23211
- var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
23212
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
23212
23213
  function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
23213
23214
  switch (tag) {
23214
23215
  case dataViewTag:
@@ -23248,7 +23249,7 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
23248
23249
  var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
23249
23250
  stack["delete"](object);
23250
23251
  return result;
23251
- case symbolTag$1:
23252
+ case symbolTag:
23252
23253
  if (symbolValueOf) {
23253
23254
  return symbolValueOf.call(object) == symbolValueOf.call(other);
23254
23255
  }
@@ -23258,8 +23259,8 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
23258
23259
  var _equalByTag = equalByTag$1;
23259
23260
  var getAllKeys = _getAllKeys;
23260
23261
  var COMPARE_PARTIAL_FLAG$1 = 1;
23261
- var objectProto$3 = Object.prototype;
23262
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
23262
+ var objectProto$1 = Object.prototype;
23263
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
23263
23264
  function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
23264
23265
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
23265
23266
  if (objLength != othLength && !isPartial) {
@@ -23268,7 +23269,7 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
23268
23269
  var index = objLength;
23269
23270
  while (index--) {
23270
23271
  var key = objProps[index];
23271
- if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
23272
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
23272
23273
  return false;
23273
23274
  }
23274
23275
  }
@@ -23307,8 +23308,8 @@ var _equalObjects = equalObjects$1;
23307
23308
  var Stack = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag = _getTag, isArray = isArray_1, isBuffer = isBufferExports, isTypedArray = isTypedArray_1;
23308
23309
  var COMPARE_PARTIAL_FLAG = 1;
23309
23310
  var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
23310
- var objectProto$2 = Object.prototype;
23311
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
23311
+ var objectProto = Object.prototype;
23312
+ var hasOwnProperty = objectProto.hasOwnProperty;
23312
23313
  function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
23313
23314
  var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
23314
23315
  objTag = objTag == argsTag ? objectTag : objTag;
@@ -23326,7 +23327,7 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
23326
23327
  return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
23327
23328
  }
23328
23329
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
23329
- var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
23330
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
23330
23331
  if (objIsWrapped || othIsWrapped) {
23331
23332
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
23332
23333
  stack || (stack = new Stack());
@@ -23340,12 +23341,12 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
23340
23341
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
23341
23342
  }
23342
23343
  var _baseIsEqualDeep = baseIsEqualDeep$1;
23343
- var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike$1 = isObjectLike_1;
23344
+ var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1;
23344
23345
  function baseIsEqual$1(value, other, bitmask, customizer, stack) {
23345
23346
  if (value === other) {
23346
23347
  return true;
23347
23348
  }
23348
- if (value == null || other == null || !isObjectLike$1(value) && !isObjectLike$1(other)) {
23349
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
23349
23350
  return value !== value && other !== other;
23350
23351
  }
23351
23352
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
@@ -23409,12 +23410,12 @@ class JsonNormalizer extends BaseNormalizer {
23409
23410
  return true;
23410
23411
  }
23411
23412
  _includesMark(node, checkingMark) {
23412
- var _a2;
23413
- return ((_a2 = node.marks) == null ? void 0 : _a2.some((mark) => isEqual$1(mark, checkingMark))) ?? false;
23413
+ var _a;
23414
+ return ((_a = node.marks) == null ? void 0 : _a.some((mark) => isEqual$1(mark, checkingMark))) ?? false;
23414
23415
  }
23415
23416
  _includesMarkType(node, type) {
23416
- var _a2;
23417
- return ((_a2 = node.marks) == null ? void 0 : _a2.some((mark) => mark.type === type)) ?? false;
23417
+ var _a;
23418
+ return ((_a = node.marks) == null ? void 0 : _a.some((mark) => mark.type === type)) ?? false;
23418
23419
  }
23419
23420
  _isLink(node) {
23420
23421
  return node.type === NodeTypes.TEXT && this._includesMarkType(node, TextSettings.LINK);
@@ -23434,8 +23435,8 @@ class JsonNormalizer extends BaseNormalizer {
23434
23435
  node.marks.push(mark);
23435
23436
  }
23436
23437
  _findMarkIndexByType(node, type) {
23437
- var _a2;
23438
- return ((_a2 = node.marks) == null ? void 0 : _a2.findIndex((mark) => mark.type === type)) ?? null;
23438
+ var _a;
23439
+ return ((_a = node.marks) == null ? void 0 : _a.findIndex((mark) => mark.type === type)) ?? null;
23439
23440
  }
23440
23441
  }
23441
23442
  class ContentNormalizer {
@@ -23952,1094 +23953,6 @@ const _sfc_main$G = {
23952
23953
  }
23953
23954
  };
23954
23955
  const Icon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-09bee8af"]]);
23955
- var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
23956
- var canUseDom = canUseDOM;
23957
- const canUseDOM$1 = /* @__PURE__ */ getDefaultExportFromCjs(canUseDom);
23958
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
23959
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
23960
- var root = freeGlobal || freeSelf || Function("return this")();
23961
- var Symbol$1 = root.Symbol;
23962
- var objectProto$1 = Object.prototype;
23963
- var hasOwnProperty = objectProto$1.hasOwnProperty;
23964
- var nativeObjectToString$1 = objectProto$1.toString;
23965
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
23966
- function getRawTag(value) {
23967
- var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
23968
- try {
23969
- value[symToStringTag$1] = void 0;
23970
- var unmasked = true;
23971
- } catch (e) {
23972
- }
23973
- var result = nativeObjectToString$1.call(value);
23974
- if (unmasked) {
23975
- if (isOwn) {
23976
- value[symToStringTag$1] = tag;
23977
- } else {
23978
- delete value[symToStringTag$1];
23979
- }
23980
- }
23981
- return result;
23982
- }
23983
- var objectProto = Object.prototype;
23984
- var nativeObjectToString = objectProto.toString;
23985
- function objectToString(value) {
23986
- return nativeObjectToString.call(value);
23987
- }
23988
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
23989
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
23990
- function baseGetTag(value) {
23991
- if (value == null) {
23992
- return value === void 0 ? undefinedTag : nullTag;
23993
- }
23994
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
23995
- }
23996
- function isObjectLike(value) {
23997
- return value != null && typeof value == "object";
23998
- }
23999
- var symbolTag = "[object Symbol]";
24000
- function isSymbol(value) {
24001
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
24002
- }
24003
- var reWhitespace = /\s/;
24004
- function trimmedEndIndex(string) {
24005
- var index = string.length;
24006
- while (index-- && reWhitespace.test(string.charAt(index))) {
24007
- }
24008
- return index;
24009
- }
24010
- var reTrimStart = /^\s+/;
24011
- function baseTrim(string) {
24012
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
24013
- }
24014
- function isObject(value) {
24015
- var type = typeof value;
24016
- return value != null && (type == "object" || type == "function");
24017
- }
24018
- var NAN = 0 / 0;
24019
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
24020
- var reIsBinary = /^0b[01]+$/i;
24021
- var reIsOctal = /^0o[0-7]+$/i;
24022
- var freeParseInt = parseInt;
24023
- function toNumber(value) {
24024
- if (typeof value == "number") {
24025
- return value;
24026
- }
24027
- if (isSymbol(value)) {
24028
- return NAN;
24029
- }
24030
- if (isObject(value)) {
24031
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
24032
- value = isObject(other) ? other + "" : other;
24033
- }
24034
- if (typeof value != "string") {
24035
- return value === 0 ? value : +value;
24036
- }
24037
- value = baseTrim(value);
24038
- var isBinary = reIsBinary.test(value);
24039
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
24040
- }
24041
- var now = function() {
24042
- return root.Date.now();
24043
- };
24044
- var FUNC_ERROR_TEXT$1 = "Expected a function";
24045
- var nativeMax = Math.max, nativeMin = Math.min;
24046
- function debounce(func, wait, options) {
24047
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
24048
- if (typeof func != "function") {
24049
- throw new TypeError(FUNC_ERROR_TEXT$1);
24050
- }
24051
- wait = toNumber(wait) || 0;
24052
- if (isObject(options)) {
24053
- leading = !!options.leading;
24054
- maxing = "maxWait" in options;
24055
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
24056
- trailing = "trailing" in options ? !!options.trailing : trailing;
24057
- }
24058
- function invokeFunc(time) {
24059
- var args = lastArgs, thisArg = lastThis;
24060
- lastArgs = lastThis = void 0;
24061
- lastInvokeTime = time;
24062
- result = func.apply(thisArg, args);
24063
- return result;
24064
- }
24065
- function leadingEdge(time) {
24066
- lastInvokeTime = time;
24067
- timerId = setTimeout(timerExpired, wait);
24068
- return leading ? invokeFunc(time) : result;
24069
- }
24070
- function remainingWait(time) {
24071
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
24072
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
24073
- }
24074
- function shouldInvoke(time) {
24075
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
24076
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
24077
- }
24078
- function timerExpired() {
24079
- var time = now();
24080
- if (shouldInvoke(time)) {
24081
- return trailingEdge(time);
24082
- }
24083
- timerId = setTimeout(timerExpired, remainingWait(time));
24084
- }
24085
- function trailingEdge(time) {
24086
- timerId = void 0;
24087
- if (trailing && lastArgs) {
24088
- return invokeFunc(time);
24089
- }
24090
- lastArgs = lastThis = void 0;
24091
- return result;
24092
- }
24093
- function cancel() {
24094
- if (timerId !== void 0) {
24095
- clearTimeout(timerId);
24096
- }
24097
- lastInvokeTime = 0;
24098
- lastArgs = lastCallTime = lastThis = timerId = void 0;
24099
- }
24100
- function flush() {
24101
- return timerId === void 0 ? result : trailingEdge(now());
24102
- }
24103
- function debounced() {
24104
- var time = now(), isInvoking = shouldInvoke(time);
24105
- lastArgs = arguments;
24106
- lastThis = this;
24107
- lastCallTime = time;
24108
- if (isInvoking) {
24109
- if (timerId === void 0) {
24110
- return leadingEdge(lastCallTime);
24111
- }
24112
- if (maxing) {
24113
- clearTimeout(timerId);
24114
- timerId = setTimeout(timerExpired, wait);
24115
- return invokeFunc(lastCallTime);
24116
- }
24117
- }
24118
- if (timerId === void 0) {
24119
- timerId = setTimeout(timerExpired, wait);
24120
- }
24121
- return result;
24122
- }
24123
- debounced.cancel = cancel;
24124
- debounced.flush = flush;
24125
- return debounced;
24126
- }
24127
- var FUNC_ERROR_TEXT = "Expected a function";
24128
- function throttle(func, wait, options) {
24129
- var leading = true, trailing = true;
24130
- if (typeof func != "function") {
24131
- throw new TypeError(FUNC_ERROR_TEXT);
24132
- }
24133
- if (isObject(options)) {
24134
- leading = "leading" in options ? !!options.leading : leading;
24135
- trailing = "trailing" in options ? !!options.trailing : trailing;
24136
- }
24137
- return debounce(func, wait, {
24138
- "leading": leading,
24139
- "maxWait": wait,
24140
- "trailing": trailing
24141
- });
24142
- }
24143
- var __assign = function() {
24144
- __assign = Object.assign || function __assign2(t) {
24145
- for (var s, i = 1, n = arguments.length; i < n; i++) {
24146
- s = arguments[i];
24147
- for (var p in s)
24148
- if (Object.prototype.hasOwnProperty.call(s, p))
24149
- t[p] = s[p];
24150
- }
24151
- return t;
24152
- };
24153
- return __assign.apply(this, arguments);
24154
- };
24155
- var cachedScrollbarWidth = null;
24156
- var cachedDevicePixelRatio = null;
24157
- if (canUseDOM$1) {
24158
- window.addEventListener("resize", function() {
24159
- if (cachedDevicePixelRatio !== window.devicePixelRatio) {
24160
- cachedDevicePixelRatio = window.devicePixelRatio;
24161
- cachedScrollbarWidth = null;
24162
- }
24163
- });
24164
- }
24165
- function scrollbarWidth() {
24166
- if (cachedScrollbarWidth === null) {
24167
- if (typeof document === "undefined") {
24168
- cachedScrollbarWidth = 0;
24169
- return cachedScrollbarWidth;
24170
- }
24171
- var body = document.body;
24172
- var box = document.createElement("div");
24173
- box.classList.add("simplebar-hide-scrollbar");
24174
- body.appendChild(box);
24175
- var width = box.getBoundingClientRect().right;
24176
- body.removeChild(box);
24177
- cachedScrollbarWidth = width;
24178
- }
24179
- return cachedScrollbarWidth;
24180
- }
24181
- function getElementWindow$1(element) {
24182
- if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
24183
- return window;
24184
- }
24185
- return element.ownerDocument.defaultView;
24186
- }
24187
- function getElementDocument$1(element) {
24188
- if (!element || !element.ownerDocument) {
24189
- return document;
24190
- }
24191
- return element.ownerDocument;
24192
- }
24193
- var getOptions$1 = function(obj) {
24194
- var initialObj = {};
24195
- var options = Array.prototype.reduce.call(obj, function(acc, attribute) {
24196
- var option = attribute.name.match(/data-simplebar-(.+)/);
24197
- if (option) {
24198
- var key = option[1].replace(/\W+(.)/g, function(_, chr) {
24199
- return chr.toUpperCase();
24200
- });
24201
- switch (attribute.value) {
24202
- case "true":
24203
- acc[key] = true;
24204
- break;
24205
- case "false":
24206
- acc[key] = false;
24207
- break;
24208
- case void 0:
24209
- acc[key] = true;
24210
- break;
24211
- default:
24212
- acc[key] = attribute.value;
24213
- }
24214
- }
24215
- return acc;
24216
- }, initialObj);
24217
- return options;
24218
- };
24219
- function addClasses$1(el, classes) {
24220
- var _a2;
24221
- if (!el)
24222
- return;
24223
- (_a2 = el.classList).add.apply(_a2, classes.split(" "));
24224
- }
24225
- function removeClasses$1(el, classes) {
24226
- if (!el)
24227
- return;
24228
- classes.split(" ").forEach(function(className) {
24229
- el.classList.remove(className);
24230
- });
24231
- }
24232
- function classNamesToQuery$1(classNames) {
24233
- return ".".concat(classNames.split(" ").join("."));
24234
- }
24235
- var helpers = /* @__PURE__ */ Object.freeze({
24236
- __proto__: null,
24237
- getElementWindow: getElementWindow$1,
24238
- getElementDocument: getElementDocument$1,
24239
- getOptions: getOptions$1,
24240
- addClasses: addClasses$1,
24241
- removeClasses: removeClasses$1,
24242
- classNamesToQuery: classNamesToQuery$1
24243
- });
24244
- var getElementWindow = getElementWindow$1, getElementDocument = getElementDocument$1, getOptions$2 = getOptions$1, addClasses$2 = addClasses$1, removeClasses = removeClasses$1, classNamesToQuery = classNamesToQuery$1;
24245
- var SimpleBarCore = (
24246
- /** @class */
24247
- function() {
24248
- function SimpleBarCore2(element, options) {
24249
- if (options === void 0) {
24250
- options = {};
24251
- }
24252
- var _this = this;
24253
- this.removePreventClickId = null;
24254
- this.minScrollbarWidth = 20;
24255
- this.stopScrollDelay = 175;
24256
- this.isScrolling = false;
24257
- this.isMouseEntering = false;
24258
- this.scrollXTicking = false;
24259
- this.scrollYTicking = false;
24260
- this.wrapperEl = null;
24261
- this.contentWrapperEl = null;
24262
- this.contentEl = null;
24263
- this.offsetEl = null;
24264
- this.maskEl = null;
24265
- this.placeholderEl = null;
24266
- this.heightAutoObserverWrapperEl = null;
24267
- this.heightAutoObserverEl = null;
24268
- this.rtlHelpers = null;
24269
- this.scrollbarWidth = 0;
24270
- this.resizeObserver = null;
24271
- this.mutationObserver = null;
24272
- this.elStyles = null;
24273
- this.isRtl = null;
24274
- this.mouseX = 0;
24275
- this.mouseY = 0;
24276
- this.onMouseMove = function() {
24277
- };
24278
- this.onWindowResize = function() {
24279
- };
24280
- this.onStopScrolling = function() {
24281
- };
24282
- this.onMouseEntered = function() {
24283
- };
24284
- this.onScroll = function() {
24285
- var elWindow = getElementWindow(_this.el);
24286
- if (!_this.scrollXTicking) {
24287
- elWindow.requestAnimationFrame(_this.scrollX);
24288
- _this.scrollXTicking = true;
24289
- }
24290
- if (!_this.scrollYTicking) {
24291
- elWindow.requestAnimationFrame(_this.scrollY);
24292
- _this.scrollYTicking = true;
24293
- }
24294
- if (!_this.isScrolling) {
24295
- _this.isScrolling = true;
24296
- addClasses$2(_this.el, _this.classNames.scrolling);
24297
- }
24298
- _this.showScrollbar("x");
24299
- _this.showScrollbar("y");
24300
- _this.onStopScrolling();
24301
- };
24302
- this.scrollX = function() {
24303
- if (_this.axis.x.isOverflowing) {
24304
- _this.positionScrollbar("x");
24305
- }
24306
- _this.scrollXTicking = false;
24307
- };
24308
- this.scrollY = function() {
24309
- if (_this.axis.y.isOverflowing) {
24310
- _this.positionScrollbar("y");
24311
- }
24312
- _this.scrollYTicking = false;
24313
- };
24314
- this._onStopScrolling = function() {
24315
- removeClasses(_this.el, _this.classNames.scrolling);
24316
- if (_this.options.autoHide) {
24317
- _this.hideScrollbar("x");
24318
- _this.hideScrollbar("y");
24319
- }
24320
- _this.isScrolling = false;
24321
- };
24322
- this.onMouseEnter = function() {
24323
- if (!_this.isMouseEntering) {
24324
- addClasses$2(_this.el, _this.classNames.mouseEntered);
24325
- _this.showScrollbar("x");
24326
- _this.showScrollbar("y");
24327
- _this.isMouseEntering = true;
24328
- }
24329
- _this.onMouseEntered();
24330
- };
24331
- this._onMouseEntered = function() {
24332
- removeClasses(_this.el, _this.classNames.mouseEntered);
24333
- if (_this.options.autoHide) {
24334
- _this.hideScrollbar("x");
24335
- _this.hideScrollbar("y");
24336
- }
24337
- _this.isMouseEntering = false;
24338
- };
24339
- this._onMouseMove = function(e) {
24340
- _this.mouseX = e.clientX;
24341
- _this.mouseY = e.clientY;
24342
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
24343
- _this.onMouseMoveForAxis("x");
24344
- }
24345
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
24346
- _this.onMouseMoveForAxis("y");
24347
- }
24348
- };
24349
- this.onMouseLeave = function() {
24350
- _this.onMouseMove.cancel();
24351
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
24352
- _this.onMouseLeaveForAxis("x");
24353
- }
24354
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
24355
- _this.onMouseLeaveForAxis("y");
24356
- }
24357
- _this.mouseX = -1;
24358
- _this.mouseY = -1;
24359
- };
24360
- this._onWindowResize = function() {
24361
- _this.scrollbarWidth = _this.getScrollbarWidth();
24362
- _this.hideNativeScrollbar();
24363
- };
24364
- this.onPointerEvent = function(e) {
24365
- if (!_this.axis.x.track.el || !_this.axis.y.track.el || !_this.axis.x.scrollbar.el || !_this.axis.y.scrollbar.el)
24366
- return;
24367
- var isWithinTrackXBounds, isWithinTrackYBounds;
24368
- _this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
24369
- _this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
24370
- if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
24371
- isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
24372
- }
24373
- if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
24374
- isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
24375
- }
24376
- if (isWithinTrackXBounds || isWithinTrackYBounds) {
24377
- e.stopPropagation();
24378
- if (e.type === "pointerdown" && e.pointerType !== "touch") {
24379
- if (isWithinTrackXBounds) {
24380
- _this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
24381
- if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
24382
- _this.onDragStart(e, "x");
24383
- } else {
24384
- _this.onTrackClick(e, "x");
24385
- }
24386
- }
24387
- if (isWithinTrackYBounds) {
24388
- _this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
24389
- if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
24390
- _this.onDragStart(e, "y");
24391
- } else {
24392
- _this.onTrackClick(e, "y");
24393
- }
24394
- }
24395
- }
24396
- }
24397
- };
24398
- this.drag = function(e) {
24399
- var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
24400
- if (!_this.draggedAxis || !_this.contentWrapperEl)
24401
- return;
24402
- var eventOffset;
24403
- var track = _this.axis[_this.draggedAxis].track;
24404
- var trackSize = (_b = (_a2 = track.rect) === null || _a2 === void 0 ? void 0 : _a2[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _b !== void 0 ? _b : 0;
24405
- var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
24406
- var contentSize = (_d = (_c = _this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c[_this.axis[_this.draggedAxis].scrollSizeAttr]) !== null && _d !== void 0 ? _d : 0;
24407
- var hostSize = parseInt((_f = (_e = _this.elStyles) === null || _e === void 0 ? void 0 : _e[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _f !== void 0 ? _f : "0px", 10);
24408
- e.preventDefault();
24409
- e.stopPropagation();
24410
- if (_this.draggedAxis === "y") {
24411
- eventOffset = e.pageY;
24412
- } else {
24413
- eventOffset = e.pageX;
24414
- }
24415
- var dragPos = eventOffset - ((_h = (_g = track.rect) === null || _g === void 0 ? void 0 : _g[_this.axis[_this.draggedAxis].offsetAttr]) !== null && _h !== void 0 ? _h : 0) - _this.axis[_this.draggedAxis].dragOffset;
24416
- dragPos = _this.draggedAxis === "x" && _this.isRtl ? ((_k = (_j = track.rect) === null || _j === void 0 ? void 0 : _j[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _k !== void 0 ? _k : 0) - scrollbar.size - dragPos : dragPos;
24417
- var dragPerc = dragPos / (trackSize - scrollbar.size);
24418
- var scrollPos = dragPerc * (contentSize - hostSize);
24419
- if (_this.draggedAxis === "x" && _this.isRtl) {
24420
- scrollPos = ((_l = SimpleBarCore2.getRtlHelpers()) === null || _l === void 0 ? void 0 : _l.isScrollingToNegative) ? -scrollPos : scrollPos;
24421
- }
24422
- _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
24423
- };
24424
- this.onEndDrag = function(e) {
24425
- var elDocument = getElementDocument(_this.el);
24426
- var elWindow = getElementWindow(_this.el);
24427
- e.preventDefault();
24428
- e.stopPropagation();
24429
- removeClasses(_this.el, _this.classNames.dragging);
24430
- elDocument.removeEventListener("mousemove", _this.drag, true);
24431
- elDocument.removeEventListener("mouseup", _this.onEndDrag, true);
24432
- _this.removePreventClickId = elWindow.setTimeout(function() {
24433
- elDocument.removeEventListener("click", _this.preventClick, true);
24434
- elDocument.removeEventListener("dblclick", _this.preventClick, true);
24435
- _this.removePreventClickId = null;
24436
- });
24437
- };
24438
- this.preventClick = function(e) {
24439
- e.preventDefault();
24440
- e.stopPropagation();
24441
- };
24442
- this.el = element;
24443
- this.options = __assign(__assign({}, SimpleBarCore2.defaultOptions), options);
24444
- this.classNames = __assign(__assign({}, SimpleBarCore2.defaultOptions.classNames), options.classNames);
24445
- this.axis = {
24446
- x: {
24447
- scrollOffsetAttr: "scrollLeft",
24448
- sizeAttr: "width",
24449
- scrollSizeAttr: "scrollWidth",
24450
- offsetSizeAttr: "offsetWidth",
24451
- offsetAttr: "left",
24452
- overflowAttr: "overflowX",
24453
- dragOffset: 0,
24454
- isOverflowing: true,
24455
- forceVisible: false,
24456
- track: { size: null, el: null, rect: null, isVisible: false },
24457
- scrollbar: { size: null, el: null, rect: null, isVisible: false }
24458
- },
24459
- y: {
24460
- scrollOffsetAttr: "scrollTop",
24461
- sizeAttr: "height",
24462
- scrollSizeAttr: "scrollHeight",
24463
- offsetSizeAttr: "offsetHeight",
24464
- offsetAttr: "top",
24465
- overflowAttr: "overflowY",
24466
- dragOffset: 0,
24467
- isOverflowing: true,
24468
- forceVisible: false,
24469
- track: { size: null, el: null, rect: null, isVisible: false },
24470
- scrollbar: { size: null, el: null, rect: null, isVisible: false }
24471
- }
24472
- };
24473
- if (typeof this.el !== "object" || !this.el.nodeName) {
24474
- throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
24475
- }
24476
- this.onMouseMove = throttle(this._onMouseMove, 64);
24477
- this.onWindowResize = debounce(this._onWindowResize, 64, { leading: true });
24478
- this.onStopScrolling = debounce(this._onStopScrolling, this.stopScrollDelay);
24479
- this.onMouseEntered = debounce(this._onMouseEntered, this.stopScrollDelay);
24480
- this.init();
24481
- }
24482
- SimpleBarCore2.getRtlHelpers = function() {
24483
- if (SimpleBarCore2.rtlHelpers) {
24484
- return SimpleBarCore2.rtlHelpers;
24485
- }
24486
- var dummyDiv = document.createElement("div");
24487
- dummyDiv.innerHTML = '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
24488
- var scrollbarDummyEl = dummyDiv.firstElementChild;
24489
- var dummyChild = scrollbarDummyEl === null || scrollbarDummyEl === void 0 ? void 0 : scrollbarDummyEl.firstElementChild;
24490
- if (!dummyChild)
24491
- return null;
24492
- document.body.appendChild(scrollbarDummyEl);
24493
- scrollbarDummyEl.scrollLeft = 0;
24494
- var dummyContainerOffset = SimpleBarCore2.getOffset(scrollbarDummyEl);
24495
- var dummyChildOffset = SimpleBarCore2.getOffset(dummyChild);
24496
- scrollbarDummyEl.scrollLeft = -999;
24497
- var dummyChildOffsetAfterScroll = SimpleBarCore2.getOffset(dummyChild);
24498
- document.body.removeChild(scrollbarDummyEl);
24499
- SimpleBarCore2.rtlHelpers = {
24500
- // determines if the scrolling is responding with negative values
24501
- isScrollOriginAtZero: dummyContainerOffset.left !== dummyChildOffset.left,
24502
- // determines if the origin scrollbar position is inverted or not (positioned on left or right)
24503
- isScrollingToNegative: dummyChildOffset.left !== dummyChildOffsetAfterScroll.left
24504
- };
24505
- return SimpleBarCore2.rtlHelpers;
24506
- };
24507
- SimpleBarCore2.prototype.getScrollbarWidth = function() {
24508
- try {
24509
- if (this.contentWrapperEl && getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display === "none" || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style) {
24510
- return 0;
24511
- } else {
24512
- return scrollbarWidth();
24513
- }
24514
- } catch (e) {
24515
- return scrollbarWidth();
24516
- }
24517
- };
24518
- SimpleBarCore2.getOffset = function(el) {
24519
- var rect = el.getBoundingClientRect();
24520
- var elDocument = getElementDocument(el);
24521
- var elWindow = getElementWindow(el);
24522
- return {
24523
- top: rect.top + (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
24524
- left: rect.left + (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
24525
- };
24526
- };
24527
- SimpleBarCore2.prototype.init = function() {
24528
- if (canUseDOM$1) {
24529
- this.initDOM();
24530
- this.rtlHelpers = SimpleBarCore2.getRtlHelpers();
24531
- this.scrollbarWidth = this.getScrollbarWidth();
24532
- this.recalculate();
24533
- this.initListeners();
24534
- }
24535
- };
24536
- SimpleBarCore2.prototype.initDOM = function() {
24537
- var _a2, _b;
24538
- this.wrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.wrapper));
24539
- this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(classNamesToQuery(this.classNames.contentWrapper));
24540
- this.contentEl = this.options.contentNode || this.el.querySelector(classNamesToQuery(this.classNames.contentEl));
24541
- this.offsetEl = this.el.querySelector(classNamesToQuery(this.classNames.offset));
24542
- this.maskEl = this.el.querySelector(classNamesToQuery(this.classNames.mask));
24543
- this.placeholderEl = this.findChild(this.wrapperEl, classNamesToQuery(this.classNames.placeholder));
24544
- this.heightAutoObserverWrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverWrapperEl));
24545
- this.heightAutoObserverEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverEl));
24546
- this.axis.x.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.horizontal)));
24547
- this.axis.y.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.vertical)));
24548
- this.axis.x.scrollbar.el = ((_a2 = this.axis.x.track.el) === null || _a2 === void 0 ? void 0 : _a2.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
24549
- this.axis.y.scrollbar.el = ((_b = this.axis.y.track.el) === null || _b === void 0 ? void 0 : _b.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
24550
- if (!this.options.autoHide) {
24551
- addClasses$2(this.axis.x.scrollbar.el, this.classNames.visible);
24552
- addClasses$2(this.axis.y.scrollbar.el, this.classNames.visible);
24553
- }
24554
- };
24555
- SimpleBarCore2.prototype.initListeners = function() {
24556
- var _this = this;
24557
- var _a2;
24558
- var elWindow = getElementWindow(this.el);
24559
- this.el.addEventListener("mouseenter", this.onMouseEnter);
24560
- this.el.addEventListener("pointerdown", this.onPointerEvent, true);
24561
- this.el.addEventListener("mousemove", this.onMouseMove);
24562
- this.el.addEventListener("mouseleave", this.onMouseLeave);
24563
- (_a2 = this.contentWrapperEl) === null || _a2 === void 0 ? void 0 : _a2.addEventListener("scroll", this.onScroll);
24564
- elWindow.addEventListener("resize", this.onWindowResize);
24565
- if (!this.contentEl)
24566
- return;
24567
- if (window.ResizeObserver) {
24568
- var resizeObserverStarted_1 = false;
24569
- var resizeObserver = elWindow.ResizeObserver || ResizeObserver;
24570
- this.resizeObserver = new resizeObserver(function() {
24571
- if (!resizeObserverStarted_1)
24572
- return;
24573
- elWindow.requestAnimationFrame(function() {
24574
- _this.recalculate();
24575
- });
24576
- });
24577
- this.resizeObserver.observe(this.el);
24578
- this.resizeObserver.observe(this.contentEl);
24579
- elWindow.requestAnimationFrame(function() {
24580
- resizeObserverStarted_1 = true;
24581
- });
24582
- }
24583
- this.mutationObserver = new elWindow.MutationObserver(function() {
24584
- elWindow.requestAnimationFrame(function() {
24585
- _this.recalculate();
24586
- });
24587
- });
24588
- this.mutationObserver.observe(this.contentEl, {
24589
- childList: true,
24590
- subtree: true,
24591
- characterData: true
24592
- });
24593
- };
24594
- SimpleBarCore2.prototype.recalculate = function() {
24595
- if (!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)
24596
- return;
24597
- var elWindow = getElementWindow(this.el);
24598
- this.elStyles = elWindow.getComputedStyle(this.el);
24599
- this.isRtl = this.elStyles.direction === "rtl";
24600
- var contentElOffsetWidth = this.contentEl.offsetWidth;
24601
- var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
24602
- var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1 || contentElOffsetWidth > 0;
24603
- var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
24604
- var elOverflowX = this.elStyles.overflowX;
24605
- var elOverflowY = this.elStyles.overflowY;
24606
- this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft);
24607
- this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
24608
- var contentElScrollHeight = this.contentEl.scrollHeight;
24609
- var contentElScrollWidth = this.contentEl.scrollWidth;
24610
- this.contentWrapperEl.style.height = isHeightAuto ? "auto" : "100%";
24611
- this.placeholderEl.style.width = isWidthAuto ? "".concat(contentElOffsetWidth || contentElScrollWidth, "px") : "auto";
24612
- this.placeholderEl.style.height = "".concat(contentElScrollHeight, "px");
24613
- var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
24614
- this.axis.x.isOverflowing = contentElOffsetWidth !== 0 && contentElScrollWidth > contentElOffsetWidth;
24615
- this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight;
24616
- this.axis.x.isOverflowing = elOverflowX === "hidden" ? false : this.axis.x.isOverflowing;
24617
- this.axis.y.isOverflowing = elOverflowY === "hidden" ? false : this.axis.y.isOverflowing;
24618
- this.axis.x.forceVisible = this.options.forceVisible === "x" || this.options.forceVisible === true;
24619
- this.axis.y.forceVisible = this.options.forceVisible === "y" || this.options.forceVisible === true;
24620
- this.hideNativeScrollbar();
24621
- var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
24622
- var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
24623
- this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
24624
- this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
24625
- this.axis.x.scrollbar.size = this.getScrollbarSize("x");
24626
- this.axis.y.scrollbar.size = this.getScrollbarSize("y");
24627
- if (this.axis.x.scrollbar.el)
24628
- this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px");
24629
- if (this.axis.y.scrollbar.el)
24630
- this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px");
24631
- this.positionScrollbar("x");
24632
- this.positionScrollbar("y");
24633
- this.toggleTrackVisibility("x");
24634
- this.toggleTrackVisibility("y");
24635
- };
24636
- SimpleBarCore2.prototype.getScrollbarSize = function(axis) {
24637
- var _a2, _b;
24638
- if (axis === void 0) {
24639
- axis = "y";
24640
- }
24641
- if (!this.axis[axis].isOverflowing || !this.contentEl) {
24642
- return 0;
24643
- }
24644
- var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
24645
- var trackSize = (_b = (_a2 = this.axis[axis].track.el) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetSizeAttr]) !== null && _b !== void 0 ? _b : 0;
24646
- var scrollbarRatio = trackSize / contentSize;
24647
- var scrollbarSize;
24648
- scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
24649
- if (this.options.scrollbarMaxSize) {
24650
- scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
24651
- }
24652
- return scrollbarSize;
24653
- };
24654
- SimpleBarCore2.prototype.positionScrollbar = function(axis) {
24655
- var _a2, _b, _c;
24656
- if (axis === void 0) {
24657
- axis = "y";
24658
- }
24659
- var scrollbar = this.axis[axis].scrollbar;
24660
- if (!this.axis[axis].isOverflowing || !this.contentWrapperEl || !scrollbar.el || !this.elStyles) {
24661
- return;
24662
- }
24663
- var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
24664
- var trackSize = ((_a2 = this.axis[axis].track.el) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetSizeAttr]) || 0;
24665
- var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
24666
- var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
24667
- scrollOffset = axis === "x" && this.isRtl && ((_b = SimpleBarCore2.getRtlHelpers()) === null || _b === void 0 ? void 0 : _b.isScrollOriginAtZero) ? -scrollOffset : scrollOffset;
24668
- if (axis === "x" && this.isRtl) {
24669
- scrollOffset = ((_c = SimpleBarCore2.getRtlHelpers()) === null || _c === void 0 ? void 0 : _c.isScrollingToNegative) ? scrollOffset : -scrollOffset;
24670
- }
24671
- var scrollPourcent = scrollOffset / (contentSize - hostSize);
24672
- var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
24673
- handleOffset = axis === "x" && this.isRtl ? -handleOffset + (trackSize - scrollbar.size) : handleOffset;
24674
- scrollbar.el.style.transform = axis === "x" ? "translate3d(".concat(handleOffset, "px, 0, 0)") : "translate3d(0, ".concat(handleOffset, "px, 0)");
24675
- };
24676
- SimpleBarCore2.prototype.toggleTrackVisibility = function(axis) {
24677
- if (axis === void 0) {
24678
- axis = "y";
24679
- }
24680
- var track = this.axis[axis].track.el;
24681
- var scrollbar = this.axis[axis].scrollbar.el;
24682
- if (!track || !scrollbar || !this.contentWrapperEl)
24683
- return;
24684
- if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
24685
- track.style.visibility = "visible";
24686
- this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "scroll";
24687
- this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(axis));
24688
- } else {
24689
- track.style.visibility = "hidden";
24690
- this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "hidden";
24691
- this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(axis));
24692
- }
24693
- if (this.axis[axis].isOverflowing) {
24694
- scrollbar.style.display = "block";
24695
- } else {
24696
- scrollbar.style.display = "none";
24697
- }
24698
- };
24699
- SimpleBarCore2.prototype.showScrollbar = function(axis) {
24700
- if (axis === void 0) {
24701
- axis = "y";
24702
- }
24703
- if (this.axis[axis].isOverflowing && !this.axis[axis].scrollbar.isVisible) {
24704
- addClasses$2(this.axis[axis].scrollbar.el, this.classNames.visible);
24705
- this.axis[axis].scrollbar.isVisible = true;
24706
- }
24707
- };
24708
- SimpleBarCore2.prototype.hideScrollbar = function(axis) {
24709
- if (axis === void 0) {
24710
- axis = "y";
24711
- }
24712
- if (this.axis[axis].isOverflowing && this.axis[axis].scrollbar.isVisible) {
24713
- removeClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
24714
- this.axis[axis].scrollbar.isVisible = false;
24715
- }
24716
- };
24717
- SimpleBarCore2.prototype.hideNativeScrollbar = function() {
24718
- if (!this.offsetEl)
24719
- return;
24720
- this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
24721
- this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
24722
- };
24723
- SimpleBarCore2.prototype.onMouseMoveForAxis = function(axis) {
24724
- if (axis === void 0) {
24725
- axis = "y";
24726
- }
24727
- var currentAxis = this.axis[axis];
24728
- if (!currentAxis.track.el || !currentAxis.scrollbar.el)
24729
- return;
24730
- currentAxis.track.rect = currentAxis.track.el.getBoundingClientRect();
24731
- currentAxis.scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
24732
- if (this.isWithinBounds(currentAxis.track.rect)) {
24733
- this.showScrollbar(axis);
24734
- addClasses$2(currentAxis.track.el, this.classNames.hover);
24735
- if (this.isWithinBounds(currentAxis.scrollbar.rect)) {
24736
- addClasses$2(currentAxis.scrollbar.el, this.classNames.hover);
24737
- } else {
24738
- removeClasses(currentAxis.scrollbar.el, this.classNames.hover);
24739
- }
24740
- } else {
24741
- removeClasses(currentAxis.track.el, this.classNames.hover);
24742
- if (this.options.autoHide) {
24743
- this.hideScrollbar(axis);
24744
- }
24745
- }
24746
- };
24747
- SimpleBarCore2.prototype.onMouseLeaveForAxis = function(axis) {
24748
- if (axis === void 0) {
24749
- axis = "y";
24750
- }
24751
- removeClasses(this.axis[axis].track.el, this.classNames.hover);
24752
- removeClasses(this.axis[axis].scrollbar.el, this.classNames.hover);
24753
- if (this.options.autoHide) {
24754
- this.hideScrollbar(axis);
24755
- }
24756
- };
24757
- SimpleBarCore2.prototype.onDragStart = function(e, axis) {
24758
- var _a2;
24759
- if (axis === void 0) {
24760
- axis = "y";
24761
- }
24762
- var elDocument = getElementDocument(this.el);
24763
- var elWindow = getElementWindow(this.el);
24764
- var scrollbar = this.axis[axis].scrollbar;
24765
- var eventOffset = axis === "y" ? e.pageY : e.pageX;
24766
- this.axis[axis].dragOffset = eventOffset - (((_a2 = scrollbar.rect) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetAttr]) || 0);
24767
- this.draggedAxis = axis;
24768
- addClasses$2(this.el, this.classNames.dragging);
24769
- elDocument.addEventListener("mousemove", this.drag, true);
24770
- elDocument.addEventListener("mouseup", this.onEndDrag, true);
24771
- if (this.removePreventClickId === null) {
24772
- elDocument.addEventListener("click", this.preventClick, true);
24773
- elDocument.addEventListener("dblclick", this.preventClick, true);
24774
- } else {
24775
- elWindow.clearTimeout(this.removePreventClickId);
24776
- this.removePreventClickId = null;
24777
- }
24778
- };
24779
- SimpleBarCore2.prototype.onTrackClick = function(e, axis) {
24780
- var _this = this;
24781
- var _a2, _b, _c, _d;
24782
- if (axis === void 0) {
24783
- axis = "y";
24784
- }
24785
- var currentAxis = this.axis[axis];
24786
- if (!this.options.clickOnTrack || !currentAxis.scrollbar.el || !this.contentWrapperEl)
24787
- return;
24788
- e.preventDefault();
24789
- var elWindow = getElementWindow(this.el);
24790
- this.axis[axis].scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
24791
- var scrollbar = this.axis[axis].scrollbar;
24792
- var scrollbarOffset = (_b = (_a2 = scrollbar.rect) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetAttr]) !== null && _b !== void 0 ? _b : 0;
24793
- var hostSize = parseInt((_d = (_c = this.elStyles) === null || _c === void 0 ? void 0 : _c[this.axis[axis].sizeAttr]) !== null && _d !== void 0 ? _d : "0px", 10);
24794
- var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
24795
- var t = axis === "y" ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
24796
- var dir = t < 0 ? -1 : 1;
24797
- var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
24798
- var speed = 40;
24799
- var scrollTo = function() {
24800
- if (!_this.contentWrapperEl)
24801
- return;
24802
- if (dir === -1) {
24803
- if (scrolled > scrollSize) {
24804
- scrolled -= speed;
24805
- _this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
24806
- elWindow.requestAnimationFrame(scrollTo);
24807
- }
24808
- } else {
24809
- if (scrolled < scrollSize) {
24810
- scrolled += speed;
24811
- _this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
24812
- elWindow.requestAnimationFrame(scrollTo);
24813
- }
24814
- }
24815
- };
24816
- scrollTo();
24817
- };
24818
- SimpleBarCore2.prototype.getContentElement = function() {
24819
- return this.contentEl;
24820
- };
24821
- SimpleBarCore2.prototype.getScrollElement = function() {
24822
- return this.contentWrapperEl;
24823
- };
24824
- SimpleBarCore2.prototype.removeListeners = function() {
24825
- var elWindow = getElementWindow(this.el);
24826
- this.el.removeEventListener("mouseenter", this.onMouseEnter);
24827
- this.el.removeEventListener("pointerdown", this.onPointerEvent, true);
24828
- this.el.removeEventListener("mousemove", this.onMouseMove);
24829
- this.el.removeEventListener("mouseleave", this.onMouseLeave);
24830
- if (this.contentWrapperEl) {
24831
- this.contentWrapperEl.removeEventListener("scroll", this.onScroll);
24832
- }
24833
- elWindow.removeEventListener("resize", this.onWindowResize);
24834
- if (this.mutationObserver) {
24835
- this.mutationObserver.disconnect();
24836
- }
24837
- if (this.resizeObserver) {
24838
- this.resizeObserver.disconnect();
24839
- }
24840
- this.onMouseMove.cancel();
24841
- this.onWindowResize.cancel();
24842
- this.onStopScrolling.cancel();
24843
- this.onMouseEntered.cancel();
24844
- };
24845
- SimpleBarCore2.prototype.unMount = function() {
24846
- this.removeListeners();
24847
- };
24848
- SimpleBarCore2.prototype.isWithinBounds = function(bbox) {
24849
- return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
24850
- };
24851
- SimpleBarCore2.prototype.findChild = function(el, query) {
24852
- var matches2 = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
24853
- return Array.prototype.filter.call(el.children, function(child) {
24854
- return matches2.call(child, query);
24855
- })[0];
24856
- };
24857
- SimpleBarCore2.rtlHelpers = null;
24858
- SimpleBarCore2.defaultOptions = {
24859
- forceVisible: false,
24860
- clickOnTrack: true,
24861
- scrollbarMinSize: 25,
24862
- scrollbarMaxSize: 0,
24863
- ariaLabel: "scrollable content",
24864
- classNames: {
24865
- contentEl: "simplebar-content",
24866
- contentWrapper: "simplebar-content-wrapper",
24867
- offset: "simplebar-offset",
24868
- mask: "simplebar-mask",
24869
- wrapper: "simplebar-wrapper",
24870
- placeholder: "simplebar-placeholder",
24871
- scrollbar: "simplebar-scrollbar",
24872
- track: "simplebar-track",
24873
- heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper",
24874
- heightAutoObserverEl: "simplebar-height-auto-observer",
24875
- visible: "simplebar-visible",
24876
- horizontal: "simplebar-horizontal",
24877
- vertical: "simplebar-vertical",
24878
- hover: "simplebar-hover",
24879
- dragging: "simplebar-dragging",
24880
- scrolling: "simplebar-scrolling",
24881
- scrollable: "simplebar-scrollable",
24882
- mouseEntered: "simplebar-mouse-entered"
24883
- },
24884
- scrollableNode: null,
24885
- contentNode: null,
24886
- autoHide: true
24887
- };
24888
- SimpleBarCore2.getOptions = getOptions$2;
24889
- SimpleBarCore2.helpers = helpers;
24890
- return SimpleBarCore2;
24891
- }()
24892
- );
24893
- var extendStatics = function(d, b) {
24894
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
24895
- d2.__proto__ = b2;
24896
- } || function(d2, b2) {
24897
- for (var p in b2)
24898
- if (Object.prototype.hasOwnProperty.call(b2, p))
24899
- d2[p] = b2[p];
24900
- };
24901
- return extendStatics(d, b);
24902
- };
24903
- function __extends(d, b) {
24904
- if (typeof b !== "function" && b !== null)
24905
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24906
- extendStatics(d, b);
24907
- function __() {
24908
- this.constructor = d;
24909
- }
24910
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24911
- }
24912
- var _a = SimpleBarCore.helpers, getOptions = _a.getOptions, addClasses = _a.addClasses;
24913
- var SimpleBar = (
24914
- /** @class */
24915
- function(_super) {
24916
- __extends(SimpleBar2, _super);
24917
- function SimpleBar2() {
24918
- var args = [];
24919
- for (var _i = 0; _i < arguments.length; _i++) {
24920
- args[_i] = arguments[_i];
24921
- }
24922
- var _this = _super.apply(this, args) || this;
24923
- SimpleBar2.instances.set(args[0], _this);
24924
- return _this;
24925
- }
24926
- SimpleBar2.initDOMLoadedElements = function() {
24927
- document.removeEventListener("DOMContentLoaded", this.initDOMLoadedElements);
24928
- window.removeEventListener("load", this.initDOMLoadedElements);
24929
- Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"), function(el) {
24930
- if (el.getAttribute("data-simplebar") !== "init" && !SimpleBar2.instances.has(el))
24931
- new SimpleBar2(el, getOptions(el.attributes));
24932
- });
24933
- };
24934
- SimpleBar2.removeObserver = function() {
24935
- var _a2;
24936
- (_a2 = SimpleBar2.globalObserver) === null || _a2 === void 0 ? void 0 : _a2.disconnect();
24937
- };
24938
- SimpleBar2.prototype.initDOM = function() {
24939
- var _this = this;
24940
- var _a2, _b, _c;
24941
- if (!Array.prototype.filter.call(this.el.children, function(child) {
24942
- return child.classList.contains(_this.classNames.wrapper);
24943
- }).length) {
24944
- this.wrapperEl = document.createElement("div");
24945
- this.contentWrapperEl = document.createElement("div");
24946
- this.offsetEl = document.createElement("div");
24947
- this.maskEl = document.createElement("div");
24948
- this.contentEl = document.createElement("div");
24949
- this.placeholderEl = document.createElement("div");
24950
- this.heightAutoObserverWrapperEl = document.createElement("div");
24951
- this.heightAutoObserverEl = document.createElement("div");
24952
- addClasses(this.wrapperEl, this.classNames.wrapper);
24953
- addClasses(this.contentWrapperEl, this.classNames.contentWrapper);
24954
- addClasses(this.offsetEl, this.classNames.offset);
24955
- addClasses(this.maskEl, this.classNames.mask);
24956
- addClasses(this.contentEl, this.classNames.contentEl);
24957
- addClasses(this.placeholderEl, this.classNames.placeholder);
24958
- addClasses(this.heightAutoObserverWrapperEl, this.classNames.heightAutoObserverWrapperEl);
24959
- addClasses(this.heightAutoObserverEl, this.classNames.heightAutoObserverEl);
24960
- while (this.el.firstChild) {
24961
- this.contentEl.appendChild(this.el.firstChild);
24962
- }
24963
- this.contentWrapperEl.appendChild(this.contentEl);
24964
- this.offsetEl.appendChild(this.contentWrapperEl);
24965
- this.maskEl.appendChild(this.offsetEl);
24966
- this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
24967
- this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
24968
- this.wrapperEl.appendChild(this.maskEl);
24969
- this.wrapperEl.appendChild(this.placeholderEl);
24970
- this.el.appendChild(this.wrapperEl);
24971
- (_a2 = this.contentWrapperEl) === null || _a2 === void 0 ? void 0 : _a2.setAttribute("tabindex", "0");
24972
- (_b = this.contentWrapperEl) === null || _b === void 0 ? void 0 : _b.setAttribute("role", "region");
24973
- (_c = this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c.setAttribute("aria-label", this.options.ariaLabel);
24974
- }
24975
- if (!this.axis.x.track.el || !this.axis.y.track.el) {
24976
- var track = document.createElement("div");
24977
- var scrollbar = document.createElement("div");
24978
- addClasses(track, this.classNames.track);
24979
- addClasses(scrollbar, this.classNames.scrollbar);
24980
- track.appendChild(scrollbar);
24981
- this.axis.x.track.el = track.cloneNode(true);
24982
- addClasses(this.axis.x.track.el, this.classNames.horizontal);
24983
- this.axis.y.track.el = track.cloneNode(true);
24984
- addClasses(this.axis.y.track.el, this.classNames.vertical);
24985
- this.el.appendChild(this.axis.x.track.el);
24986
- this.el.appendChild(this.axis.y.track.el);
24987
- }
24988
- SimpleBarCore.prototype.initDOM.call(this);
24989
- this.el.setAttribute("data-simplebar", "init");
24990
- };
24991
- SimpleBar2.prototype.unMount = function() {
24992
- SimpleBarCore.prototype.unMount.call(this);
24993
- SimpleBar2.instances["delete"](this.el);
24994
- };
24995
- SimpleBar2.initHtmlApi = function() {
24996
- this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this);
24997
- if (typeof MutationObserver !== "undefined") {
24998
- this.globalObserver = new MutationObserver(SimpleBar2.handleMutations);
24999
- this.globalObserver.observe(document, { childList: true, subtree: true });
25000
- }
25001
- if (document.readyState === "complete" || // @ts-ignore: IE specific
25002
- document.readyState !== "loading" && !document.documentElement.doScroll) {
25003
- window.setTimeout(this.initDOMLoadedElements);
25004
- } else {
25005
- document.addEventListener("DOMContentLoaded", this.initDOMLoadedElements);
25006
- window.addEventListener("load", this.initDOMLoadedElements);
25007
- }
25008
- };
25009
- SimpleBar2.handleMutations = function(mutations) {
25010
- mutations.forEach(function(mutation) {
25011
- mutation.addedNodes.forEach(function(addedNode) {
25012
- if (addedNode.nodeType === 1) {
25013
- if (addedNode.hasAttribute("data-simplebar")) {
25014
- !SimpleBar2.instances.has(addedNode) && document.documentElement.contains(addedNode) && new SimpleBar2(addedNode, getOptions(addedNode.attributes));
25015
- } else {
25016
- addedNode.querySelectorAll("[data-simplebar]").forEach(function(el) {
25017
- if (el.getAttribute("data-simplebar") !== "init" && !SimpleBar2.instances.has(el) && document.documentElement.contains(el))
25018
- new SimpleBar2(el, getOptions(el.attributes));
25019
- });
25020
- }
25021
- }
25022
- });
25023
- mutation.removedNodes.forEach(function(removedNode) {
25024
- if (removedNode.nodeType === 1) {
25025
- if (removedNode.getAttribute("data-simplebar") === "init") {
25026
- SimpleBar2.instances.has(removedNode) && !document.documentElement.contains(removedNode) && SimpleBar2.instances.get(removedNode).unMount();
25027
- } else {
25028
- Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar="init"]'), function(el) {
25029
- SimpleBar2.instances.has(el) && !document.documentElement.contains(el) && SimpleBar2.instances.get(el).unMount();
25030
- });
25031
- }
25032
- }
25033
- });
25034
- });
25035
- };
25036
- SimpleBar2.instances = /* @__PURE__ */ new WeakMap();
25037
- return SimpleBar2;
25038
- }(SimpleBarCore)
25039
- );
25040
- if (canUseDOM$1) {
25041
- SimpleBar.initHtmlApi();
25042
- }
25043
23956
  function useValidator({ validations }) {
25044
23957
  const error = ref(null);
25045
23958
  function validate() {
@@ -25064,8 +23977,8 @@ function useTempValue({ valueRef, format = noFormatter }) {
25064
23977
  }
25065
23978
  function useElementRef(ref2) {
25066
23979
  return computed(() => {
25067
- var _a2;
25068
- return ((_a2 = ref2.value) == null ? void 0 : _a2.$el) || ref2.value;
23980
+ var _a;
23981
+ return ((_a = ref2.value) == null ? void 0 : _a.$el) || ref2.value;
25069
23982
  });
25070
23983
  }
25071
23984
  function useNumberValue({ valueRef, digits, min: min2, max: max2, onChange }) {
@@ -25132,8 +24045,8 @@ function useActivatedListener({ targetRef, isActiveRef, event, onEvent, options
25132
24045
  targetRef.value.addEventListener(event, onEvent, options);
25133
24046
  }
25134
24047
  function removeListener() {
25135
- var _a2;
25136
- (_a2 = targetRef.value) == null ? void 0 : _a2.removeEventListener(event, onEvent, options);
24048
+ var _a;
24049
+ (_a = targetRef.value) == null ? void 0 : _a.removeEventListener(event, onEvent, options);
25137
24050
  }
25138
24051
  function updateListener() {
25139
24052
  if (!targetRef.value)
@@ -27115,8 +26028,8 @@ function useActiveOptionManager({ optionsRef, inputRef, stateless, onChange }) {
27115
26028
  }
27116
26029
  function useDropdownEntityTitle(entityRef) {
27117
26030
  return computed(() => {
27118
- var _a2, _b;
27119
- return ((_a2 = entityRef.value) == null ? void 0 : _a2.title) || ((_b = entityRef.value) == null ? void 0 : _b.id) || "";
26031
+ var _a, _b;
26032
+ return ((_a = entityRef.value) == null ? void 0 : _a.title) || ((_b = entityRef.value) == null ? void 0 : _b.id) || "";
27120
26033
  });
27121
26034
  }
27122
26035
  const _hoisted_1$f = { class: "zw-dropdown__activator-title zw-text--truncate" };
@@ -27201,8 +26114,8 @@ const _sfc_main$w = {
27201
26114
  const scrollView = useScrollView();
27202
26115
  const optionTitle = useDropdownEntityTitle(toRef(props, "option"));
27203
26116
  const isActive2 = computed(() => {
27204
- var _a2;
27205
- return props.option.id === ((_a2 = activeOptionManager.activeOption.value) == null ? void 0 : _a2.id);
26117
+ var _a;
26118
+ return props.option.id === ((_a = activeOptionManager.activeOption.value) == null ? void 0 : _a.id);
27206
26119
  });
27207
26120
  const classes = computed(() => ({ "zw-dropdown__option--active": isActive2.value }));
27208
26121
  function activate() {
@@ -27396,8 +26309,8 @@ const _sfc_main$s = {
27396
26309
  const Dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-0d65726d"]]);
27397
26310
  function usePickerApi({ pickerRef, colorRef, onChange, onClosed, onBeforeOpened }) {
27398
26311
  const isOpened = computed(() => {
27399
- var _a2;
27400
- return ((_a2 = pickerRef.value) == null ? void 0 : _a2.isVisible) ?? false;
26312
+ var _a;
26313
+ return ((_a = pickerRef.value) == null ? void 0 : _a.isVisible) ?? false;
27401
26314
  });
27402
26315
  let initialColor;
27403
26316
  function open() {
@@ -27406,8 +26319,8 @@ function usePickerApi({ pickerRef, colorRef, onChange, onClosed, onBeforeOpened
27406
26319
  pickerRef.value.open(pickerRef.value.$el);
27407
26320
  }
27408
26321
  function close2() {
27409
- var _a2;
27410
- (_a2 = pickerRef.value) == null ? void 0 : _a2.close(colorRef.value);
26322
+ var _a;
26323
+ (_a = pickerRef.value) == null ? void 0 : _a.close(colorRef.value);
27411
26324
  onClosed();
27412
26325
  }
27413
26326
  function toggle() {
@@ -27418,10 +26331,10 @@ function usePickerApi({ pickerRef, colorRef, onChange, onClosed, onBeforeOpened
27418
26331
  onChange(color);
27419
26332
  }
27420
26333
  function cancel() {
27421
- var _a2;
26334
+ var _a;
27422
26335
  const color = initialColor ?? colorRef.value;
27423
26336
  triggerChange(color);
27424
- (_a2 = pickerRef.value) == null ? void 0 : _a2.close(color);
26337
+ (_a = pickerRef.value) == null ? void 0 : _a.close(color);
27425
26338
  }
27426
26339
  const editingColor = computed({
27427
26340
  get: () => colorRef.value,
@@ -27551,10 +26464,10 @@ const _sfc_main$q = {
27551
26464
  }))
27552
26465
  }));
27553
26466
  const options = computed(() => {
27554
- var _a2;
26467
+ var _a;
27555
26468
  const list = {};
27556
26469
  for (const font of fonts) {
27557
- list[_a2 = font.category] ?? (list[_a2] = { id: font.category, options: [] });
26470
+ list[_a = font.category] ?? (list[_a] = { id: font.category, options: [] });
27558
26471
  list[font.category].options.push({
27559
26472
  id: font.name,
27560
26473
  isDefault: defaultFontFamily.value === font.name