{"version":3,"file":"rich_text_editor-FduHYl-G.cjs","names":["computePosition","arrow","autoPlacement","flip","hide","inline","offset","shift","size","getComputedStyle","NodeSelection","CellSelection","Plugin","PluginKey","flip2","shift2","offset2","arrow2","size2","autoPlacement2","hide2","inline2","Plugin2","PluginKey2","Table","TableRow","TableCell","TableHeader","TextStyle","VueRenderer","SuggestionList","getEmojiData","EmojiSuggestion","emojiPattern","codeToEmojiData","emojiShortCodeRegex","Node","VueNodeViewRenderer","EmojiComponent","stringToUnicode","InputRule","emojiRegex","PluginKey","suggestionOptions","getPhoneNumberRegex","linkRegex","Plugin","PluginKey","Mark","Image","Paragraph","Mention","VueNodeViewRenderer","MentionComponent","PluginKey","Mention","VueNodeViewRenderer","ChannelComponent","PluginKey","Mention","VueNodeViewRenderer","SlashCommandComponent","PluginKey","Node","VueNodeViewRenderer","VariableComponent","MentionSuggestion","ChannelSuggestion","SlashCommandSuggestion"],"sources":["../../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_patch_hash=hlk524tqy4svh2bbayevihx324_@floating-ui+dom@1.7.6_@tiptap+cor_kpexihlfm3sl2tcft5dydpfypm/node_modules/@tiptap/vue-3/dist/menus/index.js","../components/rich_text_editor/extensions/table/table.js","../components/rich_text_editor/extensions/text_style/text_style.js","../components/rich_text_editor/extensions/emoji/EmojiComponent.vue","../components/rich_text_editor/extensions/suggestion/SuggestionList.vue","../components/rich_text_editor/extensions/utils/suggestion_utils.js","../components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue","../components/rich_text_editor/extensions/emoji/suggestion.js","../components/rich_text_editor/extensions/emoji/emoji.js","../components/rich_text_editor/extensions/emoji/index.js","../components/rich_text_editor/extensions/custom_link/utils.js","../components/rich_text_editor/extensions/custom_link/autolink.js","../components/rich_text_editor/extensions/custom_link/custom_link.js","../components/rich_text_editor/extensions/custom_link/index.js","../components/rich_text_editor/extensions/image/image.js","../components/rich_text_editor/extensions/image/index.js","../components/rich_text_editor/extensions/div/div.js","../components/rich_text_editor/extensions/div/index.js","../components/rich_text_editor/extensions/mentions/MentionComponent.vue","../components/rich_text_editor/extensions/mentions/mention.js","../components/rich_text_editor/extensions/channels/ChannelComponent.vue","../components/rich_text_editor/extensions/channels/channel.js","../components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue","../components/rich_text_editor/extensions/slash_command/slash_command.js","../components/rich_text_editor/extensions/variable/VariableComponent.vue","../components/rich_text_editor/extensions/variable/variable.js","../components/rich_text_editor/extensions/variable/index.js","../components/rich_text_editor/extensions/mentions/MentionSuggestion.vue","../components/rich_text_editor/extensions/mentions/suggestion.js","../components/rich_text_editor/extensions/channels/ChannelSuggestion.vue","../components/rich_text_editor/extensions/channels/suggestion.js","../components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue","../components/rich_text_editor/extensions/slash_command/suggestion.js","../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n  x: v,\n  y: v\n});\nconst oppositeSideMap = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nfunction clamp(start, value, end) {\n  return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n  return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n  return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n  return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n  return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n  const firstChar = placement[0];\n  return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n  return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n  if (rtl === void 0) {\n    rtl = false;\n  }\n  const alignment = getAlignment(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const length = getAxisLength(alignmentAxis);\n  let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n  if (rects.reference[length] > rects.floating[length]) {\n    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n  }\n  return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n  const oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n  return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n  switch (side) {\n    case 'top':\n    case 'bottom':\n      if (rtl) return isStart ? rlPlacement : lrPlacement;\n      return isStart ? lrPlacement : rlPlacement;\n    case 'left':\n    case 'right':\n      return isStart ? tbPlacement : btPlacement;\n    default:\n      return [];\n  }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n  const alignment = getAlignment(placement);\n  let list = getSideList(getSide(placement), direction === 'start', rtl);\n  if (alignment) {\n    list = list.map(side => side + \"-\" + alignment);\n    if (flipAlignment) {\n      list = list.concat(list.map(getOppositeAlignmentPlacement));\n    }\n  }\n  return list;\n}\nfunction getOppositePlacement(placement) {\n  const side = getSide(placement);\n  return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0,\n    ...padding\n  };\n}\nfunction getPaddingObject(padding) {\n  return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n    top: padding,\n    right: padding,\n    bottom: padding,\n    left: padding\n  };\n}\nfunction rectToClientRect(rect) {\n  const {\n    x,\n    y,\n    width,\n    height\n  } = rect;\n  return {\n    width,\n    height,\n    top: y,\n    left: x,\n    right: x + width,\n    bottom: y + height,\n    x,\n    y\n  };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n  let {\n    reference,\n    floating\n  } = _ref;\n  const sideAxis = getSideAxis(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const alignLength = getAxisLength(alignmentAxis);\n  const side = getSide(placement);\n  const isVertical = sideAxis === 'y';\n  const commonX = reference.x + reference.width / 2 - floating.width / 2;\n  const commonY = reference.y + reference.height / 2 - floating.height / 2;\n  const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n  let coords;\n  switch (side) {\n    case 'top':\n      coords = {\n        x: commonX,\n        y: reference.y - floating.height\n      };\n      break;\n    case 'bottom':\n      coords = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n    case 'right':\n      coords = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n    case 'left':\n      coords = {\n        x: reference.x - floating.width,\n        y: commonY\n      };\n      break;\n    default:\n      coords = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n  switch (getAlignment(placement)) {\n    case 'start':\n      coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n    case 'end':\n      coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n  }\n  return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n  var _await$platform$isEle;\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    x,\n    y,\n    platform,\n    rects,\n    elements,\n    strategy\n  } = state;\n  const {\n    boundary = 'clippingAncestors',\n    rootBoundary = 'viewport',\n    elementContext = 'floating',\n    altBoundary = false,\n    padding = 0\n  } = evaluate(options, state);\n  const paddingObject = getPaddingObject(padding);\n  const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n  const element = elements[altBoundary ? altContext : elementContext];\n  const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n    boundary,\n    rootBoundary,\n    strategy\n  }));\n  const rect = elementContext === 'floating' ? {\n    x,\n    y,\n    width: rects.floating.width,\n    height: rects.floating.height\n  } : rects.reference;\n  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n    x: 1,\n    y: 1\n  } : {\n    x: 1,\n    y: 1\n  };\n  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  }) : rect);\n  return {\n    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n  };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n  const {\n    placement = 'bottom',\n    strategy = 'absolute',\n    middleware = [],\n    platform\n  } = config;\n  const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n    ...platform,\n    detectOverflow\n  };\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n  let rects = await platform.getElementRects({\n    reference,\n    floating,\n    strategy\n  });\n  let {\n    x,\n    y\n  } = computeCoordsFromPlacement(rects, placement, rtl);\n  let statefulPlacement = placement;\n  let resetCount = 0;\n  const middlewareData = {};\n  for (let i = 0; i < middleware.length; i++) {\n    const currentMiddleware = middleware[i];\n    if (!currentMiddleware) {\n      continue;\n    }\n    const {\n      name,\n      fn\n    } = currentMiddleware;\n    const {\n      x: nextX,\n      y: nextY,\n      data,\n      reset\n    } = await fn({\n      x,\n      y,\n      initialPlacement: placement,\n      placement: statefulPlacement,\n      strategy,\n      middlewareData,\n      rects,\n      platform: platformWithDetectOverflow,\n      elements: {\n        reference,\n        floating\n      }\n    });\n    x = nextX != null ? nextX : x;\n    y = nextY != null ? nextY : y;\n    middlewareData[name] = {\n      ...middlewareData[name],\n      ...data\n    };\n    if (reset && resetCount < MAX_RESET_COUNT) {\n      resetCount++;\n      if (typeof reset === 'object') {\n        if (reset.placement) {\n          statefulPlacement = reset.placement;\n        }\n        if (reset.rects) {\n          rects = reset.rects === true ? await platform.getElementRects({\n            reference,\n            floating,\n            strategy\n          }) : reset.rects;\n        }\n        ({\n          x,\n          y\n        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n      }\n      i = -1;\n    }\n  }\n  return {\n    x,\n    y,\n    placement: statefulPlacement,\n    strategy,\n    middlewareData\n  };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n  name: 'arrow',\n  options,\n  async fn(state) {\n    const {\n      x,\n      y,\n      placement,\n      rects,\n      platform,\n      elements,\n      middlewareData\n    } = state;\n    // Since `element` is required, we don't Partial<> the type.\n    const {\n      element,\n      padding = 0\n    } = evaluate(options, state) || {};\n    if (element == null) {\n      return {};\n    }\n    const paddingObject = getPaddingObject(padding);\n    const coords = {\n      x,\n      y\n    };\n    const axis = getAlignmentAxis(placement);\n    const length = getAxisLength(axis);\n    const arrowDimensions = await platform.getDimensions(element);\n    const isYAxis = axis === 'y';\n    const minProp = isYAxis ? 'top' : 'left';\n    const maxProp = isYAxis ? 'bottom' : 'right';\n    const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n    const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n    const startDiff = coords[axis] - rects.reference[axis];\n    const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n    let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n    // DOM platform can return `window` as the `offsetParent`.\n    if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n      clientSize = elements.floating[clientProp] || rects.floating[length];\n    }\n    const centerToReference = endDiff / 2 - startDiff / 2;\n\n    // If the padding is large enough that it causes the arrow to no longer be\n    // centered, modify the padding so that it is centered.\n    const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n    const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n    const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n    // Make sure the arrow doesn't overflow the floating element if the center\n    // point is outside the floating element's bounds.\n    const min$1 = minPadding;\n    const max = clientSize - arrowDimensions[length] - maxPadding;\n    const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n    const offset = clamp(min$1, center, max);\n\n    // If the reference is small enough that the arrow's padding causes it to\n    // to point to nothing for an aligned placement, adjust the offset of the\n    // floating element itself. To ensure `shift()` continues to take action,\n    // a single reset is performed when this is true.\n    const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n    const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n    return {\n      [axis]: coords[axis] + alignmentOffset,\n      data: {\n        [axis]: offset,\n        centerOffset: center - offset - alignmentOffset,\n        ...(shouldAddOffset && {\n          alignmentOffset\n        })\n      },\n      reset: shouldAddOffset\n    };\n  }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n  return allowedPlacementsSortedByAlignment.filter(placement => {\n    if (alignment) {\n      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n    }\n    return true;\n  });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'autoPlacement',\n    options,\n    async fn(state) {\n      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n      const {\n        rects,\n        middlewareData,\n        placement,\n        platform,\n        elements\n      } = state;\n      const {\n        crossAxis = false,\n        alignment,\n        allowedPlacements = placements,\n        autoAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n      const currentPlacement = placements$1[currentIndex];\n      if (currentPlacement == null) {\n        return {};\n      }\n      const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n      // Make `computeCoords` start from the right place.\n      if (placement !== currentPlacement) {\n        return {\n          reset: {\n            placement: placements$1[0]\n          }\n        };\n      }\n      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n      const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n        placement: currentPlacement,\n        overflows: currentOverflows\n      }];\n      const nextPlacement = placements$1[currentIndex + 1];\n\n      // There are more placements to check.\n      if (nextPlacement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: nextPlacement\n          }\n        };\n      }\n      const placementsSortedByMostSpace = allOverflows.map(d => {\n        const alignment = getAlignment(d.placement);\n        return [d.placement, alignment && crossAxis ?\n        // Check along the mainAxis and main crossAxis side.\n        d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n        // Check only the mainAxis.\n        d.overflows[0], d.overflows];\n      }).sort((a, b) => a[1] - b[1]);\n      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n      // Aligned placements should not check their opposite crossAxis\n      // side.\n      getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n      if (resetPlacement !== placement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: resetPlacement\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'flip',\n    options,\n    async fn(state) {\n      var _middlewareData$arrow, _middlewareData$flip;\n      const {\n        placement,\n        middlewareData,\n        rects,\n        initialPlacement,\n        platform,\n        elements\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true,\n        fallbackPlacements: specifiedFallbackPlacements,\n        fallbackStrategy = 'bestFit',\n        fallbackAxisSideDirection = 'none',\n        flipAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n\n      // If a reset by the arrow was caused due to an alignment offset being\n      // added, we should skip any logic now since `flip()` has already done its\n      // work.\n      // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n      if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      const side = getSide(placement);\n      const initialSideAxis = getSideAxis(initialPlacement);\n      const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n      const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n      const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n      const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n      if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n        fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n      }\n      const placements = [initialPlacement, ...fallbackPlacements];\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const overflows = [];\n      let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n      if (checkMainAxis) {\n        overflows.push(overflow[side]);\n      }\n      if (checkCrossAxis) {\n        const sides = getAlignmentSides(placement, rects, rtl);\n        overflows.push(overflow[sides[0]], overflow[sides[1]]);\n      }\n      overflowsData = [...overflowsData, {\n        placement,\n        overflows\n      }];\n\n      // One or more sides is overflowing.\n      if (!overflows.every(side => side <= 0)) {\n        var _middlewareData$flip2, _overflowsData$filter;\n        const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n        const nextPlacement = placements[nextIndex];\n        if (nextPlacement) {\n          const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n          if (!ignoreCrossAxisOverflow ||\n          // We leave the current main axis only if every placement on that axis\n          // overflows the main axis.\n          overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n            // Try next placement and re-run the lifecycle.\n            return {\n              data: {\n                index: nextIndex,\n                overflows: overflowsData\n              },\n              reset: {\n                placement: nextPlacement\n              }\n            };\n          }\n        }\n\n        // First, find the candidates that fit on the mainAxis side of overflow,\n        // then find the placement that fits the best on the main crossAxis side.\n        let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n        // Otherwise fallback.\n        if (!resetPlacement) {\n          switch (fallbackStrategy) {\n            case 'bestFit':\n              {\n                var _overflowsData$filter2;\n                const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n                  if (hasFallbackAxisSideDirection) {\n                    const currentSideAxis = getSideAxis(d.placement);\n                    return currentSideAxis === initialSideAxis ||\n                    // Create a bias to the `y` side axis due to horizontal\n                    // reading directions favoring greater width.\n                    currentSideAxis === 'y';\n                  }\n                  return true;\n                }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n                if (placement) {\n                  resetPlacement = placement;\n                }\n                break;\n              }\n            case 'initialPlacement':\n              resetPlacement = initialPlacement;\n              break;\n          }\n        }\n        if (placement !== resetPlacement) {\n          return {\n            reset: {\n              placement: resetPlacement\n            }\n          };\n        }\n      }\n      return {};\n    }\n  };\n};\n\nfunction getSideOffsets(overflow, rect) {\n  return {\n    top: overflow.top - rect.height,\n    right: overflow.right - rect.width,\n    bottom: overflow.bottom - rect.height,\n    left: overflow.left - rect.width\n  };\n}\nfunction isAnySideFullyClipped(overflow) {\n  return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'hide',\n    options,\n    async fn(state) {\n      const {\n        rects,\n        platform\n      } = state;\n      const {\n        strategy = 'referenceHidden',\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      switch (strategy) {\n        case 'referenceHidden':\n          {\n            const overflow = await platform.detectOverflow(state, {\n              ...detectOverflowOptions,\n              elementContext: 'reference'\n            });\n            const offsets = getSideOffsets(overflow, rects.reference);\n            return {\n              data: {\n                referenceHiddenOffsets: offsets,\n                referenceHidden: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        case 'escaped':\n          {\n            const overflow = await platform.detectOverflow(state, {\n              ...detectOverflowOptions,\n              altBoundary: true\n            });\n            const offsets = getSideOffsets(overflow, rects.floating);\n            return {\n              data: {\n                escapedOffsets: offsets,\n                escaped: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        default:\n          {\n            return {};\n          }\n      }\n    }\n  };\n};\n\nfunction getBoundingRect(rects) {\n  const minX = min(...rects.map(rect => rect.left));\n  const minY = min(...rects.map(rect => rect.top));\n  const maxX = max(...rects.map(rect => rect.right));\n  const maxY = max(...rects.map(rect => rect.bottom));\n  return {\n    x: minX,\n    y: minY,\n    width: maxX - minX,\n    height: maxY - minY\n  };\n}\nfunction getRectsByLine(rects) {\n  const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n  const groups = [];\n  let prevRect = null;\n  for (let i = 0; i < sortedRects.length; i++) {\n    const rect = sortedRects[i];\n    if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n      groups.push([rect]);\n    } else {\n      groups[groups.length - 1].push(rect);\n    }\n    prevRect = rect;\n  }\n  return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'inline',\n    options,\n    async fn(state) {\n      const {\n        placement,\n        elements,\n        rects,\n        platform,\n        strategy\n      } = state;\n      // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n      // ClientRect's bounds, despite the event listener being triggered. A\n      // padding of 2 seems to handle this issue.\n      const {\n        padding = 2,\n        x,\n        y\n      } = evaluate(options, state);\n      const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n      const clientRects = getRectsByLine(nativeClientRects);\n      const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n      const paddingObject = getPaddingObject(padding);\n      function getBoundingClientRect() {\n        // There are two rects and they are disjoined.\n        if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n          // Find the first rect in which the point is fully inside.\n          return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n        }\n\n        // There are 2 or more connected rects.\n        if (clientRects.length >= 2) {\n          if (getSideAxis(placement) === 'y') {\n            const firstRect = clientRects[0];\n            const lastRect = clientRects[clientRects.length - 1];\n            const isTop = getSide(placement) === 'top';\n            const top = firstRect.top;\n            const bottom = lastRect.bottom;\n            const left = isTop ? firstRect.left : lastRect.left;\n            const right = isTop ? firstRect.right : lastRect.right;\n            const width = right - left;\n            const height = bottom - top;\n            return {\n              top,\n              bottom,\n              left,\n              right,\n              width,\n              height,\n              x: left,\n              y: top\n            };\n          }\n          const isLeftSide = getSide(placement) === 'left';\n          const maxRight = max(...clientRects.map(rect => rect.right));\n          const minLeft = min(...clientRects.map(rect => rect.left));\n          const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n          const top = measureRects[0].top;\n          const bottom = measureRects[measureRects.length - 1].bottom;\n          const left = minLeft;\n          const right = maxRight;\n          const width = right - left;\n          const height = bottom - top;\n          return {\n            top,\n            bottom,\n            left,\n            right,\n            width,\n            height,\n            x: left,\n            y: top\n          };\n        }\n        return fallback;\n      }\n      const resetRects = await platform.getElementRects({\n        reference: {\n          getBoundingClientRect\n        },\n        floating: elements.floating,\n        strategy\n      });\n      if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n        return {\n          reset: {\n            rects: resetRects\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n  const {\n    placement,\n    platform,\n    elements\n  } = state;\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n  const side = getSide(placement);\n  const alignment = getAlignment(placement);\n  const isVertical = getSideAxis(placement) === 'y';\n  const mainAxisMulti = originSides.has(side) ? -1 : 1;\n  const crossAxisMulti = rtl && isVertical ? -1 : 1;\n  const rawValue = evaluate(options, state);\n\n  // eslint-disable-next-line prefer-const\n  let {\n    mainAxis,\n    crossAxis,\n    alignmentAxis\n  } = typeof rawValue === 'number' ? {\n    mainAxis: rawValue,\n    crossAxis: 0,\n    alignmentAxis: null\n  } : {\n    mainAxis: rawValue.mainAxis || 0,\n    crossAxis: rawValue.crossAxis || 0,\n    alignmentAxis: rawValue.alignmentAxis\n  };\n  if (alignment && typeof alignmentAxis === 'number') {\n    crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n  }\n  return isVertical ? {\n    x: crossAxis * crossAxisMulti,\n    y: mainAxis * mainAxisMulti\n  } : {\n    x: mainAxis * mainAxisMulti,\n    y: crossAxis * crossAxisMulti\n  };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n  if (options === void 0) {\n    options = 0;\n  }\n  return {\n    name: 'offset',\n    options,\n    async fn(state) {\n      var _middlewareData$offse, _middlewareData$arrow;\n      const {\n        x,\n        y,\n        placement,\n        middlewareData\n      } = state;\n      const diffCoords = await convertValueToCoords(state, options);\n\n      // If the placement is the same and the arrow caused an alignment offset\n      // then we don't need to change the positioning coordinates.\n      if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      return {\n        x: x + diffCoords.x,\n        y: y + diffCoords.y,\n        data: {\n          ...diffCoords,\n          placement\n        }\n      };\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'shift',\n    options,\n    async fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        platform\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = false,\n        limiter = {\n          fn: _ref => {\n            let {\n              x,\n              y\n            } = _ref;\n            return {\n              x,\n              y\n            };\n          }\n        },\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const crossAxis = getSideAxis(getSide(placement));\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      if (checkMainAxis) {\n        const minSide = mainAxis === 'y' ? 'top' : 'left';\n        const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n        const min = mainAxisCoord + overflow[minSide];\n        const max = mainAxisCoord - overflow[maxSide];\n        mainAxisCoord = clamp(min, mainAxisCoord, max);\n      }\n      if (checkCrossAxis) {\n        const minSide = crossAxis === 'y' ? 'top' : 'left';\n        const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n        const min = crossAxisCoord + overflow[minSide];\n        const max = crossAxisCoord - overflow[maxSide];\n        crossAxisCoord = clamp(min, crossAxisCoord, max);\n      }\n      const limitedCoords = limiter.fn({\n        ...state,\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      });\n      return {\n        ...limitedCoords,\n        data: {\n          x: limitedCoords.x - x,\n          y: limitedCoords.y - y,\n          enabled: {\n            [mainAxis]: checkMainAxis,\n            [crossAxis]: checkCrossAxis\n          }\n        }\n      };\n    }\n  };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    options,\n    fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        rects,\n        middlewareData\n      } = state;\n      const {\n        offset = 0,\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const crossAxis = getSideAxis(placement);\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      const rawOffset = evaluate(offset, state);\n      const computedOffset = typeof rawOffset === 'number' ? {\n        mainAxis: rawOffset,\n        crossAxis: 0\n      } : {\n        mainAxis: 0,\n        crossAxis: 0,\n        ...rawOffset\n      };\n      if (checkMainAxis) {\n        const len = mainAxis === 'y' ? 'height' : 'width';\n        const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n        const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n        if (mainAxisCoord < limitMin) {\n          mainAxisCoord = limitMin;\n        } else if (mainAxisCoord > limitMax) {\n          mainAxisCoord = limitMax;\n        }\n      }\n      if (checkCrossAxis) {\n        var _middlewareData$offse, _middlewareData$offse2;\n        const len = mainAxis === 'y' ? 'width' : 'height';\n        const isOriginSide = originSides.has(getSide(placement));\n        const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n        const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n        if (crossAxisCoord < limitMin) {\n          crossAxisCoord = limitMin;\n        } else if (crossAxisCoord > limitMax) {\n          crossAxisCoord = limitMax;\n        }\n      }\n      return {\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      };\n    }\n  };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'size',\n    options,\n    async fn(state) {\n      var _state$middlewareData, _state$middlewareData2;\n      const {\n        placement,\n        rects,\n        platform,\n        elements\n      } = state;\n      const {\n        apply = () => {},\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const side = getSide(placement);\n      const alignment = getAlignment(placement);\n      const isYAxis = getSideAxis(placement) === 'y';\n      const {\n        width,\n        height\n      } = rects.floating;\n      let heightSide;\n      let widthSide;\n      if (side === 'top' || side === 'bottom') {\n        heightSide = side;\n        widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n      } else {\n        widthSide = side;\n        heightSide = alignment === 'end' ? 'top' : 'bottom';\n      }\n      const maximumClippingHeight = height - overflow.top - overflow.bottom;\n      const maximumClippingWidth = width - overflow.left - overflow.right;\n      const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n      const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n      const noShift = !state.middlewareData.shift;\n      let availableHeight = overflowAvailableHeight;\n      let availableWidth = overflowAvailableWidth;\n      if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n        availableWidth = maximumClippingWidth;\n      }\n      if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n        availableHeight = maximumClippingHeight;\n      }\n      if (noShift && !alignment) {\n        const xMin = max(overflow.left, 0);\n        const xMax = max(overflow.right, 0);\n        const yMin = max(overflow.top, 0);\n        const yMax = max(overflow.bottom, 0);\n        if (isYAxis) {\n          availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n        } else {\n          availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n        }\n      }\n      await apply({\n        ...state,\n        availableWidth,\n        availableHeight\n      });\n      const nextDimensions = await platform.getDimensions(elements.floating);\n      if (width !== nextDimensions.width || height !== nextDimensions.height) {\n        return {\n          reset: {\n            rects: true\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n  return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || '').toLowerCase();\n  }\n  // Mocked nodes in testing environments may not be instances of Node. By\n  // returning `#document` an infinite loop won't occur.\n  // https://github.com/floating-ui/floating-ui/issues/2317\n  return '#document';\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n  return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n  try {\n    if (element.matches(':popover-open')) {\n      return true;\n    }\n  } catch (_e) {\n    // no-op\n  }\n  try {\n    return element.matches(':modal');\n  } catch (_e) {\n    return false;\n  }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n  return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else if (isTopLayer(currentNode)) {\n      return null;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (isWebKitValue == null) {\n    isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n  }\n  return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n  return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.scrollX,\n    scrollTop: element.scrollY\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === 'html') {\n    return node;\n  }\n  const result =\n  // Step into the shadow DOM of the parent of a slotted node.\n  node.assignedSlot ||\n  // DOM Element detected.\n  node.parentNode ||\n  // ShadowRoot detected.\n  isShadowRoot(node) && node.host ||\n  // Fallback.\n  getDocumentElement(node);\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    const frameElement = getFrameElement(win);\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n  } else {\n    return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n  }\n}\nfunction getFrameElement(win) {\n  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n  const css = getComputedStyle$1(element);\n  // In testing environments, the `width` and `height` properties are empty\n  // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n  let width = parseFloat(css.width) || 0;\n  let height = parseFloat(css.height) || 0;\n  const hasOffset = isHTMLElement(element);\n  const offsetWidth = hasOffset ? element.offsetWidth : width;\n  const offsetHeight = hasOffset ? element.offsetHeight : height;\n  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n  if (shouldFallback) {\n    width = offsetWidth;\n    height = offsetHeight;\n  }\n  return {\n    width,\n    height,\n    $: shouldFallback\n  };\n}\n\nfunction unwrapElement(element) {\n  return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n  const domElement = unwrapElement(element);\n  if (!isHTMLElement(domElement)) {\n    return createCoords(1);\n  }\n  const rect = domElement.getBoundingClientRect();\n  const {\n    width,\n    height,\n    $\n  } = getCssDimensions(domElement);\n  let x = ($ ? round(rect.width) : rect.width) / width;\n  let y = ($ ? round(rect.height) : rect.height) / height;\n\n  // 0, NaN, or Infinity should always fallback to 1.\n\n  if (!x || !Number.isFinite(x)) {\n    x = 1;\n  }\n  if (!y || !Number.isFinite(y)) {\n    y = 1;\n  }\n  return {\n    x,\n    y\n  };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n  const win = getWindow(element);\n  if (!isWebKit() || !win.visualViewport) {\n    return noOffsets;\n  }\n  return {\n    x: win.visualViewport.offsetLeft,\n    y: win.visualViewport.offsetTop\n  };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n    return false;\n  }\n  return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n  const clientRect = element.getBoundingClientRect();\n  const domElement = unwrapElement(element);\n  let scale = createCoords(1);\n  if (includeScale) {\n    if (offsetParent) {\n      if (isElement(offsetParent)) {\n        scale = getScale(offsetParent);\n      }\n    } else {\n      scale = getScale(element);\n    }\n  }\n  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n  let x = (clientRect.left + visualOffsets.x) / scale.x;\n  let y = (clientRect.top + visualOffsets.y) / scale.y;\n  let width = clientRect.width / scale.x;\n  let height = clientRect.height / scale.y;\n  if (domElement) {\n    const win = getWindow(domElement);\n    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n    let currentWin = win;\n    let currentIFrame = getFrameElement(currentWin);\n    while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n      const iframeScale = getScale(currentIFrame);\n      const iframeRect = currentIFrame.getBoundingClientRect();\n      const css = getComputedStyle$1(currentIFrame);\n      const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n      const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n      x *= iframeScale.x;\n      y *= iframeScale.y;\n      width *= iframeScale.x;\n      height *= iframeScale.y;\n      x += left;\n      y += top;\n      currentWin = getWindow(currentIFrame);\n      currentIFrame = getFrameElement(currentWin);\n    }\n  }\n  return rectToClientRect({\n    width,\n    height,\n    x,\n    y\n  });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n  const leftScroll = getNodeScroll(element).scrollLeft;\n  if (!rect) {\n    return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n  }\n  return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n  const htmlRect = documentElement.getBoundingClientRect();\n  const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n  const y = htmlRect.top + scroll.scrollTop;\n  return {\n    x,\n    y\n  };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n  let {\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  } = _ref;\n  const isFixed = strategy === 'fixed';\n  const documentElement = getDocumentElement(offsetParent);\n  const topLayer = elements ? isTopLayer(elements.floating) : false;\n  if (offsetParent === documentElement || topLayer && isFixed) {\n    return rect;\n  }\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  let scale = createCoords(1);\n  const offsets = createCoords(0);\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent);\n      scale = getScale(offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    }\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n  return {\n    width: rect.width * scale.x,\n    height: rect.height * scale.y,\n    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n  };\n}\n\nfunction getClientRects(element) {\n  return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n  const html = getDocumentElement(element);\n  const scroll = getNodeScroll(element);\n  const body = element.ownerDocument.body;\n  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n  let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n  const y = -scroll.scrollTop;\n  if (getComputedStyle$1(body).direction === 'rtl') {\n    x += max(html.clientWidth, body.clientWidth) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n  const win = getWindow(element);\n  const html = getDocumentElement(element);\n  const visualViewport = win.visualViewport;\n  let width = html.clientWidth;\n  let height = html.clientHeight;\n  let x = 0;\n  let y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    const visualViewportBased = isWebKit();\n    if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  const windowScrollbarX = getWindowScrollBarX(html);\n  // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n  // visual width of the <html> but this is not considered in the size\n  // of `html.clientWidth`.\n  if (windowScrollbarX <= 0) {\n    const doc = html.ownerDocument;\n    const body = doc.body;\n    const bodyStyles = getComputedStyle(body);\n    const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n    const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n    if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n      width -= clippingStableScrollbarWidth;\n    }\n  } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n    // If the <body> scrollbar is on the left, the width needs to be extended\n    // by the scrollbar amount so there isn't extra space on the right.\n    width += windowScrollbarX;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n  const top = clientRect.top + element.clientTop;\n  const left = clientRect.left + element.clientLeft;\n  const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n  const width = element.clientWidth * scale.x;\n  const height = element.clientHeight * scale.y;\n  const x = left * scale.x;\n  const y = top * scale.y;\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n  let rect;\n  if (clippingAncestor === 'viewport') {\n    rect = getViewportRect(element, strategy);\n  } else if (clippingAncestor === 'document') {\n    rect = getDocumentRect(getDocumentElement(element));\n  } else if (isElement(clippingAncestor)) {\n    rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n  } else {\n    const visualOffsets = getVisualOffsets(element);\n    rect = {\n      x: clippingAncestor.x - visualOffsets.x,\n      y: clippingAncestor.y - visualOffsets.y,\n      width: clippingAncestor.width,\n      height: clippingAncestor.height\n    };\n  }\n  return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n  const parentNode = getParentNode(element);\n  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n    return false;\n  }\n  return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n  const cachedResult = cache.get(element);\n  if (cachedResult) {\n    return cachedResult;\n  }\n  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n  let currentContainingBlockComputedStyle = null;\n  const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n  let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    const computedStyle = getComputedStyle$1(currentNode);\n    const currentNodeIsContaining = isContainingBlock(currentNode);\n    if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n      currentContainingBlockComputedStyle = null;\n    }\n    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n    if (shouldDropCurrentNode) {\n      // Drop non-containing blocks.\n      result = result.filter(ancestor => ancestor !== currentNode);\n    } else {\n      // Record last containing block for next iteration.\n      currentContainingBlockComputedStyle = computedStyle;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  cache.set(element, result);\n  return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n  let {\n    element,\n    boundary,\n    rootBoundary,\n    strategy\n  } = _ref;\n  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n  const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n  const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n  let top = firstRect.top;\n  let right = firstRect.right;\n  let bottom = firstRect.bottom;\n  let left = firstRect.left;\n  for (let i = 1; i < clippingAncestors.length; i++) {\n    const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n    top = max(rect.top, top);\n    right = min(rect.right, right);\n    bottom = min(rect.bottom, bottom);\n    left = max(rect.left, left);\n  }\n  return {\n    width: right - left,\n    height: bottom - top,\n    x: left,\n    y: top\n  };\n}\n\nfunction getDimensions(element) {\n  const {\n    width,\n    height\n  } = getCssDimensions(element);\n  return {\n    width,\n    height\n  };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  const documentElement = getDocumentElement(offsetParent);\n  const isFixed = strategy === 'fixed';\n  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  const offsets = createCoords(0);\n\n  // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n  // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n  function setLeftRTLScrollbarOffset() {\n    offsets.x = getWindowScrollBarX(documentElement);\n  }\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    } else if (documentElement) {\n      setLeftRTLScrollbarOffset();\n    }\n  }\n  if (isFixed && !isOffsetParentAnElement && documentElement) {\n    setLeftRTLScrollbarOffset();\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n  return {\n    x,\n    y,\n    width: rect.width,\n    height: rect.height\n  };\n}\n\nfunction isStaticPositioned(element) {\n  return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n  if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n    return null;\n  }\n  if (polyfill) {\n    return polyfill(element);\n  }\n  let rawOffsetParent = element.offsetParent;\n\n  // Firefox returns the <html> element as the offsetParent if it's non-static,\n  // while Chrome and Safari return the <body> element. The <body> element must\n  // be used to perform the correct calculations even if the <html> element is\n  // non-static.\n  if (getDocumentElement(element) === rawOffsetParent) {\n    rawOffsetParent = rawOffsetParent.ownerDocument.body;\n  }\n  return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n  const win = getWindow(element);\n  if (isTopLayer(element)) {\n    return win;\n  }\n  if (!isHTMLElement(element)) {\n    let svgOffsetParent = getParentNode(element);\n    while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n      if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n        return svgOffsetParent;\n      }\n      svgOffsetParent = getParentNode(svgOffsetParent);\n    }\n    return win;\n  }\n  let offsetParent = getTrueOffsetParent(element, polyfill);\n  while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n    offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n  }\n  if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n    return win;\n  }\n  return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n  const getDimensionsFn = this.getDimensions;\n  const floatingDimensions = await getDimensionsFn(data.floating);\n  return {\n    reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n    floating: {\n      x: 0,\n      y: 0,\n      width: floatingDimensions.width,\n      height: floatingDimensions.height\n    }\n  };\n};\n\nfunction isRTL(element) {\n  return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n  convertOffsetParentRelativeRectToViewportRelativeRect,\n  getDocumentElement,\n  getClippingRect,\n  getOffsetParent,\n  getElementRects,\n  getClientRects,\n  getDimensions,\n  getScale,\n  isElement,\n  isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n  let io = null;\n  let timeoutId;\n  const root = getDocumentElement(element);\n  function cleanup() {\n    var _io;\n    clearTimeout(timeoutId);\n    (_io = io) == null || _io.disconnect();\n    io = null;\n  }\n  function refresh(skip, threshold) {\n    if (skip === void 0) {\n      skip = false;\n    }\n    if (threshold === void 0) {\n      threshold = 1;\n    }\n    cleanup();\n    const elementRectForRootMargin = element.getBoundingClientRect();\n    const {\n      left,\n      top,\n      width,\n      height\n    } = elementRectForRootMargin;\n    if (!skip) {\n      onMove();\n    }\n    if (!width || !height) {\n      return;\n    }\n    const insetTop = floor(top);\n    const insetRight = floor(root.clientWidth - (left + width));\n    const insetBottom = floor(root.clientHeight - (top + height));\n    const insetLeft = floor(left);\n    const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n    const options = {\n      rootMargin,\n      threshold: max(0, min(1, threshold)) || 1\n    };\n    let isFirstUpdate = true;\n    function handleObserve(entries) {\n      const ratio = entries[0].intersectionRatio;\n      if (ratio !== threshold) {\n        if (!isFirstUpdate) {\n          return refresh();\n        }\n        if (!ratio) {\n          // If the reference is clipped, the ratio is 0. Throttle the refresh\n          // to prevent an infinite loop of updates.\n          timeoutId = setTimeout(() => {\n            refresh(false, 1e-7);\n          }, 1000);\n        } else {\n          refresh(false, ratio);\n        }\n      }\n      if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n        // It's possible that even though the ratio is reported as 1, the\n        // element is not actually fully within the IntersectionObserver's root\n        // area anymore. This can happen under performance constraints. This may\n        // be a bug in the browser's IntersectionObserver implementation. To\n        // work around this, we compare the element's bounding rect now with\n        // what it was at the time we created the IntersectionObserver. If they\n        // are not equal then the element moved, so we refresh.\n        refresh();\n      }\n      isFirstUpdate = false;\n    }\n\n    // Older browsers don't support a `document` as the root and will throw an\n    // error.\n    try {\n      io = new IntersectionObserver(handleObserve, {\n        ...options,\n        // Handle <iframe>s\n        root: root.ownerDocument\n      });\n    } catch (_e) {\n      io = new IntersectionObserver(handleObserve, options);\n    }\n    io.observe(element);\n  }\n  refresh(true);\n  return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    ancestorScroll = true,\n    ancestorResize = true,\n    elementResize = typeof ResizeObserver === 'function',\n    layoutShift = typeof IntersectionObserver === 'function',\n    animationFrame = false\n  } = options;\n  const referenceEl = unwrapElement(reference);\n  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n  ancestors.forEach(ancestor => {\n    ancestorScroll && ancestor.addEventListener('scroll', update, {\n      passive: true\n    });\n    ancestorResize && ancestor.addEventListener('resize', update);\n  });\n  const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n  let reobserveFrame = -1;\n  let resizeObserver = null;\n  if (elementResize) {\n    resizeObserver = new ResizeObserver(_ref => {\n      let [firstEntry] = _ref;\n      if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n        // Prevent update loops when using the `size` middleware.\n        // https://github.com/floating-ui/floating-ui/issues/1740\n        resizeObserver.unobserve(floating);\n        cancelAnimationFrame(reobserveFrame);\n        reobserveFrame = requestAnimationFrame(() => {\n          var _resizeObserver;\n          (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n        });\n      }\n      update();\n    });\n    if (referenceEl && !animationFrame) {\n      resizeObserver.observe(referenceEl);\n    }\n    if (floating) {\n      resizeObserver.observe(floating);\n    }\n  }\n  let frameId;\n  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n  if (animationFrame) {\n    frameLoop();\n  }\n  function frameLoop() {\n    const nextRefRect = getBoundingClientRect(reference);\n    if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n      update();\n    }\n    prevRefRect = nextRefRect;\n    frameId = requestAnimationFrame(frameLoop);\n  }\n  update();\n  return () => {\n    var _resizeObserver2;\n    ancestors.forEach(ancestor => {\n      ancestorScroll && ancestor.removeEventListener('scroll', update);\n      ancestorResize && ancestor.removeEventListener('resize', update);\n    });\n    cleanupIo == null || cleanupIo();\n    (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n    resizeObserver = null;\n    if (animationFrame) {\n      cancelAnimationFrame(frameId);\n    }\n  };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n  // This caches the expensive `getClippingElementAncestors` function so that\n  // multiple lifecycle resets re-use the same result. It only lives for a\n  // single call. If other functions become expensive, we can add them as well.\n  const cache = new Map();\n  const mergedOptions = {\n    platform,\n    ...options\n  };\n  const platformWithCache = {\n    ...mergedOptions.platform,\n    _c: cache\n  };\n  return computePosition$1(reference, floating, {\n    ...mergedOptions,\n    platform: platformWithCache\n  });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","// ../extension-bubble-menu/src/bubble-menu-plugin.ts\nimport {\n  arrow,\n  autoPlacement,\n  computePosition,\n  flip,\n  hide,\n  inline,\n  offset,\n  shift,\n  size\n} from \"@floating-ui/dom\";\nimport { isTextSelection, posToDOMRect } from \"@tiptap/core\";\nimport { NodeSelection, Plugin, PluginKey } from \"@tiptap/pm/state\";\nimport { CellSelection } from \"@tiptap/pm/tables\";\nfunction combineDOMRects(rect1, rect2) {\n  const top = Math.min(rect1.top, rect2.top);\n  const bottom = Math.max(rect1.bottom, rect2.bottom);\n  const left = Math.min(rect1.left, rect2.left);\n  const right = Math.max(rect1.right, rect2.right);\n  const width = right - left;\n  const height = bottom - top;\n  const x = left;\n  const y = top;\n  return new DOMRect(x, y, width, height);\n}\nvar BubbleMenuView = class {\n  constructor({\n    editor,\n    element,\n    view,\n    updateDelay = 250,\n    resizeDelay = 60,\n    shouldShow,\n    appendTo,\n    getReferencedVirtualElement,\n    options\n  }) {\n    this.preventHide = false;\n    this.isVisible = false;\n    this.scrollTarget = window;\n    this.floatingUIOptions = {\n      strategy: \"absolute\",\n      placement: \"top\",\n      offset: 8,\n      flip: {},\n      shift: {},\n      arrow: false,\n      size: false,\n      autoPlacement: false,\n      hide: false,\n      inline: false,\n      onShow: void 0,\n      onHide: void 0,\n      onUpdate: void 0,\n      onDestroy: void 0\n    };\n    this.shouldShow = ({ view, state, from, to }) => {\n      const { doc, selection } = state;\n      const { empty } = selection;\n      const isEmptyTextBlock = !doc.textBetween(from, to).length && isTextSelection(state.selection);\n      const isChildOfMenu = this.element.contains(document.activeElement);\n      const hasEditorFocus = view.hasFocus() || isChildOfMenu;\n      if (!hasEditorFocus || empty || isEmptyTextBlock || !this.editor.isEditable) {\n        return false;\n      }\n      return true;\n    };\n    this.mousedownHandler = () => {\n      this.preventHide = true;\n    };\n    this.dragstartHandler = () => {\n      this.hide();\n    };\n    /**\n     * Handles the window resize event to update the position of the bubble menu.\n     * It uses a debounce mechanism to prevent excessive updates.\n     * The delay is defined by the `resizeDelay` property.\n     */\n    this.resizeHandler = () => {\n      if (this.resizeDebounceTimer) {\n        clearTimeout(this.resizeDebounceTimer);\n      }\n      this.resizeDebounceTimer = window.setTimeout(() => {\n        this.updatePosition();\n      }, this.resizeDelay);\n    };\n    this.focusHandler = () => {\n      setTimeout(() => this.update(this.editor.view));\n    };\n    this.blurHandler = ({ event }) => {\n      var _a;\n      if (this.editor.isDestroyed) {\n        this.destroy();\n        return;\n      }\n      if (this.preventHide) {\n        this.preventHide = false;\n        return;\n      }\n      if ((event == null ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) == null ? void 0 : _a.contains(event.relatedTarget))) {\n        return;\n      }\n      if ((event == null ? void 0 : event.relatedTarget) === this.editor.view.dom) {\n        return;\n      }\n      this.hide();\n    };\n    this.handleDebouncedUpdate = (view, oldState) => {\n      const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));\n      const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));\n      if (!selectionChanged && !docChanged) {\n        return;\n      }\n      if (this.updateDebounceTimer) {\n        clearTimeout(this.updateDebounceTimer);\n      }\n      this.updateDebounceTimer = window.setTimeout(() => {\n        this.updateHandler(view, selectionChanged, docChanged, oldState);\n      }, this.updateDelay);\n    };\n    this.updateHandler = (view, selectionChanged, docChanged, oldState) => {\n      const { composing } = view;\n      const isSame = !selectionChanged && !docChanged;\n      if (composing || isSame) {\n        return;\n      }\n      const shouldShow = this.getShouldShow(oldState);\n      if (!shouldShow) {\n        this.hide();\n        return;\n      }\n      this.updatePosition();\n      this.show();\n    };\n    this.transactionHandler = ({ transaction: tr }) => {\n      const meta = tr.getMeta(\"bubbleMenu\");\n      if (meta === \"updatePosition\") {\n        this.updatePosition();\n      } else if (meta && typeof meta === \"object\" && meta.type === \"updateOptions\") {\n        this.updateOptions(meta.options);\n      }\n    };\n    var _a;\n    this.editor = editor;\n    this.element = element;\n    this.view = view;\n    this.updateDelay = updateDelay;\n    this.resizeDelay = resizeDelay;\n    this.appendTo = appendTo;\n    this.scrollTarget = (_a = options == null ? void 0 : options.scrollTarget) != null ? _a : window;\n    this.getReferencedVirtualElement = getReferencedVirtualElement;\n    this.floatingUIOptions = {\n      ...this.floatingUIOptions,\n      ...options\n    };\n    this.element.tabIndex = 0;\n    if (shouldShow) {\n      this.shouldShow = shouldShow;\n    }\n    this.element.addEventListener(\"mousedown\", this.mousedownHandler, { capture: true });\n    this.view.dom.addEventListener(\"dragstart\", this.dragstartHandler);\n    this.editor.on(\"focus\", this.focusHandler);\n    this.editor.on(\"blur\", this.blurHandler);\n    this.editor.on(\"transaction\", this.transactionHandler);\n    window.addEventListener(\"resize\", this.resizeHandler);\n    this.scrollTarget.addEventListener(\"scroll\", this.resizeHandler);\n    this.update(view, view.state);\n    if (this.getShouldShow()) {\n      this.show();\n      this.updatePosition();\n    }\n  }\n  get middlewares() {\n    const middlewares = [];\n    if (this.floatingUIOptions.flip) {\n      middlewares.push(flip(typeof this.floatingUIOptions.flip !== \"boolean\" ? this.floatingUIOptions.flip : void 0));\n    }\n    if (this.floatingUIOptions.shift) {\n      middlewares.push(\n        shift(typeof this.floatingUIOptions.shift !== \"boolean\" ? this.floatingUIOptions.shift : void 0)\n      );\n    }\n    if (this.floatingUIOptions.offset) {\n      middlewares.push(\n        offset(typeof this.floatingUIOptions.offset !== \"boolean\" ? this.floatingUIOptions.offset : void 0)\n      );\n    }\n    if (this.floatingUIOptions.arrow) {\n      middlewares.push(arrow(this.floatingUIOptions.arrow));\n    }\n    if (this.floatingUIOptions.size) {\n      middlewares.push(size(typeof this.floatingUIOptions.size !== \"boolean\" ? this.floatingUIOptions.size : void 0));\n    }\n    if (this.floatingUIOptions.autoPlacement) {\n      middlewares.push(\n        autoPlacement(\n          typeof this.floatingUIOptions.autoPlacement !== \"boolean\" ? this.floatingUIOptions.autoPlacement : void 0\n        )\n      );\n    }\n    if (this.floatingUIOptions.hide) {\n      middlewares.push(hide(typeof this.floatingUIOptions.hide !== \"boolean\" ? this.floatingUIOptions.hide : void 0));\n    }\n    if (this.floatingUIOptions.inline) {\n      middlewares.push(\n        inline(typeof this.floatingUIOptions.inline !== \"boolean\" ? this.floatingUIOptions.inline : void 0)\n      );\n    }\n    return middlewares;\n  }\n  get virtualElement() {\n    var _a, _b, _c;\n    const { selection } = this.editor.state;\n    const referencedVirtualElement = (_a = this.getReferencedVirtualElement) == null ? void 0 : _a.call(this);\n    if (referencedVirtualElement) {\n      return referencedVirtualElement;\n    }\n    if (!((_c = (_b = this.view) == null ? void 0 : _b.dom) == null ? void 0 : _c.parentNode)) {\n      return;\n    }\n    const domRect = posToDOMRect(this.view, selection.from, selection.to);\n    let virtualElement = {\n      getBoundingClientRect: () => domRect,\n      getClientRects: () => [domRect]\n    };\n    if (selection instanceof NodeSelection) {\n      let node = this.view.nodeDOM(selection.from);\n      const nodeViewWrapper = node.dataset.nodeViewWrapper ? node : node.querySelector(\"[data-node-view-wrapper]\");\n      if (nodeViewWrapper) {\n        node = nodeViewWrapper;\n      }\n      if (node) {\n        virtualElement = {\n          getBoundingClientRect: () => node.getBoundingClientRect(),\n          getClientRects: () => [node.getBoundingClientRect()]\n        };\n      }\n    }\n    if (selection instanceof CellSelection) {\n      const { $anchorCell, $headCell } = selection;\n      const from = $anchorCell ? $anchorCell.pos : $headCell.pos;\n      const to = $headCell ? $headCell.pos : $anchorCell.pos;\n      const fromDOM = this.view.nodeDOM(from);\n      const toDOM = this.view.nodeDOM(to);\n      if (!fromDOM || !toDOM) {\n        return;\n      }\n      const clientRect = fromDOM === toDOM ? fromDOM.getBoundingClientRect() : combineDOMRects(\n        fromDOM.getBoundingClientRect(),\n        toDOM.getBoundingClientRect()\n      );\n      virtualElement = {\n        getBoundingClientRect: () => clientRect,\n        getClientRects: () => [clientRect]\n      };\n    }\n    return virtualElement;\n  }\n  updatePosition() {\n    const virtualElement = this.virtualElement;\n    if (!virtualElement) {\n      return;\n    }\n    computePosition(virtualElement, this.element, {\n      placement: this.floatingUIOptions.placement,\n      strategy: this.floatingUIOptions.strategy,\n      middleware: this.middlewares\n    }).then(({ x, y, strategy, middlewareData }) => {\n      var _a, _b;\n      if (((_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden) || ((_b = middlewareData.hide) == null ? void 0 : _b.escaped)) {\n        this.element.style.visibility = \"hidden\";\n        return;\n      }\n      this.element.style.visibility = \"visible\";\n      this.element.style.width = \"max-content\";\n      this.element.style.position = strategy;\n      this.element.style.left = `${x}px`;\n      this.element.style.top = `${y}px`;\n      if (this.isVisible && this.floatingUIOptions.onUpdate) {\n        this.floatingUIOptions.onUpdate();\n      }\n    });\n  }\n  update(view, oldState) {\n    const { state } = view;\n    const hasValidSelection = state.selection.from !== state.selection.to;\n    if (this.updateDelay > 0 && hasValidSelection) {\n      this.handleDebouncedUpdate(view, oldState);\n      return;\n    }\n    const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));\n    const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));\n    this.updateHandler(view, selectionChanged, docChanged, oldState);\n  }\n  getShouldShow(oldState) {\n    var _a;\n    const { state } = this.view;\n    const { selection } = state;\n    const { ranges } = selection;\n    const from = Math.min(...ranges.map((range) => range.$from.pos));\n    const to = Math.max(...ranges.map((range) => range.$to.pos));\n    const shouldShow = (_a = this.shouldShow) == null ? void 0 : _a.call(this, {\n      editor: this.editor,\n      element: this.element,\n      view: this.view,\n      state,\n      oldState,\n      from,\n      to\n    });\n    return shouldShow || false;\n  }\n  show() {\n    var _a;\n    if (this.isVisible) {\n      return;\n    }\n    this.element.style.visibility = \"visible\";\n    this.element.style.opacity = \"1\";\n    const appendToElement = typeof this.appendTo === \"function\" ? this.appendTo() : this.appendTo;\n    (_a = appendToElement != null ? appendToElement : this.view.dom.parentElement) == null ? void 0 : _a.appendChild(this.element);\n    if (this.floatingUIOptions.onShow) {\n      this.floatingUIOptions.onShow();\n    }\n    this.isVisible = true;\n  }\n  hide() {\n    if (!this.isVisible) {\n      return;\n    }\n    this.element.style.visibility = \"hidden\";\n    this.element.style.opacity = \"0\";\n    this.element.remove();\n    if (this.floatingUIOptions.onHide) {\n      this.floatingUIOptions.onHide();\n    }\n    this.isVisible = false;\n  }\n  updateOptions(newProps) {\n    var _a;\n    if (newProps.updateDelay !== void 0) {\n      this.updateDelay = newProps.updateDelay;\n    }\n    if (newProps.resizeDelay !== void 0) {\n      this.resizeDelay = newProps.resizeDelay;\n    }\n    if (newProps.appendTo !== void 0) {\n      this.appendTo = newProps.appendTo;\n    }\n    if (newProps.getReferencedVirtualElement !== void 0) {\n      this.getReferencedVirtualElement = newProps.getReferencedVirtualElement;\n    }\n    if (newProps.shouldShow !== void 0) {\n      if (newProps.shouldShow) {\n        this.shouldShow = newProps.shouldShow;\n      }\n    }\n    if (newProps.options !== void 0) {\n      const newScrollTarget = (_a = newProps.options.scrollTarget) != null ? _a : window;\n      if (newScrollTarget !== this.scrollTarget) {\n        this.scrollTarget.removeEventListener(\"scroll\", this.resizeHandler);\n        this.scrollTarget = newScrollTarget;\n        this.scrollTarget.addEventListener(\"scroll\", this.resizeHandler);\n      }\n      this.floatingUIOptions = {\n        ...this.floatingUIOptions,\n        ...newProps.options\n      };\n    }\n  }\n  destroy() {\n    this.hide();\n    this.element.removeEventListener(\"mousedown\", this.mousedownHandler, { capture: true });\n    this.view.dom.removeEventListener(\"dragstart\", this.dragstartHandler);\n    window.removeEventListener(\"resize\", this.resizeHandler);\n    this.scrollTarget.removeEventListener(\"scroll\", this.resizeHandler);\n    this.editor.off(\"focus\", this.focusHandler);\n    this.editor.off(\"blur\", this.blurHandler);\n    this.editor.off(\"transaction\", this.transactionHandler);\n    if (this.floatingUIOptions.onDestroy) {\n      this.floatingUIOptions.onDestroy();\n    }\n  }\n};\nvar BubbleMenuPlugin = (options) => {\n  return new Plugin({\n    key: typeof options.pluginKey === \"string\" ? new PluginKey(options.pluginKey) : options.pluginKey,\n    view: (view) => new BubbleMenuView({ view, ...options })\n  });\n};\n\n// src/menus/BubbleMenu.ts\nimport { defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref } from \"vue\";\nvar BubbleMenu = defineComponent({\n  name: \"BubbleMenu\",\n  inheritAttrs: false,\n  props: {\n    pluginKey: {\n      type: [String, Object],\n      default: \"bubbleMenu\"\n    },\n    editor: {\n      type: Object,\n      required: true\n    },\n    updateDelay: {\n      type: Number,\n      default: void 0\n    },\n    resizeDelay: {\n      type: Number,\n      default: void 0\n    },\n    options: {\n      type: Object,\n      default: () => ({})\n    },\n    appendTo: {\n      type: [Object, Function],\n      default: void 0\n    },\n    shouldShow: {\n      type: Function,\n      default: null\n    },\n    getReferencedVirtualElement: {\n      type: Function,\n      default: void 0\n    }\n  },\n  setup(props, { slots, attrs }) {\n    const root = ref(null);\n    onMounted(() => {\n      const {\n        editor,\n        options,\n        pluginKey,\n        resizeDelay,\n        appendTo,\n        shouldShow,\n        getReferencedVirtualElement,\n        updateDelay\n      } = props;\n      const el = root.value;\n      if (!el) {\n        return;\n      }\n      el.style.visibility = \"hidden\";\n      el.style.position = \"absolute\";\n      el.remove();\n      nextTick(() => {\n        editor.registerPlugin(\n          BubbleMenuPlugin({\n            editor,\n            element: el,\n            options,\n            pluginKey,\n            resizeDelay,\n            appendTo,\n            shouldShow,\n            getReferencedVirtualElement,\n            updateDelay\n          })\n        );\n      });\n    });\n    onBeforeUnmount(() => {\n      const { pluginKey, editor } = props;\n      editor.unregisterPlugin(pluginKey);\n    });\n    return () => {\n      var _a;\n      return h(\"div\", { ref: root, ...attrs }, (_a = slots.default) == null ? void 0 : _a.call(slots));\n    };\n  }\n});\n\n// ../extension-floating-menu/src/floating-menu-plugin.ts\nimport {\n  arrow as arrow2,\n  autoPlacement as autoPlacement2,\n  computePosition as computePosition2,\n  flip as flip2,\n  hide as hide2,\n  inline as inline2,\n  offset as offset2,\n  shift as shift2,\n  size as size2\n} from \"@floating-ui/dom\";\nimport { getText, getTextSerializersFromSchema, posToDOMRect as posToDOMRect2 } from \"@tiptap/core\";\nimport { Plugin as Plugin2, PluginKey as PluginKey2 } from \"@tiptap/pm/state\";\nvar FloatingMenuView = class {\n  constructor({\n    editor,\n    element,\n    view,\n    updateDelay = 250,\n    resizeDelay = 60,\n    options,\n    appendTo,\n    shouldShow\n  }) {\n    this.preventHide = false;\n    this.isVisible = false;\n    this.scrollTarget = window;\n    this.shouldShow = ({ view, state }) => {\n      const { selection } = state;\n      const { $anchor, empty } = selection;\n      const isRootDepth = $anchor.depth === 1;\n      const isEmptyTextBlock = $anchor.parent.isTextblock && !$anchor.parent.type.spec.code && !$anchor.parent.textContent && $anchor.parent.childCount === 0 && !this.getTextContent($anchor.parent);\n      if (!view.hasFocus() || !empty || !isRootDepth || !isEmptyTextBlock || !this.editor.isEditable) {\n        return false;\n      }\n      return true;\n    };\n    this.floatingUIOptions = {\n      strategy: \"absolute\",\n      placement: \"right\",\n      offset: 8,\n      flip: {},\n      shift: {},\n      arrow: false,\n      size: false,\n      autoPlacement: false,\n      hide: false,\n      inline: false\n    };\n    this.updateHandler = (view, selectionChanged, docChanged, oldState) => {\n      const { composing } = view;\n      const isSame = !selectionChanged && !docChanged;\n      if (composing || isSame) {\n        return;\n      }\n      const shouldShow = this.getShouldShow(oldState);\n      if (!shouldShow) {\n        this.hide();\n        return;\n      }\n      this.updatePosition();\n      this.show();\n    };\n    this.mousedownHandler = () => {\n      this.preventHide = true;\n    };\n    this.focusHandler = () => {\n      setTimeout(() => this.update(this.editor.view));\n    };\n    this.blurHandler = ({ event }) => {\n      var _a;\n      if (this.preventHide) {\n        this.preventHide = false;\n        return;\n      }\n      if ((event == null ? void 0 : event.relatedTarget) && ((_a = this.element.parentNode) == null ? void 0 : _a.contains(event.relatedTarget))) {\n        return;\n      }\n      if ((event == null ? void 0 : event.relatedTarget) === this.editor.view.dom) {\n        return;\n      }\n      this.hide();\n    };\n    /**\n     * Handles the transaction event to update the position of the floating menu.\n     * This allows external code to trigger a position update via:\n     * `editor.view.dispatch(editor.state.tr.setMeta('floatingMenu', 'updatePosition'))`\n     */\n    this.transactionHandler = ({ transaction: tr }) => {\n      const meta = tr.getMeta(\"floatingMenu\");\n      if (meta === \"updatePosition\") {\n        this.updatePosition();\n      } else if (meta && typeof meta === \"object\" && meta.type === \"updateOptions\") {\n        this.updateOptions(meta.options);\n      }\n    };\n    /**\n     * Handles the window resize event to update the position of the floating menu.\n     * It uses a debounce mechanism to prevent excessive updates.\n     * The delay is defined by the `resizeDelay` property.\n     */\n    this.resizeHandler = () => {\n      if (this.resizeDebounceTimer) {\n        clearTimeout(this.resizeDebounceTimer);\n      }\n      this.resizeDebounceTimer = window.setTimeout(() => {\n        this.updatePosition();\n      }, this.resizeDelay);\n    };\n    var _a;\n    this.editor = editor;\n    this.element = element;\n    this.view = view;\n    this.updateDelay = updateDelay;\n    this.resizeDelay = resizeDelay;\n    this.appendTo = appendTo;\n    this.scrollTarget = (_a = options == null ? void 0 : options.scrollTarget) != null ? _a : window;\n    this.floatingUIOptions = {\n      ...this.floatingUIOptions,\n      ...options\n    };\n    this.element.tabIndex = 0;\n    if (shouldShow) {\n      this.shouldShow = shouldShow;\n    }\n    this.element.addEventListener(\"mousedown\", this.mousedownHandler, { capture: true });\n    this.editor.on(\"focus\", this.focusHandler);\n    this.editor.on(\"blur\", this.blurHandler);\n    this.editor.on(\"transaction\", this.transactionHandler);\n    window.addEventListener(\"resize\", this.resizeHandler);\n    this.scrollTarget.addEventListener(\"scroll\", this.resizeHandler);\n    this.update(view, view.state);\n    if (this.getShouldShow()) {\n      this.show();\n      this.updatePosition();\n    }\n  }\n  getTextContent(node) {\n    return getText(node, { textSerializers: getTextSerializersFromSchema(this.editor.schema) });\n  }\n  get middlewares() {\n    const middlewares = [];\n    if (this.floatingUIOptions.flip) {\n      middlewares.push(flip2(typeof this.floatingUIOptions.flip !== \"boolean\" ? this.floatingUIOptions.flip : void 0));\n    }\n    if (this.floatingUIOptions.shift) {\n      middlewares.push(\n        shift2(typeof this.floatingUIOptions.shift !== \"boolean\" ? this.floatingUIOptions.shift : void 0)\n      );\n    }\n    if (this.floatingUIOptions.offset) {\n      middlewares.push(\n        offset2(typeof this.floatingUIOptions.offset !== \"boolean\" ? this.floatingUIOptions.offset : void 0)\n      );\n    }\n    if (this.floatingUIOptions.arrow) {\n      middlewares.push(arrow2(this.floatingUIOptions.arrow));\n    }\n    if (this.floatingUIOptions.size) {\n      middlewares.push(size2(typeof this.floatingUIOptions.size !== \"boolean\" ? this.floatingUIOptions.size : void 0));\n    }\n    if (this.floatingUIOptions.autoPlacement) {\n      middlewares.push(\n        autoPlacement2(\n          typeof this.floatingUIOptions.autoPlacement !== \"boolean\" ? this.floatingUIOptions.autoPlacement : void 0\n        )\n      );\n    }\n    if (this.floatingUIOptions.hide) {\n      middlewares.push(hide2(typeof this.floatingUIOptions.hide !== \"boolean\" ? this.floatingUIOptions.hide : void 0));\n    }\n    if (this.floatingUIOptions.inline) {\n      middlewares.push(\n        inline2(typeof this.floatingUIOptions.inline !== \"boolean\" ? this.floatingUIOptions.inline : void 0)\n      );\n    }\n    return middlewares;\n  }\n  getShouldShow(oldState) {\n    var _a;\n    const { state } = this.view;\n    const { selection } = state;\n    const { ranges } = selection;\n    const from = Math.min(...ranges.map((range) => range.$from.pos));\n    const to = Math.max(...ranges.map((range) => range.$to.pos));\n    const shouldShow = (_a = this.shouldShow) == null ? void 0 : _a.call(this, {\n      editor: this.editor,\n      view: this.view,\n      state,\n      oldState,\n      from,\n      to\n    });\n    return shouldShow;\n  }\n  updateOptions(newProps) {\n    var _a;\n    if (newProps.updateDelay !== void 0) {\n      this.updateDelay = newProps.updateDelay;\n    }\n    if (newProps.resizeDelay !== void 0) {\n      this.resizeDelay = newProps.resizeDelay;\n    }\n    if (newProps.appendTo !== void 0) {\n      this.appendTo = newProps.appendTo;\n    }\n    if (newProps.shouldShow !== void 0) {\n      if (newProps.shouldShow) {\n        this.shouldShow = newProps.shouldShow;\n      }\n    }\n    if (newProps.options !== void 0) {\n      const newScrollTarget = (_a = newProps.options.scrollTarget) != null ? _a : window;\n      if (newScrollTarget !== this.scrollTarget) {\n        this.scrollTarget.removeEventListener(\"scroll\", this.resizeHandler);\n        this.scrollTarget = newScrollTarget;\n        this.scrollTarget.addEventListener(\"scroll\", this.resizeHandler);\n      }\n      this.floatingUIOptions = {\n        ...this.floatingUIOptions,\n        ...newProps.options\n      };\n    }\n  }\n  updatePosition() {\n    const { selection } = this.editor.state;\n    const domRect = posToDOMRect2(this.view, selection.from, selection.to);\n    const virtualElement = {\n      getBoundingClientRect: () => domRect,\n      getClientRects: () => [domRect]\n    };\n    computePosition2(virtualElement, this.element, {\n      placement: this.floatingUIOptions.placement,\n      strategy: this.floatingUIOptions.strategy,\n      middleware: this.middlewares\n    }).then(({ x, y, strategy, middlewareData }) => {\n      var _a, _b;\n      if (((_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden) || ((_b = middlewareData.hide) == null ? void 0 : _b.escaped)) {\n        this.element.style.visibility = \"hidden\";\n        return;\n      }\n      this.element.style.visibility = \"visible\";\n      this.element.style.width = \"max-content\";\n      this.element.style.position = strategy;\n      this.element.style.left = `${x}px`;\n      this.element.style.top = `${y}px`;\n      if (this.isVisible && this.floatingUIOptions.onUpdate) {\n        this.floatingUIOptions.onUpdate();\n      }\n    });\n  }\n  update(view, oldState) {\n    const selectionChanged = !(oldState == null ? void 0 : oldState.selection.eq(view.state.selection));\n    const docChanged = !(oldState == null ? void 0 : oldState.doc.eq(view.state.doc));\n    this.updateHandler(view, selectionChanged, docChanged, oldState);\n  }\n  show() {\n    var _a;\n    if (this.isVisible) {\n      return;\n    }\n    this.element.style.visibility = \"visible\";\n    this.element.style.opacity = \"1\";\n    const appendToElement = typeof this.appendTo === \"function\" ? this.appendTo() : this.appendTo;\n    (_a = appendToElement != null ? appendToElement : this.view.dom.parentElement) == null ? void 0 : _a.appendChild(this.element);\n    if (this.floatingUIOptions.onShow) {\n      this.floatingUIOptions.onShow();\n    }\n    this.isVisible = true;\n  }\n  hide() {\n    if (!this.isVisible) {\n      return;\n    }\n    this.element.style.visibility = \"hidden\";\n    this.element.style.opacity = \"0\";\n    this.element.remove();\n    if (this.floatingUIOptions.onHide) {\n      this.floatingUIOptions.onHide();\n    }\n    this.isVisible = false;\n  }\n  destroy() {\n    this.hide();\n    this.element.removeEventListener(\"mousedown\", this.mousedownHandler, { capture: true });\n    window.removeEventListener(\"resize\", this.resizeHandler);\n    this.scrollTarget.removeEventListener(\"scroll\", this.resizeHandler);\n    this.editor.off(\"focus\", this.focusHandler);\n    this.editor.off(\"blur\", this.blurHandler);\n    this.editor.off(\"transaction\", this.transactionHandler);\n    if (this.floatingUIOptions.onDestroy) {\n      this.floatingUIOptions.onDestroy();\n    }\n  }\n};\nvar FloatingMenuPlugin = (options) => {\n  return new Plugin2({\n    key: typeof options.pluginKey === \"string\" ? new PluginKey2(options.pluginKey) : options.pluginKey,\n    view: (view) => new FloatingMenuView({ view, ...options })\n  });\n};\n\n// src/menus/FloatingMenu.ts\nimport { defineComponent as defineComponent2, h as h2, onBeforeUnmount as onBeforeUnmount2, onMounted as onMounted2, ref as ref2 } from \"vue\";\nvar FloatingMenu = defineComponent2({\n  name: \"FloatingMenu\",\n  inheritAttrs: false,\n  props: {\n    pluginKey: {\n      // TODO: TypeScript breaks :(\n      // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],\n      type: null,\n      default: \"floatingMenu\"\n    },\n    editor: {\n      type: Object,\n      required: true\n    },\n    updateDelay: {\n      type: Number,\n      default: void 0\n    },\n    resizeDelay: {\n      type: Number,\n      default: void 0\n    },\n    options: {\n      type: Object,\n      default: () => ({})\n    },\n    appendTo: {\n      type: [Object, Function],\n      default: void 0\n    },\n    shouldShow: {\n      type: Function,\n      default: null\n    }\n  },\n  setup(props, { slots, attrs }) {\n    const root = ref2(null);\n    onMounted2(() => {\n      const { pluginKey, editor, updateDelay, resizeDelay, options, appendTo, shouldShow } = props;\n      const el = root.value;\n      if (!el) {\n        return;\n      }\n      el.style.visibility = \"hidden\";\n      el.style.position = \"absolute\";\n      el.remove();\n      editor.registerPlugin(\n        FloatingMenuPlugin({\n          pluginKey,\n          editor,\n          element: el,\n          updateDelay,\n          resizeDelay,\n          options,\n          appendTo,\n          shouldShow\n        })\n      );\n    });\n    onBeforeUnmount2(() => {\n      const { pluginKey, editor } = props;\n      editor.unregisterPlugin(pluginKey);\n    });\n    return () => {\n      var _a;\n      return h2(\"div\", { ref: root, ...attrs }, (_a = slots.default) == null ? void 0 : _a.call(slots));\n    };\n  }\n});\nexport {\n  BubbleMenu,\n  FloatingMenu\n};\n//# sourceMappingURL=index.js.map","import { mergeAttributes } from '@tiptap/core';\nimport { Table, TableRow, TableCell, TableHeader } from '@tiptap/extension-table';\n\nconst createAttribute = (name) => ({\n  default: null,\n  parseHTML: element => element.getAttribute(name),\n  renderHTML: attributes => {\n    if (!attributes[name]) return {};\n    return { [name]: attributes[name] };\n  },\n});\n\nconst createTableStyleAttribute = () => {\n  let attribute = createAttribute('style');\n  attribute.renderHTML = (attributes) => {\n    if (!attributes['style']) return {};\n    return { ['style']: replaceZeroWidth(attributes['style']) };\n  }\n  return attribute;\n};\n\nfunction replaceZeroWidth(style) {\n  return style.replace(/(?<![a-z-])width\\s*:\\s*([^;]+);?/gi, (match, value) => {\n    return /^\\s*0\\s*[a-z%]*\\s*(!important)?\\s*$/i.test(value) ? 'width: 100%;' : match;\n  });\n}\n\nexport const CustomTable = Table.extend({\n  addAttributes () {\n    return {\n      ...this.parent?.(),\n      border: createAttribute('border'),\n      cellpadding: createAttribute('cellpadding'),\n      cellspacing: createAttribute('cellspacing'),\n      style: createTableStyleAttribute(),\n    };\n  },\n\n  renderHTML({ HTMLAttributes }) {\n    return ['table', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), ['tbody', 0]];\n  },\n});\n\nexport const CustomTableRow = TableRow.extend({\n  addAttributes () {\n    return {\n      ...this.parent?.(),\n      style: createAttribute('style'),\n    };\n  },\n});\n\nconst tableCellAttributes = {\n  style: createAttribute('style'),\n  valign: createAttribute('valign'),\n  width: createAttribute('width'),\n};\n\nexport const CustomTableCell = TableCell.extend({\n  addAttributes () {\n    return {\n      ...this.parent?.(),\n      ...tableCellAttributes,\n    };\n  },\n});\n\nexport const CustomTableHeader = TableHeader.extend({\n  addAttributes () {\n    return {\n      ...this.parent?.(),\n      ...tableCellAttributes,\n    };\n  },\n});\n","import { TextStyle } from '@tiptap/extension-text-style';\n\nexport const CustomTextStyle = TextStyle.extend({\n  parseHTML () {\n    return [\n      ...this.parent?.() || [],\n      {\n        tag: 'div',\n        consuming: false,\n        getAttrs: element => {\n          if (!element.hasAttribute('style')) return false;\n          return {};\n        },\n      },\n      {\n        tag: 'a',\n        consuming: false,\n        getAttrs: element => {\n          if (!element.hasAttribute('style')) return false;\n          return {};\n        },\n      },\n    ];\n  },\n});\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <node-view-wrapper\n    class=\"d-d-inline-block d-va-bottom d-lh0\"\n  >\n    <dt-emoji\n      size=\"500\"\n      :code=\"node.attrs.code\"\n    />\n  </node-view-wrapper>\n</template>\n\n<script>\nimport { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3';\n\nimport { DtEmoji } from '@/components/emoji';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'EmojiComponent',\n  components: {\n    NodeViewWrapper,\n    DtEmoji,\n  },\n\n  props: nodeViewProps,\n};\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <div class=\"d-popover__dialog d-suggestion-list__container\">\n    <ul\n      v-show=\"items.length\"\n      ref=\"suggestionList\"\n      class=\"d-suggestion-list\"\n    >\n      <dt-list-item\n        v-for=\"(item, index) in items\"\n        :key=\"item.id\"\n        :class=\"[\n          'd-suggestion-list__item',\n          { 'd-list-item--highlighted': index === selectedIndex },\n        ]\"\n        navigation-type=\"arrow-keys\"\n        @click=\"selectItem(index)\"\n        @keydown.prevent=\"onKeyDown\"\n      >\n        <component\n          :is=\"itemComponent\"\n          :item=\"item\"\n        />\n      </dt-list-item>\n    </ul>\n  </div>\n</template>\n\n<script>\nimport { DtListItem } from '@/components/list_item';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'SuggestionList',\n  components: {\n    DtListItem,\n  },\n\n  props: {\n    items: {\n      type: Array,\n      required: true,\n    },\n\n    command: {\n      type: Function,\n      required: true,\n    },\n\n    itemComponent: {\n      type: Object,\n      required: true,\n    },\n\n    itemType: {\n      type: String,\n      required: true,\n    },\n  },\n\n  data () {\n    return {\n      selectedIndex: 0,\n    };\n  },\n\n  watch: {\n    items () {\n      this.selectedIndex = 0;\n    },\n  },\n\n  methods: {\n    onKeyDown ({ event }) {\n      if (event.key === 'ArrowUp') {\n        this.upHandler();\n        return true;\n      }\n\n      if (event.key === 'ArrowDown') {\n        this.downHandler();\n        return true;\n      }\n\n      if (event.key === 'Enter' || event.key === 'Tab') {\n        this.selectHandler();\n        return true;\n      }\n\n      return false;\n    },\n\n    upHandler () {\n      this.selectedIndex = ((this.selectedIndex + this.items.length) - 1) % this.items.length;\n\n      this.scrollActiveElementIntoView();\n    },\n\n    downHandler () {\n      this.selectedIndex = (this.selectedIndex + 1) % this.items.length;\n\n      this.scrollActiveElementIntoView();\n    },\n\n    async scrollActiveElementIntoView () {\n      await this.$nextTick();\n      const activeElement = this.$refs.suggestionList.querySelector('.d-list-item--highlighted');\n      if (activeElement) {\n        activeElement.scrollIntoView({\n          behavior: 'smooth',\n          block: 'nearest',\n        });\n      }\n    },\n\n    selectHandler () {\n      this.selectItem(this.selectedIndex);\n    },\n\n    selectItem (index) {\n      const item = this.items[index];\n\n      switch (this.itemType) {\n        case 'emoji':\n          this.command(item);\n          return;\n        case 'mention':\n          this.command({ name: item.name, id: item.id, avatarSrc: item.avatarSrc, contactKey: item.contactKey });\n          break;\n        case 'channel':\n          this.command({ name: item.name, id: item.id, locked: item.locked, channelKey: item.channelKey });\n          break;\n        case 'slash-command':\n          this.command({ command: item.command });\n          break;\n      }\n    },\n  },\n};\n</script>\n","import { markRaw } from 'vue';\nimport { VueRenderer } from '@tiptap/vue-3';\nimport { computePosition, flip, shift, offset } from '@floating-ui/dom';\n\nimport SuggestionList from '../suggestion/SuggestionList.vue';\n\n/**\n * Default placement configuration for floating UI.\n */\nexport const DEFAULT_PLACEMENT = 'top-start';\n\n/**\n * Default z-index for floating elements.\n */\nexport const DEFAULT_Z_INDEX = '650';\n\n/**\n * Creates a default virtual element with zero dimensions.\n * @returns {Object} Virtual element with getBoundingClientRect method\n */\nexport function createDefaultVirtualElement () {\n  return {\n    getBoundingClientRect: () => ({\n      width: 0,\n      height: 0,\n      x: 0,\n      y: 0,\n      top: 0,\n      left: 0,\n      right: 0,\n      bottom: 0,\n    }),\n  };\n}\n\n/**\n * Creates a virtual element from a clientRect function.\n * @param {Function} clientRect - Function that returns a DOMRect\n * @returns {Object} Virtual element with getBoundingClientRect method\n */\nexport function createVirtualElement (clientRect) {\n  return { getBoundingClientRect: clientRect };\n}\n\n/**\n * Calculates and updates the position of a floating element.\n * @param {HTMLElement} floatingEl - The floating element to position\n * @param {Object} virtualEl - Virtual element with getBoundingClientRect\n * @param {Object} options - Positioning options\n * @param {string} options.placement - Placement of the floating element\n * @param {Array} options.middleware - Floating UI middleware array\n */\nexport async function updateFloatingPosition (floatingEl, virtualEl, options = {}) {\n  if (!floatingEl || !virtualEl?.getBoundingClientRect) return;\n\n  const {\n    placement = DEFAULT_PLACEMENT,\n    middleware = [offset(0), flip(), shift({ padding: 8 })],\n  } = options;\n\n  const { x, y } = await computePosition(virtualEl, floatingEl, {\n    placement,\n    middleware,\n  });\n\n  Object.assign(floatingEl.style, {\n    left: `${x}px`,\n    top: `${y}px`,\n  });\n}\n\n/**\n * Initializes a floating element with default styles.\n * @param {HTMLElement} element - The element to initialize\n * @param {Object} options - Style options\n * @param {string} options.zIndex - Z-index value\n */\nexport function initializeFloatingElement (element, options = {}) {\n  const { zIndex = DEFAULT_Z_INDEX } = options;\n  element.style.position = 'absolute';\n  element.style.zIndex = zIndex;\n  element.style.display = 'none';\n}\n\n/**\n * Shows a floating element.\n * @param {HTMLElement} element - The element to show\n */\nexport function showFloatingElement (element) {\n  if (!element) return;\n  element.style.display = 'block';\n}\n\n/**\n * Hides a floating element.\n * @param {HTMLElement} element - The element to hide\n */\nexport function hideFloatingElement (element) {\n  if (!element) return;\n  element.style.display = 'none';\n}\n\n/**\n * Creates an escape key handler.\n * @param {Function} onEscape - Callback to execute when Escape is pressed\n * @param {Function} isActive - Function that returns whether the handler should be active\n * @returns {Function} Event handler function\n */\nexport function createEscapeHandler (onEscape, isActive) {\n  return (e) => {\n    if (e.key === 'Escape' && isActive()) {\n      onEscape();\n    }\n  };\n}\n\n/**\n * Attaches an escape key handler to the document.\n * @param {Function} handler - The event handler\n */\nexport function attachEscapeHandler (handler) {\n  document.addEventListener('keydown', handler);\n}\n\n/**\n * Detaches an escape key handler from the document.\n * @param {Function} handler - The event handler\n */\nexport function detachEscapeHandler (handler) {\n  document.removeEventListener('keydown', handler);\n}\n\n/**\n * Creates a Vue component renderer for suggestions.\n * @param {Object} listComponent - The list wrapper component\n * @param {Object} itemComponent - The item component to render\n * @param {string} itemType - The type identifier for the suggestion\n * @param {Object} props - Additional props from the suggestion plugin\n * @returns {VueRenderer} The Vue renderer instance\n */\nexport function createSuggestionComponent (listComponent, itemComponent, itemType, props) {\n  return new VueRenderer(listComponent, {\n    props: {\n      itemComponent: markRaw(itemComponent),\n      itemType,\n      ...props,\n    },\n    editor: props.editor,\n  });\n}\n\n/**\n * Cleans up a suggestion popup by removing event listeners and DOM elements.\n * @param {Object} state - The state object containing references to clean up\n * @param {Function} state.escHandler - The escape key handler\n * @param {HTMLElement} state.floatingEl - The floating element\n * @param {VueRenderer} state.component - The Vue renderer component\n */\nexport function cleanupSuggestionPopup (state) {\n  if (state.escHandler) {\n    detachEscapeHandler(state.escHandler);\n  }\n  state.floatingEl?.remove();\n  state.component?.destroy();\n}\n\n/**\n * Creates a render function for suggestion popups using Floating UI.\n * @param {Object} itemComponent - The Vue component to render for each suggestion item\n * @param {string} itemType - The type identifier for the suggestion\n * @param {Object} options - Optional configuration\n * @param {Object} options.listComponent - Custom list component (defaults to SuggestionList)\n * @param {string} options.placement - Floating UI placement\n * @param {string} options.zIndex - Z-index for the floating element\n * @returns {Function} A render function compatible with Tiptap's suggestion plugin\n */\nexport function createSuggestionRenderer (itemComponent, itemType, options = {}) {\n  const {\n    listComponent = SuggestionList,\n    placement = DEFAULT_PLACEMENT,\n    zIndex = DEFAULT_Z_INDEX,\n  } = options;\n\n  return () => {\n    let component = null;\n    let floatingEl = null;\n    let popupIsOpen = false;\n    let virtualEl = createDefaultVirtualElement();\n    let escHandler = null;\n\n    function updatePosition () {\n      updateFloatingPosition(floatingEl, virtualEl, { placement });\n    }\n\n    function show () {\n      if (!floatingEl) return;\n      showFloatingElement(floatingEl);\n      popupIsOpen = true;\n      updatePosition();\n    }\n\n    function hide () {\n      if (!floatingEl) return;\n      hideFloatingElement(floatingEl);\n      popupIsOpen = false;\n    }\n\n    return {\n      onStart: props => {\n        component = createSuggestionComponent(listComponent, itemComponent, itemType, props);\n\n        if (!props.clientRect) {\n          return;\n        }\n\n        floatingEl = component.element;\n        initializeFloatingElement(floatingEl, { zIndex });\n        document.body.appendChild(floatingEl);\n\n        virtualEl = createVirtualElement(props.clientRect);\n\n        escHandler = createEscapeHandler(hide, () => popupIsOpen);\n        attachEscapeHandler(escHandler);\n\n        if (props.items.length > 0) {\n          show();\n        }\n      },\n\n      onUpdate (props) {\n        component?.updateProps(props);\n\n        if (props.items.length > 0) {\n          show();\n        } else {\n          hide();\n        }\n\n        if (props.clientRect) {\n          virtualEl = createVirtualElement(props.clientRect);\n          updatePosition();\n        }\n      },\n\n      onKeyDown (props) {\n        if (popupIsOpen) {\n          return component?.ref?.onKeyDown(props);\n        }\n      },\n\n      onExit () {\n        cleanupSuggestionPopup({ escHandler, floatingEl, component });\n        escHandler = null;\n        floatingEl = null;\n        component = null;\n      },\n    };\n  };\n}\n","<template>\n  <dt-stack\n    direction=\"row\"\n    gap=\"400\"\n  >\n    <dt-emoji\n      size=\"200\"\n      :code=\"item.code\"\n    />\n    {{ item.code }}\n  </dt-stack>\n</template>\n\n<script>\nimport { DtEmoji } from '@/components/emoji';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'EmojiSuggestion',\n  components: {\n    DtEmoji,\n    DtStack,\n  },\n\n  props: {\n    item: {\n      type: Object,\n      required: true,\n    },\n  },\n};\n</script>\n","import { getEmojiData } from '@/common/emoji';\n\nimport { createSuggestionRenderer } from '../utils/suggestion_utils';\nimport EmojiSuggestion from './EmojiSuggestion.vue';\n\nconst suggestionLimit = 20;\n\nconst sortEmojis = (a, b, query) => {\n  const aShortname = a.shortname?.replaceAll(':', '');\n  const bShortname = b.shortname?.replaceAll(':', '');\n  const aStartsWith = aShortname.startsWith(query);\n  const bStartsWith = bShortname.startsWith(query);\n\n  // If one starts with query and the other doesn't, prioritize the one that starts\n  if (aStartsWith && !bStartsWith) return -1;\n  if (!aStartsWith && bStartsWith) return 1;\n\n  // Sort alphabetically\n  return aShortname.localeCompare(bShortname);\n};\n\nexport default {\n  items: ({ query }) => {\n    if (query.length < 2) {\n      return [];\n    }\n    const emojiList = Object.values(getEmojiData());\n    query = query.toLowerCase();\n\n    const filteredEmoji = emojiList\n      .filter(\n        item => [\n          item.name,\n          item.shortname?.replaceAll(':', ''),\n          ...(item.keywords || []),\n        ].some(text => text && text.startsWith(query)),\n      ).splice(0, suggestionLimit)\n      .sort((a, b) => sortEmojis(a, b, query));\n    return filteredEmoji.map(item => ({ code: item.shortname }));\n  },\n\n  command: ({ editor, range, props }) => {\n    // increase range.to by one when the next node is of type \"text\"\n    // and starts with a space character\n    const nodeAfter = editor.view.state.selection.$to.nodeAfter;\n    const overrideSpace = nodeAfter?.text?.startsWith(' ');\n\n    if (overrideSpace) {\n      range.to += 1;\n    }\n\n    editor\n      .chain()\n      .focus()\n      .insertContentAt(range, [\n        {\n          type: 'emoji',\n          attrs: props,\n        },\n      ])\n      .run();\n\n    window.getSelection()?.collapseToEnd();\n  },\n\n  render: createSuggestionRenderer(EmojiSuggestion, 'emoji'),\n};\n","import { InputRule, mergeAttributes, Node, nodePasteRule } from '@tiptap/core';\nimport { PluginKey } from '@tiptap/pm/state';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport Suggestion from '@tiptap/suggestion';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport EmojiComponent from './EmojiComponent.vue';\nimport { codeToEmojiData, emojiShortCodeRegex, emojiRegex, stringToUnicode } from '@/common/emoji';\nimport suggestionOptions from './suggestion';\n\nconst inputShortCodeRegex = /(:\\w+:)$/;\nconst inputUnicodeRegex = new RegExp(emojiPattern + '$');\n\nconst inputRuleMatch = (match) => {\n  if (match && codeToEmojiData(match[0])) {\n    const text = match[2] || match[0];\n    // needs to be a dict returned\n    // ref type InputRuleMatch:\n    // https://github.com/ueberdosis/tiptap/blob/main/packages/core/src/InputRule.ts#L16\n    return { text };\n  }\n};\n\nconst shortCodePasteMatch = (text) => {\n  const matches = [...text.matchAll(emojiShortCodeRegex)];\n\n  return matches\n    .filter(match => codeToEmojiData(match[0]))\n    .map(match => ({\n      index: match.index,\n      text: match[0],\n      match,\n    }));\n};\n\nexport const Emoji = Node.create({\n  name: 'emoji',\n  addOptions () {\n    return {\n      HTMLAttributes: {},\n    };\n  },\n  group: 'inline',\n  inline: true,\n  selectable: false,\n  atom: true,\n\n  addNodeView () {\n    return VueNodeViewRenderer(EmojiComponent);\n  },\n\n  addAttributes () {\n    return {\n      code: {\n        default: null,\n      },\n    };\n  },\n\n  parseHTML () {\n    return [\n      {\n        tag: 'emoji-component',\n      },\n    ];\n  },\n\n  renderText ({ node }) {\n    // output emoji in text as unicode character rather than shortname for backwards compatibility with\n    // our backend.\n    const unicodeEmoji = stringToUnicode(codeToEmojiData(node.attrs.code).unicode_output);\n    return unicodeEmoji;\n  },\n\n  renderHTML ({ HTMLAttributes }) {\n    return ['emoji-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n  },\n\n  addInputRules () {\n    return [\n      new InputRule({\n        find: (text) => {\n          const match = text.match(inputShortCodeRegex) || text.match(inputUnicodeRegex);\n          if (!match) return;\n\n          return inputRuleMatch(match);\n        },\n        handler: ({ state, range, match}) => {\n          const { tr } = state;\n          const start = range.from;\n          const end = range.to;\n          tr.replaceWith(start, end, this.type.create({ code: match[0] }));\n        },\n      }),\n    ];\n  },\n\n  addPasteRules () {\n    return [\n      nodePasteRule({\n        find: shortCodePasteMatch,\n        type: this.type,\n        getAttributes (attrs) {\n          return {\n            code: attrs[0],\n          };\n        },\n      }),\n      nodePasteRule({\n        find: emojiRegex,\n        type: this.type,\n        getAttributes (attrs) {\n          return {\n            code: attrs[0],\n          };\n        },\n      }),\n    ];\n  },\n\n  addProseMirrorPlugins () {\n    return [\n      Suggestion({\n        char: ':',\n        pluginKey: new PluginKey('emoji'),\n        editor: this.editor,\n        ...this.options.suggestion,\n        ...suggestionOptions,\n      }),\n    ];\n  },\n\n  addKeyboardShortcuts () {\n    return {\n      Backspace: () => this.editor.commands.command(({ tr, state }) => {\n        let isEmoji = false;\n        const { selection } = state;\n        const { empty, anchor } = selection;\n        if (!empty) { return false; }\n        state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {\n          if (node.type.name === this.name) {\n            isEmoji = true;\n            tr.insertText('', pos, pos + node.nodeSize);\n            return false;\n          }\n        });\n        return isEmoji;\n      }),\n    };\n  },\n});\n","import { Emoji } from './emoji';\n\nexport * from './emoji';\n\nexport default Emoji;\n","import { getMarksBetween } from '@tiptap/core';\nimport {\n  getPhoneNumberRegex,\n  linkRegex,\n} from '@/common/utils';\n\n/**\n * Get matches in a string and return the ones that pass the optional extra\n * validation or if no validator is provided return all matches.\n */\nexport function getRegexMatches (text, regex, validator = () => true) {\n  const matches = [];\n\n  // Reset the lastIndex since the last time this was run.\n  regex.lastIndex = 0;\n\n  let match;\n  while ((match = regex.exec(text))) {\n    if (validator(text, match)) {\n      matches.push(match);\n    }\n  }\n\n  return matches;\n}\n\n/**\n * Validate the prefix of a match in a string not to contain certain characters.\n */\nexport function hasValidPrefix (text, match) {\n  // The string match can't start with # or @ or have either preceding the match\n  // as they're reserved for mentions and hashtags.\n  return !['#', '@'].includes(text.charAt(match.index)) &&\n    !['#', '@'].includes(text.charAt(match.index - 1));\n}\n\n/**\n * Trim punctuation characters at the a of the string, e.g. \"dialpad.com!\" =>\n * \"dialpad.com\"\n */\nexport function trimEndPunctiation (string) {\n  const endPunctuationRegex = new RegExp(\n    '(?:' +\n    [\n      '[!?.,:;\\'\"]',\n      '(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$',\n    ].join('|'),\n    'g',\n  );\n  return string.replace(endPunctuationRegex, '');\n}\n\n/**\n * Find the word from a string at a given index. For example for \"example here\"\n * - indices 0-7  => \"example\"\n * - indices 8-12 => \"here\".\n * Modified from https://stackoverflow.com/a/5174867\n */\nexport function getWordAt (text, index) {\n  // Position of the first non-whitespace character following a possible\n  // whitespace when looking from the index to the left.\n  const left = text.slice(0, index + 1).search(/\\S+\\s*$/);\n\n  // Position of the first whitespace when looking from the index to the right.\n  const right = text.slice(index).search(/\\s/);\n\n  // If the word is at the end of the string, right is -1.\n  if (right < 0) {\n    const word = text.slice(left);\n    return {\n      text: word,\n      from: left,\n      to: left + word.length,\n    };\n  }\n\n  return {\n    text: text.slice(left, right + index),\n    from: left,\n    to: right + index,\n  };\n}\n\n/**\n * Helper to check if a word at a given index matches a regex and if true, finds\n * the previous or next word until the regex doesn't match anymore. Useful to\n * find for example the entire phone number when it is separated by whitespace.\n */\nexport function getWordAtUntil (text, index, direction, regex) {\n  const word = getWordAt(text, index);\n\n  // Reset the lastIndex since the last time this was run.\n  regex.lastIndex = 0;\n\n  // If the word doesn't match the regex we can just return it.\n  if (!regex.test(word.text)) {\n    return word;\n  }\n\n  // Depending on the direction take one step to the left or right to find the\n  // preceding or following word.\n  const newIndex = direction === 'left' ? word.from - 1 : word.to + 1;\n\n  // Prevent an infinite loop for the base cases.\n  if (newIndex <= 0 || newIndex >= text.length || newIndex === index) {\n    return word;\n  }\n\n  // Run the preceding/following word through the validator until we meet the\n  // string boundaries or find a word that doesn't match the regex.\n  return getWordAtUntil(text, newIndex, direction, regex);\n}\n\n/**\n * Remove marks from a range.\n */\nexport function removeMarks (range, doc, tr, type) {\n  const from = Math.max(range.from - 1, 0);\n  const to = Math.min(range.to + 1, doc.content.size);\n  const marksInRange = getMarksBetween(from, to, doc);\n\n  for (const mark of marksInRange) {\n    if (mark.mark.type !== type) {\n      continue;\n    }\n\n    tr.removeMark(mark.from, mark.to, type);\n  }\n}\n\n// Regex to match partial phone numbers.\nconst partialPhoneNumberRegex = getPhoneNumberRegex(1, 15);\n\n/**\n * Find matches from text and add marks on them.\n */\nexport function addMarks (text, pos, from, to, tr, type) {\n  if (!text) {\n    return;\n  }\n\n  // from = start index for the change\n  // pos  = start index of the node\n  // 1    = range uses 1-based indexing, deduct 1\n  let rangeFrom = from - pos - 1;\n\n  // If the change spans multiple nodes/paragraphs the start index can become\n  // negative, so default to 0.\n  rangeFrom = rangeFrom < 0 ? 0 : rangeFrom;\n\n  // to  = end index of the change\n  // pos = start index of the node\n  const rangeTo = to - pos;\n\n  // Get the first word in the range.\n  const firstWordInRange = getWordAtUntil(\n    text,\n    rangeFrom,\n    'left',\n    partialPhoneNumberRegex,\n  );\n\n  // Get the last word in the range.\n  const lastWordInRange = getWordAtUntil(\n    text,\n    rangeTo,\n    'right',\n    partialPhoneNumberRegex,\n  );\n\n  // Create a substring that consists of whole words only.\n  const wordsInRange = text.slice(firstWordInRange.from, lastWordInRange.to);\n\n  // Find all valid matches within the substring.\n  const matches = getRegexMatches(wordsInRange, linkRegex, hasValidPrefix);\n\n  // Loop through the matches and add marks.\n  matches.forEach(match => {\n    // Trim any punctuation characters at the end of the match.\n    const word = trimEndPunctiation(match[0]);\n\n    // pos                   = start index of the node\n    // firstWordInRange.from = start index of the first word in range\n    // match.index           = index of the regex match\n    // 1                     = addMark() uses 1-based indexing, add 1\n    const from = pos + firstWordInRange.from + match.index + 1;\n\n    // Sum up the from index and the match length to get the end index.\n    const to = from + word.length;\n\n    tr.addMark(from, to, type.create());\n  });\n}\n","import {\n  combineTransactionSteps,\n  findChildrenInRange,\n  getChangedRanges,\n} from '@tiptap/core';\nimport {\n  Plugin,\n  PluginKey,\n} from '@tiptap/pm/state';\nimport {\n  addMarks,\n  removeMarks,\n} from './utils';\n\n/**\n * Plugin to automatically add links into content.\n */\nexport function autolink (options) {\n  // Flag to see if we've loaded this plugin once already. This is used to run\n  // the initial content through the plugin if the editor was mounted with some.\n  let hasInitialized = false;\n\n  return new Plugin({\n    key: new PluginKey('autolink'),\n\n    appendTransaction: (transactions, oldState, newState) => {\n      const contentChanged = transactions.some(tr => tr.docChanged) &&\n        !oldState.doc.eq(newState.doc);\n\n      // Every interaction with the editor is a transaction, but we only care\n      // about the ones with content changes.\n      if (hasInitialized && !contentChanged) {\n        return;\n      }\n\n      // The original transaction that we're manipulating.\n      const { tr } = newState;\n\n      // Text content after the original transaction.\n      const { textContent } = newState.doc;\n\n      // When the editor is initialized we want to add links to it.\n      if (!hasInitialized) {\n        addMarks(textContent, 0, 0, textContent.length, tr, options.type);\n      }\n\n      hasInitialized = true;\n\n      // The transformed state of the document.\n      const transform = combineTransactionSteps(\n        oldState.doc,\n        [...transactions],\n      );\n\n      // All the changes within the document.\n      const changes = getChangedRanges(transform);\n\n      changes.forEach(({ oldRange, newRange }) => {\n        // Remove all link marks in the changed range since we'll add them\n        // right back if they're still valid links.\n        removeMarks(newRange, newState.doc, tr, options.type);\n\n        // Find all paragraphs (Textblocks) that were affected since we want to\n        // handle matches in each paragraph separately.\n        const paragraphs = findChildrenInRange(\n          newState.doc,\n          newRange,\n          node => node.isTextblock,\n        );\n\n        paragraphs.forEach(({ node, pos }) => {\n          addMarks(\n            node.textContent,\n            pos,\n            oldRange.from,\n            newRange.to,\n            tr,\n            options.type,\n          );\n        });\n      });\n\n      // Return the modified transaction or the changes above wont have effect.\n      return tr;\n    },\n  });\n}\n","/**\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n\nimport {\n  mergeAttributes,\n  Mark,\n} from '@tiptap/core';\nimport { autolink } from './autolink';\n\nconst defaultAttributes = {\n  class: 'd-link d-c-text d-d-inline-block d-wb-break-all',\n  rel: 'noopener noreferrer nofollow',\n};\n\n// This is the actual extension code, which is mostly showing that all the\n// functionality comes from the ProseMirror plugin.\nexport const CustomLink = Mark.create({\n  name: 'CustomLink',\n\n  renderHTML ({ HTMLAttributes }) {\n    return [\n      'a',\n      mergeAttributes(\n        this.options.HTMLAttributes,\n        HTMLAttributes,\n        defaultAttributes,\n      ),\n    ];\n  },\n\n  renderText ({ node }) {\n    return node.attrs.text;\n  },\n\n  addProseMirrorPlugins () {\n    return [\n      autolink({ type: this.type }),\n    ];\n  },\n});\n","import { CustomLink } from './custom_link';\n\nexport default CustomLink;\n","import Image from '@tiptap/extension-image';\n\nexport const ConfigurableImage = Image.extend({\n  name: 'ConfigurableImage',\n\n  addAttributes () {\n    return {\n      src: {\n        default: '',\n      },\n      alt: {\n        default: undefined,\n      },\n      title: {\n        default: undefined,\n      },\n      width: {\n        default: undefined,\n      },\n      height: {\n        default: undefined,\n      },\n      style: {\n        default: undefined,\n      },\n    };\n  },\n}).configure({ inline: true, allowBase64: true });\n","import { ConfigurableImage } from './image';\n\nexport default ConfigurableImage;\n","import { mergeAttributes } from '@tiptap/core';\nimport Paragraph from '@tiptap/extension-paragraph';\n\nconst BLOCK_TAGS = new Set([\n  'address', 'article', 'aside', 'blockquote', 'dd', 'details',\n  'dialog', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure',\n  'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header',\n  'hgroup', 'hr', 'li', 'main', 'nav', 'ol', 'p', 'pre', 'section',\n  'table', 'ul',\n]);\n\n/** Extension for div tag support\n * Replaces the default p tags when typing text to div tags\n * Extends the following extension: https://github.com/ueberdosis/tiptap/blob/main/packages/extension-paragraph/src/paragraph.ts\n */\nexport const DivParagraph = Paragraph.extend({\n  parseHTML () {\n    return [{\n      tag: 'div',\n      getAttrs: (node) => {\n        // Skip divs that contain block-level children. Without this check ProseMirror would\n        // match the container as a paragraph and then immediately close it\n        // (creating an empty <div></div>) before lifting the block children\n        // out, resulting in unwanted blank lines.\n        for (const child of node.children) {\n          if (BLOCK_TAGS.has(child.tagName.toLowerCase())) {\n            return false;\n          }\n        }\n        return null;\n      },\n    }];\n  },\n\n  renderHTML ({ HTMLAttributes }) {\n    return ['div', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n  },\n\n});\n","import { DivParagraph } from './div';\n\nexport default DivParagraph;\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <node-view-wrapper\n    class=\"d-d-inline-block\"\n  >\n    <dt-link\n      kind=\"mention\"\n      @click.prevent=\"handleClick\"\n      @mouseenter=\"handleMouseEnter\"\n      @mouseleave=\"handleMouseLeave\"\n      @focusin=\"handleMouseEnter\"\n      @focusout=\"handleMouseLeave\"\n    >\n      {{ text }}\n    </dt-link>\n  </node-view-wrapper>\n</template>\n\n<script>\nimport { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3';\n\nimport { DtLink } from '@/components/link';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'MentionComponent',\n  components: {\n    NodeViewWrapper,\n    DtLink,\n  },\n\n  props: nodeViewProps,\n\n  computed: {\n    text () {\n      return '@' + this.$props.node.attrs.name;\n    },\n  },\n\n  methods: {\n    getMentionData () {\n      return {\n        name: this.$props.node.attrs.name,\n        id: this.$props.node.attrs.id,\n        avatarSrc: this.$props.node.attrs.avatarSrc,\n        contactKey: this.$props.node.attrs.contactKey,\n      };\n    },\n\n    handleClick () {\n      this.$props.editor.emit('mention-click', this.getMentionData());\n    },\n\n    handleMouseEnter (event) {\n      this.$props.editor.emit('mention-hover', { ...this.getMentionData(), event });\n    },\n\n    handleMouseLeave (event) {\n      this.$props.editor.emit('mention-leave', { ...this.getMentionData(), event });\n    },\n  },\n};\n</script>\n","import Mention from '@tiptap/extension-mention';\nimport { mergeAttributes } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport { PluginKey } from '@tiptap/pm/state';\n\n// Mention component\nimport MentionComponent from './MentionComponent.vue';\n\nexport const MentionPlugin = Mention.extend({\n\n  addNodeView () {\n    return VueNodeViewRenderer(MentionComponent);\n  },\n\n  parseHTML () {\n    return [\n      {\n        tag: 'mention-component',\n      },\n    ];\n  },\n\n  addAttributes () {\n    return {\n      name: {\n        default: '',\n      },\n      avatarSrc: {\n        default: '',\n      },\n      id: {\n        default: '',\n      },\n      contactKey: {\n        default: '',\n      },\n    };\n  },\n\n  renderText ({ node }) {\n    return `@${node.attrs.id}`;\n  },\n\n  renderHTML ({ HTMLAttributes }) {\n    return ['mention-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n  },\n\n}).configure({\n  suggestion: {\n    char: '@',\n    pluginKey: new PluginKey('mentionSuggestion'),\n  },\n});\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <node-view-wrapper\n    class=\"d-d-inline-block\"\n  >\n    <dt-link\n      kind=\"mention\"\n      @click.prevent=\"handleClick\"\n    >\n      <dt-stack\n        direction=\"row\"\n        gap=\"0\"\n      >\n        <dt-icon-lock\n          v-if=\"$props.node.attrs.locked\"\n          size=\"200\"\n        />\n        <span>{{ text }}</span>\n      </dt-stack>\n    </dt-link>\n  </node-view-wrapper>\n</template>\n\n<script>\nimport { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3';\nimport { DtIconLock } from '@dialpad/dialtone-icons/vue3';\nimport { DtStack } from '@/components/stack';\n\nimport { DtLink } from '@/components/link';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'ChannelComponent',\n  components: {\n    NodeViewWrapper,\n    DtLink,\n    DtIconLock,\n    DtStack,\n  },\n\n  props: nodeViewProps,\n\n  computed: {\n    text () {\n      if (this.$props.node.attrs.locked) {\n        return this.$props.node.attrs.name;\n      }\n      return '#' + this.$props.node.attrs.name;\n    },\n  },\n\n  methods: {\n    handleClick () {\n      const channelData = {\n        name: this.$props.node.attrs.name,\n        id: this.$props.node.attrs.id,\n        locked: this.$props.node.attrs.locked,\n        channelKey: this.$props.node.attrs.channelKey,\n      };\n      this.$props.editor.emit('channel-click', channelData);\n    },\n  },\n};\n</script>\n","import Mention from '@tiptap/extension-mention';\nimport { mergeAttributes } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport { PluginKey } from '@tiptap/pm/state';\n\n// Channel Mention component\nimport ChannelComponent from './ChannelComponent.vue';\n\nexport const ChannelPlugin = Mention.extend({\n  name: 'channel',\n\n  addNodeView () {\n    return VueNodeViewRenderer(ChannelComponent);\n  },\n\n  parseHTML () {\n    return [\n      {\n        tag: 'channel-component',\n      },\n    ];\n  },\n\n  addAttributes () {\n    return {\n      name: {\n        default: '',\n      },\n      id: {\n        default: '',\n      },\n      locked: {\n        default: false,\n      },\n      channelKey: {\n        default: '',\n      },\n    };\n  },\n\n  renderText ({ node }) {\n    return `#${node.attrs.id}`;\n  },\n\n  renderHTML ({ HTMLAttributes }) {\n    return ['channel-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n  },\n\n}).configure({\n  suggestion: {\n    char: '#',\n    pluginKey: new PluginKey('channelSuggestion'),\n  },\n});\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <node-view-wrapper\n    class=\"d-d-inline-block\"\n  >\n    {{ text }}\n  </node-view-wrapper>\n</template>\n\n<script>\nimport { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'SlashCommandsComponent',\n  components: {\n    NodeViewWrapper,\n  },\n\n  props: {\n    ...nodeViewProps,\n  },\n\n  emits: ['selected-command'],\n\n  computed: {\n    text () {\n      return '/' + this.$props.node.attrs.command;\n    },\n  },\n\n  created () {\n    const command = this.$props.node.attrs.command;\n\n    // First emit the event using the component's own emit\n    this.$emit('selected-command', command);\n\n    // Access the callback from the editor's storage\n    const onSelectedCommand = this.editor?.storage?.['slash-commands']?.onSelectedCommand;\n    if (onSelectedCommand && typeof onSelectedCommand === 'function') {\n      onSelectedCommand(command);\n    }\n  },\n};\n</script>\n","import Mention from '@tiptap/extension-mention';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport { PluginKey } from '@tiptap/pm/state';\n\n// Slash Command Mention component\nimport SlashCommandComponent from './SlashCommandComponent.vue';\nimport { mergeAttributes, nodeInputRule, nodePasteRule } from '@tiptap/core';\n\nconst slashCommandPasteMatch = (text, slashCommandRegex) => {\n  const matches = [...text.matchAll(slashCommandRegex)];\n\n  return matches\n    .map(match => {\n      let slashCommand = match[2];\n      if (!slashCommand.endsWith(' ')) slashCommand += ' ';\n      return {\n        index: match.index,\n        text: slashCommand,\n        match,\n      };\n    });\n};\n\nexport const SlashCommandPlugin = Mention.extend({\n  name: 'slash-commands',\n  group: 'inline',\n  inline: true,\n\n  addOptions () {\n    return {\n      ...this.parent?.(),\n      onSelectedCommand: null,\n    };\n  },\n\n  addStorage () {\n    return {\n      onSelectedCommand: this.options.onSelectedCommand,\n    };\n  },\n\n  addNodeView () {\n    return VueNodeViewRenderer(SlashCommandComponent);\n  },\n\n  parseHTML () {\n    return [\n      {\n        tag: 'command-component',\n      },\n    ];\n  },\n\n  addAttributes () {\n    return {\n      command: {\n        default: '',\n      },\n      parametersExample: {\n        default: '',\n      },\n      description: {\n        default: '',\n      },\n    };\n  },\n\n  renderText ({ node }) {\n    return `/${node.attrs.command}`;\n  },\n\n  renderHTML ({ HTMLAttributes }) {\n    return ['command-component', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];\n  },\n\n  addInputRules () {\n    const suggestions = this.options.suggestion?.items({ query: '' }).map(suggestion => suggestion.command);\n    const slashCommandRegex = new RegExp(`^((?:\\\\/)(${suggestions.join('|')})) $`);\n    return [\n      nodeInputRule({\n        find: slashCommandRegex,\n        type: this.type,\n        getAttributes (attrs) {\n          return { command: attrs[2] };\n        },\n      }),\n    ];\n  },\n\n  addPasteRules () {\n    const suggestions = this.options.suggestion?.items({ query: '' }).map(suggestion => suggestion.command);\n    const slashCommandRegex = new RegExp(`^((?:\\\\/)(${suggestions.join('|')})) ?$`, 'g');\n    return [\n      nodePasteRule({\n        find: (text) => slashCommandPasteMatch(text, slashCommandRegex),\n        type: this.type,\n        getAttributes (attrs) {\n          return { command: attrs[0].trim() };\n        },\n      }),\n    ];\n  },\n}).configure({\n  suggestion: {\n    char: '/',\n    pluginKey: new PluginKey('slashCommandSuggestion'),\n  },\n});\n","<script>\nimport { DtButton } from '@/components/button';\nimport { DtPopover } from '@/components/popover';\nimport { DtInput } from '@/components/input';\nimport { DtBadge } from '@/components/badge';\nimport { DialtoneLocalization } from '@/localization/index.js';\nimport { nodeViewProps, NodeViewWrapper } from '@tiptap/vue-3';\n\nconst MAX_VARIABLE_ALT_LENGTH = 100;\n\nexport default {\n  name: 'VariableComponent',\n\n  components: {\n    DtBadge,\n    DtButton,\n    DtPopover,\n    DtInput,\n    NodeViewWrapper,\n  },\n\n  props: nodeViewProps,\n\n  data() {\n    return {\n      i18n: new DialtoneLocalization(),\n      MAX_VARIABLE_ALT_LENGTH,\n    };\n  },\n\n  computed: {\n    altText: {\n      get() {\n        return this.node?.attrs?.altText || '';\n      },\n\n      set(value) {\n        this.updateAttributes({ altText: value });\n      },\n    },\n\n    variableId() {\n      return this.node?.attrs?.id;\n    },\n\n    placeholder() {\n      return this.variableData?.placeholder || '';\n    },\n\n    variableItems() {\n      return this.extension?.options?.variableItems || [];\n    },\n\n    variableData() {\n      return this.variableItems.find(item => item.id === this.variableId);\n    },\n\n    enableAltText() {\n      return this.node?.attrs?.enableAltText;\n    },\n\n    badgeLabel() {\n      return `{} ${this.placeholder}`;\n    },\n\n    placeholderText() {\n      return `Replaces ${this.placeholder}`;\n    },\n  },\n};\n</script>\n\n<template>\n  <!-- eslint-disable vue/no-restricted-class -->\n  <node-view-wrapper class=\"d-d-inline-block\">\n    <dt-popover\n      v-if=\"enableAltText\"\n      padding=\"small\"\n      navigation-type=\"arrow-keys\"\n      placement=\"top-start\"\n      :modal=\"false\"\n    >\n      <template #anchor=\"{ attrs }\">\n        <dt-button\n          v-bind=\"attrs\"\n          kind=\"unstyled\"\n        >\n          <dt-badge\n            :text=\"badgeLabel\"\n            contenteditable=\"false\"\n          />\n        </dt-button>\n      </template>\n      <template #content=\"{ close }\">\n        <dt-input\n          v-model=\"altText\"\n          root-class=\"d-p8 d-w332\"\n          :label=\"i18n.$t('DIALTONE_EDITOR_VARIABLE_LABEL')\"\n          :placeholder=\"placeholderText\"\n          :validate=\"{\n            length: {\n              description: i18n.$t('DIALTONE_EDITOR_VARIABLE_VALIDATE_DESCRIPTION'),\n              message: i18n.$t('DIALTONE_EDITOR_VARIABLE_VALIDATE_MESSAGE'),\n              max: MAX_VARIABLE_ALT_LENGTH,\n              warn: MAX_VARIABLE_ALT_LENGTH,\n              limitMaxLength: true,\n            },\n          }\"\n          @keyup.enter=\"close()\"\n        />\n      </template>\n    </dt-popover>\n    <dt-badge\n      v-else\n      :text=\"badgeLabel\"\n      contenteditable=\"false\"\n    />\n  </node-view-wrapper>\n</template>\n","import { mergeAttributes, Node } from '@tiptap/core';\nimport { VueNodeViewRenderer } from '@tiptap/vue-3';\nimport VariableComponent from './VariableComponent.vue';\n\nexport const Variable = Node.create({\n  name: 'variable',\n  group: 'inline',\n  inline: true,\n  selectable: true,\n  atom: true,\n\n  addOptions() {\n    return {\n      HTMLAttributes: {},\n      variableItems: [],\n    };\n  },\n\n  addNodeView() {\n    return VueNodeViewRenderer(VariableComponent);\n  },\n\n  addAttributes() {\n    return {\n      id: {\n        default: null,\n        parseHTML: element => element.getAttribute('data-variable-id'),\n        renderHTML: attributes => {\n          if (!attributes.id) {\n            return {};\n          }\n          return {\n            'data-variable-id': attributes.id,\n          };\n        },\n      },\n      altText: {\n        default: '',\n        parseHTML: element => element.getAttribute('data-alt-text'),\n        renderHTML: attributes => {\n          if (!attributes.altText) {\n            return {};\n          }\n          return {\n            'data-alt-text': attributes.altText,\n          };\n        },\n      },\n      enableAltText: {\n        default: true,\n        parseHTML: element => element.getAttribute('data-enable-alt-text') === 'true',\n        renderHTML: attributes => {\n          return {\n            'data-enable-alt-text': String(attributes.enableAltText),\n          };\n        },\n      },\n    };\n  },\n\n  parseHTML() {\n    return [\n      {\n        tag: 'variable',\n      },\n    ];\n  },\n\n  renderText({ node }) {\n    return node.attrs.altText;\n  },\n\n  renderHTML({ node, HTMLAttributes }) {\n    return [\n      'variable',\n      mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {\n        'data-variable-id': node.attrs.id,\n        'data-alt-text': node.attrs.altText,\n        'data-enable-alt-text': String(node.attrs.enableAltText),\n      }),\n    ];\n  },\n\n  addCommands() {\n    return {\n      insertVariable: (options = {}) => ({ commands }) => {\n        return commands.insertContent({\n          type: this.name,\n          attrs: {\n            id: options.id || null,\n            altText: options.altText || '',\n            enableAltText: options.enableAltText,\n          },\n        });\n      },\n    };\n  },\n});\n","import { Variable } from './variable';\n\nexport default Variable;\n","<template>\n  <dt-stack\n    direction=\"row\"\n    class=\"d-mention-suggestion__container\"\n    gap=\"400\"\n  >\n    <dt-avatar\n      :full-name=\"name\"\n      :image-src=\"avatarSrc\"\n      :image-alt=\"name\"\n      :show-presence=\"showDetails\"\n      :presence=\"presence\"\n      size=\"sm\"\n    />\n    <dt-stack\n      class=\"d-mention-suggestion__details-container\"\n      gap=\"100\"\n    >\n      <!-- eslint-disable-next-line vue/no-restricted-class -->\n      <span class=\"d-mention-suggestion__name\">\n        {{ name }}\n      </span>\n      <dt-stack\n        v-if=\"showDetails\"\n        direction=\"row\"\n        gap=\"300\"\n        class=\"d-label--sm-plain\"\n      >\n        <span\n          v-if=\"presenceText\"\n          class=\"d-mention-suggestion__presence\"\n          :class=\"[presenceFontColorClass]\"\n        >\n          {{ presenceText }}\n        </span>\n        <div\n          v-if=\"status && presenceText\"\n          class=\"d-mention-suggestion__divider\"\n        >\n          •\n        </div>\n        <div\n          v-if=\"status\"\n          class=\"d-mention-suggestion__status\"\n        >\n          {{ status }}\n        </div>\n      </dt-stack>\n    </dt-stack>\n  </dt-stack>\n</template>\n\n<script>\nimport { DtAvatar } from '@/components/avatar';\nimport { DtStack } from '@/components/stack';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'MentionSuggestion',\n  components: {\n    DtAvatar,\n    DtStack,\n  },\n\n  props: {\n    item: {\n      type: Object,\n      required: true,\n    },\n  },\n\n  computed: {\n    name () {\n      return this.item.name;\n    },\n\n    avatarSrc () {\n      return this.item.avatarSrc;\n    },\n\n    presence () {\n      return this.item.presence;\n    },\n\n    status () {\n      return this.item.status;\n    },\n\n    presenceText () {\n      return this.item.presenceText;\n    },\n\n    presenceFontColorClass () {\n      const presenceFontColors = {\n        active: 'd-recipe-contact-row--active',\n        busy: 'd-recipe-contact-row--busy',\n        away: 'd-recipe-contact-row--away',\n        offline: 'd-recipe-contact-row--busy',\n      };\n\n      return presenceFontColors[this.presence];\n    },\n\n    showDetails () {\n      return this.item.showDetails;\n    },\n  },\n};\n</script>\n","import { createSuggestionRenderer } from '../utils/suggestion_utils';\nimport MentionSuggestion from './MentionSuggestion.vue';\n\nexport default {\n\n  // This function comes from the user and passed to the editor directly.\n  // This will also activate the mention plugin on the editor\n  // items: ({ query }) => { return [] },\n\n  allowSpaces: true,\n\n  render: createSuggestionRenderer(MentionSuggestion, 'mention'),\n};\n","<template>\n  <dt-stack\n    direction=\"row\"\n    gap=\"400\"\n  >\n    <dt-icon-hash\n      v-if=\"!item.locked\"\n      size=\"300\"\n    />\n    <dt-icon-lock\n      v-else\n      size=\"300\"\n    />\n    <span>{{ name }}</span>\n  </dt-stack>\n</template>\n\n<script>\nimport { DtStack } from '@/components/stack';\nimport DtIconHash from '@dialpad/dialtone-icons/vue3/hash';\nimport DtIconLock from '@dialpad/dialtone-icons/vue3/lock';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'ChannelSuggestion',\n  components: {\n    DtStack,\n    DtIconHash,\n    DtIconLock,\n  },\n\n  props: {\n    item: {\n      type: Object,\n      required: true,\n    },\n  },\n\n  computed: {\n    name () {\n      return this.item.name;\n    },\n  },\n};\n</script>\n","import { createSuggestionRenderer } from '../utils/suggestion_utils';\nimport ChannelSuggestion from './ChannelSuggestion.vue';\n\nexport default {\n\n  // This function comes from the user and passed to the editor directly.\n  // This will also activate the mention plugin on the editor\n  // items: ({ query }) => { return [] },\n\n  allowSpaces: true,\n\n  render: createSuggestionRenderer(ChannelSuggestion, 'channel'),\n};\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <div>\n    <div class=\"d-body--md-compact\">\n      <span>/{{ command }}</span><span v-if=\"parametersExample\"> {{ parametersExample }}</span>\n    </div>\n    <div class=\"d-body--sm d-fc-tertiary\">\n      {{ description }}\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'SlashCommandSuggestion',\n\n  props: {\n    item: {\n      type: Object,\n      required: true,\n    },\n  },\n\n  computed: {\n    command () {\n      return this.item.command;\n    },\n\n    description () {\n      return this.item.description;\n    },\n\n    parametersExample () {\n      return this.item.parametersExample;\n    },\n  },\n};\n</script>\n","import { createSuggestionRenderer } from '../utils/suggestion_utils';\nimport SlashCommandSuggestion from './SlashCommandSuggestion.vue';\n\nexport default {\n\n  // This function comes from the user and passed to the editor directly.\n  // This will also activate the mention plugin on the editor\n  // items: ({ query }) => { return [] },\n\n  allowSpaces: true,\n  startOfLine: true,\n\n  render: createSuggestionRenderer(SlashCommandSuggestion, 'slash-command'),\n};\n","<!-- eslint-disable vue/no-static-inline-styles -->\n<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- eslint-disable vue/no-restricted-class -->\n<template>\n  <div>\n    <!-- why the hell is this visibility: hidden by default??? -->\n    <bubble-menu\n      v-if=\"editor && link\"\n      :editor=\"editor\"\n      :should-show=\"bubbleMenuShouldShow\"\n      :options=\"floatingOptions\"\n      :append-to=\"appendTo\"\n      style=\"visibility: visible;\"\n    >\n      <div class=\"d-popover__dialog\">\n        <dt-stack\n          direction=\"row\"\n          class=\"d-rich-text-editor-bubble-menu__button-stack\"\n          gap=\"0\"\n        >\n          <dt-button\n            kind=\"muted\"\n            importance=\"clear\"\n            @click=\"editLink\"\n          >\n            {{ i18n.$t('DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL') }}\n          </dt-button>\n          <dt-button\n            kind=\"muted\"\n            importance=\"clear\"\n            @click=\"openLink\"\n          >\n            {{ i18n.$t('DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL') }}\n          </dt-button>\n          <dt-button\n            kind=\"danger\"\n            importance=\"clear\"\n            @click=\"removeLink\"\n          >\n            {{ i18n.$t('DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL') }}\n          </dt-button>\n        </dt-stack>\n      </div>\n    </bubble-menu>\n    <editor-content\n      ref=\"editor\"\n      :editor=\"editor\"\n      class=\"d-rich-text-editor\"\n      data-qa=\"dt-rich-text-editor\"\n      v-bind=\"attrs\"\n    />\n  </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent } from '@tiptap/vue-3';\nimport { BubbleMenu } from '@tiptap/vue-3/menus';\nimport { Extension } from '@tiptap/core';\nimport { DtButton } from '../button';\nimport { DtStack } from '../stack';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Code from '@tiptap/extension-code';\nimport Document from '@tiptap/extension-document';\nimport { Placeholder, UndoRedo, Gapcursor } from '@tiptap/extensions';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Bold from '@tiptap/extension-bold';\nimport { BulletList, OrderedList, ListItem } from '@tiptap/extension-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport { CustomTable, CustomTableRow, CustomTableCell, CustomTableHeader } from './extensions/table/table';\nimport { CustomTextStyle } from './extensions/text_style/text_style';\nimport { TextStyleKit } from '@tiptap/extension-text-style';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport DivParagraph from './extensions/div';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport Variable from './extensions/variable';\nimport {\n  RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n  RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n  RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { renderEditorToMarkdown } from './markdownRenderer';\nimport deepEqual from 'deep-equal';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n  compatConfig: { MODE: 3 },\n  name: 'DtRichTextEditor',\n\n  components: {\n    EditorContent,\n    BubbleMenu,\n    DtButton,\n    DtStack,\n  },\n\n  props: {\n    /**\n     * Value of the input. The object format should match TipTap's JSON\n     * document structure: https://tiptap.dev/guide/output#option-1-json\n     */\n    modelValue: {\n      type: [Object, String],\n      default: '',\n    },\n\n    /**\n     * Whether the input is editable\n     */\n    editable: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Prevents the user from typing any further. Deleting text will still work.\n     */\n    preventTyping: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * When this option is false the editor will only ever paste plain text, no rich text formatting will be applied,\n     * and any HTML will be rendered as text.\n     */\n    pasteRichText: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n     * line breaks can still be entered by pressing shift+enter.\n     */\n    allowLineBreaks: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Descriptive label for the input element\n     */\n    inputAriaLabel: {\n      type: String,\n      required: true,\n    },\n\n    /**\n     * Additional class name for the input element. Only accepts a String value\n     * because this is passed to the editor via options. For multiple classes,\n     * join them into one string, e.g. \"d-p8 d-hmx96\"\n     */\n    inputClass: {\n      type: String,\n      default: '',\n    },\n\n    /**\n     * Whether the input should receive focus after the component has been\n     * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n     * - `start`  Sets the focus to the beginning of the input\n     * - `end`    Sets the focus to the end of the input\n     * - `all`    Selects the whole contents of the input\n     * - `Number` Sets the focus to a specific position in the input\n     * - `true`   Defaults to `start`\n     * - `false`  Disables autofocus\n     * @values true, false, start, end, all, number\n     */\n    autoFocus: {\n      type: [Boolean, String, Number],\n      default: false,\n      validator (autoFocus) {\n        if (typeof autoFocus === 'string') {\n          return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n        }\n        return true;\n      },\n    },\n\n    /**\n     * The output format that the editor uses when emitting the \"@input\" event.\n     * One of `text`, `json`, `html`, `markdown`. See https://tiptap.dev/guide/output for\n     * examples.\n     * @values text, json, html, markdown\n     */\n    outputFormat: {\n      type: String,\n      default: 'html',\n      validator (outputFormat) {\n        return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n      },\n    },\n\n    /**\n     * Placeholder text\n     */\n    placeholder: {\n      type: String,\n      default: '',\n    },\n\n    /**\n     * Enables the TipTap Link extension and optionally passes configurations to it\n     *\n     * It is not recommended to use this and the custom link extension at the same time.\n     */\n    link: {\n      type: [Boolean, Object],\n      default: false,\n    },\n\n    /**\n     * Enables the Custom Link extension and optionally passes configurations to it\n     *\n     * It is not recommended to use this and the built in TipTap link extension at the same time.\n     *\n     * The custom link does some additional things on top of the built in TipTap link\n     * extension such as styling phone numbers and IP adresses as links, and allows you\n     * to linkify text without having to type a space after the link. Currently it is missing some\n     * functionality such as editing links and will likely require more work to be fully usable,\n     * so it is recommended to use the built in TipTap link for now.\n     */\n    customLink: {\n      type: [Boolean, Object],\n      default: false,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the contacts for suggestion.\n     * items({ query }) => { return [ContactObject]; }\n     * ContactObject format:\n     * { name: string, avatarSrc: string, id: string }\n     *\n     * When null, it does not add the plugin.\n     */\n    mentionSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the channels for suggestion.\n     * items({ query }) => { return [ChannelObject]; }\n     * ChannelObject format:\n     * { name: string, id: string, locked: boolean, channelKey?: string }\n     *\n     * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n     */\n    channelSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * suggestion object containing the items query function.\n     * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n     *\n     * The only required key is the items function which is used to query the slash commands for suggestion.\n     * items({ query }) => { return [SlashCommandObject]; }\n     * SlashCommandObject format:\n     * { command: string, description: string, parametersExample?: string }\n     * The \"parametersExample\" parameter is optional, and describes an example\n     * of the parameters that command can take.\n     *\n     * When null, it does not add the plugin.\n     * Note that slash commands only work when they are the first word in the input.\n     */\n    slashCommandSuggestion: {\n      type: Object,\n      default: null,\n    },\n\n    /**\n     * Whether the input allows for block quote.\n     */\n    allowBlockquote: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for bold to be introduced in the text.\n     */\n    allowBold: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for bullet list to be introduced in the text.\n     */\n    allowBulletList: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for italic to be introduced in the text.\n     */\n    allowItalic: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for strike to be introduced in the text.\n     */\n    allowStrike: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows for underline to be introduced in the text.\n     */\n    allowUnderline: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows inline code (wrapped in backticks).\n     */\n    allowCode: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows codeblock to be introduced in the text.\n     */\n    allowCodeblock: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows inline images to be rendered.\n     */\n    allowInlineImages: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows color to be introduced in the text.\n     */\n    allowFontColor: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows background color to be introduced in the text.\n     */\n    allowBackgroundColor: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows font size to be introduced in the text.\n     */\n    allowFontSize: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows different font-families to be introduced in the text.\n     */\n    allowFontFamily: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows line height to be introduced in the text.\n     */\n    allowLineHeight: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Whether the input allows variables to be introduced in the text.\n     */\n    allowVariable: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Array of available variable items that can be inserted.\n     */\n    variableItems: {\n      type: Array,\n      default: () => [],\n    },\n\n    /**\n     * Additional TipTap extensions to be added to the editor.\n     */\n    additionalExtensions: {\n      type: Array,\n      default: () => [],\n    },\n\n    /**\n     * Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.\n     * There are some cases when you may want the link to remain selected but hide the bubble menu such as when You\n     * are showing a custom link editor popup.\n     */\n    hideLinkBubbleMenu: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Controls how whitespace is handled when parsing HTML content.\n     * - 'full': All whitespace is preserved\n     * - true: Whitespace in inline content is preserved, whitespace-only nodes between blocks are removed\n     * - false: Standard HTML whitespace collapsing\n     * @values full, true, false\n     */\n    preserveWhitespace: {\n      type: [Boolean, String],\n      default: 'full',\n    },\n\n    /**\n     * Show text in HTML div tags instead of paragraph tags\n     */\n    useDivTags: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Allow Tables to be used in to the editor\n     */\n    allowTables: {\n      type: Boolean,\n      default: false,\n    },\n\n    /**\n     * Allow text alignment controls (left, center, right, justify) in the editor.\n     */\n    allowTextAlign: {\n      type: Boolean,\n      default: true,\n    },\n\n    /**\n     * Whether the input allows image resize to be introduced in the text.\n     */\n    allowImageResize: {\n      type: Boolean,\n      default: false,\n    },\n  },\n\n  emits: [\n    /**\n     * Editor input event\n     * @event input\n     * @type {String|JSON}\n     */\n    'input',\n\n    /**\n     * Input event always in JSON format.\n     * @event input\n     * @type {JSON}\n     */\n    'json-input',\n\n    /**\n     * Input event always in HTML format.\n     * @event input\n     * @type {HTML}\n     */\n    'html-input',\n\n    /**\n     * Input event always in text format.\n     * @event input\n     * @type {String}\n     */\n    'text-input',\n\n    /**\n     * Input event always in markdown format.\n     * @event input\n     * @type {String}\n     */\n    'markdown-input',\n\n    /**\n     * Event to sync the value with the parent\n     * @event update:value\n     * @type {String|JSON}\n     */\n    'update:modelValue',\n\n    /**\n     * Editor blur event\n     * @event blur\n     * @type {FocusEvent}\n     */\n    'blur',\n\n    /**\n     * Editor focus event\n     * @event focus\n     * @type {FocusEvent}\n     */\n    'focus',\n\n    /**\n     * Enter was pressed. Note that shift enter must be pressed to line break the input.\n     * @event enter\n     * @type {String}\n     */\n    'enter',\n\n    /**\n     * \"Edit link\" button was clicked. Fires an event for the consuming component to handle the editing of the link.\n     * event contains the link object with two properties href and text.\n     * @event edit-link\n     * @type {Object}\n     */\n    'edit-link',\n\n    /**\n     * \"Selected\" event is fired when the user selects text in the editor. returns the currently selected text.\n     * If the selected text is partially a link, the full link text is returned.\n     * @event selected\n     * @type {String}\n     */\n    'selected',\n\n    /**\n     * Event fired when a slash command is selected\n     * @event selected-command\n     * @type {String}\n     */\n    'selected-command',\n\n    /**\n     * Event fired when a mention is clicked\n     * @event mention-click\n     * @type {Object}\n     */\n    'mention-click',\n\n    /**\n     * Event fired when the cursor enters a mention. The payload includes the\n     * mention data (name, id, avatarSrc, contactKey) plus the native MouseEvent\n     * as `event`, which can be used for positioning a hovercard.\n     * @event mention-hover\n     * @type {Object}\n     */\n    'mention-hover',\n\n    /**\n     * Event fired when the cursor leaves a mention. The payload includes the\n     * mention data (name, id, avatarSrc, contactKey) plus the native MouseEvent\n     * as `event`.\n     * @event mention-leave\n     * @type {Object}\n     */\n    'mention-leave',\n\n    /**\n     * Event fired when a channel is clicked\n     * @event channel-click\n     * @type {Object}\n     */\n    'channel-click',\n  ],\n\n  data () {\n    return {\n      editor: null,\n      appendTo: () => returnFirstEl(this.$refs.editor.$el).getRootNode()?.querySelector('body'),\n      floatingOptions: {\n        placement: 'top-start',\n      },\n\n      i18n: new DialtoneLocalization(),\n\n    };\n\n  },\n\n  computed: {\n    attrs () {\n      return {\n        ...this.$attrs,\n        onInput: () => {},\n        onFocus: () => {},\n        onBlur: () => {},\n      };\n    },\n\n    // eslint-disable-next-line complexity\n    extensions () {\n      // These are the default extensions needed just for plain text.\n      const extensions = [Document, Text, UndoRedo, HardBreak];\n      extensions.push(this.useDivTags ? DivParagraph : Paragraph);\n\n      // bold must come before blockquote due to keyboard shortcuts\n      if (this.allowBold) {\n        extensions.push(Bold);\n      }\n      if (this.allowBlockquote) {\n        extensions.push(Blockquote);\n      }\n\n      if (this.allowBulletList) {\n        extensions.push(BulletList);\n        extensions.push(ListItem.extend({\n          renderText ({ node }) {\n            return node.textContent;\n          },\n        }));\n        extensions.push(OrderedList);\n      }\n      if (this.allowItalic) {\n        extensions.push(Italic);\n      }\n      if (this.allowStrike) {\n        extensions.push(Strike);\n      }\n      if (this.allowUnderline) {\n        extensions.push(Underline);\n      }\n\n      // Enable placeholderText\n      if (this.placeholder) {\n        extensions.push(\n          Placeholder.configure({ placeholder: this.placeholder }),\n        );\n      }\n\n      const self = this;\n      const ShiftEnter = Extension.create({\n        addKeyboardShortcuts () {\n          return {\n            'Shift-Enter': ({ editor }) => {\n              if (self.allowLineBreaks) {\n                return false;\n              }\n              editor.commands.first(({ commands }) => [\n                () => commands.newlineInCode(),\n                () => self.allowBulletList && commands.splitListItem('listItem'),\n                () => commands.createParagraphNear(),\n                () => commands.liftEmptyBlock(),\n                () => commands.splitBlock(),\n              ]);\n              return true;\n            },\n            Enter: () => {\n              if (self.allowLineBreaks) {\n                return false;\n              }\n              self.$emit('enter');\n              return true;\n            },\n          };\n        },\n      });\n      extensions.push(ShiftEnter);\n\n      if (this.link) {\n        extensions.push(TipTapLink.extend({\n          inclusive: false,\n          addKeyboardShortcuts () {\n            return {\n              'Mod-k': () => {\n                self.$emit('edit-link');\n                return true;\n              },\n            };\n          },\n        }).configure({\n          HTMLAttributes: {\n            class: 'd-link d-wb-break-all',\n          },\n          openOnClick: false,\n          autolink: true,\n          protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n        }));\n      }\n      if (this.customLink) {\n        extensions.push(this.getExtension(CustomLink, this.customLink));\n      }\n\n      if (this.mentionSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n        extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n      }\n\n      if (this.channelSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n        extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n      }\n\n      if (this.slashCommandSuggestion) {\n        // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n        const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n        extensions.push(SlashCommandPlugin.configure({\n          suggestion: suggestionObject,\n          onSelectedCommand: (command) => {\n            this.$emit('selected-command', command);\n          },\n        }));\n      }\n\n      if (this.allowVariable) {\n        extensions.push(Variable.configure({\n          variableItems: this.variableItems,\n        }));\n      }\n\n      // Emoji has some interactions with Enter key\n      // hence this should be done last otherwise the enter wont add a emoji.\n      extensions.push(Emoji);\n\n      if (this.allowTextAlign) {\n        extensions.push(TextAlign.configure({\n          types: ['paragraph'],\n        }));\n      }\n\n      if (this.allowCode) {\n        extensions.push(Code);\n      }\n\n      if (this.allowCodeblock) {\n        extensions.push(CodeBlock.extend({\n          renderText ({ node, pos, range }) {\n            // Tiptap 3.x passes range = { from, to } (the overall selection range).\n            // Full node in range: wrap in fences (getText(), full doc selection).\n            // Partial selection: return only the overlapping text.\n            const from = range?.from ?? 0;\n            const to = range?.to ?? (pos + node.nodeSize);\n            if (from <= pos && to >= pos + node.nodeSize) {\n              return `\\`\\`\\`\\n${node.textContent}\\n\\`\\`\\``;\n            }\n            const textStart = Math.max(0, from - pos - 1);\n            const textEnd = Math.min(node.textContent.length, to - pos - 1);\n            return node.textContent.slice(textStart, textEnd);\n          },\n          addCommands () {\n            return {\n              ...this.parent?.(),\n              toggleCodeBlock: (attributes = {}) => ({ state, chain, commands }) => {\n                const codeBlockType = state.schema.nodes[this.name];\n                const { $from } = state.selection;\n\n                if ($from.parent.type === codeBlockType) {\n                  const paragraphType = state.schema.nodes.paragraph;\n                  const lines = $from.parent.textContent.split('\\n');\n                  const codeBlockPos = $from.before();\n                  const codeBlockNode = $from.parent;\n                  return chain()\n                    .command(({ tr }) => {\n                      const paragraphs = lines.map(line =>\n                        paragraphType.create({}, line ? [state.schema.text(line)] : []),\n                      );\n                      tr.replaceWith(codeBlockPos, codeBlockPos + codeBlockNode.nodeSize, paragraphs);\n                      return true;\n                    })\n                    .run();\n                }\n\n                const { from, to } = state.selection;\n                const blocks = [];\n                state.doc.nodesBetween(from, to, (node, pos) => {\n                  if (node.isTextblock) {\n                    blocks.push({ node, pos });\n                    return false;\n                  }\n                });\n\n                if (blocks.length <= 1) {\n                  return commands.setNode(this.name, attributes);\n                }\n\n                // Multiple paragraphs selected: merge into a single code block\n                const combinedText = blocks.map(({ node }) => node.textContent).join('\\n');\n                const firstPos = blocks[0].pos;\n                const lastBlock = blocks[blocks.length - 1];\n                const lastPos = lastBlock.pos + lastBlock.node.nodeSize;\n\n                return chain()\n                  .command(({ tr }) => {\n                    const content = combinedText.length ? [state.schema.text(combinedText)] : [];\n                    tr.replaceWith(firstPos, lastPos, codeBlockType.create(attributes, content));\n                    return true;\n                  })\n                  .run();\n              },\n            };\n          },\n        }).configure({\n          HTMLAttributes: {\n            class: 'd-rich-text-editor__code-block',\n          },\n        }));\n      }\n\n      if (this.allowInlineImages) {\n        extensions.push(ConfigurableImage.configure({\n          resize: {\n            enabled: this.allowImageResize,\n            alwaysPreserveAspectRatio: true,\n          },\n        }));\n      }\n\n      if (this.allowFontFamily ||\n        this.allowFontColor ||\n        this.allowFontSize ||\n        this.allowBackgroundColor ||\n        this.allowLineHeight) {\n        extensions.push(TextStyleKit.configure({\n          color: this.allowFontColor,\n          backgroundColor: this.allowBackgroundColor,\n          fontFamily: this.allowFontFamily,\n          fontSize: this.allowFontSize,\n          lineHeight: this.allowLineHeight,\n        }));\n        extensions.push(CustomTextStyle);\n      }\n\n      if (this.additionalExtensions.length) {\n        extensions.push(...this.additionalExtensions);\n      }\n\n      if (this.allowTables) {\n        extensions.push(CustomTable.configure({ resizable: true }),\n          CustomTableRow, CustomTableHeader, CustomTableCell, Gapcursor);\n      }\n      return extensions;\n    },\n\n    inputAttrs () {\n      const attrs = {\n        'aria-label': this.inputAriaLabel,\n        'aria-multiline': true,\n        role: 'textbox',\n      };\n      if (!this.editable) {\n        attrs['aria-readonly'] = true;\n      }\n      return attrs;\n    },\n  },\n\n  /**\n   * Because the Editor instance is initialized when mounted it does not get\n   * updated props automatically, so the ones that can change after mount have\n   * to be hooked up to the Editor's own API.\n   */\n  watch: {\n    editable (isEditable) {\n      this.editor.setEditable(isEditable);\n      this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n    },\n\n    inputClass (newClass) {\n      this.updateEditorAttributes({ class: newClass });\n    },\n\n    inputAriaLabel (newLabel) {\n      this.updateEditorAttributes({ 'aria-label': newLabel });\n    },\n\n    extensions () {\n      // Extensions can't be registered on the fly, so just recreate the editor.\n      // https://github.com/ueberdosis/tiptap/issues/1044\n      this.destroyEditor();\n      this.createEditor();\n    },\n\n    modelValue (newValue) {\n      this.processValue(newValue);\n    },\n  },\n\n  created () {\n    this.createEditor();\n  },\n\n  beforeUnmount () {\n    this.destroyEditor();\n  },\n\n  mounted () {\n    warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n    this.processValue(this.modelValue, false);\n  },\n\n  methods: {\n\n    createEditor () {\n      // For all available options, see https://tiptap.dev/api/editor#settings\n      this.editor = new Editor({\n        autofocus: this.autoFocus,\n        content: this.modelValue,\n        editable: this.editable,\n        extensions: this.extensions,\n        shouldRerenderOnTransaction: false,\n        parseOptions: {\n          preserveWhitespace: this.preserveWhitespace,\n        },\n\n        editorProps: {\n          attributes: {\n            ...this.inputAttrs,\n            class: this.inputClass,\n          },\n\n          handleKeyDown: (view, event) => {\n            if (!this.preventTyping) return false;\n\n            const allowedKeys = ['Backspace'];\n            if (!this.allowLineBreaks && !event.shiftKey) {\n              allowedKeys.push('Enter');\n            }\n\n            return !allowedKeys.includes(event.key);\n          },\n\n          handlePaste: (view, event) => {\n            const clipboardData = event.clipboardData || window.clipboardData;\n            const textData = clipboardData.getData('text/plain');\n            const htmlData = clipboardData.getData('text/html');\n\n            return this.processPasteData(view, textData, htmlData);\n          },\n\n          // Moves the <br /> tags inside the previous closing tag to avoid\n          // Prosemirror wrapping them within another </p> tag.\n          // Converts <hr> to an empty paragraph so it pastes as a line separator.\n          transformPastedHTML (html) {\n            return html\n              .replace(/<hr[^>]*\\/?>/gi, '<p><br></p>')\n              .replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$1');\n          },\n        },\n      });\n      this.addEditorListeners();\n    },\n\n    bubbleMenuShouldShow ({ editor }) {\n      return !this.hideLinkBubbleMenu && editor.isActive('link');\n    },\n\n    /**\n     * If the selection contains a link, return the existing link text.\n     * Otherwise, use just the selected text.\n     * @param editor the editor instance.\n     */\n    getSelectedLinkText (editor) {\n      const { view, state } = editor;\n      const { from, to } = view.state.selection;\n      const text = state.doc.textBetween(from, to, '');\n      const linkNode = this.editor.state.doc.nodeAt(from);\n      if (linkNode && linkNode.marks?.at(0)?.type?.name === 'link') {\n        return linkNode.textContent;\n      } else {\n        return text;\n      }\n    },\n\n    editLink () {\n      const linkText = this.getSelectedLinkText(this.editor);\n\n      const link = {\n        href: this.editor.getAttributes('link').href,\n        text: linkText,\n      };\n      this.$emit('edit-link', link);\n    },\n\n    removeLink () {\n      this.editor?.chain()?.focus()?.unsetLink()?.run();\n    },\n\n    openLink () {\n      this.editor?.chain()?.focus();\n      const link = this.editor.getAttributes('link').href;\n      window.open(link, '_blank');\n    },\n\n\n    setLink (linkInput, linkText, linkOptions, linkProtocols = RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n      defaultPrefix) {\n      if (!linkInput) {\n        // If link text is set to empty string,\n        // remove any existing links.\n        this.removeLink();\n        return;\n      }\n\n      // Check if input matches any of the supported link formats\n      const prefix = linkProtocols.find(prefixRegex => prefixRegex.test(linkInput));\n\n      if (!prefix) {\n        // If no matching pattern is found, prepend default prefix\n        linkInput = `${defaultPrefix}${linkInput}`;\n      }\n\n      this.editor\n        .chain()\n        .focus()\n        .extendMarkRange('link')\n        .run();\n\n      const selection = this.editor?.view?.state?.selection;\n      const displayText = linkText || linkInput;\n\n      this.editor\n        .chain()\n        .focus()\n        .insertContent(displayText)\n        .setTextSelection({ from: selection.from, to: selection.from + displayText.length })\n        .setLink({ href: linkInput, class: linkOptions.class })\n        .run();\n    },\n\n\n    processValue (newValue, returnIfEqual = true) {\n      if (!this.editor) return;\n      const currentValue = this.getOutput();\n\n      if (returnIfEqual && deepEqual(newValue, currentValue)) {\n        // The new value came from this component and was passed back down\n        // through the parent, so don't do anything here.\n        return;\n      }\n\n      // If the text contains emoji characters convert them to emoji component tags\n      if (typeof newValue === 'string' && this.outputFormat === 'text') {\n        const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n        newValue = newValue?.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n      }\n\n      // Otherwise replace the content (resets the cursor position).\n      this.editor.commands.setContent(newValue, {\n        emitUpdate: false,\n        parseOptions: { preserveWhitespace: this.preserveWhitespace },\n      });\n    },\n\n    destroyEditor () {\n      this.editor.destroy();\n    },\n\n    insertPlainTextWithHardBreaks (view, textData) {\n      // If we convert both newlines into hardBreak, we create a blank line.\n      // Collapsing avoids the extra hardBreak while preserving single line breaks.\n      const normalizedData = this.pasteRichText\n        ? textData\n        : textData.replace(/\\r\\n/g, '\\n').replace(/\\n\\n/g, '\\n');\n\n      // Remove trailing newlines to avoid inserting empty lines at the end\n      const trimmedData = normalizedData.replace(/[\\r\\n]+$/, '');\n\n      const lines = trimmedData.split(/\\r?\\n/);\n\n      const content = [];\n      for (let i = 0; i < lines.length; i++) {\n        if (i > 0) content.push({ type: 'hardBreak' });\n        if (lines[i]) content.push({ type: 'text', text: lines[i] });\n      }\n\n      this.editor.chain().focus().insertContent(content).run();\n    },\n\n    shouldPreserveLineBreaks (textData, htmlData) {\n      // When pasteRichText is false, always use plain text handling to ensure HTML tags are literal\n      if (!this.pasteRichText) {\n        return !!textData;\n      }\n      // When pasteRichText is true, preserve line breaks for plain text that contains blank lines\n      // or multiple consecutive line breaks to avoid losing formatting\n      return !htmlData && textData && this.hasBlankLines(textData);\n    },\n\n    processPasteData (view, textData, htmlData) {\n      if (this.shouldPreserveLineBreaks(textData, htmlData)) {\n        this.insertPlainTextWithHardBreaks(view, textData);\n        return true;\n      }\n\n      if (this.shouldHandlePreformattedHTML(htmlData)) {\n        const extractedText = this.extractPreformattedText(htmlData);\n        if (extractedText && extractedText.includes('\\n')) {\n          this.insertPlainTextWithHardBreaks(view, extractedText);\n          return true;\n        }\n      }\n\n      return false;\n    },\n\n    shouldHandlePreformattedHTML (htmlData) {\n      return this.pasteRichText && htmlData && this.containsPreformattedContent(htmlData);\n    },\n\n    containsPreformattedContent (htmlData) {\n      const tempDiv = document.createElement('div');\n      tempDiv.innerHTML = htmlData;\n      const elements = tempDiv.querySelectorAll('*');\n\n      for (const element of elements) {\n        if (this.hasPreWhitespace(element) && this.hasLineBreaks(element)) {\n          return true;\n        }\n      }\n      return false;\n    },\n\n    hasPreWhitespace (element) {\n      const styleAttr = element.getAttribute('style') || '';\n      const elementStyle = element.style.whiteSpace || '';\n\n      const hasPreElementStyle = elementStyle === 'pre' || elementStyle === 'pre-wrap';\n      const hasPreInlineStyle = styleAttr.includes('white-space: pre');\n\n      return hasPreElementStyle || hasPreInlineStyle;\n    },\n\n    hasLineBreaks (element) {\n      return element.textContent && element.textContent.includes('\\n');\n    },\n\n    hasBlankLines (textData) {\n      // Check for blank lines (empty lines between content) or multiple consecutive line breaks\n      return textData.includes('\\n\\n') || /\\n\\s*\\n/.test(textData);\n    },\n\n    extractPreformattedText (htmlData) {\n      const tempDiv = document.createElement('div');\n      tempDiv.innerHTML = htmlData;\n      return this.walkAndExtractText(tempDiv);\n    },\n\n    walkAndExtractText (node) {\n      let result = '';\n\n      if (node.nodeType === Node.TEXT_NODE) {\n        result += node.textContent;\n      } else if (node.nodeType === Node.ELEMENT_NODE) {\n        if (this.hasPreWhitespace(node)) {\n          result += node.textContent;\n        } else {\n          for (const child of node.childNodes) {\n            result += this.walkAndExtractText(child);\n          }\n        }\n      }\n\n      return result;\n    },\n\n    triggerInputChangeEvents () {\n      const value = this.getOutput();\n      this.$emit('input', value);\n      this.$emit('update:modelValue', value);\n\n      // Always output JSON in a separate event\n      const jsonValue = this.editor.getJSON();\n      this.$emit('json-input', jsonValue);\n      // Always output HTML in a separate event\n      const htmlValue = this.editor.getHTML();\n      this.$emit('html-input', htmlValue);\n\n      // Always output text in a separate event\n      const textValue = this.editor.getText({ blockSeparator: '\\n' });\n      this.$emit('text-input', textValue);\n\n      // Always output markdown in a separate event\n      const markdownValue = renderEditorToMarkdown(jsonValue, this.extensions);\n      this.$emit('markdown-input', markdownValue);\n    },\n\n    /**\n     * The Editor exposes event hooks that we have to map our emits into. See\n     * https://tiptap.dev/api/events for all events.\n     */\n    addEditorListeners () {\n      this.editor.on('create', () => {\n        this.triggerInputChangeEvents();\n      });\n      // The content has changed.\n      this.editor.on('update', () => {\n        this.triggerInputChangeEvents();\n      });\n\n      this.editor.on('selectionUpdate', ({ editor }) => {\n        this.$emit('selected', this.getSelectedLinkText(editor));\n      });\n\n      // The editor is focused.\n      this.editor.on('focus', ({ event }) => {\n        this.$emit('focus', event);\n      });\n\n      // The editor isn't focused anymore.\n      this.editor.on('blur', ({ event }) => {\n        this.$emit('blur', event);\n      });\n\n      // Mention is clicked\n      this.editor.on('mention-click', (mentionData) => {\n        this.$emit('mention-click', mentionData);\n      });\n\n      // Cursor enters a mention\n      this.editor.on('mention-hover', (mentionData) => {\n        this.$emit('mention-hover', mentionData);\n      });\n\n      // Cursor leaves a mention\n      this.editor.on('mention-leave', (mentionData) => {\n        this.$emit('mention-leave', mentionData);\n      });\n\n      // Channel is clicked\n      this.editor.on('channel-click', (channelData) => {\n        this.$emit('channel-click', channelData);\n      });\n    },\n\n    getOutput () {\n      switch (this.outputFormat) {\n        case 'json':\n          return this.editor.getJSON();\n        case 'html':\n          return this.editor.getHTML();\n        case 'markdown':\n          return renderEditorToMarkdown(this.editor.getJSON(), this.extensions);\n        case 'text':\n        default:\n          return this.editor.getText({ blockSeparator: '\\n' });\n      }\n    },\n\n    getExtension (extension, options) {\n      if (typeof options === 'boolean') {\n        return extension;\n      }\n      return extension.configure?.(options);\n    },\n\n    updateEditorAttributes (attributes) {\n      this.editor.setOptions({\n        editorProps: {\n          attributes: {\n            ...this.inputAttrs,\n            class: this.inputClass,\n            ...attributes,\n          },\n        },\n      });\n    },\n\n    focusEditor () {\n      this.editor.commands.focus();\n    },\n\n  },\n};\n</script>\n"],"x_google_ignoreList":[0,1,2,3,4],"mappings":"m/DAKA,IAAM,GAAQ,CAAC,MAAO,QAAS,SAAU,OAAO,CAC1C,GAAa,CAAC,QAAS,MAAM,CAC7B,GAA0B,GAAM,QAAQ,EAAK,IAAS,EAAI,OAAO,EAAM,EAAO,IAAM,GAAW,GAAI,EAAO,IAAM,GAAW,GAAG,CAAE,EAAE,CAAC,CACnI,EAAM,KAAK,IACX,EAAM,KAAK,IACX,GAAQ,KAAK,MAEb,EAAe,IAAM,CACzB,EAAG,EACH,EAAG,EACJ,EACK,GAAkB,CACtB,KAAM,QACN,MAAO,OACP,OAAQ,MACR,IAAK,SACN,CACD,SAAS,GAAM,EAAO,EAAO,EAAK,CAChC,OAAO,EAAI,EAAO,EAAI,EAAO,EAAI,CAAC,CAEpC,SAAS,EAAS,EAAO,EAAO,CAC9B,OAAO,OAAO,GAAU,WAAa,EAAM,EAAM,CAAG,EAEtD,SAAS,EAAQ,EAAW,CAC1B,OAAO,EAAU,MAAM,IAAI,CAAC,GAE9B,SAAS,EAAa,EAAW,CAC/B,OAAO,EAAU,MAAM,IAAI,CAAC,GAE9B,SAAS,GAAgB,EAAM,CAC7B,OAAO,IAAS,IAAM,IAAM,IAE9B,SAAS,GAAc,EAAM,CAC3B,OA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