From f3c8921b098840758917582985f4a0936b5ef5c6 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Sat, 22 Jun 2024 09:48:18 +0000 Subject: [PATCH] Bundled output for commit c8dc8f692223a7a6e0f50b57c13096a9dd5b07e0 Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- extensions/lock/js/dist/admin.js | 2 +- extensions/lock/js/dist/admin.js.map | 2 +- extensions/mentions/js/dist/admin.js | 2 +- extensions/mentions/js/dist/admin.js.map | 2 +- extensions/mentions/js/dist/forum.js | 2 +- extensions/mentions/js/dist/forum.js.map | 2 +- extensions/nicknames/js/dist/admin.js | 2 +- extensions/nicknames/js/dist/admin.js.map | 2 +- extensions/nicknames/js/dist/forum.js | 2 +- extensions/nicknames/js/dist/forum.js.map | 2 +- extensions/subscriptions/js/dist/forum.js | 2 +- extensions/subscriptions/js/dist/forum.js.map | 2 +- extensions/tags/js/dist/forum.js | 2 +- extensions/tags/js/dist/forum.js.map | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/extensions/lock/js/dist/admin.js b/extensions/lock/js/dist/admin.js index 8b23ea0c64..b87f29e27d 100644 --- a/extensions/lock/js/dist/admin.js +++ b/extensions/lock/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var a in o)e.o(o,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:o[a]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>m});const o=flarum.reg.get("core","admin/app");var a=e.n(o);const t=flarum.reg.get("core","common/extenders");var s=e.n(t);const n=flarum.reg.get("core","common/query/IGambit"),l=flarum.reg.get("core","common/app");var i=e.n(l);class c extends n.BooleanGambit{key(){return i().translator.trans("flarum-lock.lib.gambits.discussions.locked.key",{},!0)}filterKey(){return"locked"}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",c);const m=[(new(s().Search)).gambit("discussions",c)];a().initializers.add("lock",(()=>{a().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:a().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); +(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var a in o)e.o(o,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:o[a]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>m});const o=flarum.reg.get("core","admin/app");var a=e.n(o);const t=flarum.reg.get("core","common/extenders");var s=e.n(t);const n=flarum.reg.get("core","common/query/IGambit"),l=flarum.reg.get("core","common/app");var i=e.n(l);class c extends n.BooleanGambit{key(){return i().translator.trans("flarum-lock.lib.gambits.discussions.locked.key",{},!0)}filterKey(){return"locked"}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",c);const m=[(new(s().Search)).gambit("discussions",c)];a().initializers.add("flarum-lock",(()=>{a().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:a().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/admin.js.map b/extensions/lock/js/dist/admin.js.map index ba11e68eb4..5d194a348b 100644 --- a/extensions/lock/js/dist/admin.js.map +++ b/extensions/lock/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.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,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,wBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,c,aCE7C,MAAMW,UAAqB,EAAAC,cACxCjB,MACE,OAAO,qBAAqB,iDAAkD,CAAC,GAAG,EACpF,CACAkB,YACE,MAAO,QACT,EAEFJ,OAAOC,IAAII,IAAI,cAAe,wCAAyCH,GCRvE,UAAgB,IAAI,aACnBI,OAAO,cAAeJ,ICDvB,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeK,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.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', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { BooleanGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class LockedGambit extends BooleanGambit {\n key() {\n return app.translator.trans('flarum-lock.lib.gambits.discussions.locked.key', {}, true);\n }\n filterKey() {\n return 'locked';\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\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","LockedGambit","BooleanGambit","filterKey","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.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,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,wBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,c,aCE7C,MAAMW,UAAqB,EAAAC,cACxCjB,MACE,OAAO,qBAAqB,iDAAkD,CAAC,GAAG,EACpF,CACAkB,YACE,MAAO,QACT,EAEFJ,OAAOC,IAAII,IAAI,cAAe,wCAAyCH,GCRvE,UAAgB,IAAI,aACnBI,OAAO,cAAeJ,ICDvB,qBAAqB,eAAe,KAClC,sBAAsB,eAAeK,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.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', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { BooleanGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class LockedGambit extends BooleanGambit {\n key() {\n return app.translator.trans('flarum-lock.lib.gambits.discussions.locked.key', {}, true);\n }\n filterKey() {\n return 'locked';\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\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","LockedGambit","BooleanGambit","filterKey","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/mentions/js/dist/admin.js b/extensions/mentions/js/dist/admin.js index f867b21f2e..c0d0dce103 100644 --- a/extensions/mentions/js/dist/admin.js +++ b/extensions/mentions/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const r=flarum.reg.get("core","admin/app");var n=e.n(r);n().initializers.add("flarum-mentions",(function(){n().extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:n().translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:n().translator.trans("flarum-mentions.admin.settings.allow_username_format_text")}).registerPermission({permission:"mentionGroups",label:n().translator.trans("flarum-mentions.admin.permissions.mention_groups_label"),icon:"fas fa-at"},"start")}))})(),module.exports=t})(); +(()=>{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const r=flarum.reg.get("core","admin/app");var a=e.n(r);a().initializers.add("flarum-mentions",(()=>{a().extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:a().translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:a().translator.trans("flarum-mentions.admin.settings.allow_username_format_text")}).registerPermission({permission:"mentionGroups",label:a().translator.trans("flarum-mentions.admin.permissions.mention_groups_label"),icon:"fas fa-at"},"start")}))})(),module.exports=t})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/mentions/js/dist/admin.js.map b/extensions/mentions/js/dist/admin.js.map index a28cbd4793..ddd5816e35 100644 --- a/extensions/mentions/js/dist/admin.js.map +++ b/extensions/mentions/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.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,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,mBAAmB,WACtC,sBAAsB,mBAAmBW,gBAAgB,CACvDC,QAAS,wCACTC,KAAM,UACNC,MAAO,qBAAqB,8DAC5BC,KAAM,qBAAqB,+DAC1BC,mBAAmB,CACpBC,WAAY,gBACZH,MAAO,qBAAqB,0DAC5BI,KAAM,aACL,QACL,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', 'admin/app')\"","webpack://@flarum/mentions/./src/admin/index.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', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('flarum-mentions', function () {\n app.extensionData.for('flarum-mentions').registerSetting({\n setting: 'flarum-mentions.allow_username_format',\n type: 'boolean',\n label: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_label'),\n help: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_text')\n }).registerPermission({\n permission: 'mentionGroups',\n label: app.translator.trans('flarum-mentions.admin.permissions.mention_groups_label'),\n icon: 'fas fa-at'\n }, 'start');\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","registerSetting","setting","type","label","help","registerPermission","permission","icon"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.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,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,mBAAmB,KACtC,sBAAsB,mBAAmBW,gBAAgB,CACvDC,QAAS,wCACTC,KAAM,UACNC,MAAO,qBAAqB,8DAC5BC,KAAM,qBAAqB,+DAC1BC,mBAAmB,CACpBC,WAAY,gBACZH,MAAO,qBAAqB,0DAC5BI,KAAM,aACL,QAAQ,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', 'admin/app')\"","webpack://@flarum/mentions/./src/admin/index.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', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('flarum-mentions', () => {\n app.extensionData.for('flarum-mentions').registerSetting({\n setting: 'flarum-mentions.allow_username_format',\n type: 'boolean',\n label: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_label'),\n help: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_text')\n }).registerPermission({\n permission: 'mentionGroups',\n label: app.translator.trans('flarum-mentions.admin.permissions.mention_groups_label'),\n icon: 'fas fa-at'\n }, 'start');\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","registerSetting","setting","type","label","help","registerPermission","permission","icon"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/mentions/js/dist/forum.js b/extensions/mentions/js/dist/forum.js index ee2b9c1b2e..2eb44de04d 100644 --- a/extensions/mentions/js/dist/forum.js +++ b/extensions/mentions/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>Ot,filterGroupMentions:()=>Yt,filterPostMentions:()=>Qt,filterTagMentions:()=>Vt,filterUserMentions:()=>Jt,postFilterGroupMentions:()=>Kt,postFilterPostMentions:()=>Xt,postFilterTagMentions:()=>Zt,postFilterUserMentions:()=>zt});const n=flarum.reg.get("core","common/extend"),o=flarum.reg.get("core","forum/app");var s=t.n(o);const r=flarum.reg.get("core","common/utils/string"),i=flarum.reg.get("core","common/helpers/textContrastClass");var a=t.n(i);const u=flarum.reg.get("core","forum/components/Post");var l=t.n(u);const c=flarum.reg.get("core","forum/components/CommentPost");var d=t.n(c);const f=flarum.reg.get("core","forum/components/PostPreview");var p=t.n(f);const h=flarum.reg.get("core","common/components/LoadingIndicator");var g=t.n(h);const b=flarum.reg.get("core","common/components/Link");var y=t.n(b);const v=flarum.reg.get("core","common/helpers/punctuateSeries");var w=t.n(v);const M=flarum.reg.get("core","common/helpers/username");var x=t.n(M);const P=flarum.reg.get("core","common/components/Icon");var C=t.n(P);const A=flarum.reg.get("core","common/components/Button");var T=t.n(A);const B=flarum.reg.get("core","common/components/Modal");var D=t.n(B);const _=flarum.reg.get("core","common/states/PaginatedListState");var N=t.n(_);class S extends(N()){constructor(t,e){void 0===e&&(e=1),t.page={...t.page||{},limit:10},super(t,e,10)}get type(){return"posts"}}flarum.reg.add("flarum-mentions","forum/state/MentionedByModalState",S);const k=flarum.reg.get("core","common/components/Form");var F=t.n(k);class I extends(D()){oninit(t){super.oninit(t),this.state=new S({filter:{mentionedPost:this.attrs.post.id()},sort:"number"}),this.state.refresh()}className(){return"MentionedByModal"}title(){return s().translator.trans("flarum-mentions.forum.mentioned_by.title")}content(){return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(g(),null):m("[",null,m("ul",{className:"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview"},this.state.getPages().map((t=>t.items.map((t=>m("li",{"data-number":t.number()},m(p(),{post:t,onclick:()=>s().modal.close()}))))))))),this.state.hasNext()&&m("div",{className:"Modal-footer"},m(F(),{className:"Form--centered"},m("div",{className:"Form-group"},m(T(),{className:"Button Button--block",onclick:()=>this.state.loadNext(),loading:this.state.isLoadingNext()},s().translator.trans("flarum-mentions.forum.mentioned_by.load_more_button"))))))}}flarum.reg.add("flarum-mentions","forum/components/MentionedByModal",I);const R=flarum.reg.get("core","forum/utils/DiscussionControls");var L=t.n(R);function U(t,e,n){return new Promise((o=>{const r=s().mentionFormats.mentionable("post").replacement(t)+" ";e.fields.content()||(e.body.attrs.originalContent=r);const i=e.editor.getSelectionRange()[0],a=e.fields.content().slice(0,i),m=0==a.length?0:3-a.match(/(\n{0,2})$/)[0].length;return e.editor.insertAtCursor(Array(m).join("\n")+(n?"> "+r+n.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),o(e)}))}function j(t,e){const n=flarum.reg.checkModule("core","forum/components/EditPostComposer");return n&&s().composer.bodyMatches(n)&&s().composer.body.attrs.post.discussion()===t.discussion()?U(t,s().composer,e):L().replyAction.call(t.discussion()).then((n=>U(t,n,e)))}flarum.reg.add("flarum-mentions","forum/utils/reply",j);const E=flarum.reg.get("core","common/Fragment");var H=t.n(E);class G extends(H()){constructor(t){super(),this.post=t}view(){return m("button",{className:"Button PostQuoteButton",onclick:()=>{j(this.post,this.content)}},m(C(),{name:"fas fa-quote-left",className:"Button-icon"}),s().translator.trans("flarum-mentions.forum.post.quote_button"))}show(t,e){const n=this.$().show(),o=n.offsetParent().offset();n.css("left",t-o.left).css("top",e-o.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)}showStart(t,e){const n=this.$();this.show(t,$(window).scrollTop()+e-n.outerHeight()-5)}showEnd(t,e){const n=this.$();this.show(t-n.outerWidth(),$(window).scrollTop()+e+5)}hide(){this.$().hide(),$(document).off("mouseup",this.hideHandler)}}function W(t){const e=window.getSelection();if(!e.isCollapsed){const n=e.getRangeAt(0),o=n.commonAncestorContainer;if(t[0]===o||$.contains(t[0],o)){const t=$("
").append(n.cloneContents());return t.find("img.emoji").replaceWith((function(){return this.alt})),t.find("img").replaceWith((function(){return"![](".concat(this.src,")")})),t.find("a").replaceWith((function(){return"[".concat(this.innerText,"](").concat(this.href,")")})),t.text()}}return""}flarum.reg.add("flarum-mentions","forum/fragments/PostQuoteButton",G),flarum.reg.add("flarum-mentions","forum/utils/selectedText",W);const q=flarum.reg.get("core","common/components/TextEditorButton");var O=t.n(q);const J=flarum.reg.get("core","common/utils/KeyboardNavigatable");var z=t.n(J);const Q=flarum.reg.get("core","common/utils/AutocompleteReader");var X=t.n(Q);const Y=flarum.reg.get("core","common/utils/throttleDebounce");function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function V(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==K(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!==K(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===K(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Z extends(H()){constructor(){super(...arguments),V(this,"items",[]),V(this,"active",!1),V(this,"index",0),V(this,"keyWasJustPressed",!1)}view(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((t=>m("li",null,t))))}show(t,e){this.$().show().css({left:t+"px",top:e+"px"}),this.active=!0}hide(){this.$().hide(),this.active=!1}navigate(t){this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((()=>this.keyWasJustPressed=!1),500)}complete(){this.$("li").eq(this.index).find("button").click()}setIndex(t,e){if(this.keyWasJustPressed&&!e)return;const n=this.$(),o=n.find("li");let s=t;s<0?s=o.length-1:s>=o.length&&(s=0),this.index=s;const r=o.removeClass("active").eq(s).addClass("active");if(e){const t=n.scrollTop(),e=n.offset().top,o=e+n.outerHeight(),s=r.offset().top,i=s+r.outerHeight();let a;so&&(a=t-o+i+parseInt(n.css("padding-bottom"),10)),void 0!==a&&n.stop(!0).animate({scrollTop:a},100)}}}flarum.reg.add("flarum-mentions","forum/fragments/AutocompleteDropdown",Z);const tt=flarum.reg.get("core","common/Component");var et=t.n(tt);const nt=flarum.reg.get("core","common/utils/classList");var ot=t.n(nt);class st extends(et()){view(t){const{mentionable:e,...n}=this.attrs,o=ot()("MentionsDropdownItem","PostPreview","MentionsDropdown-".concat(e.type()));return m("button",Object.assign({className:o},n),m("span",{className:"PostPreview-content"},t.children))}}flarum.reg.add("flarum-mentions","forum/components/MentionsDropdownItem",st);class rt{constructor(t){V(this,"mentionables",void 0),V(this,"results",{}),V(this,"typed",null),V(this,"searched",[]),V(this,"dropdownItemAttrs",{}),V(this,"search",(async()=>{if(!this.typed||this.typed.length<=1)return;const t=this.typed.toLowerCase();if(!this.searched.includes(t)){for(const e of this.mentionables)for(const n of await e.search(t))this.results[e.type()].has(n.id())||this.results[e.type()].set(n.id(),n);return this.searched.push(t),Promise.resolve()}})),this.dropdownItemAttrs=t}init(t){this.typed=null,this.mentionables=t;for(const t of this.mentionables)this.results[t.type()]=new Map(t.initialResults().map((t=>[t.id(),t])))}matches(t,e){var n;return t.matches(e,(null==(n=this.typed)?void 0:n.toLowerCase())||"")}makeSuggestion(t,e){const n=t.suggestion(e,this.typed),o=t.replacement(e),{onclick:s,...r}=this.dropdownItemAttrs;return m(st,Object.assign({mentionable:t,onclick:()=>s(o)},r),n)}buildSuggestions(){const t=[];for(const e of this.mentionables){if(!e.enabled())continue;let n=Array.from(this.results[e.type()].values()).filter((t=>this.matches(e,t)));const o=e.maxStoreMatchedResults();o&&(n=n.splice(0,o));for(const o of n){const n=this.makeSuggestion(e,o);t.push(n)}}return t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModels",rt);class it{constructor(){V(this,"instances",void 0),V(this,"mentionables",void 0),V(this,"extendable",void 0)}makeMentionables(){var t;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((t=>new t(this)))}getMentionable(t){var e;return null!=(e=this.makeMentionables().find((e=>e.type()===t)))?e:null}extend(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormat",it);const at=flarum.reg.get("core","common/components/Avatar");var mt=t.n(at);const ut=flarum.reg.get("core","common/helpers/highlight");var lt=t.n(ut);class ct{constructor(t){V(this,"format",void 0),this.format=t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModel",ct);const dt=flarum.reg.get("core","common/utils/extractText");var ft=t.n(dt);const pt=()=>ft()(s().translator.trans("core.lib.username.deleted_text"));function ht(t,e){return void 0===e&&(e=!0),t?((e?t.displayName():t.username())||pt()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):pt().replace(/"#[a-z]{0,3}[0-9]+/,"_")}flarum.reg.add("flarum-mentions","forum/utils/getCleanDisplayName",ht);class gt extends ct{type(){return"user"}initialResults(){return Array.from(s().store.all("users"))}replacement(t){if(s().forum.attribute("allowUsernameMentionFormat")){const e=ht(t,!1);return this.format.format(e)}const e=ht(t);return this.format.format(e,"",t.id())}suggestion(t,e){const n=x()(t,(t=>lt()(t,e)));return m("[",null,m(mt(),{user:t}),n)}matches(t,e){return!!e&&[t.username(),t.displayName()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("users",{filter:{q:t},page:{limit:5}})}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/UserMention",gt);class bt extends ct{type(){return"post"}initialResults(){const t=flarum.reg.checkModule("core","forum/components/EditPostComposer"),e=flarum.reg.checkModule("core","forum/components/ReplyComposer");if(!(e&&s().composer.bodyMatches(e)||t&&s().composer.bodyMatches(t)))return[];const n=s().composer.body.attrs,o=n.post;return(o&&o.discussion()||n.discussion).posts().filter((t=>t&&"comment"===t.contentType()&&(!o||t.number()e.createdAt().getTime()-t.createdAt().getTime()))}replacement(t){const e=ht(t.user());return this.format.format(e,"p",t.id())}suggestion(t,e){var n;const o=t.user()||null,i=x()(o,(t=>lt()(t,e)));return m("[",null,m(mt(),{user:o}),i,[s().translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," — ",(0,r.truncate)(null!=(n=t.contentPlain())?n:"",200)])}matches(t,e){const n=t.user(),o=s().mentionFormats.mentionable("user");return!e||n&&o.matches(n,e)}maxStoreMatchedResults(){return 5}search(t){return Promise.resolve([])}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/PostMention",bt);const yt=flarum.reg.get("core","common/models/Group");var vt=t.n(yt);const wt=flarum.reg.get("core","common/components/Badge");var Mt=t.n(wt);class xt extends ct{type(){return"group"}initialResults(){return Array.from(s().store.all("groups").filter((t=>t.id()!==vt().GUEST_ID&&t.id()!==vt().MEMBER_ID)))}replacement(t){return this.format.format(t.namePlural(),"g",t.id())}suggestion(t,e){let n=t.namePlural();return e&&(n=lt()(n,e)),m("[",null,m(Mt(),{className:"Avatar Badge Badge--group--".concat(t.id()," Badge-icon"),color:t.color(),type:"group",icon:t.icon()}),m("span",{className:"username"},n))}matches(t,e){return!!e&&[t.namePlural().toLowerCase(),t.nameSingular().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}search(t){return Promise.resolve([])}enabled(){var t,e,n;return null!=(t=null==(e=s().session)||null==(n=e.user)?void 0:n.canMentionGroups())&&t}}flarum.reg.add("flarum-mentions","forum/mentionables/GroupMention",xt);class Pt extends it{constructor(){super(...arguments),V(this,"mentionables",[gt,bt,xt]),V(this,"extendable",!0)}trigger(){return"@"}queryFromTyped(t){const e=t.match(/^["“]?((?:(?!"#).)+)$/);return e?e[1]:null}format(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=null),{simple:"@".concat(t),safe:'@"'.concat(t,'"#').concat(e).concat(n)}[n?"safe":"simple"]}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/AtMentionFormat",Pt);class Ct extends ct{type(){return"tag"}initialResults(){return Array.from(s().store.all("tags"))}replacement(t){return this.format.format(t.slug())}matches(t,e){return!!e&&[t.name().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("tags",{filter:{q:t},page:{limit:5}})}suggestion(t,e){let n=t.name();return e&&(n=lt()(n,e)),m("[",null,m(Mt(),{className:"Avatar",icon:t.icon(),color:t.color(),type:"tag"}),m("span",{className:"username"},n))}enabled(){return"flarum-tags"in flarum.extensions}}flarum.reg.add("flarum-mentions","forum/mentionables/TagMention",Ct);class At extends it{constructor(){super(...arguments),V(this,"mentionables",[Ct]),V(this,"extendable",!0)}trigger(){return"#"}queryFromTyped(t){const e=t.match(/^[-_\p{L}\p{N}\p{M}]+$/giu);return e?e[0]:null}format(t){return"#".concat(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/HashMentionFormat",At);class Tt{constructor(){V(this,"formats",[new Pt,new At])}get(t){var e;return null!=(e=this.formats.find((e=>e.trigger()===t)))?e:null}mentionable(t){for(const e of this.formats){const n=e.getMentionable(t);if(n)return n}return null}extend(t){this.formats.push(new t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormats",Tt);const Bt=flarum.reg.get("core","forum/components/UserPage");var $t=t.n(Bt);const Dt=flarum.reg.get("core","common/components/LinkButton");var _t=t.n(Dt);const Nt=flarum.reg.get("core","common/extenders");var St=t.n(Nt);const kt=flarum.reg.get("core","common/models/Post");var Ft=t.n(kt);const It=flarum.reg.get("core","common/models/User");var Rt=t.n(It);const Lt=flarum.reg.get("core","forum/components/PostsUserPage");var Ut=t.n(Lt);class jt extends(Ut()){loadResults(t){return s().store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})}}flarum.reg.add("flarum-mentions","forum/components/MentionsUserPage",jt);const Et=flarum.reg.get("core","forum/components/Notification");var Ht=t.n(Et);class Gt extends(Ht()){icon(){return"fas fa-reply"}href(){const t=this.attrs.notification,e=t.subject(),n=t.content();return s().route.discussion(e.discussion(),n&&n.replyNumber)}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain()||"",200)}}flarum.reg.add("flarum-mentions","forum/components/PostMentionedNotification",Gt);class Wt extends(Ht()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/UserMentionedNotification",Wt);class qt extends(Ht()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.group_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/GroupMentionedNotification",qt);const Ot=[(new(St().Routes)).add("user.mentions","/u/:username/mentions",jt),new(St().Model)(Ft()).hasMany("mentionedBy").attribute("mentionedByCount"),(new(St().Notification)).add("postMentioned",Gt).add("userMentioned",Wt).add("groupMentioned",qt),new(St().Model)(Rt()).attribute("canMentionGroups")];function Jt(t){let e;if(s().forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?e=s().store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(e=s().store.getById("users",t.getAttribute("id"))),e)return t.setAttribute("id",e.id()),t.setAttribute("slug",e.slug()),t.setAttribute("displayname",ft()(x()(e))),!0;t.invalidate()}function zt(t){t.setAttribute("deleted",!1)}function Qt(t){const e=s().store.getById("posts",t.getAttribute("id"));if(e)return t.setAttribute("discussionid",e.discussion().id()),t.setAttribute("number",e.number()),t.setAttribute("displayname",ft()(x()(e.user()))),!0}function Xt(t){t.setAttribute("deleted",!1)}function Yt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));if(e)return t.setAttribute("groupname",ft()(e.namePlural())),!0}t.invalidate()}function Kt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",e.color()),t.setAttribute("icon",e.icon()),t.setAttribute("deleted",!1)}}function Vt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));if(e)return t.setAttribute("id",e.id()),t.setAttribute("tagname",e.name()),!0}t.invalidate()}function Zt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));t.setAttribute("icon",e.icon()),t.setAttribute("color",e.color()),t.setAttribute("deleted",!1)}}flarum.reg.add("flarum-mentions","forum/utils/textFormatter",{filterUserMentions:Jt,postFilterUserMentions:zt,filterPostMentions:Qt,postFilterPostMentions:Xt,filterGroupMentions:Yt,postFilterGroupMentions:Kt,filterTagMentions:Vt,postFilterTagMentions:Zt}),flarum.reg.add("flarum-mentions","forum/extenders/Mentionables",class{constructor(){V(this,"formats",[]),V(this,"mentionables",{})}format(t){return this.formats.push(t),this}mentionable(t,e){return this.mentionables[t]||(this.mentionables[t]=[]),this.mentionables[t].push(e),this}extend(t){for(const e of this.formats)t.mentionFormats.extend(e);for(const e in this.mentionables){const n=t.mentionFormats.get(e);if(n)for(const t of this.mentionables[e])n.extend(t)}}}),s().mentionFormats=new Tt,s().initializers.add("flarum-mentions",(function(){!function(){function t(){const t=this.attrs.post.contentHtml();if(t===this.oldPostContentHtml||this.isEditing())return;this.oldPostContentHtml=t;const e=this.attrs.post,n=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){const t=$(this),o=t.data("id");let s;const r=$('