');this.$().append(r);const i=this.$(),a=this.$(".Post-mentionedBy"),u=()=>{!r.hasClass("in")&&r.is(":visible")||(m.render(r[0],m("[",null,o.map((e=>m("li",{"data-number":e.number()},m(p(),{post:e,onclick:t.bind(this)})))),o.length{t.call(this),s().modal.show(I,{post:n})}},m("span",{className:"PostPreview-content"},m("span",{className:"PostPreview-badge Avatar"},m(C(),{name:"fas fa-reply-all"})),m("span",null,s().translator.trans("flarum-mentions.forum.post.mentioned_by_more_text",{count:n.mentionedByCount()-o.length}))))))),r.show().css("top",a.offset().top-i.offset().top+a.outerHeight(!0)).css("left",a.offsetParent().offset().left-i.offset().left).css("max-width",i.width()),setTimeout((()=>r.off("transitionend").addClass("in"))))};a.add(r).hover((()=>{clearTimeout(e),e=setTimeout(u,250)}),(()=>{clearTimeout(e),e=setTimeout(t,250)})),this.$().find(".Post-mentionedBy-summary a").hover((function(){r.find('[data-number="'+$(this).data("number")+'"]').addClass("active")}),(function(){r.find("[data-number]").removeClass("active")}))}})),(0,n.extend)(d().prototype,"footerItems",(function(e){const n=this.attrs.post,o=n.mentionedBy();if(o&&o.length){const r=[],i=o.sort((t=>t.user()===s().session.user?-1:0)).filter((t=>{const e=t.user();if(-1===r.indexOf(e))return r.push(e),!0})),a=4,u=n.mentionedByCount()>a,l=i.slice(0,u?a-1:a).map((e=>{const n=e.user();return m(y(),{href:s().route.post(e),onclick:t.bind(this),"data-number":e.number()},s().session.user===n?s().translator.trans("flarum-mentions.forum.post.you_text"):x()(n))}));if(u){const t=n.mentionedByCount()-l.length;l.push(s().translator.trans("flarum-mentions.forum.post.others_text",{count:t}))}e.add("replies",m("div",{className:"Post-mentionedBy"},m("span",{className:"Post-mentionedBy-summary"},m(C(),{name:"fas fa-reply"}),s().translator.trans(`flarum-mentions.forum.post.mentioned_by${i[0].user()===s().session.user?"_self":""}_text`,{count:l.length,users:v()(l)}))))}}))}(),(0,n.extend)(d().prototype,"actionItems",(function(t){const e=this.attrs.post;e.isHidden()||s().session.user&&!e.discussion().canReply()||t.add("reply",m(T(),{className:"Button Button--link",onclick:()=>j(e)},s().translator.trans("flarum-mentions.forum.post.reply_link")))})),(0,n.extend)(d().prototype,"oncreate",(function(){const t=this.attrs.post;if(t.isHidden()||s().session.user&&!t.discussion().canReply())return;const e=this.$(".Post-body"),n=$(''),o=new H(t),r=function(t){setTimeout((()=>{const s=q(e);if(s){o.content=s,m.render(n[0],o.render());const e=window.getSelection().getRangeAt(0).getClientRects(),r=e[0];if(t.clientYt.search().then(e)));const t=this.$(".TextEditor-editor").wrap('');this.navigator=new(z()),this.navigator.when((()=>this.mentionsDropdown.active)).onUp((()=>this.mentionsDropdown.navigate(-1))).onDown((()=>this.mentionsDropdown.navigate(1))).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo(t),t.after($(''))})),(0,n.extend)("flarum/common/components/TextEditor","buildEditorParams",(function(t){let e;t.inputListeners.push((()=>{const t=this.attrs.composer.editor.getSelectionRange(),n=t[0];if(t[1]-n>0)return;let o=null;const r=new(Q())((t=>!!(o=s().mentionFormats.get(t)))).check(this.attrs.composer.editor.getLastNChars(30),n,/\S+/),i=this.mentionsDropdown;let a=new rt({onmouseenter:function(){i.setIndex($(this).parent().index())},onclick:t=>{this.attrs.composer.editor.replaceBeforeCursor(r.absoluteStart-1,t+" "),this.mentionsDropdown.hide()}});if(this.mentionsDropdown.hide(),this.mentionsDropdown.active=!1,r){if(a.init(o.makeMentionables()),e=o.queryFromTyped(r.typed),!e)return;a.typed=e;const t=()=>{const t=a.buildSuggestions();if(t.length){this.mentionsDropdown.items=t,m.render(this.$(".ComposerBody-mentionsDropdownContainer")[0],this.mentionsDropdown.render()),this.mentionsDropdown.show();const e=this.attrs.composer.editor.getCaretCoordinates(r.absoluteStart),n=this.mentionsDropdown.$().outerWidth(),o=this.mentionsDropdown.$().outerHeight(),s=this.mentionsDropdown.$().offsetParent();let i=e.left,a=e.top+15;a+o>s.height()&&(a=e.top-o-15),i+n>s.width()&&(i=s.width()-n),a=Math.max(-(s.offset().top-$(document).scrollTop()),a),i=Math.max(-s.offset().left,i),this.mentionsDropdown.show(i,a)}else this.mentionsDropdown.active=!1,this.mentionsDropdown.hide()};this.mentionsDropdown.active=!0,t(),this.mentionsDropdown.setIndex(0),this.mentionsDropdown.$().scrollTop(0),this.searchMentions(a,t)}}))})),(0,n.extend)("flarum/common/components/TextEditor","toolbarItems",(function(t){t.add("mention",m(O(),{onclick:()=>this.attrs.composer.editor.insertAtCursor(" @"),icon:"fas fa-at"},s().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))})),(0,n.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:s().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:s().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:s().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,n.extend)(Bt().prototype,"navItems",(function(t){const e=this.user;t.add("mentions",m(Nt(),{href:s().route("user.mentions",{username:e.slug()}),name:"mentions",icon:"fas fa-at"},s().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),r.getPlainContent.removeSelectors.push("a.PostMention"),(0,n.extend)(l().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(a()(getComputedStyle(this).getPropertyValue("--color")))}))})),(0,n.override)("flarum/forum/components/SearchModal","defaultActiveSource",(function(t){const e=t();return!e&&s().current.data.routeName&&s().current.data.routeName.includes("user.mentions")&&s().current.data.user?"posts":e})),(0,n.extend)("flarum/forum/components/SearchModal","defaultFilters",(function(t){s().current.data.routeName&&s().current.data.routeName.includes("user.mentions")&&s().current.data.user&&(t.posts.mentioned=s().current.data.user.username())}))}))})(),module.exports=e})();
//# sourceMappingURL=forum.js.map
\ No newline at end of file
diff --git a/extensions/mentions/js/dist/forum.js.map b/extensions/mentions/js/dist/forum.js.map
index 16dc837a8..7861bbca7 100644
--- a/extensions/mentions/js/dist/forum.js.map
+++ b/extensions/mentions/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sRCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,uBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,yB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,gC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,gC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,sC,aCA5D,MAAM,EAA+BS,OAAOC,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AM,aACL,eAAe/M,MAAM,6CAA8C,GACxE,IAGA,EAAAqV,gBAAgBC,gBAAgBjM,KAAK,kBAGrC,IAAAsB,QAAO,cAAgB,YAAY,WACjCtL,KAAK8D,EAAE,gDAAgDyN,MAAK,WAC1DvR,KAAKkW,UAAUtW,IAAI,IAAkBuW,iBAAiBnW,MAAMoW,iBAAiB,YAC/E,GACF,KAGA,IAAAC,UAAS,sCAAuC,uBAAuB,SAAUC,GAC/E,MAAMC,EAAOD,IACb,OAAKC,GAAQ,YAAY/E,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAU/M,SAAS,kBAAoB,YAAY+H,KAAK3F,KAC3G,QAEF0K,CACT,KACA,IAAAjL,QAAO,sCAAuC,kBAAkB,SAAUmL,GACpE,YAAYjF,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAU/M,SAAS,kBAAoB,YAAY+H,KAAK3F,OACzG4K,EAAQ7J,MAAMmC,UAAY,YAAYyC,KAAK3F,KAAKG,WAEpD,GAAE,G","sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/webpack/runtime/compat get default export","webpack://@flarum/mentions/webpack/runtime/define property getters","webpack://@flarum/mentions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/mentions/webpack/runtime/make namespace object","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/CommentPost')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostPreview')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/punctuateSeries')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/mentions/./src/forum/state/MentionedByModalState.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/mentions/./src/forum/components/MentionedByModal.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/mentions/./src/forum/utils/reply.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/mentions/./src/forum/fragments/PostQuoteButton.js","webpack://@flarum/mentions/./src/forum/utils/selectedText.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/AutocompleteReader')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/mentions/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/mentions/./src/forum/components/MentionsDropdownItem.tsx","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModels.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormat.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModel.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/mentions/./src/forum/utils/getCleanDisplayName.js","webpack://@flarum/mentions/./src/forum/mentionables/UserMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/PostMention.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Group')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/mentions/./src/forum/mentionables/GroupMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/AtMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/TagMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/HashMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormats.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/UserPage')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostsUserPage')\"","webpack://@flarum/mentions/./src/forum/components/MentionsUserPage.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/mentions/./src/forum/components/PostMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/UserMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/GroupMentionedNotification.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/mentions/./src/common/query/posts/MentionedGambit.ts","webpack://@flarum/mentions/./src/common/extend.ts","webpack://@flarum/mentions/./src/forum/extend.ts","webpack://@flarum/mentions/./src/forum/utils/textFormatter.js","webpack://@flarum/mentions/./src/forum/extenders/Mentionables.ts","webpack://@flarum/mentions/./src/forum/index.js","webpack://@flarum/mentions/./src/forum/addPostMentionPreviews.js","webpack://@flarum/mentions/./src/forum/addMentionedByList.js","webpack://@flarum/mentions/./src/forum/addPostReplyAction.js","webpack://@flarum/mentions/./src/forum/addPostQuoteButton.js","webpack://@flarum/mentions/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/textContrastClass');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/CommentPost');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostPreview');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/punctuateSeries');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/username');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class MentionedByModalState extends PaginatedListState {\n constructor(params, page) {\n if (page === void 0) {\n page = 1;\n }\n const limit = 10;\n params.page = {\n ...(params.page || {}),\n limit\n };\n super(params, page, limit);\n }\n get type() {\n return 'posts';\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/state/MentionedByModalState', MentionedByModalState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import app from 'flarum/forum/app';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModalState from '../state/MentionedByModalState';\nimport Form from 'flarum/common/components/Form';\nexport default class MentionedByModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new MentionedByModalState({\n filter: {\n mentionedPost: this.attrs.post.id()\n },\n sort: 'number'\n });\n this.state.refresh();\n }\n className() {\n return 'MentionedByModal';\n }\n title() {\n return app.translator.trans('flarum-mentions.forum.mentioned_by.title');\n }\n content() {\n return m('[', null, m(\"div\", {\n className: \"Modal-body\"\n }, this.state.isInitialLoading() ? m(LoadingIndicator, null) : m('[', null, m(\"ul\", {\n className: \"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview\"\n }, this.state.getPages().map(page => page.items.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: () => app.modal.close()\n }))))))), this.state.hasNext() && m(\"div\", {\n className: \"Modal-footer\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--block\",\n onclick: () => this.state.loadNext(),\n loading: this.state.isLoadingNext()\n }, app.translator.trans('flarum-mentions.forum.mentioned_by.load_more_button'))))));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionedByModal', MentionedByModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import app from 'flarum/forum/app';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nexport function insertMention(post, composer, quote) {\n return new Promise(resolve => {\n const mention = app.mentionFormats.mentionable('post').replacement(post) + ' ';\n\n // If the composer is empty, then assume we're starting a new reply.\n // In which case we don't want the user to have to confirm if they\n // close the composer straight away.\n if (!composer.fields.content()) {\n composer.body.attrs.originalContent = mention;\n }\n const cursorPosition = composer.editor.getSelectionRange()[0];\n const preceding = composer.fields.content().slice(0, cursorPosition);\n const precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\\n{0,2})$/)[0].length;\n composer.editor.insertAtCursor(Array(precedingNewlines).join('\\n') + (\n // Insert up to two newlines, depending on preceding whitespace\n quote ? '> ' + mention + quote.trim().replace(/\\n/g, '\\n> ') + '\\n\\n' : mention), false);\n return resolve(composer);\n });\n}\nexport default function reply(post, quote) {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n if (EditPostComposer && app.composer.bodyMatches(EditPostComposer) && app.composer.body.attrs.post.discussion() === post.discussion()) {\n // If we're already editing a post in the discussion of post we're quoting,\n // insert the mention directly.\n return insertMention(post, app.composer, quote);\n } else {\n // The default \"Reply\" action behavior will only open a new composer if\n // necessary, but it will always be a ReplyComposer, hence the exceptional\n // case above.\n return DiscussionControls.replyAction.call(post.discussion()).then(composer => insertMention(post, composer, quote));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/reply', reply);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import app from 'flarum/forum/app';\nimport Fragment from 'flarum/common/Fragment';\nimport Icon from 'flarum/common/components/Icon';\nimport reply from '../utils/reply';\nexport default class PostQuoteButton extends Fragment {\n constructor(post) {\n super();\n this.post = post;\n }\n view() {\n return m(\"button\", {\n className: \"Button PostQuoteButton\",\n onclick: () => {\n reply(this.post, this.content);\n }\n }, m(Icon, {\n name: \"fas fa-quote-left\",\n className: \"Button-icon\"\n }), app.translator.trans('flarum-mentions.forum.post.quote_button'));\n }\n show(left, top) {\n const $this = this.$().show();\n const parentOffset = $this.offsetParent().offset();\n $this.css('left', left - parentOffset.left).css('top', top - parentOffset.top);\n this.hideHandler = this.hide.bind(this);\n $(document).on('mouseup', this.hideHandler);\n }\n showStart(left, top) {\n const $this = this.$();\n this.show(left, $(window).scrollTop() + top - $this.outerHeight() - 5);\n }\n showEnd(right, bottom) {\n const $this = this.$();\n this.show(right - $this.outerWidth(), $(window).scrollTop() + bottom + 5);\n }\n hide() {\n this.$().hide();\n $(document).off('mouseup', this.hideHandler);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/PostQuoteButton', PostQuoteButton);","/**\n * Finds the selected text in the provided composer body.\n */\nexport default function selectedText(body) {\n const selection = window.getSelection();\n if (!selection.isCollapsed) {\n const range = selection.getRangeAt(0);\n const parent = range.commonAncestorContainer;\n if (body[0] === parent || $.contains(body[0], parent)) {\n const clone = $('
').append(range.cloneContents());\n\n // Replace emoji images with their shortcode (found in alt attribute)\n clone.find('img.emoji').replaceWith(function () {\n return this.alt;\n });\n\n // Replace all other images with a Markdown image\n clone.find('img').replaceWith(function () {\n return ``;\n });\n\n // Replace all links with a Markdown link\n clone.find('a').replaceWith(function () {\n return `[${this.innerText}](${this.href})`;\n });\n return clone.text();\n }\n }\n return '';\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/selectedText', selectedText);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/AutocompleteReader');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu MentionsDropdown\"\n }, this.items.map(item => m(\"li\", null, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class MentionsDropdownItem extends Component {\n view(vnode) {\n const {\n mentionable,\n ...attrs\n } = this.attrs;\n const className = classList('MentionsDropdownItem', 'PostPreview', `MentionsDropdown-${mentionable.type()}`);\n return m(\"button\", Object.assign({\n className: className\n }, attrs), m(\"span\", {\n className: \"PostPreview-content\"\n }, vnode.children));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsDropdownItem', MentionsDropdownItem);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionsDropdownItem from '../components/MentionsDropdownItem';\nexport default class MentionableModels {\n constructor(dropdownItemAttrs) {\n _defineProperty(this, \"mentionables\", void 0);\n /**\n * We store models returned from an API here to preserve order in which they are returned\n * This prevents the list jumping around while models are returned.\n * We also use a hashmap for model IDs to provide O(1) lookup for the users already in the list.\n */\n _defineProperty(this, \"results\", {});\n _defineProperty(this, \"typed\", null);\n _defineProperty(this, \"searched\", []);\n _defineProperty(this, \"dropdownItemAttrs\", {});\n /**\n * Don't send API calls searching for models until at least 2 characters have been typed.\n * This focuses the mention results on models already loaded.\n */\n _defineProperty(this, \"search\", async () => {\n if (!this.typed || this.typed.length <= 1) return;\n const typedLower = this.typed.toLowerCase();\n if (this.searched.includes(typedLower)) return;\n for (const mentionable of this.mentionables) {\n for (const model of await mentionable.search(typedLower)) {\n if (!this.results[mentionable.type()].has(model.id())) {\n this.results[mentionable.type()].set(model.id(), model);\n }\n }\n }\n this.searched.push(typedLower);\n return Promise.resolve();\n });\n this.dropdownItemAttrs = dropdownItemAttrs;\n }\n init(mentionables) {\n this.typed = null;\n this.mentionables = mentionables;\n for (const mentionable of this.mentionables) {\n this.results[mentionable.type()] = new Map(mentionable.initialResults().map(result => [result.id(), result]));\n }\n }\n matches(mentionable, model) {\n return mentionable.matches(model, this.typed?.toLowerCase() || '');\n }\n makeSuggestion(mentionable, model) {\n const content = mentionable.suggestion(model, this.typed);\n const replacement = mentionable.replacement(model);\n const {\n onclick,\n ...attrs\n } = this.dropdownItemAttrs;\n return m(MentionsDropdownItem, Object.assign({\n mentionable: mentionable,\n onclick: () => onclick(replacement)\n }, attrs), content);\n }\n buildSuggestions() {\n const suggestions = [];\n for (const mentionable of this.mentionables) {\n if (!mentionable.enabled()) continue;\n let matches = Array.from(this.results[mentionable.type()].values()).filter(model => this.matches(mentionable, model));\n const max = mentionable.maxStoreMatchedResults();\n if (max) matches = matches.splice(0, max);\n for (const model of matches) {\n const dropdownItem = this.makeSuggestion(mentionable, model);\n suggestions.push(dropdownItem);\n }\n }\n return suggestions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModels', MentionableModels);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionFormat {\n constructor() {\n _defineProperty(this, \"instances\", void 0);\n _defineProperty(this, \"mentionables\", void 0);\n _defineProperty(this, \"extendable\", void 0);\n }\n makeMentionables() {\n return this.instances ?? (this.instances = this.mentionables.map(Mentionable => new Mentionable(this)));\n }\n getMentionable(type) {\n return this.makeMentionables().find(mentionable => mentionable.type() === type) ?? null;\n }\n extend(mentionable) {\n if (!this.extendable) throw new Error('This mention format does not allow extending.');\n this.mentionables.push(mentionable);\n }\n\n /**\n * Picks the term to search in the API from the typed text.\n * @example:\n * * Full text = `Hello @\"John D`\n * * Typed text = `\"John D`\n * * Query = `John D`\n */\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormat', MentionFormat);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Avatar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/highlight');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionableModel {\n constructor(format) {\n _defineProperty(this, \"format\", void 0);\n this.format = format;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModel', MentionableModel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import app from 'flarum/forum/app';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * Whether to use the old mentions format.\n *\n * `'@username'` or `'@\"Display name\"'`\n */\nexport const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false;\nconst getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text'));\n\n/**\n * Fetches a user's username or display name.\n *\n * Chooses based on the format option set in the admin settings page.\n *\n * @param user An instance of the User model to fetch the username for\n * @param useDisplayName If `true`, uses `user.displayName()`, otherwise, uses `user.username()`\n */\nexport default function getCleanDisplayName(user, useDisplayName) {\n if (useDisplayName === void 0) {\n useDisplayName = true;\n }\n if (!user) return getDeletedUserText().replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n const text = (useDisplayName ? user.displayName() : user.username()) || getDeletedUserText();\n return text.replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/getCleanDisplayName', getCleanDisplayName);","import app from 'flarum/forum/app';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nimport getCleanDisplayName, { shouldUseOldFormat } from '../utils/getCleanDisplayName';\nexport default class UserMention extends MentionableModel {\n type() {\n return 'user';\n }\n initialResults() {\n return Array.from(app.store.all('users'));\n }\n\n /**\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @\"Display name\"#UserID or `@username`\n *\n * @example
New display name syntax
\n * // '@\"user\"#1'\n * forUser(User) // User is ID 1, display name is 'User'\n *\n * @example
Using old syntax
\n * // '@username'\n * forUser(user) // User's username is 'username'\n */\n replacement(user) {\n if (shouldUseOldFormat()) {\n const cleanText = getCleanDisplayName(user, false);\n return this.format.format(cleanText);\n }\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, '', user.id());\n }\n suggestion(model, typed) {\n const username = usernameHelper(model, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: model\n }), username);\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.username(), model.displayName()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('users', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/UserMention', UserMention);","import app from 'flarum/forum/app';\nimport MentionableModel from './MentionableModel';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport { truncate } from 'flarum/common/utils/string';\nimport getCleanDisplayName from '../utils/getCleanDisplayName';\nexport default class PostMention extends MentionableModel {\n type() {\n return 'post';\n }\n\n /**\n * If the user is replying to a discussion, or if they are editing a\n * post, then we can suggest other posts in the discussion to mention.\n * We will add the 5 most recent comments in the discussion which\n * match any username characters that have been typed.\n */\n initialResults() {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n const ReplyComposer = flarum.reg.checkModule('core', 'forum/components/ReplyComposer');\n if ((!ReplyComposer || !app.composer.bodyMatches(ReplyComposer)) && (!EditPostComposer || !app.composer.bodyMatches(EditPostComposer))) {\n return [];\n }\n\n // @ts-ignore\n const composerAttrs = app.composer.body.attrs;\n const composerPost = composerAttrs.post;\n const discussion = composerPost && composerPost.discussion() || composerAttrs.discussion;\n return discussion.posts()\n // Filter to only comment posts, and replies before this message\n .filter(post => post && post.contentType() === 'comment' && (!composerPost || post.number() < composerPost.number()))\n // Sort by new to old\n .sort((a, b) => b.createdAt().getTime() - a.createdAt().getTime());\n }\n\n /**\n * Generates the syntax for mentioning of a post. Also cleans up the display name.\n *\n * @example
Post mention
\n * // '@\"User\"#p13'\n * // @\"Display name\"#pPostID\n * forPostMention(user, 13) // User display name is 'User', post ID is 13\n */\n replacement(post) {\n const user = post.user();\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, 'p', post.id());\n }\n suggestion(model, typed) {\n const user = model.user() || null;\n const username = usernameHelper(user, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: user\n }), username, [app.translator.trans('flarum-mentions.forum.composer.reply_to_post_text', {\n number: model.number()\n }), ' — ', truncate(model.contentPlain() ?? '', 200)]);\n }\n matches(model, typed) {\n const user = model.user();\n const userMentionable = app.mentionFormats.mentionable('user');\n return !typed || user && userMentionable.matches(user, typed);\n }\n maxStoreMatchedResults() {\n return 5;\n }\n\n /**\n * Post mention suggestions are only offered from current discussion posts.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/PostMention', PostMention);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Group');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","import app from 'flarum/forum/app';\nimport Group from 'flarum/common/models/Group';\nimport MentionableModel from './MentionableModel';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nexport default class GroupMention extends MentionableModel {\n type() {\n return 'group';\n }\n initialResults() {\n return Array.from(app.store.all('groups').filter(g => {\n return g.id() !== Group.GUEST_ID && g.id() !== Group.MEMBER_ID;\n }));\n }\n\n /**\n * Generates the mention syntax for a group mention.\n *\n * @\"Name Plural\"#gGroupID\n *\n * @example
Group mention
\n * // '@\"Mods\"#g4'\n * forGroup(group) // Group display name is 'Mods', group ID is 4\n */\n replacement(group) {\n return this.format.format(group.namePlural(), 'g', group.id());\n }\n suggestion(model, typed) {\n let groupName = model.namePlural();\n if (typed) {\n groupName = highlight(groupName, typed);\n }\n return m('[', null, m(Badge, {\n className: `Avatar Badge Badge--group--${model.id()} Badge-icon`,\n color: model.color(),\n type: \"group\",\n icon: model.icon()\n }), m(\"span\", {\n className: \"username\"\n }, groupName));\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.namePlural().toLowerCase(), model.nameSingular().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n\n /**\n * All groups are already loaded, so we don't need to search for them.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return app.session?.user?.canMentionGroups() ?? false;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/GroupMention', GroupMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport UserMention from '../UserMention';\nimport PostMention from '../PostMention';\nimport GroupMention from '../GroupMention';\nexport default class AtMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [UserMention, PostMention, GroupMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '@';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[\"“]?((?:(?!\"#).)+)$/);\n return matchTyped ? matchTyped[1] : null;\n }\n format(name, char, id) {\n if (char === void 0) {\n char = '';\n }\n if (id === void 0) {\n id = null;\n }\n return {\n simple: `@${name}`,\n safe: `@\"${name}\"#${char}${id}`\n }[id ? 'safe' : 'simple'];\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/AtMentionFormat', AtMentionFormat);","import app from 'flarum/forum/app';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nexport default class TagMention extends MentionableModel {\n type() {\n return 'tag';\n }\n initialResults() {\n return Array.from(app.store.all('tags'));\n }\n\n /**\n * Generates the mention syntax for a tag mention.\n *\n * ~tagSlug\n *\n * @example
Tag mention
\n * // ~general\n * forTag(tag) // Tag display name is 'Tag', tag ID is 5\n */\n replacement(tag) {\n return this.format.format(tag.slug());\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.name().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('tags', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n suggestion(model, typed) {\n let tagName = model.name();\n if (typed) {\n tagName = highlight(tagName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar\",\n icon: model.icon(),\n color: model.color(),\n type: \"tag\"\n }), m(\"span\", {\n className: \"username\"\n }, tagName));\n }\n enabled() {\n return 'flarum-tags' in flarum.extensions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/TagMention', TagMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport TagMention from '../TagMention';\nexport default class HashMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [TagMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '#';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[-_\\p{L}\\p{N}\\p{M}]+$/giu);\n return matchTyped ? matchTyped[0] : null;\n }\n format(slug) {\n return `#${slug}`;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/HashMentionFormat', HashMentionFormat);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport AtMentionFormat from './AtMentionFormat';\nimport HashMentionFormat from './HashMentionFormat';\nexport default class MentionFormats {\n constructor() {\n _defineProperty(this, \"formats\", [new AtMentionFormat(), new HashMentionFormat()]);\n }\n get(symbol) {\n return this.formats.find(f => f.trigger() === symbol) ?? null;\n }\n mentionable(type) {\n for (const format of this.formats) {\n const mentionable = format.getMentionable(type);\n if (mentionable) return mentionable;\n }\n return null;\n }\n extend(format) {\n this.formats.push(new format());\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormats', MentionFormats);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/UserPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostsUserPage');","import PostsUserPage from 'flarum/forum/components/PostsUserPage';\n/**\n * The `MentionsUserPage` component shows post which user Mentioned at\n */\nexport default class MentionsUserPage extends PostsUserPage {\n params(user) {\n return {\n filter: {\n type: 'comment',\n mentioned: user.id()\n }\n };\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsUserPage', MentionsUserPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class PostMentionedNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n href() {\n const notification = this.attrs.notification;\n const post = notification.subject();\n const content = notification.content();\n return app.route.discussion(post.discussion(), content && content.replyNumber);\n }\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.post_mentioned_text', {\n user,\n count: 1\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain() || '', 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/PostMentionedNotification', PostMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class UserMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.user_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/UserMentionedNotification', UserMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class GroupMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.group_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/GroupMentionedNotification', GroupMentionedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { KeyValueGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class MentionedGambit extends KeyValueGambit {\n key() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.hint', {}, true);\n }\n filterKey() {\n return 'mentioned';\n }\n}\nflarum.reg.add('flarum-mentions', 'common/query/posts/MentionedGambit', MentionedGambit);","import Extend from 'flarum/common/extenders';\nimport MentionedGambit from './query/posts/MentionedGambit';\nexport default [new Extend.Search() //\n.gambit('posts', MentionedGambit)];","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport MentionsUserPage from './components/MentionsUserPage';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport GroupMentionedNotification from './components/GroupMentionedNotification';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('user.mentions', '/u/:username/mentions', MentionsUserPage), new Extend.Model(Post) //\n.hasMany('mentionedBy').attribute('mentionedByCount'), new Extend.Notification() //\n.add('postMentioned', PostMentionedNotification).add('userMentioned', UserMentionedNotification).add('groupMentioned', GroupMentionedNotification), new Extend.Model(User) //\n.attribute('canMentionGroups')];","import app from 'flarum/forum/app';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nexport function filterUserMentions(tag) {\n let user;\n if (app.forum.attribute('allowUsernameMentionFormat') && tag.hasAttribute('username')) user = app.store.getBy('users', 'username', tag.getAttribute('username'));else if (tag.hasAttribute('id')) user = app.store.getById('users', tag.getAttribute('id'));\n if (user) {\n tag.setAttribute('id', user.id());\n tag.setAttribute('slug', user.slug());\n tag.setAttribute('displayname', extractText(username(user)));\n return true;\n }\n tag.invalidate();\n}\nexport function postFilterUserMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterPostMentions(tag) {\n const post = app.store.getById('posts', tag.getAttribute('id'));\n if (post) {\n tag.setAttribute('discussionid', post.discussion().id());\n tag.setAttribute('number', post.number());\n tag.setAttribute('displayname', extractText(username(post.user())));\n return true;\n }\n}\nexport function postFilterPostMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n if (group) {\n tag.setAttribute('groupname', extractText(group.namePlural()));\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n tag.setAttribute('color', group.color());\n tag.setAttribute('icon', group.icon());\n tag.setAttribute('deleted', false);\n }\n}\nexport function filterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n if (model) {\n tag.setAttribute('id', model.id());\n tag.setAttribute('tagname', model.name());\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n tag.setAttribute('icon', model.icon());\n tag.setAttribute('color', model.color());\n tag.setAttribute('deleted', false);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/textFormatter', { filterUserMentions: filterUserMentions,postFilterUserMentions: postFilterUserMentions,filterPostMentions: filterPostMentions,postFilterPostMentions: postFilterPostMentions,filterGroupMentions: filterGroupMentions,postFilterGroupMentions: postFilterGroupMentions,filterTagMentions: filterTagMentions,postFilterTagMentions: postFilterTagMentions, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class Mentionables {\n constructor() {\n _defineProperty(this, \"formats\", []);\n _defineProperty(this, \"mentionables\", {});\n }\n /**\n * Register a new mention format.\n * Must extend MentionFormat and have a unique unused trigger symbol.\n */\n format(format) {\n this.formats.push(format);\n return this;\n }\n\n /**\n * Register a new mentionable model to a mention format.\n * Only works if the format has already been registered,\n * and the format allows using multiple mentionables.\n *\n * @param symbol The trigger symbol of the format to extend (ex: @).\n * @param mentionable The mentionable instance to register.\n * Must extend MentionableModel.\n */\n mentionable(symbol, mentionable) {\n if (!this.mentionables[symbol]) {\n this.mentionables[symbol] = [];\n }\n this.mentionables[symbol].push(mentionable);\n return this;\n }\n extend(app) {\n for (const format of this.formats) {\n app.mentionFormats.extend(format);\n }\n for (const symbol in this.mentionables) {\n const format = app.mentionFormats.get(symbol);\n if (!format) continue;\n for (const mentionable of this.mentionables[symbol]) {\n format.extend(mentionable);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/extenders/Mentionables', Mentionables);","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport Post from 'flarum/forum/components/Post';\nimport addPostMentionPreviews from './addPostMentionPreviews';\nimport addMentionedByList from './addMentionedByList';\nimport addPostReplyAction from './addPostReplyAction';\nimport addPostQuoteButton from './addPostQuoteButton';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport MentionFormats from './mentionables/formats/MentionFormats';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\napp.mentionFormats = new MentionFormats();\nexport { default as extend } from './extend';\napp.initializers.add('flarum-mentions', () => {\n // For every mention of a post inside a post's content, set up a hover handler\n // that shows a preview of the mentioned post.\n addPostMentionPreviews();\n\n // In the footer of each post, show information about who has replied (i.e.\n // who the post has been mentioned by).\n addMentionedByList();\n\n // Add a 'reply' control to the footer of each post. When clicked, it will\n // open up the composer and add a post mention to its contents.\n addPostReplyAction();\n\n // Show a Quote button when Post text is selected\n addPostQuoteButton();\n\n // After typing '@' in the composer, show a dropdown suggesting a bunch of\n // posts or users that the user could mention.\n addComposerAutocomplete();\n\n // Add notification preferences.\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('postMentioned', {\n name: 'postMentioned',\n icon: 'fas fa-reply',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label')\n });\n items.add('userMentioned', {\n name: 'userMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label')\n });\n items.add('groupMentioned', {\n name: 'groupMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_group_mentioned_label')\n });\n });\n\n // Add mentions tab in user profile\n extend(UserPage.prototype, 'navItems', function (items) {\n const user = this.user;\n items.add('mentions', m(LinkButton, {\n href: app.route('user.mentions', {\n username: user.slug()\n }),\n name: \"mentions\",\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.user.mentions_link')), 80);\n });\n\n // Remove post mentions when rendering post previews.\n getPlainContent.removeSelectors.push('a.PostMention');\n\n // Apply color contrast fix on group mentions.\n extend(Post.prototype, 'oncreate', function () {\n this.$('.GroupMention--colored, .TagMention--colored').each(function () {\n this.classList.add(textContrastClass(getComputedStyle(this).getPropertyValue('--color')));\n });\n });\n\n // Auto scope the search to the current user mentioned posts.\n override('flarum/forum/components/SearchModal', 'defaultActiveSource', function (original) {\n const orig = original();\n if (!orig && app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n return 'posts';\n }\n return orig;\n });\n extend('flarum/forum/components/SearchModal', 'defaultFilters', function (filters) {\n if (app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n filters.posts.mentioned = app.current.data.user.username();\n }\n });\n});\nexport * from './utils/textFormatter';\nimport './forum';","import { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default function addPostMentionPreviews() {\n function addPreviews() {\n const contentHtml = this.attrs.post.contentHtml();\n if (contentHtml === this.oldPostContentHtml || this.isEditing()) return;\n this.oldPostContentHtml = contentHtml;\n const parentPost = this.attrs.post;\n const $parentPost = this.$();\n this.$().on('click', '.UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)', function (e) {\n m.route.set(this.getAttribute('href'));\n e.preventDefault();\n });\n this.$('.PostMention:not(.PostMention--deleted)').each(function () {\n const $this = $(this);\n const id = $this.data('id');\n let timeout;\n\n // Wrap the mention link in a wrapper element so that we can insert a\n // preview popup as its sibling and relatively position it.\n const $preview = $('
');\n $parentPost.append($preview);\n const getPostElement = () => {\n return $(`.PostStream-item[data-id=\"${id}\"]`);\n };\n const showPreview = () => {\n // When the user hovers their mouse over the mention, look for the\n // post that it's referring to in the stream, and determine if it's\n // in the viewport. If it is, we will \"pulsate\" it.\n const $post = getPostElement();\n let visible = false;\n if ($post.length) {\n const top = $post.offset().top;\n const scrollTop = window.pageYOffset;\n if (top > scrollTop && top + $post.height() < scrollTop + $(window).height()) {\n $post.addClass('pulsate');\n visible = true;\n }\n }\n\n // Otherwise, we will show a popup preview of the post. If the post\n // hasn't yet been loaded, we will need to do that.\n if (!visible) {\n // Position the preview so that it appears above the mention.\n // (The offsetParent should be .Post-body.)\n const positionPreview = () => {\n const previewHeight = $preview.outerHeight(true);\n let offset = 0;\n\n // If the preview goes off the top of the viewport, reposition it to\n // be below the mention.\n if ($this.offset().top - previewHeight < $(window).scrollTop() + $('#header').outerHeight()) {\n offset += $this.outerHeight(true);\n } else {\n offset -= previewHeight;\n }\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + offset).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $this.offsetParent().width());\n };\n const showPost = post => {\n const discussion = post.discussion();\n m.render($preview[0], [discussion !== parentPost.discussion() && m(\"li\", null, m(\"span\", {\n className: \"PostMention-preview-discussion\"\n }, discussion.title())), m(\"li\", null, m(PostPreview, {\n post: post\n }))]);\n positionPreview();\n };\n const post = app.store.getById('posts', id);\n if (post && post.discussion()) {\n showPost(post);\n } else {\n m.render($preview[0], m(LoadingIndicator, null));\n app.store.find('posts', id).then(showPost);\n positionPreview();\n }\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n }\n };\n const hidePreview = () => {\n getPostElement().removeClass('pulsate');\n if ($preview.hasClass('in')) {\n $preview.removeClass('in').one('transitionend', () => $preview.hide());\n }\n };\n\n // On a touch (mobile) device we cannot hover the link to reveal the preview.\n // Instead we cancel the navigation so that a click reveals the preview.\n // Users can then click on the preview to go to the post if desired.\n $this.on('touchend', e => {\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n getPostElement().removeClass('pulsate');\n timeout = setTimeout(hidePreview, 250);\n }).on('touchend', e => {\n showPreview();\n e.stopPropagation();\n });\n $(document).on('touchend', hidePreview);\n });\n }\n extend(CommentPost.prototype, 'oncreate', addPreviews);\n extend(CommentPost.prototype, 'onupdate', addPreviews);\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport Icon from 'flarum/common/components/Icon';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModal from './components/MentionedByModal';\nexport default function addMentionedByList() {\n function hidePreview() {\n this.$('.Post-mentionedBy-preview').removeClass('in').one('transitionend', function () {\n $(this).hide();\n });\n }\n extend(CommentPost.prototype, 'oncreate', function () {\n let timeout;\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const $preview = $('
');\n this.$().append($preview);\n const $parentPost = this.$();\n const $this = this.$('.Post-mentionedBy');\n const showPreview = () => {\n if (!$preview.hasClass('in') && $preview.is(':visible')) return;\n\n // When the user hovers their mouse over the list of people who have\n // replied to the post, render a list of reply previews into a\n // popup.\n m.render($preview[0], m('[', null, replies.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: hidePreview.bind(this)\n }))), replies.length < post.mentionedByCount() && m(\"li\", {\n className: \"Post-mentionedBy-preview-more\"\n }, m(Button, {\n className: \"PostPreview Button\",\n onclick: () => {\n hidePreview.call(this);\n app.modal.show(MentionedByModal, {\n post\n });\n }\n }, m(\"span\", {\n className: \"PostPreview-content\"\n }, m(\"span\", {\n className: \"PostPreview-badge Avatar\"\n }, m(Icon, {\n name: 'fas fa-reply-all'\n })), m(\"span\", null, app.translator.trans('flarum-mentions.forum.post.mentioned_by_more_text', {\n count: post.mentionedByCount() - replies.length\n })))))));\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + $this.outerHeight(true)).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $parentPost.width());\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n };\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n timeout = setTimeout(hidePreview, 250);\n });\n\n // Whenever the user hovers their mouse over a particular name in the\n // list of repliers, highlight the corresponding post in the preview\n // popup.\n this.$().find('.Post-mentionedBy-summary a').hover(function () {\n $preview.find('[data-number=\"' + $(this).data('number') + '\"]').addClass('active');\n }, function () {\n $preview.find('[data-number]').removeClass('active');\n });\n }\n });\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const users = [];\n const repliers = replies.sort(reply => reply.user() === app.session.user ? -1 : 0).filter(reply => {\n const user = reply.user();\n if (users.indexOf(user) === -1) {\n users.push(user);\n return true;\n }\n });\n const limit = 4;\n const overLimit = post.mentionedByCount() > limit;\n\n // Create a list of unique users who have replied. So even if a user has\n // replied twice, they will only be in this array once.\n const names = repliers.slice(0, overLimit ? limit - 1 : limit).map(reply => {\n const user = reply.user();\n return m(Link, {\n href: app.route.post(reply),\n onclick: hidePreview.bind(this),\n \"data-number\": reply.number()\n }, app.session.user === user ? app.translator.trans('flarum-mentions.forum.post.you_text') : username(user));\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.mentionedByCount() - names.length;\n names.push(app.translator.trans('flarum-mentions.forum.post.others_text', {\n count\n }));\n }\n items.add('replies', m(\"div\", {\n className: \"Post-mentionedBy\"\n }, m(\"span\", {\n className: \"Post-mentionedBy-summary\"\n }, m(Icon, {\n name: 'fas fa-reply'\n }), app.translator.trans(`flarum-mentions.forum.post.mentioned_by${repliers[0].user() === app.session.user ? '_self' : ''}_text`, {\n count: names.length,\n users: punctuateSeries(names)\n }))));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport reply from './utils/reply';\nexport default function addPostReplyAction() {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n items.add('reply', m(Button, {\n className: \"Button Button--link\",\n onclick: () => reply(post)\n }, app.translator.trans('flarum-mentions.forum.post.reply_link')));\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostQuoteButton from './fragments/PostQuoteButton';\nimport selectedText from './utils/selectedText';\nexport default function addPostQuoteButton() {\n extend(CommentPost.prototype, 'oncreate', function () {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n const $postBody = this.$('.Post-body');\n\n // Wrap the quote button in a wrapper element so that we can render\n // button into it.\n const $container = $('');\n const button = new PostQuoteButton(post);\n const handler = function (e) {\n setTimeout(() => {\n const content = selectedText($postBody);\n if (content) {\n button.content = content;\n m.render($container[0], button.render());\n const rects = window.getSelection().getRangeAt(0).getClientRects();\n const firstRect = rects[0];\n if (e.clientY < firstRect.bottom && e.clientX - firstRect.right < firstRect.left - e.clientX) {\n button.showStart(firstRect.left, firstRect.top);\n } else {\n const lastRect = rects[rects.length - 1];\n button.showEnd(lastRect.right, lastRect.bottom);\n }\n }\n }, 1);\n };\n this.$().after($container).on('mouseup', handler);\n if ('ontouchstart' in window) {\n document.addEventListener('selectionchange', handler, false);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport AutocompleteReader from 'flarum/common/utils/AutocompleteReader';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport MentionableModels from './mentionables/MentionableModels';\nexport default function addComposerAutocomplete() {\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.mentionsDropdown = new AutocompleteDropdown();\n this.searchMentions = throttle(250, (mentionables, buildSuggestions) => mentionables.search().then(buildSuggestions));\n const $editor = this.$('.TextEditor-editor').wrap('');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.mentionsDropdown.active).onUp(() => this.mentionsDropdown.navigate(-1)).onDown(() => this.mentionsDropdown.navigate(1)).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo($editor);\n $editor.after($(''));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n let matchTyped;\n const suggestionsInputListener = () => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n let activeFormat = null;\n const autocompleteReader = new AutocompleteReader(character => !!(activeFormat = app.mentionFormats.get(character)));\n const autocompleting = autocompleteReader.check(this.attrs.composer.editor.getLastNChars(30), cursor, /\\S+/);\n const mentionsDropdown = this.mentionsDropdown;\n let mentionables = new MentionableModels({\n onmouseenter: function () {\n mentionsDropdown.setIndex($(this).parent().index());\n },\n onclick: replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(autocompleting.absoluteStart - 1, replacement + ' ');\n this.mentionsDropdown.hide();\n }\n });\n this.mentionsDropdown.hide();\n this.mentionsDropdown.active = false;\n if (autocompleting) {\n mentionables.init(activeFormat.makeMentionables());\n matchTyped = activeFormat.queryFromTyped(autocompleting.typed);\n if (!matchTyped) return;\n mentionables.typed = matchTyped;\n const buildSuggestions = () => {\n // If the user has started to type a mention,\n // then suggest models matching.\n const suggestions = mentionables.buildSuggestions();\n if (suggestions.length) {\n this.mentionsDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-mentionsDropdownContainer')[0], this.mentionsDropdown.render());\n this.mentionsDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(autocompleting.absoluteStart);\n const width = this.mentionsDropdown.$().outerWidth();\n const height = this.mentionsDropdown.$().outerHeight();\n const parent = this.mentionsDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.mentionsDropdown.show(left, top);\n } else {\n this.mentionsDropdown.active = false;\n this.mentionsDropdown.hide();\n }\n };\n this.mentionsDropdown.active = true;\n buildSuggestions();\n this.mentionsDropdown.setIndex(0);\n this.mentionsDropdown.$().scrollTop(0);\n this.searchMentions(mentionables, buildSuggestions);\n }\n };\n params.inputListeners.push(suggestionsInputListener);\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('mention', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' @'),\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.composer.mention_tooltip')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","MentionedByModalState","constructor","params","page","limit","super","type","add","MentionedByModal","oninit","vnode","this","state","filter","mentionedPost","attrs","post","id","sort","refresh","className","title","trans","content","m","isInitialLoading","getPages","map","items","reply","number","onclick","close","hasNext","loadNext","loading","isLoadingNext","insertMention","composer","quote","Promise","resolve","mention","mentionable","replacement","fields","body","originalContent","cursorPosition","editor","getSelectionRange","preceding","slice","precedingNewlines","length","match","insertAtCursor","Array","join","trim","replace","EditPostComposer","checkModule","bodyMatches","discussion","then","PostQuoteButton","view","name","show","left","top","$this","$","parentOffset","offsetParent","offset","css","hideHandler","hide","bind","document","on","showStart","window","scrollTop","outerHeight","showEnd","right","bottom","outerWidth","off","selectedText","selection","getSelection","isCollapsed","range","getRangeAt","parent","commonAncestorContainer","contains","clone","append","cloneContents","find","replaceWith","alt","src","innerText","href","text","_typeof","iterator","_defineProperty","e","r","t","i","toPrimitive","TypeError","String","toPropertyKey","configurable","writable","AutocompleteDropdown","arguments","item","active","navigate","delta","keyWasJustPressed","setIndex","index","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","dropdownTop","dropdownBottom","itemTop","itemBottom","parseInt","stop","animate","MentionsDropdownItem","assign","children","MentionableModels","dropdownItemAttrs","async","typed","typedLower","toLowerCase","searched","includes","mentionables","model","search","results","has","set","push","init","Map","initialResults","result","matches","makeSuggestion","suggestion","buildSuggestions","suggestions","enabled","from","values","max","maxStoreMatchedResults","splice","dropdownItem","MentionFormat","makeMentionables","instances","Mentionable","getMentionable","extend","extendable","Error","MentionableModel","format","getDeletedUserText","getCleanDisplayName","user","useDisplayName","displayName","username","UserMention","all","attribute","cleanText","some","substr","q","PostMention","ReplyComposer","composerAttrs","composerPost","posts","contentType","b","createdAt","getTime","truncate","contentPlain","userMentionable","GroupMention","g","group","namePlural","groupName","color","icon","nameSingular","canMentionGroups","AtMentionFormat","trigger","queryFromTyped","matchTyped","char","simple","safe","TagMention","tag","slug","tagName","extensions","HashMentionFormat","MentionFormats","symbol","formats","f","MentionsUserPage","mentioned","PostMentionedNotification","notification","subject","replyNumber","fromUser","count","excerpt","UserMentionedNotification","GroupMentionedNotification","MentionedGambit","KeyValueGambit","hint","filterKey","gambit","hasMany","filterUserMentions","hasAttribute","getBy","getAttribute","getById","setAttribute","invalidate","postFilterUserMentions","filterPostMentions","postFilterPostMentions","filterGroupMentions","postFilterGroupMentions","filterTagMentions","postFilterTagMentions","app","mentionFormats","addPreviews","contentHtml","oldPostContentHtml","isEditing","parentPost","$parentPost","route","preventDefault","each","data","timeout","$preview","getPostElement","showPreview","$post","visible","pageYOffset","height","positionPreview","previewHeight","width","showPost","render","store","hidePreview","hasClass","one","cancelable","hover","stopPropagation","addPostMentionPreviews","replies","mentionedBy","is","mentionedByCount","users","repliers","indexOf","overLimit","names","addMentionedByList","isHidden","canReply","$postBody","$container","button","handler","rects","getClientRects","firstRect","clientY","clientX","lastRect","after","addEventListener","mentionsDropdown","searchMentions","throttle","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","inputListeners","cursor","activeFormat","autocompleting","character","check","getLastNChars","onmouseenter","replaceBeforeCursor","absoluteStart","coordinates","getCaretCoordinates","Math","label","getPlainContent","removeSelectors","classList","getComputedStyle","getPropertyValue","override","original","orig","routeName","filters"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,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rB,IAAI,gBAAiB,CACzB2D,KAAM,gBACNgK,KAAM,eACNqI,MAAO,eAAejV,MAAM,gEAE9BM,EAAMrB,IAAI,gBAAiB,CACzB2D,KAAM,gBACNgK,KAAM,YACNqI,MAAO,eAAejV,MAAM,gEAE9BM,EAAMrB,IAAI,iBAAkB,CAC1B2D,KAAM,iBACNgK,KAAM,YACNqI,MAAO,eAAejV,MAAM,gEAEhC,KAGA,IAAAyK,QAAO,eAAoB,YAAY,SAAUnK,GAC/C,MAAM0K,EAAO3L,KAAK2L,KAClB1K,EAAMrB,IAAI,WAAYiB,EAAE,KAAY,CAClCmF,KAAM,UAAU,gBAAiB,CAC/B8F,SAAUH,EAAKwC,SAEjB5K,KAAM,WACNgK,KAAM,aACL,eAAe5M,MAAM,6CAA8C,GACxE,IAGA,EAAAkV,gBAAgBC,gBAAgBhM,KAAK,kBAGrC,IAAAsB,QAAO,cAAgB,YAAY,WACjCpL,KAAK4D,EAAE,gDAAgDwN,MAAK,WAC1DpR,KAAK+V,UAAUnW,IAAI,IAAkBoW,iBAAiBhW,MAAMiW,iBAAiB,YAC/E,GACF,KAGA,IAAAC,UAAS,sCAAuC,uBAAuB,SAAUC,GAC/E,MAAMC,EAAOD,IACb,OAAKC,GAAQ,YAAY/E,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAU9M,SAAS,kBAAoB,YAAY8H,KAAK1F,KAC3G,QAEFyK,CACT,KACA,IAAAhL,QAAO,sCAAuC,kBAAkB,SAAUkL,GACpE,YAAYjF,KAAKgF,WAAa,YAAYhF,KAAKgF,UAAU9M,SAAS,kBAAoB,YAAY8H,KAAK1F,OACzG2K,EAAQ7J,MAAMmC,UAAY,YAAYyC,KAAK1F,KAAKG,WAEpD,GAAE,G","sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/webpack/runtime/compat get default export","webpack://@flarum/mentions/webpack/runtime/define property getters","webpack://@flarum/mentions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/mentions/webpack/runtime/make namespace object","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/CommentPost')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostPreview')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/punctuateSeries')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/mentions/./src/forum/state/MentionedByModalState.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/mentions/./src/forum/components/MentionedByModal.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/mentions/./src/forum/utils/reply.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/mentions/./src/forum/fragments/PostQuoteButton.js","webpack://@flarum/mentions/./src/forum/utils/selectedText.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/AutocompleteReader')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/mentions/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/mentions/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/mentions/./src/forum/components/MentionsDropdownItem.tsx","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModels.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormat.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModel.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/mentions/./src/forum/utils/getCleanDisplayName.js","webpack://@flarum/mentions/./src/forum/mentionables/UserMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/PostMention.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Group')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/mentions/./src/forum/mentionables/GroupMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/AtMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/TagMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/HashMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormats.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/UserPage')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostsUserPage')\"","webpack://@flarum/mentions/./src/forum/components/MentionsUserPage.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/mentions/./src/forum/components/PostMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/UserMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/GroupMentionedNotification.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/mentions/./src/common/query/posts/MentionedGambit.ts","webpack://@flarum/mentions/./src/common/extend.ts","webpack://@flarum/mentions/./src/forum/extend.ts","webpack://@flarum/mentions/./src/forum/utils/textFormatter.js","webpack://@flarum/mentions/./src/forum/extenders/Mentionables.ts","webpack://@flarum/mentions/./src/forum/index.js","webpack://@flarum/mentions/./src/forum/addPostMentionPreviews.js","webpack://@flarum/mentions/./src/forum/addMentionedByList.js","webpack://@flarum/mentions/./src/forum/addPostReplyAction.js","webpack://@flarum/mentions/./src/forum/addPostQuoteButton.js","webpack://@flarum/mentions/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/textContrastClass');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/CommentPost');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostPreview');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/punctuateSeries');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/username');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class MentionedByModalState extends PaginatedListState {\n constructor(params, page) {\n if (page === void 0) {\n page = 1;\n }\n const limit = 10;\n params.page = {\n ...(params.page || {}),\n limit\n };\n super(params, page, limit);\n }\n get type() {\n return 'posts';\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/state/MentionedByModalState', MentionedByModalState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import app from 'flarum/forum/app';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModalState from '../state/MentionedByModalState';\nimport Form from 'flarum/common/components/Form';\nexport default class MentionedByModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new MentionedByModalState({\n filter: {\n mentionedPost: this.attrs.post.id()\n },\n sort: 'number'\n });\n this.state.refresh();\n }\n className() {\n return 'MentionedByModal';\n }\n title() {\n return app.translator.trans('flarum-mentions.forum.mentioned_by.title');\n }\n content() {\n return m('[', null, m(\"div\", {\n className: \"Modal-body\"\n }, this.state.isInitialLoading() ? m(LoadingIndicator, null) : m('[', null, m(\"ul\", {\n className: \"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview\"\n }, this.state.getPages().map(page => page.items.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: () => app.modal.close()\n }))))))), this.state.hasNext() && m(\"div\", {\n className: \"Modal-footer\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--block\",\n onclick: () => this.state.loadNext(),\n loading: this.state.isLoadingNext()\n }, app.translator.trans('flarum-mentions.forum.mentioned_by.load_more_button'))))));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionedByModal', MentionedByModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import app from 'flarum/forum/app';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nexport function insertMention(post, composer, quote) {\n return new Promise(resolve => {\n const mention = app.mentionFormats.mentionable('post').replacement(post) + ' ';\n\n // If the composer is empty, then assume we're starting a new reply.\n // In which case we don't want the user to have to confirm if they\n // close the composer straight away.\n if (!composer.fields.content()) {\n composer.body.attrs.originalContent = mention;\n }\n const cursorPosition = composer.editor.getSelectionRange()[0];\n const preceding = composer.fields.content().slice(0, cursorPosition);\n const precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\\n{0,2})$/)[0].length;\n composer.editor.insertAtCursor(Array(precedingNewlines).join('\\n') + (\n // Insert up to two newlines, depending on preceding whitespace\n quote ? '> ' + mention + quote.trim().replace(/\\n/g, '\\n> ') + '\\n\\n' : mention), false);\n return resolve(composer);\n });\n}\nexport default function reply(post, quote) {\n if (app.composer.bodyMatches('flarum/forum/components/EditPostComposer') && app.composer.body.attrs.post.discussion() === post.discussion()) {\n // If we're already editing a post in the discussion of post we're quoting,\n // insert the mention directly.\n return insertMention(post, app.composer, quote);\n } else {\n // The default \"Reply\" action behavior will only open a new composer if\n // necessary, but it will always be a ReplyComposer, hence the exceptional\n // case above.\n return DiscussionControls.replyAction.call(post.discussion()).then(composer => insertMention(post, composer, quote));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/reply', reply);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import app from 'flarum/forum/app';\nimport Fragment from 'flarum/common/Fragment';\nimport Icon from 'flarum/common/components/Icon';\nimport reply from '../utils/reply';\nexport default class PostQuoteButton extends Fragment {\n constructor(post) {\n super();\n this.post = post;\n }\n view() {\n return m(\"button\", {\n className: \"Button PostQuoteButton\",\n onclick: () => {\n reply(this.post, this.content);\n }\n }, m(Icon, {\n name: \"fas fa-quote-left\",\n className: \"Button-icon\"\n }), app.translator.trans('flarum-mentions.forum.post.quote_button'));\n }\n show(left, top) {\n const $this = this.$().show();\n const parentOffset = $this.offsetParent().offset();\n $this.css('left', left - parentOffset.left).css('top', top - parentOffset.top);\n this.hideHandler = this.hide.bind(this);\n $(document).on('mouseup', this.hideHandler);\n }\n showStart(left, top) {\n const $this = this.$();\n this.show(left, $(window).scrollTop() + top - $this.outerHeight() - 5);\n }\n showEnd(right, bottom) {\n const $this = this.$();\n this.show(right - $this.outerWidth(), $(window).scrollTop() + bottom + 5);\n }\n hide() {\n this.$().hide();\n $(document).off('mouseup', this.hideHandler);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/PostQuoteButton', PostQuoteButton);","/**\n * Finds the selected text in the provided composer body.\n */\nexport default function selectedText(body) {\n const selection = window.getSelection();\n if (!selection.isCollapsed) {\n const range = selection.getRangeAt(0);\n const parent = range.commonAncestorContainer;\n if (body[0] === parent || $.contains(body[0], parent)) {\n const clone = $('
').append(range.cloneContents());\n\n // Replace emoji images with their shortcode (found in alt attribute)\n clone.find('img.emoji').replaceWith(function () {\n return this.alt;\n });\n\n // Replace all other images with a Markdown image\n clone.find('img').replaceWith(function () {\n return ``;\n });\n\n // Replace all links with a Markdown link\n clone.find('a').replaceWith(function () {\n return `[${this.innerText}](${this.href})`;\n });\n return clone.text();\n }\n }\n return '';\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/selectedText', selectedText);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/AutocompleteReader');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu MentionsDropdown\"\n }, this.items.map(item => m(\"li\", null, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class MentionsDropdownItem extends Component {\n view(vnode) {\n const {\n mentionable,\n ...attrs\n } = this.attrs;\n const className = classList('MentionsDropdownItem', 'PostPreview', `MentionsDropdown-${mentionable.type()}`);\n return m(\"button\", Object.assign({\n className: className\n }, attrs), m(\"span\", {\n className: \"PostPreview-content\"\n }, vnode.children));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsDropdownItem', MentionsDropdownItem);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionsDropdownItem from '../components/MentionsDropdownItem';\nexport default class MentionableModels {\n constructor(dropdownItemAttrs) {\n _defineProperty(this, \"mentionables\", void 0);\n /**\n * We store models returned from an API here to preserve order in which they are returned\n * This prevents the list jumping around while models are returned.\n * We also use a hashmap for model IDs to provide O(1) lookup for the users already in the list.\n */\n _defineProperty(this, \"results\", {});\n _defineProperty(this, \"typed\", null);\n _defineProperty(this, \"searched\", []);\n _defineProperty(this, \"dropdownItemAttrs\", {});\n /**\n * Don't send API calls searching for models until at least 2 characters have been typed.\n * This focuses the mention results on models already loaded.\n */\n _defineProperty(this, \"search\", async () => {\n if (!this.typed || this.typed.length <= 1) return;\n const typedLower = this.typed.toLowerCase();\n if (this.searched.includes(typedLower)) return;\n for (const mentionable of this.mentionables) {\n for (const model of await mentionable.search(typedLower)) {\n if (!this.results[mentionable.type()].has(model.id())) {\n this.results[mentionable.type()].set(model.id(), model);\n }\n }\n }\n this.searched.push(typedLower);\n return Promise.resolve();\n });\n this.dropdownItemAttrs = dropdownItemAttrs;\n }\n init(mentionables) {\n this.typed = null;\n this.mentionables = mentionables;\n for (const mentionable of this.mentionables) {\n this.results[mentionable.type()] = new Map(mentionable.initialResults().map(result => [result.id(), result]));\n }\n }\n matches(mentionable, model) {\n return mentionable.matches(model, this.typed?.toLowerCase() || '');\n }\n makeSuggestion(mentionable, model) {\n const content = mentionable.suggestion(model, this.typed);\n const replacement = mentionable.replacement(model);\n const {\n onclick,\n ...attrs\n } = this.dropdownItemAttrs;\n return m(MentionsDropdownItem, Object.assign({\n mentionable: mentionable,\n onclick: () => onclick(replacement)\n }, attrs), content);\n }\n buildSuggestions() {\n const suggestions = [];\n for (const mentionable of this.mentionables) {\n if (!mentionable.enabled()) continue;\n let matches = Array.from(this.results[mentionable.type()].values()).filter(model => this.matches(mentionable, model));\n const max = mentionable.maxStoreMatchedResults();\n if (max) matches = matches.splice(0, max);\n for (const model of matches) {\n const dropdownItem = this.makeSuggestion(mentionable, model);\n suggestions.push(dropdownItem);\n }\n }\n return suggestions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModels', MentionableModels);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionFormat {\n constructor() {\n _defineProperty(this, \"instances\", void 0);\n _defineProperty(this, \"mentionables\", void 0);\n _defineProperty(this, \"extendable\", void 0);\n }\n makeMentionables() {\n return this.instances ?? (this.instances = this.mentionables.map(Mentionable => new Mentionable(this)));\n }\n getMentionable(type) {\n return this.makeMentionables().find(mentionable => mentionable.type() === type) ?? null;\n }\n extend(mentionable) {\n if (!this.extendable) throw new Error('This mention format does not allow extending.');\n this.mentionables.push(mentionable);\n }\n\n /**\n * Picks the term to search in the API from the typed text.\n * @example:\n * * Full text = `Hello @\"John D`\n * * Typed text = `\"John D`\n * * Query = `John D`\n */\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormat', MentionFormat);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Avatar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/highlight');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionableModel {\n constructor(format) {\n _defineProperty(this, \"format\", void 0);\n this.format = format;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModel', MentionableModel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import app from 'flarum/forum/app';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * Whether to use the old mentions format.\n *\n * `'@username'` or `'@\"Display name\"'`\n */\nexport const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false;\nconst getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text'));\n\n/**\n * Fetches a user's username or display name.\n *\n * Chooses based on the format option set in the admin settings page.\n *\n * @param user An instance of the User model to fetch the username for\n * @param useDisplayName If `true`, uses `user.displayName()`, otherwise, uses `user.username()`\n */\nexport default function getCleanDisplayName(user, useDisplayName) {\n if (useDisplayName === void 0) {\n useDisplayName = true;\n }\n if (!user) return getDeletedUserText().replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n const text = (useDisplayName ? user.displayName() : user.username()) || getDeletedUserText();\n return text.replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/getCleanDisplayName', getCleanDisplayName);","import app from 'flarum/forum/app';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nimport getCleanDisplayName, { shouldUseOldFormat } from '../utils/getCleanDisplayName';\nexport default class UserMention extends MentionableModel {\n type() {\n return 'user';\n }\n initialResults() {\n return Array.from(app.store.all('users'));\n }\n\n /**\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @\"Display name\"#UserID or `@username`\n *\n * @example
New display name syntax
\n * // '@\"user\"#1'\n * forUser(User) // User is ID 1, display name is 'User'\n *\n * @example
Using old syntax
\n * // '@username'\n * forUser(user) // User's username is 'username'\n */\n replacement(user) {\n if (shouldUseOldFormat()) {\n const cleanText = getCleanDisplayName(user, false);\n return this.format.format(cleanText);\n }\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, '', user.id());\n }\n suggestion(model, typed) {\n const username = usernameHelper(model, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: model\n }), username);\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.username(), model.displayName()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('users', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/UserMention', UserMention);","import app from 'flarum/forum/app';\nimport MentionableModel from './MentionableModel';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport { truncate } from 'flarum/common/utils/string';\nimport getCleanDisplayName from '../utils/getCleanDisplayName';\nexport default class PostMention extends MentionableModel {\n type() {\n return 'post';\n }\n\n /**\n * If the user is replying to a discussion, or if they are editing a\n * post, then we can suggest other posts in the discussion to mention.\n * We will add the 5 most recent comments in the discussion which\n * match any username characters that have been typed.\n */\n initialResults() {\n if (!app.composer.bodyMatches('flarum/forum/components/ReplyComposer') && !app.composer.bodyMatches('flarum/forum/components/EditPostComposer')) {\n return [];\n }\n\n // @ts-ignore\n const composerAttrs = app.composer.body.attrs;\n const composerPost = composerAttrs.post;\n const discussion = composerPost && composerPost.discussion() || composerAttrs.discussion;\n return discussion.posts()\n // Filter to only comment posts, and replies before this message\n .filter(post => post && post.contentType() === 'comment' && (!composerPost || post.number() < composerPost.number()))\n // Sort by new to old\n .sort((a, b) => b.createdAt().getTime() - a.createdAt().getTime());\n }\n\n /**\n * Generates the syntax for mentioning of a post. Also cleans up the display name.\n *\n * @example
Post mention
\n * // '@\"User\"#p13'\n * // @\"Display name\"#pPostID\n * forPostMention(user, 13) // User display name is 'User', post ID is 13\n */\n replacement(post) {\n const user = post.user();\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, 'p', post.id());\n }\n suggestion(model, typed) {\n const user = model.user() || null;\n const username = usernameHelper(user, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: user\n }), username, [app.translator.trans('flarum-mentions.forum.composer.reply_to_post_text', {\n number: model.number()\n }), ' — ', truncate(model.contentPlain() ?? '', 200)]);\n }\n matches(model, typed) {\n const user = model.user();\n const userMentionable = app.mentionFormats.mentionable('user');\n return !typed || user && userMentionable.matches(user, typed);\n }\n maxStoreMatchedResults() {\n return 5;\n }\n\n /**\n * Post mention suggestions are only offered from current discussion posts.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/PostMention', PostMention);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Group');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","import app from 'flarum/forum/app';\nimport Group from 'flarum/common/models/Group';\nimport MentionableModel from './MentionableModel';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nexport default class GroupMention extends MentionableModel {\n type() {\n return 'group';\n }\n initialResults() {\n return Array.from(app.store.all('groups').filter(g => {\n return g.id() !== Group.GUEST_ID && g.id() !== Group.MEMBER_ID;\n }));\n }\n\n /**\n * Generates the mention syntax for a group mention.\n *\n * @\"Name Plural\"#gGroupID\n *\n * @example
Group mention
\n * // '@\"Mods\"#g4'\n * forGroup(group) // Group display name is 'Mods', group ID is 4\n */\n replacement(group) {\n return this.format.format(group.namePlural(), 'g', group.id());\n }\n suggestion(model, typed) {\n let groupName = model.namePlural();\n if (typed) {\n groupName = highlight(groupName, typed);\n }\n return m('[', null, m(Badge, {\n className: `Avatar Badge Badge--group--${model.id()} Badge-icon`,\n color: model.color(),\n type: \"group\",\n icon: model.icon()\n }), m(\"span\", {\n className: \"username\"\n }, groupName));\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.namePlural().toLowerCase(), model.nameSingular().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n\n /**\n * All groups are already loaded, so we don't need to search for them.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return app.session?.user?.canMentionGroups() ?? false;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/GroupMention', GroupMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport UserMention from '../UserMention';\nimport PostMention from '../PostMention';\nimport GroupMention from '../GroupMention';\nexport default class AtMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [UserMention, PostMention, GroupMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '@';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[\"“]?((?:(?!\"#).)+)$/);\n return matchTyped ? matchTyped[1] : null;\n }\n format(name, char, id) {\n if (char === void 0) {\n char = '';\n }\n if (id === void 0) {\n id = null;\n }\n return {\n simple: `@${name}`,\n safe: `@\"${name}\"#${char}${id}`\n }[id ? 'safe' : 'simple'];\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/AtMentionFormat', AtMentionFormat);","import app from 'flarum/forum/app';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nexport default class TagMention extends MentionableModel {\n type() {\n return 'tag';\n }\n initialResults() {\n return Array.from(app.store.all('tags'));\n }\n\n /**\n * Generates the mention syntax for a tag mention.\n *\n * ~tagSlug\n *\n * @example
Tag mention
\n * // ~general\n * forTag(tag) // Tag display name is 'Tag', tag ID is 5\n */\n replacement(tag) {\n return this.format.format(tag.slug());\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.name().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('tags', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n suggestion(model, typed) {\n let tagName = model.name();\n if (typed) {\n tagName = highlight(tagName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar\",\n icon: model.icon(),\n color: model.color(),\n type: \"tag\"\n }), m(\"span\", {\n className: \"username\"\n }, tagName));\n }\n enabled() {\n return 'flarum-tags' in flarum.extensions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/TagMention', TagMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport TagMention from '../TagMention';\nexport default class HashMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [TagMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '#';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[-_\\p{L}\\p{N}\\p{M}]+$/giu);\n return matchTyped ? matchTyped[0] : null;\n }\n format(slug) {\n return `#${slug}`;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/HashMentionFormat', HashMentionFormat);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport AtMentionFormat from './AtMentionFormat';\nimport HashMentionFormat from './HashMentionFormat';\nexport default class MentionFormats {\n constructor() {\n _defineProperty(this, \"formats\", [new AtMentionFormat(), new HashMentionFormat()]);\n }\n get(symbol) {\n return this.formats.find(f => f.trigger() === symbol) ?? null;\n }\n mentionable(type) {\n for (const format of this.formats) {\n const mentionable = format.getMentionable(type);\n if (mentionable) return mentionable;\n }\n return null;\n }\n extend(format) {\n this.formats.push(new format());\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormats', MentionFormats);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/UserPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostsUserPage');","import PostsUserPage from 'flarum/forum/components/PostsUserPage';\n/**\n * The `MentionsUserPage` component shows post which user Mentioned at\n */\nexport default class MentionsUserPage extends PostsUserPage {\n params(user) {\n return {\n filter: {\n type: 'comment',\n mentioned: user.id()\n }\n };\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsUserPage', MentionsUserPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class PostMentionedNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n href() {\n const notification = this.attrs.notification;\n const post = notification.subject();\n const content = notification.content();\n return app.route.discussion(post.discussion(), content && content.replyNumber);\n }\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.post_mentioned_text', {\n user,\n count: 1\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain() || '', 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/PostMentionedNotification', PostMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class UserMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.user_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/UserMentionedNotification', UserMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class GroupMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.group_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/GroupMentionedNotification', GroupMentionedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { KeyValueGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class MentionedGambit extends KeyValueGambit {\n key() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.hint', {}, true);\n }\n filterKey() {\n return 'mentioned';\n }\n}\nflarum.reg.add('flarum-mentions', 'common/query/posts/MentionedGambit', MentionedGambit);","import Extend from 'flarum/common/extenders';\nimport MentionedGambit from './query/posts/MentionedGambit';\nexport default [new Extend.Search() //\n.gambit('posts', MentionedGambit)];","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport MentionsUserPage from './components/MentionsUserPage';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport GroupMentionedNotification from './components/GroupMentionedNotification';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('user.mentions', '/u/:username/mentions', MentionsUserPage), new Extend.Model(Post) //\n.hasMany('mentionedBy').attribute('mentionedByCount'), new Extend.Notification() //\n.add('postMentioned', PostMentionedNotification).add('userMentioned', UserMentionedNotification).add('groupMentioned', GroupMentionedNotification), new Extend.Model(User) //\n.attribute('canMentionGroups')];","import app from 'flarum/forum/app';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nexport function filterUserMentions(tag) {\n let user;\n if (app.forum.attribute('allowUsernameMentionFormat') && tag.hasAttribute('username')) user = app.store.getBy('users', 'username', tag.getAttribute('username'));else if (tag.hasAttribute('id')) user = app.store.getById('users', tag.getAttribute('id'));\n if (user) {\n tag.setAttribute('id', user.id());\n tag.setAttribute('slug', user.slug());\n tag.setAttribute('displayname', extractText(username(user)));\n return true;\n }\n tag.invalidate();\n}\nexport function postFilterUserMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterPostMentions(tag) {\n const post = app.store.getById('posts', tag.getAttribute('id'));\n if (post) {\n tag.setAttribute('discussionid', post.discussion().id());\n tag.setAttribute('number', post.number());\n tag.setAttribute('displayname', extractText(username(post.user())));\n return true;\n }\n}\nexport function postFilterPostMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n if (group) {\n tag.setAttribute('groupname', extractText(group.namePlural()));\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterGroupMentions(tag) {\n if (app.session?.user?.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n tag.setAttribute('color', group.color());\n tag.setAttribute('icon', group.icon());\n tag.setAttribute('deleted', false);\n }\n}\nexport function filterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n if (model) {\n tag.setAttribute('id', model.id());\n tag.setAttribute('tagname', model.name());\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n tag.setAttribute('icon', model.icon());\n tag.setAttribute('color', model.color());\n tag.setAttribute('deleted', false);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/textFormatter', { filterUserMentions: filterUserMentions,postFilterUserMentions: postFilterUserMentions,filterPostMentions: filterPostMentions,postFilterPostMentions: postFilterPostMentions,filterGroupMentions: filterGroupMentions,postFilterGroupMentions: postFilterGroupMentions,filterTagMentions: filterTagMentions,postFilterTagMentions: postFilterTagMentions, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class Mentionables {\n constructor() {\n _defineProperty(this, \"formats\", []);\n _defineProperty(this, \"mentionables\", {});\n }\n /**\n * Register a new mention format.\n * Must extend MentionFormat and have a unique unused trigger symbol.\n */\n format(format) {\n this.formats.push(format);\n return this;\n }\n\n /**\n * Register a new mentionable model to a mention format.\n * Only works if the format has already been registered,\n * and the format allows using multiple mentionables.\n *\n * @param symbol The trigger symbol of the format to extend (ex: @).\n * @param mentionable The mentionable instance to register.\n * Must extend MentionableModel.\n */\n mentionable(symbol, mentionable) {\n if (!this.mentionables[symbol]) {\n this.mentionables[symbol] = [];\n }\n this.mentionables[symbol].push(mentionable);\n return this;\n }\n extend(app) {\n for (const format of this.formats) {\n app.mentionFormats.extend(format);\n }\n for (const symbol in this.mentionables) {\n const format = app.mentionFormats.get(symbol);\n if (!format) continue;\n for (const mentionable of this.mentionables[symbol]) {\n format.extend(mentionable);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/extenders/Mentionables', Mentionables);","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport Post from 'flarum/forum/components/Post';\nimport addPostMentionPreviews from './addPostMentionPreviews';\nimport addMentionedByList from './addMentionedByList';\nimport addPostReplyAction from './addPostReplyAction';\nimport addPostQuoteButton from './addPostQuoteButton';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport MentionFormats from './mentionables/formats/MentionFormats';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\napp.mentionFormats = new MentionFormats();\nexport { default as extend } from './extend';\napp.initializers.add('flarum-mentions', () => {\n // For every mention of a post inside a post's content, set up a hover handler\n // that shows a preview of the mentioned post.\n addPostMentionPreviews();\n\n // In the footer of each post, show information about who has replied (i.e.\n // who the post has been mentioned by).\n addMentionedByList();\n\n // Add a 'reply' control to the footer of each post. When clicked, it will\n // open up the composer and add a post mention to its contents.\n addPostReplyAction();\n\n // Show a Quote button when Post text is selected\n addPostQuoteButton();\n\n // After typing '@' in the composer, show a dropdown suggesting a bunch of\n // posts or users that the user could mention.\n addComposerAutocomplete();\n\n // Add notification preferences.\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('postMentioned', {\n name: 'postMentioned',\n icon: 'fas fa-reply',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label')\n });\n items.add('userMentioned', {\n name: 'userMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label')\n });\n items.add('groupMentioned', {\n name: 'groupMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_group_mentioned_label')\n });\n });\n\n // Add mentions tab in user profile\n extend(UserPage.prototype, 'navItems', function (items) {\n const user = this.user;\n items.add('mentions', m(LinkButton, {\n href: app.route('user.mentions', {\n username: user.slug()\n }),\n name: \"mentions\",\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.user.mentions_link')), 80);\n });\n\n // Remove post mentions when rendering post previews.\n getPlainContent.removeSelectors.push('a.PostMention');\n\n // Apply color contrast fix on group mentions.\n extend(Post.prototype, 'oncreate', function () {\n this.$('.GroupMention--colored, .TagMention--colored').each(function () {\n this.classList.add(textContrastClass(getComputedStyle(this).getPropertyValue('--color')));\n });\n });\n\n // Auto scope the search to the current user mentioned posts.\n override('flarum/forum/components/SearchModal', 'defaultActiveSource', function (original) {\n const orig = original();\n if (!orig && app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n return 'posts';\n }\n return orig;\n });\n extend('flarum/forum/components/SearchModal', 'defaultFilters', function (filters) {\n if (app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n filters.posts.mentioned = app.current.data.user.username();\n }\n });\n});\nexport * from './utils/textFormatter';\nimport './forum';","import { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default function addPostMentionPreviews() {\n function addPreviews() {\n const contentHtml = this.attrs.post.contentHtml();\n if (contentHtml === this.oldPostContentHtml || this.isEditing()) return;\n this.oldPostContentHtml = contentHtml;\n const parentPost = this.attrs.post;\n const $parentPost = this.$();\n this.$().on('click', '.UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)', function (e) {\n m.route.set(this.getAttribute('href'));\n e.preventDefault();\n });\n this.$('.PostMention:not(.PostMention--deleted)').each(function () {\n const $this = $(this);\n const id = $this.data('id');\n let timeout;\n\n // Wrap the mention link in a wrapper element so that we can insert a\n // preview popup as its sibling and relatively position it.\n const $preview = $('
');\n $parentPost.append($preview);\n const getPostElement = () => {\n return $(`.PostStream-item[data-id=\"${id}\"]`);\n };\n const showPreview = () => {\n // When the user hovers their mouse over the mention, look for the\n // post that it's referring to in the stream, and determine if it's\n // in the viewport. If it is, we will \"pulsate\" it.\n const $post = getPostElement();\n let visible = false;\n if ($post.length) {\n const top = $post.offset().top;\n const scrollTop = window.pageYOffset;\n if (top > scrollTop && top + $post.height() < scrollTop + $(window).height()) {\n $post.addClass('pulsate');\n visible = true;\n }\n }\n\n // Otherwise, we will show a popup preview of the post. If the post\n // hasn't yet been loaded, we will need to do that.\n if (!visible) {\n // Position the preview so that it appears above the mention.\n // (The offsetParent should be .Post-body.)\n const positionPreview = () => {\n const previewHeight = $preview.outerHeight(true);\n let offset = 0;\n\n // If the preview goes off the top of the viewport, reposition it to\n // be below the mention.\n if ($this.offset().top - previewHeight < $(window).scrollTop() + $('#header').outerHeight()) {\n offset += $this.outerHeight(true);\n } else {\n offset -= previewHeight;\n }\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + offset).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $this.offsetParent().width());\n };\n const showPost = post => {\n const discussion = post.discussion();\n m.render($preview[0], [discussion !== parentPost.discussion() && m(\"li\", null, m(\"span\", {\n className: \"PostMention-preview-discussion\"\n }, discussion.title())), m(\"li\", null, m(PostPreview, {\n post: post\n }))]);\n positionPreview();\n };\n const post = app.store.getById('posts', id);\n if (post && post.discussion()) {\n showPost(post);\n } else {\n m.render($preview[0], m(LoadingIndicator, null));\n app.store.find('posts', id).then(showPost);\n positionPreview();\n }\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n }\n };\n const hidePreview = () => {\n getPostElement().removeClass('pulsate');\n if ($preview.hasClass('in')) {\n $preview.removeClass('in').one('transitionend', () => $preview.hide());\n }\n };\n\n // On a touch (mobile) device we cannot hover the link to reveal the preview.\n // Instead we cancel the navigation so that a click reveals the preview.\n // Users can then click on the preview to go to the post if desired.\n $this.on('touchend', e => {\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n getPostElement().removeClass('pulsate');\n timeout = setTimeout(hidePreview, 250);\n }).on('touchend', e => {\n showPreview();\n e.stopPropagation();\n });\n $(document).on('touchend', hidePreview);\n });\n }\n extend(CommentPost.prototype, 'oncreate', addPreviews);\n extend(CommentPost.prototype, 'onupdate', addPreviews);\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport Icon from 'flarum/common/components/Icon';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModal from './components/MentionedByModal';\nexport default function addMentionedByList() {\n function hidePreview() {\n this.$('.Post-mentionedBy-preview').removeClass('in').one('transitionend', function () {\n $(this).hide();\n });\n }\n extend(CommentPost.prototype, 'oncreate', function () {\n let timeout;\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const $preview = $('
');\n this.$().append($preview);\n const $parentPost = this.$();\n const $this = this.$('.Post-mentionedBy');\n const showPreview = () => {\n if (!$preview.hasClass('in') && $preview.is(':visible')) return;\n\n // When the user hovers their mouse over the list of people who have\n // replied to the post, render a list of reply previews into a\n // popup.\n m.render($preview[0], m('[', null, replies.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: hidePreview.bind(this)\n }))), replies.length < post.mentionedByCount() && m(\"li\", {\n className: \"Post-mentionedBy-preview-more\"\n }, m(Button, {\n className: \"PostPreview Button\",\n onclick: () => {\n hidePreview.call(this);\n app.modal.show(MentionedByModal, {\n post\n });\n }\n }, m(\"span\", {\n className: \"PostPreview-content\"\n }, m(\"span\", {\n className: \"PostPreview-badge Avatar\"\n }, m(Icon, {\n name: 'fas fa-reply-all'\n })), m(\"span\", null, app.translator.trans('flarum-mentions.forum.post.mentioned_by_more_text', {\n count: post.mentionedByCount() - replies.length\n })))))));\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + $this.outerHeight(true)).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $parentPost.width());\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n };\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n timeout = setTimeout(hidePreview, 250);\n });\n\n // Whenever the user hovers their mouse over a particular name in the\n // list of repliers, highlight the corresponding post in the preview\n // popup.\n this.$().find('.Post-mentionedBy-summary a').hover(function () {\n $preview.find('[data-number=\"' + $(this).data('number') + '\"]').addClass('active');\n }, function () {\n $preview.find('[data-number]').removeClass('active');\n });\n }\n });\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const users = [];\n const repliers = replies.sort(reply => reply.user() === app.session.user ? -1 : 0).filter(reply => {\n const user = reply.user();\n if (users.indexOf(user) === -1) {\n users.push(user);\n return true;\n }\n });\n const limit = 4;\n const overLimit = post.mentionedByCount() > limit;\n\n // Create a list of unique users who have replied. So even if a user has\n // replied twice, they will only be in this array once.\n const names = repliers.slice(0, overLimit ? limit - 1 : limit).map(reply => {\n const user = reply.user();\n return m(Link, {\n href: app.route.post(reply),\n onclick: hidePreview.bind(this),\n \"data-number\": reply.number()\n }, app.session.user === user ? app.translator.trans('flarum-mentions.forum.post.you_text') : username(user));\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.mentionedByCount() - names.length;\n names.push(app.translator.trans('flarum-mentions.forum.post.others_text', {\n count\n }));\n }\n items.add('replies', m(\"div\", {\n className: \"Post-mentionedBy\"\n }, m(\"span\", {\n className: \"Post-mentionedBy-summary\"\n }, m(Icon, {\n name: 'fas fa-reply'\n }), app.translator.trans(`flarum-mentions.forum.post.mentioned_by${repliers[0].user() === app.session.user ? '_self' : ''}_text`, {\n count: names.length,\n users: punctuateSeries(names)\n }))));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport reply from './utils/reply';\nexport default function addPostReplyAction() {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n items.add('reply', m(Button, {\n className: \"Button Button--link\",\n onclick: () => reply(post)\n }, app.translator.trans('flarum-mentions.forum.post.reply_link')));\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostQuoteButton from './fragments/PostQuoteButton';\nimport selectedText from './utils/selectedText';\nexport default function addPostQuoteButton() {\n extend(CommentPost.prototype, 'oncreate', function () {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n const $postBody = this.$('.Post-body');\n\n // Wrap the quote button in a wrapper element so that we can render\n // button into it.\n const $container = $('');\n const button = new PostQuoteButton(post);\n const handler = function (e) {\n setTimeout(() => {\n const content = selectedText($postBody);\n if (content) {\n button.content = content;\n m.render($container[0], button.render());\n const rects = window.getSelection().getRangeAt(0).getClientRects();\n const firstRect = rects[0];\n if (e.clientY < firstRect.bottom && e.clientX - firstRect.right < firstRect.left - e.clientX) {\n button.showStart(firstRect.left, firstRect.top);\n } else {\n const lastRect = rects[rects.length - 1];\n button.showEnd(lastRect.right, lastRect.bottom);\n }\n }\n }, 1);\n };\n this.$().after($container).on('mouseup', handler);\n if ('ontouchstart' in window) {\n document.addEventListener('selectionchange', handler, false);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport AutocompleteReader from 'flarum/common/utils/AutocompleteReader';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport MentionableModels from './mentionables/MentionableModels';\nexport default function addComposerAutocomplete() {\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.mentionsDropdown = new AutocompleteDropdown();\n this.searchMentions = throttle(250, (mentionables, buildSuggestions) => mentionables.search().then(buildSuggestions));\n const $editor = this.$('.TextEditor-editor').wrap('');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.mentionsDropdown.active).onUp(() => this.mentionsDropdown.navigate(-1)).onDown(() => this.mentionsDropdown.navigate(1)).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo($editor);\n $editor.after($(''));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n let matchTyped;\n const suggestionsInputListener = () => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n let activeFormat = null;\n const autocompleteReader = new AutocompleteReader(character => !!(activeFormat = app.mentionFormats.get(character)));\n const autocompleting = autocompleteReader.check(this.attrs.composer.editor.getLastNChars(30), cursor, /\\S+/);\n const mentionsDropdown = this.mentionsDropdown;\n let mentionables = new MentionableModels({\n onmouseenter: function () {\n mentionsDropdown.setIndex($(this).parent().index());\n },\n onclick: replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(autocompleting.absoluteStart - 1, replacement + ' ');\n this.mentionsDropdown.hide();\n }\n });\n this.mentionsDropdown.hide();\n this.mentionsDropdown.active = false;\n if (autocompleting) {\n mentionables.init(activeFormat.makeMentionables());\n matchTyped = activeFormat.queryFromTyped(autocompleting.typed);\n if (!matchTyped) return;\n mentionables.typed = matchTyped;\n const buildSuggestions = () => {\n // If the user has started to type a mention,\n // then suggest models matching.\n const suggestions = mentionables.buildSuggestions();\n if (suggestions.length) {\n this.mentionsDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-mentionsDropdownContainer')[0], this.mentionsDropdown.render());\n this.mentionsDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(autocompleting.absoluteStart);\n const width = this.mentionsDropdown.$().outerWidth();\n const height = this.mentionsDropdown.$().outerHeight();\n const parent = this.mentionsDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.mentionsDropdown.show(left, top);\n } else {\n this.mentionsDropdown.active = false;\n this.mentionsDropdown.hide();\n }\n };\n this.mentionsDropdown.active = true;\n buildSuggestions();\n this.mentionsDropdown.setIndex(0);\n this.mentionsDropdown.$().scrollTop(0);\n this.searchMentions(mentionables, buildSuggestions);\n }\n };\n params.inputListeners.push(suggestionsInputListener);\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('mention', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' @'),\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.composer.mention_tooltip')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","MentionedByModalState","constructor","params","page","limit","super","type","add","MentionedByModal","oninit","vnode","this","state","filter","mentionedPost","attrs","post","id","sort","refresh","className","title","trans","content","m","isInitialLoading","getPages","map","items","reply","number","onclick","close","hasNext","loadNext","loading","isLoadingNext","insertMention","composer","quote","Promise","resolve","mention","mentionable","replacement","fields","body","originalContent","cursorPosition","editor","getSelectionRange","preceding","slice","precedingNewlines","length","match","insertAtCursor","Array","join","trim","replace","bodyMatches","discussion","then","PostQuoteButton","view","name","show","left","top","$this","$","parentOffset","offsetParent","offset","css","hideHandler","hide","bind","document","on","showStart","window","scrollTop","outerHeight","showEnd","right","bottom","outerWidth","off","selectedText","selection","getSelection","isCollapsed","range","getRangeAt","parent","commonAncestorContainer","contains","clone","append","cloneContents","find","replaceWith","alt","src","innerText","href","text","_typeof","iterator","_defineProperty","e","r","t","i","toPrimitive","TypeError","String","toPropertyKey","configurable","writable","AutocompleteDropdown","arguments","item","active","navigate","delta","keyWasJustPressed","setIndex","index","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","dropdownTop","dropdownBottom","itemTop","itemBottom","parseInt","stop","animate","MentionsDropdownItem","assign","children","MentionableModels","dropdownItemAttrs","async","typed","typedLower","toLowerCase","searched","includes","mentionables","model","search","results","has","set","push","init","Map","initialResults","result","matches","makeSuggestion","suggestion","buildSuggestions","suggestions","enabled","from","values","max","maxStoreMatchedResults","splice","dropdownItem","MentionFormat","makeMentionables","instances","Mentionable","getMentionable","extend","extendable","Error","MentionableModel","format","getDeletedUserText","getCleanDisplayName","user","useDisplayName","displayName","username","UserMention","all","attribute","cleanText","some","substr","q","PostMention","composerAttrs","composerPost","posts","contentType","b","createdAt","getTime","truncate","contentPlain","userMentionable","GroupMention","g","group","namePlural","groupName","color","icon","nameSingular","canMentionGroups","AtMentionFormat","trigger","queryFromTyped","matchTyped","char","simple","safe","TagMention","tag","slug","tagName","extensions","HashMentionFormat","MentionFormats","symbol","formats","f","MentionsUserPage","mentioned","PostMentionedNotification","notification","subject","replyNumber","fromUser","count","excerpt","UserMentionedNotification","GroupMentionedNotification","MentionedGambit","KeyValueGambit","hint","filterKey","gambit","hasMany","filterUserMentions","hasAttribute","getBy","getAttribute","getById","setAttribute","invalidate","postFilterUserMentions","filterPostMentions","postFilterPostMentions","filterGroupMentions","postFilterGroupMentions","filterTagMentions","postFilterTagMentions","app","mentionFormats","addPreviews","contentHtml","oldPostContentHtml","isEditing","parentPost","$parentPost","route","preventDefault","each","data","timeout","$preview","getPostElement","showPreview","$post","visible","pageYOffset","height","positionPreview","previewHeight","width","showPost","render","store","hidePreview","hasClass","one","cancelable","hover","stopPropagation","addPostMentionPreviews","replies","mentionedBy","is","mentionedByCount","users","repliers","indexOf","overLimit","names","addMentionedByList","isHidden","canReply","$postBody","$container","button","handler","rects","getClientRects","firstRect","clientY","clientX","lastRect","after","addEventListener","mentionsDropdown","searchMentions","throttle","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","inputListeners","cursor","activeFormat","autocompleting","character","check","getLastNChars","onmouseenter","replaceBeforeCursor","absoluteStart","coordinates","getCaretCoordinates","Math","label","getPlainContent","removeSelectors","classList","getComputedStyle","getPropertyValue","override","original","orig","routeName","filters"],"sourceRoot":""}
\ No newline at end of file
diff --git a/extensions/messages/js/dist/forum.js b/extensions/messages/js/dist/forum.js
index aad60f85b..3c2f35097 100644
--- a/extensions/messages/js/dist/forum.js
+++ b/extensions/messages/js/dist/forum.js
@@ -1,2 +1,2 @@
-(()=>{var e,t,r={950:e=>{"use strict";e.exports=flarum.reg.get("core","common/Component")},917:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Avatar")},336:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Button")},741:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Dropdown")},801:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Icon")},500:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/InfoTile")},88:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Link")},104:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/LinkButton")},661:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/LoadingIndicator")},533:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Modal")},859:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Page")},547:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Tooltip")},732:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/UserSelectionModal")},653:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/fullTime")},167:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/humanTime")},819:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/listItems")},521:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/username")},662:e=>{"use strict";e.exports=flarum.reg.get("core","common/states/PaginatedListState")},906:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/ItemList")},476:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/ScrollListener")},821:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/Stream")},443:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/classList")},233:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/extractText")},488:e=>{"use strict";e.exports=flarum.reg.get("core","forum/app")},154:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/AbstractPost")},3:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/Comment")},592:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/ComposerBody")},47:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/HeaderList")},402:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/IndexSidebar")},314:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PageStructure")},301:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PostMeta")},651:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PostUser")},805:(e,t,r)=>{"use strict";function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{A:()=>o})}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>({301:"forum/components/MessagesPage",451:"forum/components/MessageComposer",619:"forum/components/DialogDropdownList"}[e]+".js"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="module.exports:",o.l=(r,s,a,n)=>{if(e[r])e[r].push(s);else{var u,m;if(void 0!==a)for(var l=document.getElementsByTagName("script"),i=0;i{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(s))),t)return t(s)},d=setTimeout(g.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=g.bind(null,u.onerror),u.onload=g.bind(null,u.onload),m&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var s=r.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=r[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),o.f.compat=(e,t)=>{const r=o.l;o.l=flarum.reg.loadChunk.bind(flarum.reg,r)},(()=>{var e={170:0};o.f.j=(t,r)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)r.push(s[2]);else{var a=new Promise(((r,o)=>s=e[t]=[r,o]));r.push(s[2]=a);var n=o.p+o.u(t),u=new Error;o.l(n,(r=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",u.name="ChunkLoadError",u.type=a,u.request=n,s[1](u)}}),"chunk-"+t,t)}};var t=(t,r)=>{var s,a,[n,u,m]=r,l=0;if(n.some((t=>0!==e[t]))){for(s in u)o.o(u,s)&&(o.m[s]=u[s]);m&&m(o)}for(t&&t(r);l{"use strict";o.r(a),o.d(a,{extend:()=>B});var e=o(488),t=o.n(e);const r=flarum.reg.get("core","common/extend");var s=o(402),n=o.n(s),u=o(104),l=o.n(u);const i=flarum.reg.get("core","forum/components/HeaderSecondary");var c=o.n(i);const g=flarum.reg.get("core","forum/utils/UserControls");var d=o.n(g),f=o(336),p=o.n(f),h=o(805);const b=flarum.reg.get("core","forum/components/HeaderDropdown");var v=o.n(b),x=o(443),y=o.n(x),M=o(661),C=o.n(M);class w extends(v()){constructor(){super(...arguments),(0,h.A)(this,"DialogDropdownList",null)}static initAttrs(e){e.className=y()("DialogsDropdown",e.className),e.label=e.label||t().translator.trans("flarum-messages.forum.header.dropdown_tooltip"),e.icon=e.icon||"fas fa-envelope",super.initAttrs(e)}getContent(){return this.DialogDropdownList?m(this.DialogDropdownList,{state:this.attrs.state}):(o.e(619).then(o.bind(o,331)).then((e=>{this.DialogDropdownList=e.default})),m(C(),null))}goToRoute(){m.route.set(t().route("dialogs"))}getUnreadCount(){return t().session.user.attribute("messageCount")}getNewCount(){return t().session.user.attribute("messageCount")}}flarum.reg.add("flarum-messages","forum/components/DialogsDropdown",w),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogDropdownList"),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogList"),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogListItem");var S=o(662),A=o.n(S);class D extends(A()){constructor(e,t,r){void 0===t&&(t=1),void 0===r&&(r=null),super(e,t,r),(0,h.A)(this,"lastCount",0)}get type(){return"dialogs"}getAllItems(){return super.getAllItems()}requestParams(){return{include:["lastMessage","users.groups"],filter:this.params.filter||{},sort:this.currentSort()||this.sortValue(Object.values(this.sortMap())[0])}}sortMap(){return{latest:"-lastMessageAt",newest:"-createdAt",oldest:"createdAt"}}load(){return t().session.user?.attribute("messageCount")!==this.lastCount&&(this.pages=[],this.location={page:1},this.lastCount=t().session.user?.attribute("messageCount")||0),this.pages.length>0?Promise.resolve():super.loadNext()}markAllAsRead(){return t().request({method:"POST",url:t().forum.attribute("apiUrl")+"/dialogs/read"}).then((()=>{t().dialogs.getAllItems().forEach((e=>{e.pushAttributes({unreadCount:0})})),t().session.user.pushAttributes({messageCount:0}),t().dropdownDialogs.clear(),m.redraw()}))}}flarum.reg.add("flarum-messages","forum/states/DialogListState",D);const k=flarum.reg.get("core","common/extenders");var P=o.n(k);const L=flarum.reg.get("core","common/Model");var T=o.n(L);const I=flarum.reg.get("core","common/utils/computed");var _=o.n(I);const j=flarum.reg.get("core","common/utils/string");class O extends(T()){content(){return T().attribute("content").call(this)}contentHtml(){return T().attribute("contentHtml").call(this)}renderFailed(){return T().attribute("renderFailed").call(this)}contentPlain(){return _()("contentHtml",(e=>"string"==typeof e?(0,j.getPlainContent)(e):e)).call(this)}createdAt(){return T().attribute("createdAt",T().transformDate).call(this)}dialog(){return T().hasOne("dialog").call(this)}user(){return T().hasOne("user").call(this)}}flarum.reg.add("flarum-messages","common/models/DialogMessage",O);const N=flarum.reg.get("core","common/app");var E=o.n(N);class R extends(T()){title(){return T().attribute("title").call(this)}type(){return T().attribute("type").call(this)}lastMessageAt(){return T().attribute("lastMessageAt",T().transformDate).call(this)}createdAt(){return T().attribute("createdAt",T().transformDate).call(this)}users(){return T().hasMany("users").call(this)}firstMessage(){return T().hasOne("firstMessage").call(this)}lastMessage(){return T().hasOne("lastMessage").call(this)}unreadCount(){return T().attribute("unreadCount").call(this)}lastReadMessageId(){return T().attribute("lastReadMessageId").call(this)}lastReadAt(){return T().attribute("lastReadAt",T().transformDate).call(this)}recipient(){let e=this.users();return e?e.find((e=>e&&e.id()!==E().session.user.id())):null}}flarum.reg.add("flarum-messages","common/models/Dialog",R);const B=[(new(P().Store)).add("dialogs",R).add("dialog-messages",O),(new(P().Routes)).add("messages","/messages",(()=>o.e(301).then(o.bind(o,654)))).add("dialog","/messages/dialog/:id",(()=>o.e(301).then(o.bind(o,654)))).helper("dialog",(e=>t().route("dialog",{id:e.id()})))];flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessagesPage"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessagesSidebar"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/DialogSection"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessageStream"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/states/MessageStreamState"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/DetailsModal"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/Message"),t().initializers.add("flarum-messages",(()=>{t().dialogs=new D({},1),t().dropdownDialogs=new D({filter:{unread:!0}},1,5),t().composer.composingMessageTo=function(e){const t=flarum.reg.checkModule("flarum-messages","forum/components/MessageComposer");return!!t&&this.isVisible()&&this.bodyMatches(t,{dialog:e})},(0,r.extend)(n().prototype,"navItems",(function(e){t().session.user&&e.add("messages",m(l(),{href:t().route("messages"),icon:"far fa-envelope",active:t().current.data.routeName&&["messages","dialog"].includes(t().current.data.routeName)},t().translator.trans("flarum-messages.forum.index.messages_link")),95)})),(0,r.extend)(c().prototype,"items",(function(e){t().session.user?.attribute("canSendAnyMessage")&&e.add("messages",m(w,{state:t().dropdownDialogs}),15)})),(0,r.extend)(d(),"userControls",((e,r)=>{t().session.user?.attribute("canSendAnyMessage")&&e.add("sendMessage",m(p(),{icon:"fas fa-envelope",onclick:()=>{flarum.reg.asyncModuleImport("flarum/forum/components/ComposerBody").then((()=>{t().composer.load((()=>o.e(451).then(o.bind(o,761))),{user:t().session.user,recipients:[r]}).then((()=>t().composer.show()))}))}},t().translator.trans("flarum-messages.forum.user_controls.send_message_button")))})),(0,r.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(e){e.add("messageReceived",{name:"messageReceived",icon:"fas fa-envelope",label:t().translator.trans("flarum-messages.forum.settings.notify_message_received_label")})}))})),flarum.reg.addChunkModule("451","761","flarum-messages","forum/components/MessageComposer")})(),module.exports=a})();
+(()=>{var e,t,r={950:e=>{"use strict";e.exports=flarum.reg.get("core","common/Component")},917:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Avatar")},336:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Button")},741:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Dropdown")},801:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Icon")},500:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/InfoTile")},88:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Link")},104:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/LinkButton")},661:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/LoadingIndicator")},533:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Modal")},859:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Page")},547:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/Tooltip")},732:e=>{"use strict";e.exports=flarum.reg.get("core","common/components/UserSelectionModal")},653:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/fullTime")},167:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/humanTime")},819:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/listItems")},521:e=>{"use strict";e.exports=flarum.reg.get("core","common/helpers/username")},662:e=>{"use strict";e.exports=flarum.reg.get("core","common/states/PaginatedListState")},906:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/ItemList")},476:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/ScrollListener")},821:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/Stream")},443:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/classList")},233:e=>{"use strict";e.exports=flarum.reg.get("core","common/utils/extractText")},488:e=>{"use strict";e.exports=flarum.reg.get("core","forum/app")},154:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/AbstractPost")},3:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/Comment")},592:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/ComposerBody")},47:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/HeaderList")},402:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/IndexSidebar")},314:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PageStructure")},301:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PostMeta")},651:e=>{"use strict";e.exports=flarum.reg.get("core","forum/components/PostUser")},805:(e,t,r)=>{"use strict";function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{A:()=>o})}},s={};function o(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>({301:"forum/components/MessagesPage",451:"forum/components/MessageComposer",619:"forum/components/DialogDropdownList"}[e]+".js"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="module.exports:",o.l=(r,s,a,n)=>{if(e[r])e[r].push(s);else{var u,m;if(void 0!==a)for(var l=document.getElementsByTagName("script"),i=0;i{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((e=>e(s))),t)return t(s)},d=setTimeout(g.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=g.bind(null,u.onerror),u.onload=g.bind(null,u.onload),m&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var s=r.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=r[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),o.f.compat=(e,t)=>{const r=o.l;o.l=flarum.reg.loadChunk.bind(flarum.reg,r)},(()=>{var e={170:0};o.f.j=(t,r)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)r.push(s[2]);else{var a=new Promise(((r,o)=>s=e[t]=[r,o]));r.push(s[2]=a);var n=o.p+o.u(t),u=new Error;o.l(n,(r=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var a=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",u.name="ChunkLoadError",u.type=a,u.request=n,s[1](u)}}),"chunk-"+t,t)}};var t=(t,r)=>{var s,a,[n,u,m]=r,l=0;if(n.some((t=>0!==e[t]))){for(s in u)o.o(u,s)&&(o.m[s]=u[s]);m&&m(o)}for(t&&t(r);l{"use strict";o.r(a),o.d(a,{extend:()=>B});var e=o(488),t=o.n(e);const r=flarum.reg.get("core","common/extend");var s=o(402),n=o.n(s),u=o(104),l=o.n(u);const i=flarum.reg.get("core","forum/components/HeaderSecondary");var c=o.n(i);const g=flarum.reg.get("core","forum/utils/UserControls");var d=o.n(g),f=o(336),p=o.n(f),h=o(805);const b=flarum.reg.get("core","forum/components/HeaderDropdown");var v=o.n(b),x=o(443),y=o.n(x),M=o(661),C=o.n(M);class w extends(v()){constructor(){super(...arguments),(0,h.A)(this,"DialogDropdownList",null)}static initAttrs(e){e.className=y()("DialogsDropdown",e.className),e.label=e.label||t().translator.trans("flarum-messages.forum.header.dropdown_tooltip"),e.icon=e.icon||"fas fa-envelope",super.initAttrs(e)}getContent(){return this.DialogDropdownList?m(this.DialogDropdownList,{state:this.attrs.state}):(o.e(619).then(o.bind(o,331)).then((e=>{this.DialogDropdownList=e.default})),m(C(),null))}goToRoute(){m.route.set(t().route("dialogs"))}getUnreadCount(){return t().session.user.attribute("messageCount")}getNewCount(){return t().session.user.attribute("messageCount")}}flarum.reg.add("flarum-messages","forum/components/DialogsDropdown",w),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogDropdownList"),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogList"),flarum.reg.addChunkModule("619","331","flarum-messages","forum/components/DialogListItem");var S=o(662),A=o.n(S);class D extends(A()){constructor(e,t,r){void 0===t&&(t=1),void 0===r&&(r=null),super(e,t,r),(0,h.A)(this,"lastCount",0)}get type(){return"dialogs"}getAllItems(){return super.getAllItems()}requestParams(){return{include:["lastMessage","users.groups"],filter:this.params.filter||{},sort:this.currentSort()||this.sortValue(Object.values(this.sortMap())[0])}}sortMap(){return{latest:"-lastMessageAt",newest:"-createdAt",oldest:"createdAt"}}load(){return t().session.user?.attribute("messageCount")!==this.lastCount&&(this.pages=[],this.location={page:1},this.lastCount=t().session.user?.attribute("messageCount")||0),this.pages.length>0?Promise.resolve():super.loadNext()}markAllAsRead(){return t().request({method:"POST",url:t().forum.attribute("apiUrl")+"/dialogs/read"}).then((()=>{t().dialogs.getAllItems().forEach((e=>{e.pushAttributes({unreadCount:0})})),t().session.user.pushAttributes({messageCount:0}),t().dropdownDialogs.clear(),m.redraw()}))}}flarum.reg.add("flarum-messages","forum/states/DialogListState",D);const k=flarum.reg.get("core","common/extenders");var P=o.n(k);const L=flarum.reg.get("core","common/Model");var T=o.n(L);const I=flarum.reg.get("core","common/utils/computed");var _=o.n(I);const j=flarum.reg.get("core","common/utils/string");class O extends(T()){content(){return T().attribute("content").call(this)}contentHtml(){return T().attribute("contentHtml").call(this)}renderFailed(){return T().attribute("renderFailed").call(this)}contentPlain(){return _()("contentHtml",(e=>"string"==typeof e?(0,j.getPlainContent)(e):e)).call(this)}createdAt(){return T().attribute("createdAt",T().transformDate).call(this)}dialog(){return T().hasOne("dialog").call(this)}user(){return T().hasOne("user").call(this)}}flarum.reg.add("flarum-messages","common/models/DialogMessage",O);const N=flarum.reg.get("core","common/app");var E=o.n(N);class R extends(T()){title(){return T().attribute("title").call(this)}type(){return T().attribute("type").call(this)}lastMessageAt(){return T().attribute("lastMessageAt",T().transformDate).call(this)}createdAt(){return T().attribute("createdAt",T().transformDate).call(this)}users(){return T().hasMany("users").call(this)}firstMessage(){return T().hasOne("firstMessage").call(this)}lastMessage(){return T().hasOne("lastMessage").call(this)}unreadCount(){return T().attribute("unreadCount").call(this)}lastReadMessageId(){return T().attribute("lastReadMessageId").call(this)}lastReadAt(){return T().attribute("lastReadAt",T().transformDate).call(this)}recipient(){let e=this.users();return e?e.find((e=>e&&e.id()!==E().session.user.id())):null}}flarum.reg.add("flarum-messages","common/models/Dialog",R);const B=[(new(P().Store)).add("dialogs",R).add("dialog-messages",O),(new(P().Routes)).add("messages","/messages",(()=>o.e(301).then(o.bind(o,654)))).add("dialog","/messages/dialog/:id",(()=>o.e(301).then(o.bind(o,654)))).helper("dialog",(e=>t().route("dialog",{id:e.id()})))];flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessagesPage"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessagesSidebar"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/DialogSection"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/MessageStream"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/states/MessageStreamState"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/DetailsModal"),flarum.reg.addChunkModule("301","654","flarum-messages","forum/components/Message"),t().initializers.add("flarum-messages",(()=>{t().dialogs=new D({},1),t().dropdownDialogs=new D({filter:{unread:!0}},1,5),t().composer.composingMessageTo=function(e){return this.isVisible()&&this.bodyMatches("flarum/messages/forum/components/MessageComposer",{dialog:e})},(0,r.extend)(n().prototype,"navItems",(function(e){t().session.user&&e.add("messages",m(l(),{href:t().route("messages"),icon:"far fa-envelope",active:t().current.data.routeName&&["messages","dialog"].includes(t().current.data.routeName)},t().translator.trans("flarum-messages.forum.index.messages_link")),95)})),(0,r.extend)(c().prototype,"items",(function(e){t().session.user?.attribute("canSendAnyMessage")&&e.add("messages",m(w,{state:t().dropdownDialogs}),15)})),(0,r.extend)(d(),"userControls",((e,r)=>{t().session.user?.attribute("canSendAnyMessage")&&e.add("sendMessage",m(p(),{icon:"fas fa-envelope",onclick:()=>{flarum.reg.asyncModuleImport("flarum/forum/components/ComposerBody").then((()=>{t().composer.load((()=>o.e(451).then(o.bind(o,761))),{user:t().session.user,recipients:[r]}).then((()=>t().composer.show()))}))}},t().translator.trans("flarum-messages.forum.user_controls.send_message_button")))})),(0,r.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(e){e.add("messageReceived",{name:"messageReceived",icon:"fas fa-envelope",label:t().translator.trans("flarum-messages.forum.settings.notify_message_received_label")})}))})),flarum.reg.addChunkModule("451","761","flarum-messages","forum/components/MessageComposer")})(),module.exports=a})();
//# sourceMappingURL=forum.js.map
\ No newline at end of file
diff --git a/extensions/messages/js/dist/forum.js.map b/extensions/messages/js/dist/forum.js.map
index d94ecda10..abdcab049 100644
--- a/extensions/messages/js/dist/forum.js.map
+++ b/extensions/messages/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"file":"forum.js","mappings":"UAAIA,EACAC,E,wBCDJC,EAAOC,QAAUC,OAAOC,IAAIC,IAAI,OAAQ,mB,uBCAxCJ,EAAOC,Q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IAAc,gBAAgB,CAACC,EAAOxD,KACvC,YAAYA,MAAMC,UAAU,sBAC9BuD,EAAMrD,IAAI,cAAepH,EAAE,IAAQ,CACjCuG,KAAM,kBACNuE,QAAS,KACP7M,OAAOC,IAAI6M,kBAAkB,wCAAwCpE,MAAK,KACxE,aAAayB,MAAK,IAAM,8BAA6H,CACnJnB,KAAM,YAAYA,KAClB+D,WAAY,CAAC/D,KACZN,MAAK,IAAM,aAAasE,QAAO,GAClC,GAEH,eAAe3E,MAAM,4DAC1B,KAEF,IAAAkE,QAAO,2CAA4C,qBAAqB,SAAUC,GAChFA,EAAMrD,IAAI,kBAAmB,CAC3BjC,KAAM,kBACNoB,KAAM,kBACNF,MAAO,eAAeC,MAAM,iEAEhC,GAAE,IACDrI,OAAOC,IAAImJ,eAAe,MAAO,MAAO,kBAAmB,mC","sources":["webpack://@flarum/messages/webpack/runtime/load script","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/InfoTile')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/UserSelectionModal')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/fullTime')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/listItems')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/ScrollListener')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/AbstractPost')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/Comment')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/ComposerBody')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PostMeta')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PostUser')\"","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/messages/webpack/bootstrap","webpack://@flarum/messages/webpack/runtime/compat get default export","webpack://@flarum/messages/webpack/runtime/define property getters","webpack://@flarum/messages/webpack/runtime/ensure chunk","webpack://@flarum/messages/webpack/runtime/get javascript chunk filename","webpack://@flarum/messages/webpack/runtime/global","webpack://@flarum/messages/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/messages/webpack/runtime/make namespace object","webpack://@flarum/messages/webpack/runtime/publicPath","webpack://@flarum/messages/webpack/runtime/compat","webpack://@flarum/messages/webpack/runtime/jsonp chunk loading","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderSecondary')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/utils/UserControls')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderDropdown')\"","webpack://@flarum/messages/./src/forum/components/DialogsDropdown.tsx","webpack://@flarum/messages/./src/forum/states/DialogListState.ts","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/messages/./src/common/models/DialogMessage.ts","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/messages/./src/common/models/Dialog.ts","webpack://@flarum/messages/./src/common/extend.ts","webpack://@flarum/messages/./src/forum/extend.ts","webpack://@flarum/messages/./src/forum/index.tsx"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/components/Avatar');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/Dropdown');","module.exports = flarum.reg.get('core', 'common/components/Icon');","module.exports = flarum.reg.get('core', 'common/components/InfoTile');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LinkButton');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/components/Modal');","module.exports = flarum.reg.get('core', 'common/components/Page');","module.exports = flarum.reg.get('core', 'common/components/Tooltip');","module.exports = flarum.reg.get('core', 'common/components/UserSelectionModal');","module.exports = flarum.reg.get('core', 'common/helpers/fullTime');","module.exports = flarum.reg.get('core', 'common/helpers/humanTime');","module.exports = flarum.reg.get('core', 'common/helpers/listItems');","module.exports = flarum.reg.get('core', 'common/helpers/username');","module.exports = flarum.reg.get('core', 'common/states/PaginatedListState');","module.exports = flarum.reg.get('core', 'common/utils/ItemList');","module.exports = flarum.reg.get('core', 'common/utils/ScrollListener');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/AbstractPost');","module.exports = flarum.reg.get('core', 'forum/components/Comment');","module.exports = flarum.reg.get('core', 'forum/components/ComposerBody');","module.exports = flarum.reg.get('core', 'forum/components/HeaderList');","module.exports = flarum.reg.get('core', 'forum/components/IndexSidebar');","module.exports = flarum.reg.get('core', 'forum/components/PageStructure');","module.exports = flarum.reg.get('core', 'forum/components/PostMeta');","module.exports = flarum.reg.get('core', 'forum/components/PostUser');","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + {\"301\":\"forum/components/MessagesPage\",\"451\":\"forum/components/MessageComposer\",\"619\":\"forum/components/DialogDropdownList\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t170: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderSecondary');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/UserControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderDropdown');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport HeaderDropdown from 'flarum/forum/components/HeaderDropdown';\nimport classList from 'flarum/common/utils/classList';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default class DialogsDropdown extends HeaderDropdown {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"DialogDropdownList\", null);\n }\n static initAttrs(attrs) {\n attrs.className = classList('DialogsDropdown', attrs.className);\n attrs.label = attrs.label || app.translator.trans('flarum-messages.forum.header.dropdown_tooltip');\n attrs.icon = attrs.icon || 'fas fa-envelope';\n super.initAttrs(attrs);\n }\n getContent() {\n if (!this.DialogDropdownList) {\n import(/* webpackChunkName: 'forum/components/DialogDropdownList', webpackMode: 'lazy-once' */ './DialogDropdownList').then(DialogDropdownList => {\n this.DialogDropdownList = DialogDropdownList.default;\n });\n return m(LoadingIndicator, null);\n }\n return m(this.DialogDropdownList, {\n state: this.attrs.state\n });\n }\n goToRoute() {\n m.route.set(app.route('dialogs'));\n }\n getUnreadCount() {\n return app.session.user.attribute('messageCount');\n }\n getNewCount() {\n return app.session.user.attribute('messageCount');\n }\n}\nflarum.reg.add('flarum-messages', 'forum/components/DialogsDropdown', DialogsDropdown);flarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogDropdownList');\nflarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogList');\nflarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogListItem');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class DialogListState extends PaginatedListState {\n constructor(params, page, perPage) {\n if (page === void 0) {\n page = 1;\n }\n if (perPage === void 0) {\n perPage = null;\n }\n super(params, page, perPage);\n _defineProperty(this, \"lastCount\", 0);\n }\n get type() {\n return 'dialogs';\n }\n getAllItems() {\n return super.getAllItems();\n }\n requestParams() {\n const params = {\n include: ['lastMessage', 'users.groups'],\n filter: this.params.filter || {},\n sort: this.currentSort() || this.sortValue(Object.values(this.sortMap())[0])\n };\n return params;\n }\n sortMap() {\n const map = {};\n map.latest = '-lastMessageAt';\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n return map;\n }\n load() {\n if (app.session.user?.attribute('messageCount') !== this.lastCount) {\n this.pages = [];\n this.location = {\n page: 1\n };\n this.lastCount = app.session.user?.attribute('messageCount') || 0;\n }\n if (this.pages.length > 0) {\n return Promise.resolve();\n }\n return super.loadNext();\n }\n markAllAsRead() {\n return app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/dialogs/read'\n }).then(() => {\n app.dialogs.getAllItems().forEach(dialog => {\n dialog.pushAttributes({\n unreadCount: 0\n });\n });\n app.session.user.pushAttributes({\n messageCount: 0\n });\n app.dropdownDialogs.clear();\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-messages', 'forum/states/DialogListState', DialogListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","import Model from 'flarum/common/Model';\nimport computed from 'flarum/common/utils/computed';\nimport { getPlainContent } from 'flarum/common/utils/string';\nexport default class DialogMessage extends Model {\n content() {\n return Model.attribute('content').call(this);\n }\n contentHtml() {\n return Model.attribute('contentHtml').call(this);\n }\n renderFailed() {\n return Model.attribute('renderFailed').call(this);\n }\n contentPlain() {\n return computed('contentHtml', content => {\n if (typeof content === 'string') {\n return getPlainContent(content);\n }\n return content;\n }).call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n dialog() {\n return Model.hasOne('dialog').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\nflarum.reg.add('flarum-messages', 'common/models/DialogMessage', DialogMessage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import Model from 'flarum/common/Model';\nimport app from 'flarum/common/app';\nexport default class Dialog extends Model {\n title() {\n return Model.attribute('title').call(this);\n }\n type() {\n return Model.attribute('type').call(this);\n }\n lastMessageAt() {\n return Model.attribute('lastMessageAt', Model.transformDate).call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n users() {\n return Model.hasMany('users').call(this);\n }\n firstMessage() {\n return Model.hasOne('firstMessage').call(this);\n }\n lastMessage() {\n return Model.hasOne('lastMessage').call(this);\n }\n unreadCount() {\n return Model.attribute('unreadCount').call(this);\n }\n lastReadMessageId() {\n return Model.attribute('lastReadMessageId').call(this);\n }\n lastReadAt() {\n return Model.attribute('lastReadAt', Model.transformDate).call(this);\n }\n recipient() {\n let users = this.users();\n return !users ? null : users.find(user => user && user.id() !== app.session.user.id());\n }\n}\nflarum.reg.add('flarum-messages', 'common/models/Dialog', Dialog);","import DialogMessage from './models/DialogMessage';\nimport Dialog from './models/Dialog';\nimport Extend from 'flarum/common/extenders';\nexport default [new Extend.Store().add('dialogs', Dialog) //\n.add('dialog-messages', DialogMessage) //\n];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('messages', '/messages', () => import(/* webpackChunkName: 'forum/components/MessagesPage', webpackMode: 'lazy-once' */ './components/MessagesPage')).add('dialog', '/messages/dialog/:id', () => import(/* webpackChunkName: 'forum/components/MessagesPage', webpackMode: 'lazy-once' */ './components/MessagesPage')).helper('dialog', dialog => app.route('dialog', {\n id: dialog.id()\n}))];flarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessagesPage');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessagesSidebar');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/DialogSection');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessageStream');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/states/MessageStreamState');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/DetailsModal');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/Message');","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport DialogsDropdown from './components/DialogsDropdown';\nimport DialogListState from './states/DialogListState';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-messages', () => {\n app.dialogs = new DialogListState({}, 1);\n app.dropdownDialogs = new DialogListState({\n filter: {\n unread: true\n }\n }, 1, 5);\n app.composer.composingMessageTo = function (dialog) {\n const MessageComposer = flarum.reg.checkModule('flarum-messages', 'forum/components/MessageComposer');\n if (!MessageComposer) return false;\n return this.isVisible() && this.bodyMatches(MessageComposer, {\n dialog\n });\n };\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n if (app.session.user) {\n items.add('messages', m(LinkButton, {\n href: app.route('messages'),\n icon: \"far fa-envelope\",\n active: app.current.data.routeName && ['messages', 'dialog'].includes(app.current.data.routeName)\n }, app.translator.trans('flarum-messages.forum.index.messages_link')), 95);\n }\n });\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.session.user?.attribute('canSendAnyMessage')) {\n items.add('messages', m(DialogsDropdown, {\n state: app.dropdownDialogs\n }), 15);\n }\n });\n\n // @ts-ignore\n extend(UserControls, 'userControls', (items, user) => {\n if (app.session.user?.attribute('canSendAnyMessage')) {\n items.add('sendMessage', m(Button, {\n icon: \"fas fa-envelope\",\n onclick: () => {\n flarum.reg.asyncModuleImport('flarum/forum/components/ComposerBody').then(() => {\n app.composer.load(() => import(/* webpackChunkName: 'forum/components/MessageComposer', webpackMode: 'lazy-once' */ './components/MessageComposer'), {\n user: app.session.user,\n recipients: [user]\n }).then(() => app.composer.show());\n });\n }\n }, app.translator.trans('flarum-messages.forum.user_controls.send_message_button')));\n }\n });\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('messageReceived', {\n name: 'messageReceived',\n icon: 'fas fa-envelope',\n label: app.translator.trans('flarum-messages.forum.settings.notify_message_received_label')\n });\n });\n});flarum.reg.addChunkModule('451', '761', 'flarum-messages', 'forum/components/MessageComposer');"],"names":["inProgress","dataWebpackPrefix","module","exports","flarum","reg","get","_typeof","o","Symbol","iterator","constructor","prototype","_defineProperty","e","r","t","i","toPrimitive","call","TypeError","String","toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","f","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","toStringTag","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","id","chunkLoadingGlobal","self","DialogsDropdown","super","arguments","initAttrs","attrs","className","label","trans","icon","getContent","DialogDropdownList","state","then","default","goToRoute","route","set","getUnreadCount","user","attribute","getNewCount","add","addChunkModule","DialogListState","params","page","perPage","getAllItems","requestParams","include","filter","sort","currentSort","sortValue","values","sortMap","map","load","lastCount","pages","loadNext","markAllAsRead","method","dialog","pushAttributes","unreadCount","messageCount","clear","redraw","DialogMessage","content","contentHtml","renderFailed","contentPlain","getPlainContent","createdAt","Dialog","title","lastMessageAt","users","firstMessage","lastMessage","lastReadMessageId","lastReadAt","recipient","find","helper","unread","composingMessageTo","MessageComposer","checkModule","isVisible","bodyMatches","extend","items","href","active","routeName","includes","onclick","asyncModuleImport","recipients","show"],"sourceRoot":""}
\ No newline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EAAE+F,EAAiB,CACvCW,MAAO,sBACL,GAER,KAGA,IAAA4D,QAAO,IAAc,gBAAgB,CAACC,EAAOtD,KACvC,YAAYA,MAAMC,UAAU,sBAC9BqD,EAAMnD,IAAI,cAAepH,EAAE,IAAQ,CACjCuG,KAAM,kBACNqE,QAAS,KACP3M,OAAOC,IAAI2M,kBAAkB,wCAAwClE,MAAK,KACxE,aAAayB,MAAK,IAAM,8BAA6H,CACnJnB,KAAM,YAAYA,KAClB6D,WAAY,CAAC7D,KACZN,MAAK,IAAM,aAAaoE,QAAO,GAClC,GAEH,eAAezE,MAAM,4DAC1B,KAEF,IAAAgE,QAAO,2CAA4C,qBAAqB,SAAUC,GAChFA,EAAMnD,IAAI,kBAAmB,CAC3BjC,KAAM,kBACNoB,KAAM,kBACNF,MAAO,eAAeC,MAAM,iEAEhC,GAAE,IACDrI,OAAOC,IAAImJ,eAAe,MAAO,MAAO,kBAAmB,mC","sources":["webpack://@flarum/messages/webpack/runtime/load script","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Dropdown')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/InfoTile')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/components/UserSelectionModal')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/fullTime')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/listItems')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/ScrollListener')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/AbstractPost')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/Comment')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/ComposerBody')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderList')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PostMeta')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/PostUser')\"","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/messages/../../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/messages/webpack/bootstrap","webpack://@flarum/messages/webpack/runtime/compat get default export","webpack://@flarum/messages/webpack/runtime/define property getters","webpack://@flarum/messages/webpack/runtime/ensure chunk","webpack://@flarum/messages/webpack/runtime/get javascript chunk filename","webpack://@flarum/messages/webpack/runtime/global","webpack://@flarum/messages/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/messages/webpack/runtime/make namespace object","webpack://@flarum/messages/webpack/runtime/publicPath","webpack://@flarum/messages/webpack/runtime/compat","webpack://@flarum/messages/webpack/runtime/jsonp chunk loading","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderSecondary')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/utils/UserControls')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'forum/components/HeaderDropdown')\"","webpack://@flarum/messages/./src/forum/components/DialogsDropdown.tsx","webpack://@flarum/messages/./src/forum/states/DialogListState.ts","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/messages/./src/common/models/DialogMessage.ts","webpack://@flarum/messages/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/messages/./src/common/models/Dialog.ts","webpack://@flarum/messages/./src/common/extend.ts","webpack://@flarum/messages/./src/forum/extend.ts","webpack://@flarum/messages/./src/forum/index.tsx"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/components/Avatar');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/Dropdown');","module.exports = flarum.reg.get('core', 'common/components/Icon');","module.exports = flarum.reg.get('core', 'common/components/InfoTile');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LinkButton');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/components/Modal');","module.exports = flarum.reg.get('core', 'common/components/Page');","module.exports = flarum.reg.get('core', 'common/components/Tooltip');","module.exports = flarum.reg.get('core', 'common/components/UserSelectionModal');","module.exports = flarum.reg.get('core', 'common/helpers/fullTime');","module.exports = flarum.reg.get('core', 'common/helpers/humanTime');","module.exports = flarum.reg.get('core', 'common/helpers/listItems');","module.exports = flarum.reg.get('core', 'common/helpers/username');","module.exports = flarum.reg.get('core', 'common/states/PaginatedListState');","module.exports = flarum.reg.get('core', 'common/utils/ItemList');","module.exports = flarum.reg.get('core', 'common/utils/ScrollListener');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/AbstractPost');","module.exports = flarum.reg.get('core', 'forum/components/Comment');","module.exports = flarum.reg.get('core', 'forum/components/ComposerBody');","module.exports = flarum.reg.get('core', 'forum/components/HeaderList');","module.exports = flarum.reg.get('core', 'forum/components/IndexSidebar');","module.exports = flarum.reg.get('core', 'forum/components/PageStructure');","module.exports = flarum.reg.get('core', 'forum/components/PostMeta');","module.exports = flarum.reg.get('core', 'forum/components/PostUser');","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + {\"301\":\"forum/components/MessagesPage\",\"451\":\"forum/components/MessageComposer\",\"619\":\"forum/components/DialogDropdownList\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t170: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderSecondary');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/UserControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderDropdown');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport HeaderDropdown from 'flarum/forum/components/HeaderDropdown';\nimport classList from 'flarum/common/utils/classList';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default class DialogsDropdown extends HeaderDropdown {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"DialogDropdownList\", null);\n }\n static initAttrs(attrs) {\n attrs.className = classList('DialogsDropdown', attrs.className);\n attrs.label = attrs.label || app.translator.trans('flarum-messages.forum.header.dropdown_tooltip');\n attrs.icon = attrs.icon || 'fas fa-envelope';\n super.initAttrs(attrs);\n }\n getContent() {\n if (!this.DialogDropdownList) {\n import(/* webpackChunkName: 'forum/components/DialogDropdownList', webpackMode: 'lazy-once' */ './DialogDropdownList').then(DialogDropdownList => {\n this.DialogDropdownList = DialogDropdownList.default;\n });\n return m(LoadingIndicator, null);\n }\n return m(this.DialogDropdownList, {\n state: this.attrs.state\n });\n }\n goToRoute() {\n m.route.set(app.route('dialogs'));\n }\n getUnreadCount() {\n return app.session.user.attribute('messageCount');\n }\n getNewCount() {\n return app.session.user.attribute('messageCount');\n }\n}\nflarum.reg.add('flarum-messages', 'forum/components/DialogsDropdown', DialogsDropdown);flarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogDropdownList');\nflarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogList');\nflarum.reg.addChunkModule('619', '331', 'flarum-messages', 'forum/components/DialogListItem');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class DialogListState extends PaginatedListState {\n constructor(params, page, perPage) {\n if (page === void 0) {\n page = 1;\n }\n if (perPage === void 0) {\n perPage = null;\n }\n super(params, page, perPage);\n _defineProperty(this, \"lastCount\", 0);\n }\n get type() {\n return 'dialogs';\n }\n getAllItems() {\n return super.getAllItems();\n }\n requestParams() {\n const params = {\n include: ['lastMessage', 'users.groups'],\n filter: this.params.filter || {},\n sort: this.currentSort() || this.sortValue(Object.values(this.sortMap())[0])\n };\n return params;\n }\n sortMap() {\n const map = {};\n map.latest = '-lastMessageAt';\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n return map;\n }\n load() {\n if (app.session.user?.attribute('messageCount') !== this.lastCount) {\n this.pages = [];\n this.location = {\n page: 1\n };\n this.lastCount = app.session.user?.attribute('messageCount') || 0;\n }\n if (this.pages.length > 0) {\n return Promise.resolve();\n }\n return super.loadNext();\n }\n markAllAsRead() {\n return app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/dialogs/read'\n }).then(() => {\n app.dialogs.getAllItems().forEach(dialog => {\n dialog.pushAttributes({\n unreadCount: 0\n });\n });\n app.session.user.pushAttributes({\n messageCount: 0\n });\n app.dropdownDialogs.clear();\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-messages', 'forum/states/DialogListState', DialogListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","import Model from 'flarum/common/Model';\nimport computed from 'flarum/common/utils/computed';\nimport { getPlainContent } from 'flarum/common/utils/string';\nexport default class DialogMessage extends Model {\n content() {\n return Model.attribute('content').call(this);\n }\n contentHtml() {\n return Model.attribute('contentHtml').call(this);\n }\n renderFailed() {\n return Model.attribute('renderFailed').call(this);\n }\n contentPlain() {\n return computed('contentHtml', content => {\n if (typeof content === 'string') {\n return getPlainContent(content);\n }\n return content;\n }).call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n dialog() {\n return Model.hasOne('dialog').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\nflarum.reg.add('flarum-messages', 'common/models/DialogMessage', DialogMessage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import Model from 'flarum/common/Model';\nimport app from 'flarum/common/app';\nexport default class Dialog extends Model {\n title() {\n return Model.attribute('title').call(this);\n }\n type() {\n return Model.attribute('type').call(this);\n }\n lastMessageAt() {\n return Model.attribute('lastMessageAt', Model.transformDate).call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n users() {\n return Model.hasMany('users').call(this);\n }\n firstMessage() {\n return Model.hasOne('firstMessage').call(this);\n }\n lastMessage() {\n return Model.hasOne('lastMessage').call(this);\n }\n unreadCount() {\n return Model.attribute('unreadCount').call(this);\n }\n lastReadMessageId() {\n return Model.attribute('lastReadMessageId').call(this);\n }\n lastReadAt() {\n return Model.attribute('lastReadAt', Model.transformDate).call(this);\n }\n recipient() {\n let users = this.users();\n return !users ? null : users.find(user => user && user.id() !== app.session.user.id());\n }\n}\nflarum.reg.add('flarum-messages', 'common/models/Dialog', Dialog);","import DialogMessage from './models/DialogMessage';\nimport Dialog from './models/Dialog';\nimport Extend from 'flarum/common/extenders';\nexport default [new Extend.Store().add('dialogs', Dialog) //\n.add('dialog-messages', DialogMessage) //\n];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('messages', '/messages', () => import(/* webpackChunkName: 'forum/components/MessagesPage', webpackMode: 'lazy-once' */ './components/MessagesPage')).add('dialog', '/messages/dialog/:id', () => import(/* webpackChunkName: 'forum/components/MessagesPage', webpackMode: 'lazy-once' */ './components/MessagesPage')).helper('dialog', dialog => app.route('dialog', {\n id: dialog.id()\n}))];flarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessagesPage');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessagesSidebar');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/DialogSection');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/MessageStream');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/states/MessageStreamState');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/DetailsModal');\nflarum.reg.addChunkModule('301', '654', 'flarum-messages', 'forum/components/Message');","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport DialogsDropdown from './components/DialogsDropdown';\nimport DialogListState from './states/DialogListState';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-messages', () => {\n app.dialogs = new DialogListState({}, 1);\n app.dropdownDialogs = new DialogListState({\n filter: {\n unread: true\n }\n }, 1, 5);\n app.composer.composingMessageTo = function (dialog) {\n return this.isVisible() && this.bodyMatches('flarum/messages/forum/components/MessageComposer', {\n dialog\n });\n };\n extend(IndexSidebar.prototype, 'navItems', function (items) {\n if (app.session.user) {\n items.add('messages', m(LinkButton, {\n href: app.route('messages'),\n icon: \"far fa-envelope\",\n active: app.current.data.routeName && ['messages', 'dialog'].includes(app.current.data.routeName)\n }, app.translator.trans('flarum-messages.forum.index.messages_link')), 95);\n }\n });\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.session.user?.attribute('canSendAnyMessage')) {\n items.add('messages', m(DialogsDropdown, {\n state: app.dropdownDialogs\n }), 15);\n }\n });\n\n // @ts-ignore\n extend(UserControls, 'userControls', (items, user) => {\n if (app.session.user?.attribute('canSendAnyMessage')) {\n items.add('sendMessage', m(Button, {\n icon: \"fas fa-envelope\",\n onclick: () => {\n flarum.reg.asyncModuleImport('flarum/forum/components/ComposerBody').then(() => {\n app.composer.load(() => import(/* webpackChunkName: 'forum/components/MessageComposer', webpackMode: 'lazy-once' */ './components/MessageComposer'), {\n user: app.session.user,\n recipients: [user]\n }).then(() => app.composer.show());\n });\n }\n }, app.translator.trans('flarum-messages.forum.user_controls.send_message_button')));\n }\n });\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('messageReceived', {\n name: 'messageReceived',\n icon: 'fas fa-envelope',\n label: app.translator.trans('flarum-messages.forum.settings.notify_message_received_label')\n });\n });\n});flarum.reg.addChunkModule('451', '761', 'flarum-messages', 'forum/components/MessageComposer');"],"names":["inProgress","dataWebpackPrefix","module","exports","flarum","reg","get","_typeof","o","Symbol","iterator","constructor","prototype","_defineProperty","e","r","t","i","toPrimitive","call","TypeError","String","toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","f","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","toStringTag","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","id","chunkLoadingGlobal","self","DialogsDropdown","super","arguments","initAttrs","attrs","className","label","trans","icon","getContent","DialogDropdownList","state","then","default","goToRoute","route","set","getUnreadCount","user","attribute","getNewCount","add","addChunkModule","DialogListState","params","page","perPage","getAllItems","requestParams","include","filter","sort","currentSort","sortValue","values","sortMap","map","load","lastCount","pages","loadNext","markAllAsRead","method","dialog","pushAttributes","unreadCount","messageCount","clear","redraw","DialogMessage","content","contentHtml","renderFailed","contentPlain","getPlainContent","createdAt","Dialog","title","lastMessageAt","users","firstMessage","lastMessage","lastReadMessageId","lastReadAt","recipient","find","helper","unread","composingMessageTo","isVisible","bodyMatches","extend","items","href","active","routeName","includes","onclick","asyncModuleImport","recipients","show"],"sourceRoot":""}
\ No newline at end of file
diff --git a/framework/core/js/dist-typings/forum/components/HeaderListItem.d.ts b/framework/core/js/dist-typings/forum/components/HeaderListItem.d.ts
index 87205f92d..cfbcece35 100644
--- a/framework/core/js/dist-typings/forum/components/HeaderListItem.d.ts
+++ b/framework/core/js/dist-typings/forum/components/HeaderListItem.d.ts
@@ -7,7 +7,7 @@ export interface IHeaderListItemAttrs extends ComponentAttrs {
content: string;
excerpt: string;
datetime?: Date;
- href: string;
+ href?: string | null;
onclick?: (e: Event) => void;
actions?: Mithril.Children;
}
diff --git a/framework/core/js/dist-typings/forum/states/ComposerState.d.ts b/framework/core/js/dist-typings/forum/states/ComposerState.d.ts
index e144fa29c..e386a4437 100644
--- a/framework/core/js/dist-typings/forum/states/ComposerState.d.ts
+++ b/framework/core/js/dist-typings/forum/states/ComposerState.d.ts
@@ -86,7 +86,7 @@ declare class ComposerState {
* @param type The component class to check against. Subclasses are accepted as well.
* @param data
*/
- bodyMatches(type: object, data?: any): boolean;
+ bodyMatches(type: object | string, data?: any): boolean;
/**
* Determine whether or not the Composer is visible.
*
diff --git a/framework/core/js/dist/admin.js b/framework/core/js/dist/admin.js
index 9c51bff8b..812124bb0 100644
--- a/framework/core/js/dist/admin.js
+++ b/framework/core/js/dist/admin.js
@@ -1,3 +1,3 @@
/*! For license information please see admin.js.LICENSE.txt */
-(()=>{var t,e,n={5710:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(8805);class s{constructor(){(0,r.A)(this,"element",void 0),(0,r.A)(this,"attrs",void 0),(0,r.A)(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const n={...t};return m(this,n,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error(`[${this.constructor.name}] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`);if("tag"in t)throw new Error(`[${this.constructor.name}] You cannot use the "tag" attribute name with Mithril 2.`)}this.attrs=t}static initAttrs(t){}}flarum.reg.add("core","common/Component",s)},5420:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(8805),s=n(5114);class a{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e=s.A.store),(0,r.A)(this,"data",{}),(0,r.A)(this,"freshness",new Date),(0,r.A)(this,"exists",!1),(0,r.A)(this,"store",void 0),this.data=t,this.store=e}id(){return"id"in this.data?this.data.id:void 0}attribute(t){return this.data?.attributes?.[t]}pushData(t){if("id"in t&&(this.data.id=t.id),"type"in t&&(this.data.type=t.type),"attributes"in t){this.data.attributes||={};for(const e in t.attributes){const n=t.attributes[e];n&&n instanceof a&&delete t.attributes[e]}Object.assign(this.data.attributes,t.attributes)}if("relationships"in t){const e=this.data.relationships??{};for(const n in t.relationships){const r=t.relationships[n];if(null===r){delete e[n],delete t.relationships[n];continue}let s;s=r instanceof a?{data:a.getIdentifier(r)}:r instanceof Array?{data:r.map(a.getIdentifier)}:r,t.relationships[n]=s,e[n]=s}this.data.relationships=e}return this.freshness=new Date,this}pushAttributes(t){this.pushData({attributes:t})}save(t,e){void 0===e&&(e={});const n={type:this.data.type,attributes:t};if("id"in this.data&&(n.id=this.data.id),t.relationships){n.relationships={};for(const e in t.relationships){const r=t.relationships[e];null!==r&&(n.relationships[e]={data:r instanceof Array?r.map(a.getIdentifier):a.getIdentifier(r)})}delete t.relationships}const r=this.copyData();this.pushData(n);const i={data:n,meta:e.meta||void 0};return s.A.request({method:this.exists?"PATCH":"POST",url:s.A.forum.attribute("apiUrl")+this.apiEndpoint(),body:i,...e}).then((t=>this.store.pushPayload(t)),(t=>{throw this.pushData(r),m.redraw(),t}))}delete(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?s.A.request({method:"DELETE",url:s.A.forum.attribute("apiUrl")+this.apiEndpoint(),body:t,...e}).then((()=>{this.exists=!1,this.store.remove(this)})):Promise.resolve()}apiEndpoint(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")}copyData(){return JSON.parse(JSON.stringify(this.data))}rawRelationship(t){return this.data.relationships?.[t]?.data}static attribute(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}}static hasOne(t){return function(){const e=this.data.relationships?.[t]?.data;if(e&&e instanceof Array)throw new Error(`Relationship ${t} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);return!!e&&this.store.getById(e.type,e.id)}}static hasMany(t){return function(){const e=this.data.relationships?.[t]?.data;if(e&&!(e instanceof Array))throw new Error(`Relationship ${t} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);return!!e&&e.map((t=>this.store.getById(t.type,t.id)))}}static transformDate(t){return null!=t?new Date(t):t}static getIdentifier(t){return t&&t.data&&"id"in t.data?{type:t.data.type,id:t.data.id}:null}}flarum.reg.add("core","common/Model",a)},3920:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});var r=n(8805),s=n(5114),a=n(8631);class i extends a.px{key(){return s.A.translator.trans("core.lib.gambits.discussions.author.key",{},!0)}hint(){return s.A.translator.trans("core.lib.gambits.discussions.author.hint",{},!0)}filterKey(){return"author"}}flarum.reg.add("core","common/query/discussions/AuthorGambit",i);class o extends a.px{key(){return s.A.translator.trans("core.lib.gambits.discussions.created.key",{},!0)}hint(){return s.A.translator.trans("core.lib.gambits.discussions.created.hint",{},!0)}valuePattern(){return"(\\d{4}\\-\\d\\d\\-\\d\\d(?:\\.\\.(\\d{4}\\-\\d\\d\\-\\d\\d))?)"}filterKey(){return"created"}}flarum.reg.add("core","common/query/discussions/CreatedGambit",o);class l extends a.pm{key(){return s.A.translator.trans("core.lib.gambits.discussions.hidden.key",{},!0)}filterKey(){return"hidden"}enabled(){return!!s.A.session.user}}flarum.reg.add("core","common/query/discussions/HiddenGambit",l);class c extends a.pm{key(){return s.A.translator.trans("core.lib.gambits.discussions.unread.key",{},!0)}filterKey(){return"unread"}enabled(){return!!s.A.session.user}}flarum.reg.add("core","common/query/discussions/UnreadGambit",c);class u extends a.px{key(){return s.A.translator.trans("core.lib.gambits.users.email.key",{},!0)}hint(){return s.A.translator.trans("core.lib.gambits.users.email.hint",{},!0)}filterKey(){return"email"}enabled(){return!(!s.A.session.user||!s.A.forum.attribute("canEditUserCredentials"))}}flarum.reg.add("core","common/query/users/EmailGambit",u);class d extends a.px{key(){return s.A.translator.trans("core.lib.gambits.users.group.key",{},!0)}hint(){return s.A.translator.trans("core.lib.gambits.users.group.hint",{},!0)}filterKey(){return"group"}}flarum.reg.add("core","common/query/users/GroupGambit",d);class m extends a.px{key(){return s.A.translator.trans("core.lib.gambits.posts.discussion.key",{},!0)}hint(){return s.A.translator.trans("core.lib.gambits.posts.discussion.hint",{},!0)}filterKey(){return"discussion"}}flarum.reg.add("core","common/query/discussions/DiscussionGambit",m);class h{constructor(){(0,r.A)(this,"gambits",{discussions:[i,o,l,c],posts:[i,m],users:[u,d]})}apply(t,e){return e.q=this.match(t,e.q,((t,n,r)=>{const s=t.toFilter(n,r);Object.keys(s).forEach((n=>{n in e&&t.predicates&&Array.isArray(s[n])?e[n]=e[n].concat(s[n]):e[n]=s[n]}))})),e}match(t,e,n){const r=this.for(t).filter((t=>t.enabled()));if(0===r.length)return e;const s=e.split(" ");for(const t of r)for(const r of s){const s=new RegExp(`^(-?)${t.pattern()}$`,"i");let a=r.match(s);if(a){const s="-"===a[1];a.splice(1,1),n(t,a,s,r),e=e.replace(r,"")}}return e.trim().replace(/\s+/g," ")}from(t,e,n){const r=this.for(t);return 0===r.length||Object.keys(n).forEach((t=>{for(const s of r){const r="-"===t[0];r&&(t=t.substring(1)),s.filterKey()===t&&(e+=` ${s.fromFilter(n[t],r)}`)}})),e}for(t){return(this.gambits[t]||[]).map((t=>new t))}}flarum.reg.add("core","common/GambitManager",h);class p{constructor(t){(0,r.A)(this,"state",void 0),(0,r.A)(this,"gambits",new h),this.state=t}}(0,r.A)(p,"MIN_SEARCH_LEN",3),flarum.reg.add("core","common/SearchManager",p)},5114:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});const r=window,s=new Proxy({},{get:(t,e)=>Reflect.get(r.app,e,r.app),set:(t,e,n)=>Reflect.set(r.app,e,n,r.app)}),a=s;flarum.reg.add("core","common/app",s)},9924:(t,e,n)=>{"use strict";n.d(e,{A:()=>u});var r=n(5710),s=n(3092),a=n(5673),i=n(4586),o=n(4268),l=n(5114),c=n(7479);class u extends r.A{view(t){const e=Object.assign({},this.attrs),n=(0,i.A)(e,"type");e.className=(0,o.A)("Alert",`Alert--${n}`,e.className);const r=(0,i.A)(e,"title"),u=(0,i.A)(e,"icon"),d=(0,i.A)(e,"content")||t.children,h=(0,i.A)(e,"controls")||[],p=(0,i.A)(e,"dismissible"),f=(0,i.A)(e,"ondismiss"),g=[];return(p||void 0===p)&&g.push(m(s.A,{"aria-label":l.A.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:f})),m("div",e,m("div",{className:(0,o.A)("Alert-container",e.containerClassName)},m("div",{className:"Alert-content"},!!r&&m("div",{className:"Alert-title"},!!u&&m("span",{className:"Alert-title-icon"},m(c.A,{name:u})),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},d)),m("ul",{className:"Alert-controls"},(0,a.A)(h.concat(g)))))}}flarum.reg.add("core","common/components/Alert",u)},367:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var r=n(4391),s=n(5710),a=n(4268),i=n(3288),o=n(7479);class l extends s.A{view(){const{type:t,icon:e,label:n,color:s,style:l={},...c}=this.attrs,u=(0,a.A)("Badge",[t&&`Badge--${t}`],c.className,(0,i.A)(s)),d=e?m(o.A,{name:e,className:"Badge-icon"}):m.trust(" "),h={...l};window.testing||(h["--badge-bg"]=s);const p={...c,className:u,style:h},f=m("div",p,d);return n?m(r.A,{text:n},f):f}}flarum.reg.add("core","common/components/Badge",l)},3092:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(5710),s=n(4434),a=n(4268),i=n(117),o=n(43),l=n(7479);class c extends r.A{view(t){let{type:e,"aria-label":n,icon:r,disabled:s,loading:o,className:l,class:c,...u}=this.attrs;e||="button","object"==typeof n&&(n=(0,i.A)(n)),(s||o)&&delete u.onclick,l=(0,a.A)(c,l,{hasIcon:r,disabled:s||o,loading:o});const d={disabled:s,className:l,type:e,"aria-label":n,...u};return m("button",d,this.getButtonContent(t.children))}oncreate(t){super.oncreate(t);const{"aria-label":e}=this.attrs;this.view!==c.prototype.view||e||(0,i.A)(t.children)||this.element?.getAttribute?.("aria-label")||(0,s.A)('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)}getButtonContent(t){const e=this.attrs.icon;return[e&&m(l.A,{name:e,className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(o.A,{size:"small",display:"inline"})]}}flarum.reg.add("core","common/components/Button",c)},374:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(5710),s=n(4268);class a extends r.A{view(t){const{label:e,description:n,className:r,...a}=t.attrs;return m("div",Object.assign({className:(0,s.A)("Form",r)},a),(e||n)&&m("div",{className:"Form-header"},e&&m("label",null,e),n&&m("p",{className:"helpText"},n)),m("div",{className:"Form-body"},t.children))}}flarum.reg.add("core","common/components/Form",a)},2855:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(2849);class s extends r.A{wrapper(t){return m("form",{onsubmit:this.onsubmit.bind(this)},t)}onsubmit(t){}onready(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")}onerror(t){this.alertAttrs=t.alert,m.redraw(),422===t.status&&t.response?.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()}}flarum.reg.add("core","common/components/FormModal",s)},3550:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(367);class s extends r.A{static initAttrs(t){super.initAttrs(t),t.group&&(t.icon=t.group.icon()||"",t.color=t.group.color()||"",t.label=void 0===t.label?t.group.nameSingular():t.label,t.type="group--"+t.group.id(),delete t.group)}}flarum.reg.add("core","common/components/GroupBadge",s)},7479:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(4268),s=n(5710);class a extends s.A{view(t){const{name:e,...n}=t.attrs;return n.className=(0,r.A)("icon",e,n.className),m("i",Object.assign({"aria-hidden":"true"},n))}}flarum.reg.add("core","common/components/Icon",a)},4164:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(5710),s=n(7479),a=n(4268);class i extends r.A{view(t){const{icon:e,className:n,...r}=t.attrs;return m("div",Object.assign({className:(0,a.A)("InfoTile",n)},r),this.icon(),m("div",{className:"InfoTile-text"},t.children))}icon(){return this.attrs.iconElement?this.attrs.iconElement:this.attrs.icon?m(s.A,{name:(0,a.A)(this.attrs.icon,"InfoTile-icon")}):null}}flarum.reg.add("core","common/components/InfoTile",i)},7882:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(5114),s=n(5710),a=n(7479),i=n(43),o=n(4268),l=n(3092);class c extends s.A{oninit(t){super.oninit(t)}view(t){const{className:e,...n}=this.attrs.inputAttrs||{},s=this.attrs.value||this.attrs.stream?.()||"";return m("div",{className:(0,o.A)("Input",this.attrs.className,{"Input--withPrefix":this.attrs.prefixIcon,"Input--withClear":this.attrs.clearable})},this.attrs.prefixIcon&&m(a.A,{name:(0,o.A)(this.attrs.prefixIcon,"Input-prefix-icon")}),this.input({inputClassName:e,value:s,inputAttrs:n}),this.attrs.loading&&m(i.A,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),this.attrs.clearable&&s&&!this.attrs.loading&&m(l.A,{className:"Input-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":this.attrs.clearLabel||r.A.translator.trans("core.lib.input.clear_button"),type:"button",icon:"fas fa-times-circle"}))}input(t){let{inputClassName:e,value:n,inputAttrs:r}=t;const s={className:(0,o.A)("FormControl",e),type:this.attrs.type||"text",value:n,oninput:t=>this.onchange?.(t.target.value),"aria-label":this.attrs.ariaLabel,placeholder:this.attrs.placeholder,readonly:this.attrs.readonly||void 0,disabled:this.attrs.disabled||void 0,...r};return this.attrs.renderInput?this.attrs.renderInput(s):m("input",s)}onchange(t){this.attrs.stream?this.attrs.stream(t):this.attrs.onchange?.(t)}clear(){this.onchange("")}}flarum.reg.add("core","common/components/Input",c)},43:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(5114),s=n(5710),a=n(4268);class i extends s.A{view(){const{display:t="block",size:e="medium",containerClassName:n,className:s,...i}=this.attrs,o=(0,a.A)("LoadingIndicator",s),l=(0,a.A)("LoadingIndicator-container","unset"!==t&&`LoadingIndicator-container--${t}`,e&&`LoadingIndicator-container--${e}`,n);return m("div",Object.assign({"aria-label":r.A.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},i.containerAttrs,{"data-size":e,className:l}),m("div",Object.assign({"aria-hidden":"true",className:o},i)))}}flarum.reg.add("core","common/components/LoadingIndicator",i)},2849:(t,e,n)=>{"use strict";n.d(e,{A:()=>c});var r=n(8805),s=n(5114),a=n(5710),i=n(9924),o=n(3092),l=n(4268);class c extends a.A{constructor(){super(...arguments),(0,r.A)(this,"loading",!1),(0,r.A)(this,"alertAttrs",null)}static get dismissibleOptions(){return{viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}}oncreate(t){super.oncreate(t),this.attrs.animateShow((()=>this.onready()))}onbeforeremove(t){if(super.onbeforeremove(t),!this.attrs.state.modal)return new Promise((t=>setTimeout(t,300)))}view(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:(0,l.A)("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(o.A,{icon:"fas fa-times",onclick:()=>this.hide(),className:"Button Button--icon Button--link","aria-label":s.A.translator.trans("core.lib.modal.close")})),this.wrapper(this.inner())))}wrapper(t){return m("[",null,t)}inner(){return m("[",null,m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(i.A,this.alertAttrs)),this.content())}onready(){}hide(){this.attrs.animateHide()}loaded(){this.loading=!1,m.redraw()}get dismissibleOptions(){return this.constructor.dismissibleOptions}}(0,r.A)(c,"isDismissibleViaCloseButton",!0),(0,r.A)(c,"isDismissibleViaEscKey",!0),(0,r.A)(c,"isDismissibleViaBackdropClick",!0),flarum.reg.add("core","common/components/Modal",c)},4391:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(8805),s=n(5710),a=n(4268),i=n(117);class o extends s.A{constructor(){super(...arguments),(0,r.A)(this,"firstChild",null),(0,r.A)(this,"childDomNode",null),(0,r.A)(this,"oldText",""),(0,r.A)(this,"oldVisibility",void 0),(0,r.A)(this,"shouldRecreateTooltip",!1),(0,r.A)(this,"shouldChangeTooltipVisibility",!1)}view(t){const e=t.children,{text:n,tooltipVisible:r,showOnFocus:s=!0,position:a="top",ignoreTitleWarning:i=!1,html:o=!1,delay:l=0,...c}=this.attrs;this.attrs.title&&!i&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");const u=this.getRealText();if(u!==this.oldText&&(this.oldText=u,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a
or .");const d=e[0];if("object"!=typeof d||Array.isArray(d)||null===d)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof d.tag&&["#","[","<"].includes(d.tag))throw new Error(`Tooltip component with provided with a vnode with tag "${d.tag}". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a