aboutsummaryrefslogtreecommitdiffstats
path: root/dist/6318-6318.js.map
blob: f4b2e84bd5987a428f915ecc315f349db26796d7 (plain)
1
{"version":3,"file":"6318-6318.js?v=d1513d36db8d8c7f9971","mappings":"mZA6BA,MAAMA,EAAI,CACRC,KAAM,uBACNC,MAAO,CACLC,MAAO,CACLC,KAAMC,OACNC,UAAU,GAEZC,QAAS,CACPH,KAAMC,OACNG,QAAS,MAEXC,GAAI,CACFL,KAAMC,OACNG,QAAS,MAEXE,KAAM,CACJN,KAAMC,OACNC,UAAU,GAEZK,QAAS,CACPP,KAAMC,OACNG,QAAS,MAEXI,OAAQ,CACNR,KAAMC,OACNC,UAAU,GAEZO,OAAQ,CACNT,KAAM,CAACU,OAAQC,OACfP,QAAS,KAAM,CAAG,KAGtBQ,SAAU,CACR,SAAAC,GACE,OAAOC,KAAKP,QAAUO,KAAKP,QAAUO,KAAKT,IAAsB,UAAhBS,KAAKN,OAAqBM,KAAKC,aAAaD,KAAKT,GAAI,IAAM,IAC7G,EACA,UAAAW,GACE,IAAIC,EAAGC,EAAGC,EACV,OAA6B,OAApBF,EAAIH,KAAKL,aAAkB,EAASQ,EAAEX,QAA+B,OAApBY,EAAIJ,KAAKL,aAAkB,EAASS,EAAET,SAA+D,aAA9B,OAApBU,EAAIL,KAAKL,aAAkB,EAASU,EAAEV,OACrJ,GAEFW,QAAS,CACPL,aAAY,CAACE,EAAGC,KACP,iBAAE,wBAAyB,CAChCG,KAAMJ,EACNK,KAAMJ,MAKd,IAAIK,EAAI,WACN,IAAIL,EAAIJ,KAAMK,EAAID,EAAEM,MAAMC,GAC1B,OAAON,EAAE,MAAO,CAAEO,YAAa,uBAAyB,CAACP,EAAE,MAAO,CAAEO,YAAa,4BAA6BC,MAAO,CAACT,EAAEZ,KAAM,+BAA8BY,EAAEL,UAAY,cAAgB,KAAOe,MAAOV,EAAEL,UAAY,CAAEgB,gBAAiB,OAAOX,EAAEL,cAAiB,MAAQ,CAACK,EAAEF,WAAaG,EA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zK,EAAE0H,QAASgD,iBAAkB,SAASpE,GACzKtG,EAAEmE,aAAc,CAClB,EAAGwG,eAAgB,SAASrE,GAC1BtG,EAAEmE,aAAc,CAClB,EAAGyG,QAAS,CAAC,SAAStE,GACpB,OAAQA,EAAExH,KAAK+L,QAAQ,QAAU7K,EAAE8K,GAAGxE,EAAEyE,QAAS,SAAU,CAAC,EAAG,IAAKzE,EAAE0E,IAAK,CAAC,YAAa,SAAU,QAAU,KAAOhL,EAAE8I,SAASmC,MAAM,KAAMC,UAC7I,EAAG,SAAS5E,GACV,OAAQA,EAAExH,KAAK+L,QAAQ,QAAU7K,EAAE8K,GAAGxE,EAAEyE,QAAS,QAAS,GAAIzE,EAAE0E,IAAK,UAAY1E,EAAE6E,SAAW7E,EAAE8E,UAAY9E,EAAE+E,QAAU/E,EAAEgF,QAAU,KAAOtL,EAAE2J,QAAQsB,MAAM,KAAMC,UACnK,EAAG,SAAS5E,GACV,OAAQA,EAAExH,KAAK+L,QAAQ,QAAU7K,EAAE8K,GAAGxE,EAAEyE,QAAS,QAAS,GAAIzE,EAAE0E,IAAK,WAAa1E,EAAE6E,SAAW7E,EAAE8E,UAAY9E,EAAE+E,QAAU/E,EAAEgF,QAAU,MAAQhF,EAAEuD,kBAAmBvD,EAAEuB,iBAAkB7H,EAAE8J,YAAYmB,MAAM,KAAMC,WAClN,GAAIhG,MAAOlF,EAAE4H,QAAS,SAAU,SAAStB,GACvC,OAAOA,EAAEuD,kBAAmBvD,EAAEuB,iBAAkB7H,EAAEgK,QAAQiB,MAAM,KAAMC,UACxE,IAAOlL,EAAEgF,WACX,EAAGuG,EAAI,GAUP,MAAMC,GAVyB,OAC7BrK,EACA+I,EACAqB,GACA,EACA,KACA,WACA,KACA,MAEWrK,O","sources":["webpack:///nextcloud/node_modules/@nextcloud/vue/dist/Components/NcRichContenteditable.mjs"],"sourcesContent":["import \"../assets/index-ffa6d11c.css\";\nimport { r as c } from \"../chunks/index-5f2a5f57.mjs\";\nimport { N as rt } from \"../chunks/index-5f2a5f57.mjs\";\nimport { generateUrl as p } from \"@nextcloud/router\";\nimport { n as u } from \"../chunks/_plugin-vue2_normalizer-71e2aa87.mjs\";\nimport { t as o } from \"../chunks/l10n-ef44019c.mjs\";\nimport \"../Directives/Tooltip.mjs\";\nimport { emojiAddRecent as m, emojiSearch as d } from \"../Functions/emoji.mjs\";\nimport { n as h, j as f } from \"../chunks/referencePickerModal-c2f33569.mjs\";\nimport \"@nextcloud/axios\";\nimport \"unist-util-visit\";\nimport \"unist-builder\";\nimport \"unified\";\nimport \"remark-parse\";\nimport \"remark-breaks\";\nimport \"remark-rehype\";\nimport \"rehype-react\";\nimport \"rehype-external-links\";\nimport \"./NcEmptyContent.mjs\";\nimport \"./NcSelect.mjs\";\nimport \"./NcLoadingIcon.mjs\";\nimport \"./NcTextField.mjs\";\nimport \"./NcButton.mjs\";\nimport \"./NcModal.mjs\";\nimport \"@nextcloud/event-bus\";\nimport l from \"tributejs/dist/tribute.esm.js\";\nimport _ from \"debounce\";\nimport g from \"string-length\";\nimport { VTooltip as b } from \"floating-vue\";\nconst y = {\n  name: \"NcAutoCompleteResult\",\n  props: {\n    title: {\n      type: String,\n      required: !0\n    },\n    subline: {\n      type: String,\n      default: null\n    },\n    id: {\n      type: String,\n      default: null\n    },\n    icon: {\n      type: String,\n      required: !0\n    },\n    iconUrl: {\n      type: String,\n      default: null\n    },\n    source: {\n      type: String,\n      required: !0\n    },\n    status: {\n      type: [Object, Array],\n      default: () => ({})\n    }\n  },\n  computed: {\n    avatarUrl() {\n      return this.iconUrl ? this.iconUrl : this.id && this.source === \"users\" ? this.getAvatarUrl(this.id, 44) : null;\n    },\n    haveStatus() {\n      var e, t, n;\n      return ((e = this.status) == null ? void 0 : e.icon) || ((t = this.status) == null ? void 0 : t.status) && ((n = this.status) == null ? void 0 : n.status) !== \"offline\";\n    }\n  },\n  methods: {\n    getAvatarUrl(e, t) {\n      return p(\"/avatar/{user}/{size}\", {\n        user: e,\n        size: t\n      });\n    }\n  }\n};\nvar C = function() {\n  var t = this, n = t._self._c;\n  return n(\"div\", { staticClass: \"autocomplete-result\" }, [n(\"div\", { staticClass: \"autocomplete-result__icon\", class: [t.icon, `autocomplete-result__icon--${t.avatarUrl ? \"with-avatar\" : \"\"}`], style: t.avatarUrl ? { backgroundImage: `url(${t.avatarUrl})` } : null }, [t.haveStatus ? n(\"div\", { staticClass: \"autocomplete-result__status\", class: [`autocomplete-result__status--${t.status && t.status.icon ? \"icon\" : t.status.status}`] }, [t._v(\" \" + t._s(t.status && t.status.icon || \"\") + \" \")]) : t._e()]), n(\"span\", { staticClass: \"autocomplete-result__content\" }, [n(\"span\", { staticClass: \"autocomplete-result__title\", attrs: { title: t.title } }, [t._v(\" \" + t._s(t.title) + \" \")]), t.subline ? n(\"span\", { staticClass: \"autocomplete-result__subline\" }, [t._v(\" \" + t._s(t.subline) + \" \")]) : t._e()])]);\n}, v = [], k = /* @__PURE__ */ u(\n  y,\n  C,\n  v,\n  !1,\n  null,\n  \"25cf09d8\",\n  null,\n  null\n);\nconst x = k.exports;\nconst T = {\n  name: \"NcRichContenteditable\",\n  directives: {\n    tooltip: b\n  },\n  mixins: [c],\n  props: {\n    value: {\n      type: String,\n      default: \"\",\n      required: !0\n    },\n    placeholder: {\n      type: String,\n      default: o(\"Write a message …\")\n    },\n    autoComplete: {\n      type: Function,\n      default: () => []\n    },\n    menuContainer: {\n      type: Element,\n      default: () => document.body\n    },\n    /**\n     * Make the contenteditable looks like a textarea or not.\n     * Default looks like a single-line input.\n     * This also handle the default enter/shift+enter behaviour.\n     * if multiline, enter = newline; otherwise enter = submit\n     * shift+enter always add a new line. ctrl+enter always submits\n     */\n    multiline: {\n      type: Boolean,\n      default: !1\n    },\n    /**\n     * Is the content editable ?\n     */\n    contenteditable: {\n      type: Boolean,\n      default: !0\n    },\n    /**\n     * Disable the editing and show specific disabled design\n     */\n    disabled: {\n      type: Boolean,\n      default: !1\n    },\n    /**\n     * Max allowed length\n     */\n    maxlength: {\n      type: Number,\n      default: null\n    },\n    /**\n     * Enable or disable emoji autocompletion\n     */\n    emojiAutocomplete: {\n      type: Boolean,\n      default: !0\n    },\n    /**\n     * Enable or disable link autocompletion\n     */\n    linkAutocomplete: {\n      type: Boolean,\n      default: !0\n    }\n  },\n  emits: [\n    \"submit\",\n    \"paste\",\n    \"update:value\",\n    \"smart-picker-submit\"\n  ],\n  data() {\n    return {\n      textSmiles: [],\n      tribute: null,\n      autocompleteOptions: {\n        // Allow spaces in the middle of mentions\n        allowSpaces: !0,\n        fillAttr: \"id\",\n        // Search against id and title (display name)\n        lookup: (e) => `${e.id} ${e.title}`,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => this.renderComponentHtml(e.original, x),\n        // Hide if no results\n        noMatchTemplate: () => '<span class=\"hidden\"></span>',\n        // Inner display of mentions\n        selectTemplate: (e) => {\n          var t;\n          return this.genSelectTemplate((t = e == null ? void 0 : e.original) == null ? void 0 : t.id);\n        },\n        // Autocompletion results\n        values: this.debouncedAutoComplete\n      },\n      emojiOptions: {\n        trigger: \":\",\n        // Don't use the tribute search function at all\n        // We pass search results as values (see below)\n        lookup: (e, t) => t,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : `<span class=\"tribute-container-emoji__item__emoji\">${e.original.native}</span> :${e.original.short_name}`,\n        // Hide if no results\n        noMatchTemplate: () => o(\"No emoji found\"),\n        // Display raw emoji along with its name\n        selectTemplate: (e) => this.textSmiles.includes(e.original) ? e.original : (m(e.original), e.original.native),\n        // Pass the search results as values\n        values: (e, t) => {\n          const n = d(e);\n          this.textSmiles.includes(\":\" + e) && n.unshift(\":\" + e), t(n);\n        },\n        // Class added to the menu container\n        containerClass: \"tribute-container-emoji\",\n        // Class added to each list item\n        itemClass: \"tribute-container-emoji__item\"\n      },\n      linkOptions: {\n        trigger: \"/\",\n        // Don't use the tribute search function at all\n        // We pass search results as values (see below)\n        lookup: (e, t) => t,\n        // Where to inject the menu popup\n        menuContainer: this.menuContainer,\n        // Popup mention autocompletion templates\n        menuItemTemplate: (e) => `<img class=\"tribute-container-link__item__icon\" src=\"${e.original.icon_url}\"> <span class=\"tribute-container-link__item__title\">${e.original.title}</span>`,\n        // Hide if no results\n        noMatchTemplate: () => o(\"No link provider found\"),\n        selectTemplate: this.getLink,\n        // Pass the search results as values\n        values: (e, t) => t(h(e)),\n        // Class added to the menu container\n        containerClass: \"tribute-container-link\",\n        // Class added to each list item\n        itemClass: \"tribute-container-link__item\"\n      },\n      // Represent the raw untrimmed text of the contenteditable\n      // serves no other purpose than to check whether the\n      // content is empty or not\n      localValue: this.value,\n      // Is in text composition session in IME\n      isComposing: !1\n    };\n  },\n  computed: {\n    /**\n     * Is the current trimmed value empty?\n     *\n     * @return {boolean}\n     */\n    isEmptyValue() {\n      return !this.localValue || this.localValue && this.localValue.trim() === \"\";\n    },\n    /**\n     * Is this Firefox? 🙄\n     *\n     * @return {boolean}\n     */\n    isFF() {\n      return !!navigator.userAgent.match(/firefox/i);\n    },\n    /**\n     * Is the current value over maxlength?\n     *\n     * @return {boolean}\n     */\n    isOverMaxlength() {\n      return this.isEmptyValue || !this.maxlength ? !1 : g(this.localValue) > this.maxlength;\n    },\n    /**\n     * Tooltip to show if characters count is over limit\n     *\n     * @return {string}\n     */\n    tooltipString() {\n      return this.isOverMaxlength ? {\n        content: o(\"Message limit of {count} characters reached\", { count: this.maxlength }),\n        shown: !0,\n        trigger: \"manual\"\n      } : null;\n    },\n    /**\n     * Edit is only allowed when contenteditableis true and disabled is false\n     *\n     * @return {boolean}\n     */\n    canEdit() {\n      return this.contenteditable && !this.disabled;\n    },\n    /**\n     * Proxied native event handlers without custom event handlers\n     *\n     * @return {Record<string, Function>}\n     */\n    listeners() {\n      const e = { ...this.$listeners };\n      return delete e.paste, e;\n    }\n  },\n  watch: {\n    /**\n     * If the parent value change, we compare the plain text rendering\n     * If it's different, we render everything and update the main content\n     */\n    value() {\n      const e = this.$refs.contenteditable.innerHTML;\n      this.value.trim() !== this.parseContent(e).trim() && this.updateContent(this.value);\n    }\n  },\n  mounted() {\n    const e = [\"d\", \"D\", \"p\", \"P\", \"s\", \"S\", \"x\", \"X\", \")\", \"(\", \"|\", \"/\"];\n    this.textSmiles = [], e.forEach((t) => {\n      this.textSmiles.push(\":\" + t), this.textSmiles.push(\":-\" + t);\n    }), this.autocompleteTribute = new l(this.autocompleteOptions), this.autocompleteTribute.attach(this.$el), this.emojiAutocomplete && (this.emojiTribute = new l(this.emojiOptions), this.emojiTribute.attach(this.$el)), this.linkAutocomplete && (this.linkTribute = new l(this.linkOptions), this.linkTribute.attach(this.$el)), this.updateContent(this.value), this.$refs.contenteditable.contentEditable = this.canEdit;\n  },\n  beforeDestroy() {\n    this.autocompleteTribute && this.autocompleteTribute.detach(this.$el), this.emojiTribute && this.emojiTribute.detach(this.$el), this.linkTribute && this.linkTribute.detach(this.$el);\n  },\n  methods: {\n    /**\n     * Focus the richContenteditable\n     *\n     * @public\n     */\n    focus() {\n      this.$refs.contenteditable.focus();\n    },\n    getLink(e) {\n      return f(e.original.id).then((t) => {\n        const n = document.getElementById(\"tmp-smart-picker-result-node\"), i = {\n          result: t,\n          insertText: !0\n        };\n        if (this.$emit(\"smart-picker-submit\", i), i.insertText) {\n          const s = document.createTextNode(t);\n          n.replaceWith(s), this.setCursorAfter(s), this.updateValue(this.$refs.contenteditable.innerHTML);\n        } else\n          n.remove();\n      }).catch((t) => {\n        console.debug(\"Smart picker promise rejected:\", t);\n        const n = document.getElementById(\"tmp-smart-picker-result-node\");\n        this.setCursorAfter(n), n.remove();\n      }), '<span id=\"tmp-smart-picker-result-node\"></span>';\n    },\n    setCursorAfter(e) {\n      const t = document.createRange();\n      t.setEndAfter(e), t.collapse();\n      const n = window.getSelection();\n      n.removeAllRanges(), n.addRange(t);\n    },\n    /**\n     * Re-emit the input event to the parent\n     *\n     * @param {Event} event the input event\n     */\n    onInput(e) {\n      this.updateValue(e.target.innerHTML);\n    },\n    /**\n     * When pasting, sanitize the content, extract text\n     * and render it again\n     *\n     * @param {Event} event the paste event\n     * @fires Event paste the original paste event\n     */\n    onPaste(e) {\n      if (!this.canEdit)\n        return;\n      e.preventDefault();\n      const t = e.clipboardData;\n      if (this.$emit(\"paste\", e), t.files.length !== 0 || !Object.values(t.items).find((a) => a == null ? void 0 : a.type.startsWith(\"text\")))\n        return;\n      const n = t.getData(\"text\"), i = window.getSelection();\n      if (!i.rangeCount) {\n        this.updateValue(n);\n        return;\n      }\n      const s = i.getRangeAt(0);\n      i.deleteFromDocument(), s.insertNode(document.createTextNode(n));\n      const r = document.createRange();\n      r.setStart(e.target, s.endOffset), r.collapse(!0), i.removeAllRanges(), i.addRange(r), this.updateValue(this.$refs.contenteditable.innerHTML);\n    },\n    /**\n     * Update the value text from the provided html\n     *\n     * @param {string} htmlOrText the html content (or raw text with @mentions)\n     */\n    updateValue(e) {\n      const t = this.parseContent(e);\n      this.localValue = t, this.$emit(\"update:value\", t);\n    },\n    /**\n     * Update content and local value\n     *\n     * @param {string} value the message value\n     */\n    updateContent(e) {\n      const t = this.renderContent(e);\n      this.$refs.contenteditable.innerHTML = t, this.localValue = e;\n    },\n    /**\n     * Because FF have a decade old bug preventing contenteditable=false\n     * to properly be deleted on backspace, we have to hack 👀\n     * https://stackoverflow.com/a/59383394/3885878\n     * https://stackoverflow.com/a/30574622\n     *\n     * @param {Event} event the delete keydown event\n     */\n    onDelete(e) {\n      if (!this.isFF || !window.getSelection || !this.canEdit)\n        return;\n      const t = window.getSelection(), n = e.target;\n      if (!t.isCollapsed || !t.rangeCount)\n        return;\n      const i = t.getRangeAt(t.rangeCount - 1);\n      if (i.commonAncestorContainer.nodeType === 3 && i.startOffset > 0)\n        return;\n      const s = document.createRange();\n      if (t.anchorNode !== n)\n        s.selectNodeContents(n), s.setEndBefore(t.anchorNode);\n      else if (t.anchorOffset > 0)\n        s.setEnd(n, t.anchorOffset);\n      else\n        return;\n      s.setStart(n, s.endOffset - 1);\n      const r = s.cloneContents().lastChild;\n      r && r.contentEditable === \"false\" && (s.deleteContents(), e.preventDefault());\n    },\n    /**\n     * Enter key pressed. Submits if not multiline\n     *\n     * @param {Event} event the keydown event\n     */\n    onEnter(e) {\n      this.multiline || this.isOverMaxlength || this.autocompleteTribute.isActive || this.emojiTribute.isActive || this.linkTribute.isActive || this.isComposing || (e.preventDefault(), e.stopPropagation(), this.$emit(\"submit\", e));\n    },\n    /**\n     * Ctrl + Enter key pressed is used to submit\n     *\n     * @param {Event} event the keydown event\n     */\n    onCtrlEnter(e) {\n      this.isOverMaxlength || this.$emit(\"submit\", e);\n    },\n    /**\n     * Debounce the autocomplete function\n     */\n    debouncedAutoComplete: _(async function(e, t) {\n      this.autoComplete(e, t);\n    }, 100),\n    onKeyUp(e) {\n      e.stopImmediatePropagation();\n    }\n  }\n};\nvar S = function() {\n  var t = this, n = t._self._c;\n  return n(\"div\", t._g({ directives: [{ name: \"tooltip\", rawName: \"v-tooltip\", value: t.tooltipString, expression: \"tooltipString\" }], ref: \"contenteditable\", staticClass: \"rich-contenteditable__input\", class: {\n    \"rich-contenteditable__input--empty\": t.isEmptyValue,\n    \"rich-contenteditable__input--multiline\": t.multiline,\n    \"rich-contenteditable__input--overflow\": t.isOverMaxlength,\n    \"rich-contenteditable__input--disabled\": t.disabled\n  }, attrs: { contenteditable: t.canEdit, \"aria-placeholder\": t.placeholder, \"aria-multiline\": \"true\", role: \"textbox\" }, on: { input: t.onInput, compositionstart: function(i) {\n    t.isComposing = !0;\n  }, compositionend: function(i) {\n    t.isComposing = !1;\n  }, keydown: [function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"delete\", [8, 46], i.key, [\"Backspace\", \"Delete\", \"Del\"]) ? null : t.onDelete.apply(null, arguments);\n  }, function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : t.onEnter.apply(null, arguments);\n  }, function(i) {\n    return !i.type.indexOf(\"key\") && t._k(i.keyCode, \"enter\", 13, i.key, \"Enter\") || !i.ctrlKey || i.shiftKey || i.altKey || i.metaKey ? null : (i.stopPropagation(), i.preventDefault(), t.onCtrlEnter.apply(null, arguments));\n  }], paste: t.onPaste, \"!keyup\": function(i) {\n    return i.stopPropagation(), i.preventDefault(), t.onKeyUp.apply(null, arguments);\n  } } }, t.listeners));\n}, A = [], E = /* @__PURE__ */ u(\n  T,\n  S,\n  A,\n  !1,\n  null,\n  \"9e395f41\",\n  null,\n  null\n);\nconst it = E.exports;\nexport {\n  x as NcAutoCompleteResult,\n  rt as NcMentionBubble,\n  it as default\n};\n"],"names":["y","name","props","title","type","String","required","subline","default","id","icon","iconUrl","source","status","Object","Array","computed","avatarUrl","this","getAvatarUrl","haveStatus","e","t","n","methods","user","size","C","_self","_c","staticClass","class","style","backgroundImage","_v","_s","_e","attrs","v","x","exports","T","directives","tooltip","mixins","value","placeholder","autoComplete","Function","menuContainer","Element","document","body","multiline","Boolean","contenteditable","disabled","maxlength","Number","emojiAutocomplete","linkAutocomplete","emits","data","textSmiles","tribute","autocompleteOptions","allowSpaces","fillAttr","lookup","menuItemTemplate","renderComponentHtml","original","noMatchTemplate","selectTemplate","genSelectTemplate","values","debouncedAutoComplete","emojiOptions","trigger","includes","native","short_name","unshift","containerClass","itemClass","linkOptions","icon_url","getLink","localValue","isComposing","isEmptyValue","trim","isFF","navigator","userAgent","match","isOverMaxlength","tooltipString","content","count","shown","canEdit","listeners","$listeners","paste","watch","$refs","innerHTML","parseContent","updateContent","mounted","forEach","push","autocompleteTribute","attach","$el","emojiTribute","linkTribute","contentEditable","beforeDestroy","detach","focus","then","getElementById","i","result","insertText","$emit","s","createTextNode","replaceWith","setCursorAfter","updateValue","remove","catch","console","debug","createRange","setEndAfter","collapse","window","getSelection","removeAllRanges","addRange","onInput","target","onPaste","preventDefault","clipboardData","files","length","items","find","a","startsWith","getData","rangeCount","getRangeAt","deleteFromDocument","insertNode","r","setStart","endOffset","renderContent","onDelete","isCollapsed","commonAncestorContainer","nodeType","startOffset","anchorNode","selectNodeContents","setEndBefore","anchorOffset","setEnd","cloneContents","lastChild","deleteContents","onEnter","isActive","stopPropagation","onCtrlEnter","async","onKeyUp","stopImmediatePropagation","S","_g","rawName","expression","ref","role","on","input","compositionstart","compositionend","keydown","indexOf","_k","keyCode","key","apply","arguments","ctrlKey","shiftKey","altKey","metaKey","A","it"],"sourceRoot":""}