diff --git a/js/dist/admin.js b/js/dist/admin.js index 5dc7dbd..ecd02ea 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var s in o)t.o(o,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},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);const o=flarum.core.compat["admin/app"];var s=t.n(o);const i=flarum.core.compat["common/models/User"];var a=t.n(i);function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}const r=flarum.core.compat["admin/components/ExtensionPage"];var l=t.n(r);const p=flarum.core.compat["common/components/Badge"];var c=t.n(p);const f=flarum.core.compat["common/helpers/icon"];var u=t.n(f),b=function(t){var e,o;function i(){return t.apply(this,arguments)||this}o=t,(e=i).prototype=Object.create(o.prototype),e.prototype.constructor=e,n(e,o);var a=i.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.badgeDefault="fas fa-map",this.postActionDefault="far fa-map"},a.content=function(){var t=flarum.extensions["flarum-tags"]?s().translator.trans("flarum-tags.admin.edit_tag.icon_text",{a:m("a",{href:"https://fontawesome.com/icons?m=free",tabindex:"-1"})}):"";return[m("div",{className:"ByobuSettingsPage"},m("div",{className:"container"},m("div",{className:"Form"},m("div",{className:"Form-group"},this.buildSettingComponent({type:"string",setting:"fof-byobu.icon-badge",label:s().translator.trans("fof-byobu.admin.settings.badge-icon"),help:m("div",null,m(c(),{icon:this.setting("fof-byobu.icon-badge").toJSON()||this.badgeDefault})," ",t),placeholder:this.badgeDefault}),this.buildSettingComponent({type:"string",setting:"fof-byobu.icon-postAction",label:s().translator.trans("fof-byobu.admin.settings.post-event-icon"),help:m("div",null,u()(this.setting("fof-byobu.icon-postAction").toJSON()||this.postActionDefault)," ",t),placeholder:this.postActionDefault}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.makePublic",label:s().translator.trans("fof-byobu.admin.settings.enable-make-public-option"),help:s().translator.trans("fof-byobu.admin.settings.enable-make-public-option-help")}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.delete_on_last_recipient_left",label:s().translator.trans("fof-byobu.admin.settings.delete_on_last_recipient_left"),help:s().translator.trans("fof-byobu.admin.settings.delete_on_last_recipient_left_help")}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.hide_from_all_discussions_page",label:s().translator.trans("fof-byobu.admin.settings.hide_from_all_discussions_page"),help:s().translator.trans("fof-byobu.admin.settings.hide_from_all_discussions_page_help")})),m("div",{className:"Form-group"},this.submitButton()))))]},i}(l());s().initializers.add("fof-byobu",(function(){var t;s().store.models.recipients=a(),s().extensionData.for("fof-byobu").registerPage(b),(t=s().extensionData.for("fof-byobu")).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_users"),permission:"discussion.startPrivateDiscussionWithUsers",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.add_more_than_two_user_recipients"),permission:"discussion.addMoreThanTwoUserRecipients",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_groups"),permission:"discussion.startPrivateDiscussionWithGroups",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_blocking_users"),permission:"startPrivateDiscussionWithBlockers",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.edit_user_recipients"),permission:"discussion.editUserRecipients",tagScoped:!1},"moderate",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.edit_group_recipients"),permission:"discussion.editGroupRecipients",tagScoped:!1},"moderate",95).registerPermission({icon:"fas fa-flag",label:s().translator.trans("fof-byobu.admin.permission.view_private_discussions-when-flagged"),permission:"user.viewPrivateDiscussionsWhenFlagged",tagScoped:!1},"moderate",95),s().data.settings["fof-byobu.makePublic"]&&t.registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.make_private_into_public"),permission:"discussion.makePublic",tagScoped:!1},"reply",95)}))})(),module.exports=e})(); +(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var s in o)t.o(o,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},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);const o=flarum.core.compat["admin/app"];var s=t.n(o);const i=flarum.core.compat["common/models/User"];var a=t.n(i);function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}const r=flarum.core.compat["admin/components/ExtensionPage"];var l=t.n(r);const p=flarum.core.compat["common/components/Badge"];var c=t.n(p);const f=flarum.core.compat["common/helpers/icon"];var u=t.n(f),b=function(t){var e,o;function i(){return t.apply(this,arguments)||this}o=t,(e=i).prototype=Object.create(o.prototype),e.prototype.constructor=e,n(e,o);var a=i.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.badgeDefault="fas fa-map",this.postActionDefault="far fa-map"},a.content=function(){var t=flarum.extensions["flarum-tags"]?s().translator.trans("flarum-tags.admin.edit_tag.icon_text",{a:m("a",{href:"https://fontawesome.com/icons?m=free",tabindex:"-1"})}):"";return[m("div",{className:"ByobuSettingsPage"},m("div",{className:"container"},m("div",{className:"Form"},m("div",{className:"Form-group"},this.buildSettingComponent({type:"string",setting:"fof-byobu.icon-badge",label:s().translator.trans("fof-byobu.admin.settings.badge-icon"),help:m("div",null,m(c(),{icon:this.setting("fof-byobu.icon-badge").toJSON()||this.badgeDefault})," ",t),placeholder:this.badgeDefault}),this.buildSettingComponent({type:"string",setting:"fof-byobu.icon-postAction",label:s().translator.trans("fof-byobu.admin.settings.post-event-icon"),help:m("div",null,u()(this.setting("fof-byobu.icon-postAction").toJSON()||this.postActionDefault)," ",t),placeholder:this.postActionDefault}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.makePublic",label:s().translator.trans("fof-byobu.admin.settings.enable-make-public-option"),help:s().translator.trans("fof-byobu.admin.settings.enable-make-public-option-help")}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.delete_on_last_recipient_left",label:s().translator.trans("fof-byobu.admin.settings.delete_on_last_recipient_left"),help:s().translator.trans("fof-byobu.admin.settings.delete_on_last_recipient_left_help")}),this.buildSettingComponent({type:"boolean",setting:"fof-byobu.hide_from_all_discussions_page",label:s().translator.trans("fof-byobu.admin.settings.hide_from_all_discussions_page"),help:s().translator.trans("fof-byobu.admin.settings.hide_from_all_discussions_page_help")})),m("div",{className:"Form-group"},this.submitButton()))))]},i}(l());s().initializers.add("fof-byobu",(function(){var t;s().store.models.recipients=a(),s().extensionData.for("fof-byobu").registerPage(b),(t=s().extensionData.for("fof-byobu")).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_users"),permission:"discussion.startPrivateDiscussionWithUsers",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.add_more_than_two_user_recipients"),permission:"discussion.addMoreThanTwoUserRecipients",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_groups"),permission:"discussion.startPrivateDiscussionWithGroups",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.create_private_discussions_with_blocking_users"),permission:"startPrivateDiscussionWithBlockers",tagScoped:!1},"start",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.edit_user_recipients"),permission:"discussion.editUserRecipients",tagScoped:!1},"moderate",95).registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.edit_group_recipients"),permission:"discussion.editGroupRecipients",tagScoped:!1},"moderate",95).registerPermission({icon:"fas fa-flag",label:s().translator.trans("fof-byobu.admin.permission.view_private_discussions-when-flagged"),permission:"user.viewPrivateDiscussionsWhenFlagged",tagScoped:!1},"moderate",95),s().data.settings["fof-byobu.makePublic"]&&t.registerPermission({icon:"far fa-map",label:s().translator.trans("fof-byobu.admin.permission.make_private_into_public"),permission:"discussion.makePublic",tagScoped:!1},"reply",95)}))})(),module.exports=e})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 84bd78e..789efd6 100644 --- a/js/dist/admin.js.map +++ b/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,a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AOP,IAAAA,WAAAA,MAAqB,oDAC5BmB,WAAY,iCACZC,WAAW,GAEb,WACA,IAEDF,mBACC,CACET,KAAM,cACNF,MAAOP,IAAAA,WAAAA,MAAqB,oEAC5BmB,WAAY,yCACZC,WAAW,GAEb,WACA,IAGApB,IAAAA,KAAAA,SAAAA,yBACFc,EAAUI,mBACR,CACET,KAAM,aACNF,MAAOP,IAAAA,WAAAA,MAAqB,uDAC5BmB,WAAY,wBACZC,WAAW,GAEb,QACA,GD1EL,G","sources":["webpack://@fof/byobu/webpack/bootstrap","webpack://@fof/byobu/webpack/runtime/compat get default export","webpack://@fof/byobu/webpack/runtime/define property getters","webpack://@fof/byobu/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/byobu/webpack/runtime/make namespace object","webpack://@fof/byobu/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/User']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/byobu/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/byobu/./src/admin/components/ByobuSettingsPage.tsx","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/byobu/./src/admin/index.ts","webpack://@fof/byobu/./src/admin/addPrivateDiscussionPermission.ts"],"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.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Badge from 'flarum/common/components/Badge';\nimport icon from 'flarum/common/helpers/icon';\n\nimport type Mithril from 'mithril';\n\nexport default class ByobuSetingsPage extends ExtensionPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.badgeDefault = 'fas fa-map';\n this.postActionDefault = 'far fa-map';\n }\n\n content() {\n const helpText = flarum.extensions['flarum-tags']\n ? app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a: ,\n })\n : '';\n\n return [\n
\n
\n
\n
\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-badge',\n label: app.translator.trans('fof-byobu.admin.settings.badge-icon'),\n help: (\n
\n {helpText}\n
\n ),\n placeholder: this.badgeDefault,\n })}\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-postAction',\n label: app.translator.trans('fof-byobu.admin.settings.post-event-icon'),\n help: (\n
\n {icon(this.setting('fof-byobu.icon-postAction').toJSON() || this.postActionDefault)} {helpText}\n
\n ),\n placeholder: this.postActionDefault,\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.makePublic',\n label: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option'),\n help: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option-help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.delete_on_last_recipient_left',\n label: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left'),\n help: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left_help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.hide_from_all_discussions_page',\n label: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page'),\n help: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page_help'),\n })}\n
\n
{this.submitButton()}
\n
\n
\n
,\n ];\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/admin/app';\nimport User from 'flarum/common/models/User';\n\nimport addPrivateDiscussionPermission from './addPrivateDiscussionPermission';\nimport ByobuSettings from './components/ByobuSettingsPage';\n\napp.initializers.add('fof-byobu', () => {\n app.store.models.recipients = User;\n\n app.extensionData.for('fof-byobu').registerPage(ByobuSettings);\n\n addPrivateDiscussionPermission();\n});\n","import app from 'flarum/admin/app';\n\nexport default function () {\n const byobuData = app.extensionData.for('fof-byobu');\n\n byobuData\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_users'),\n permission: 'discussion.startPrivateDiscussionWithUsers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.add_more_than_two_user_recipients'),\n permission: 'discussion.addMoreThanTwoUserRecipients',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_groups'),\n permission: 'discussion.startPrivateDiscussionWithGroups',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_blocking_users'),\n permission: 'startPrivateDiscussionWithBlockers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_user_recipients'),\n permission: 'discussion.editUserRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_group_recipients'),\n permission: 'discussion.editGroupRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('fof-byobu.admin.permission.view_private_discussions-when-flagged'),\n permission: 'user.viewPrivateDiscussionsWhenFlagged',\n tagScoped: false,\n },\n 'moderate',\n 95\n );\n\n if (app.data.settings['fof-byobu.makePublic']) {\n byobuData.registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.make_private_into_public'),\n permission: 'discussion.makePublic',\n tagScoped: false,\n },\n 'reply',\n 95\n );\n }\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","core","compat","_setPrototypeOf","p","setPrototypeOf","__proto__","ByobuSetingsPage","subClass","superClass","create","constructor","oninit","vnode","this","badgeDefault","postActionDefault","content","helpText","extensions","app","href","tabindex","className","buildSettingComponent","type","setting","label","help","icon","toJSON","placeholder","submitButton","ExtensionPage","byobuData","User","registerPage","ByobuSettings","registerPermission","permission","tagScoped"],"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,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,sB,aCAzC,SAASC,EAAgBhB,EAAGiB,GAKzC,OAJAD,EAAkBf,OAAOiB,eAAiBjB,OAAOiB,eAAeC,OAAS,SAAyBnB,EAAGiB,GAEnG,OADAjB,EAAEoB,UAAYH,EACPjB,CACT,EACOgB,EAAgBhB,EAAGiB,EAC5B,CCNA,MAAM,EAA+BJ,OAAOC,KAAKC,OAAO,kC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,uB,aCOnCM,EAAgB,SAAAC,GCNtB,IAAwBC,EAAUC,EDMZ,SAAAH,IAAA,OAAAC,EAAAG,MAAA,KAAAC,YAAA,KCNYF,EDMZF,GCNEC,EDMFF,GCL1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u/webpack/runtime/compat get default export","webpack://@fof/byobu/webpack/runtime/define property getters","webpack://@fof/byobu/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/byobu/webpack/runtime/make namespace object","webpack://@fof/byobu/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/User']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/byobu/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/byobu/./src/admin/components/ByobuSettingsPage.tsx","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/byobu/./src/admin/index.ts","webpack://@fof/byobu/./src/admin/addPrivateDiscussionPermission.ts"],"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.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Badge from 'flarum/common/components/Badge';\nimport icon from 'flarum/common/helpers/icon';\n\nimport type Mithril from 'mithril';\n\nexport default class ByobuSetingsPage extends ExtensionPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.badgeDefault = 'fas fa-map';\n this.postActionDefault = 'far fa-map';\n }\n\n content() {\n const helpText = flarum.extensions['flarum-tags']\n ? app.translator.trans('flarum-tags.admin.edit_tag.icon_text', {\n a:
,\n })\n : '';\n\n return [\n
\n
\n
\n
\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-badge',\n label: app.translator.trans('fof-byobu.admin.settings.badge-icon'),\n help: (\n
\n {helpText}\n
\n ),\n placeholder: this.badgeDefault,\n })}\n {this.buildSettingComponent({\n type: 'string',\n setting: 'fof-byobu.icon-postAction',\n label: app.translator.trans('fof-byobu.admin.settings.post-event-icon'),\n help: (\n
\n {icon(this.setting('fof-byobu.icon-postAction').toJSON() || this.postActionDefault)} {helpText}\n
\n ),\n placeholder: this.postActionDefault,\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.makePublic',\n label: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option'),\n help: app.translator.trans('fof-byobu.admin.settings.enable-make-public-option-help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.delete_on_last_recipient_left',\n label: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left'),\n help: app.translator.trans('fof-byobu.admin.settings.delete_on_last_recipient_left_help'),\n })}\n {this.buildSettingComponent({\n type: 'boolean',\n setting: 'fof-byobu.hide_from_all_discussions_page',\n label: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page'),\n help: app.translator.trans('fof-byobu.admin.settings.hide_from_all_discussions_page_help'),\n })}\n
\n
{this.submitButton()}
\n
\n
\n
,\n ];\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/admin/app';\nimport User from 'flarum/common/models/User';\n\nimport addPrivateDiscussionPermission from './addPrivateDiscussionPermission';\nimport ByobuSettings from './components/ByobuSettingsPage';\n\napp.initializers.add('fof-byobu', () => {\n app.store.models.recipients = User;\n\n app.extensionData.for('fof-byobu').registerPage(ByobuSettings);\n\n addPrivateDiscussionPermission();\n});\n","import app from 'flarum/admin/app';\n\nexport default function () {\n const byobuData = app.extensionData.for('fof-byobu');\n\n byobuData\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_users'),\n permission: 'discussion.startPrivateDiscussionWithUsers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.add_more_than_two_user_recipients'),\n permission: 'discussion.addMoreThanTwoUserRecipients',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_groups'),\n permission: 'discussion.startPrivateDiscussionWithGroups',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.create_private_discussions_with_blocking_users'),\n permission: 'startPrivateDiscussionWithBlockers',\n tagScoped: false,\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_user_recipients'),\n permission: 'discussion.editUserRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.edit_group_recipients'),\n permission: 'discussion.editGroupRecipients',\n tagScoped: false,\n },\n 'moderate',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('fof-byobu.admin.permission.view_private_discussions-when-flagged'),\n permission: 'user.viewPrivateDiscussionsWhenFlagged',\n tagScoped: false,\n },\n 'moderate',\n 95\n );\n\n if (app.data.settings['fof-byobu.makePublic']) {\n byobuData.registerPermission(\n {\n icon: 'far fa-map',\n label: app.translator.trans('fof-byobu.admin.permission.make_private_into_public'),\n permission: 'discussion.makePublic',\n tagScoped: false,\n },\n 'reply',\n 95\n );\n }\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","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","ByobuSetingsPage","_ExtensionPage","subClass","superClass","apply","arguments","create","constructor","_proto","oninit","vnode","this","badgeDefault","postActionDefault","content","helpText","extensions","app","m","href","tabindex","className","buildSettingComponent","type","setting","label","help","Badge","icon","toJSON","placeholder","submitButton","ExtensionPage","byobuData","User","registerPage","ByobuSettings","registerPermission","permission","tagScoped"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 76ff1b2..777ea39 100644 --- a/js/dist/forum.js +++ b/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,{discussions:()=>zt,extend:()=>ae,modals:()=>Kt});const n=flarum.core.compat["forum/app"];var o=t.n(n);const s=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/components/SettingsPage"];var i=t.n(r);const a=flarum.core.compat["common/components/Switch"];var c=t.n(a);const u=flarum.core.compat["common/components/Badge"];var l=t.n(u);const p=flarum.core.compat["common/models/Discussion"];var f=t.n(p);const d=flarum.core.compat["common/models/User"];var h=t.n(d);const b=flarum.core.compat["common/models/Group"];var v=t.n(b);const y=flarum.core.compat["common/components/Button"];var g=t.n(y);const _=flarum.core.compat["forum/components/DiscussionListItem"];var P=t.n(_);const w=flarum.core.compat["forum/components/DiscussionHero"];var R=t.n(w);const D=flarum.core.compat["forum/states/DiscussionListState"];var S=t.n(D);function x(t,e){if(null==t)return{};var n,o,s={},r=Object.keys(t);for(o=0;o=0||(s[n]=t[n]);return s}const k=flarum.core.compat["common/utils/classList"];var N=t.n(k);function U(t,e){return U=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},U(t,e)}function A(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,U(t,e)}const I=flarum.core.compat["common/helpers/username"];var M=t.n(I);const C=flarum.core.compat["common/components/LinkButton"];var L=t.n(C);const B=flarum.core.compat["common/Component"];var G=["recipient","link"],j=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.view=function(t){var e,n=this.attrs,s=n.recipient,r=n.link,i=x(n,G);if(i.style=i.style||{},i.className=N()("RecipientLabel",null==i?void 0:i.className),r&&s instanceof h()&&(i.href=o().route.user(s)),s instanceof h()){var a,c;e=M()(s),i.href||s.id()===(null==o()||null==(a=o().session)||null==(c=a.user)?void 0:c.id())||(i.href=o().route.user(s))}else{if(s instanceof v())return m("span",{class:i.className},s.namePlural());i.className+=" none",e=o().translator.trans("core.lib.username.deleted_text")}return m(L(),i,e)},e}(t.n(B)()),O=["link","className"];function T(t,e){void 0===e&&(e={});var n=e,o=n.link,s=n.className,r=x(n,O);return r.className=N()("RecipientsLabel",s),m("span",r,null==t?void 0:t.map((function(t,e){var n=t instanceof h()?"u":"g";return m(j,{key:n+"-"+e,recipient:t,link:o})})),!t&&m(j,null))}const q=flarum.core.compat["forum/utils/DiscussionControls"];var E=t.n(q);const V=flarum.core.compat["common/utils/ItemList"];var K=t.n(V);const F=flarum.core.compat["common/components/Modal"];var W=t.n(F);const z=flarum.core.compat["forum/components/DiscussionPage"];var H=t.n(z);const J=flarum.core.compat["common/utils/Stream"];var Q=t.n(J);const X=flarum.core.compat["forum/states/SearchState"];var Y=t.n(X);const Z=flarum.core.compat["forum/components/Search"];var tt=t.n(Z);function et(){return et=Object.assign||function(t){for(var e=1;e=3;return this.sources||(this.sources=this.sourceItems().toArray()),m("div",{role:"search",className:"Search"},m("div",{className:"RecipientsInput-selected RecipientsLabel","aria-live":"polite"},m("h4",null,o().translator.trans("fof-byobu.forum.modal.labels.selected_users")),m("p",null,o().translator.trans("fof-byobu.forum.modal.help.selected_users")),this.attrs.selected().toArray().map((function(e){return m(dt(),{text:o().translator.trans("fof-byobu.forum.modal.help.click_user_to_remove_tooltip")},m(j,{"data-container":"[data-modal-number]",recipient:e,onclick:function(n){return t.removeRecipient(e,n)}}))}))),m("div",{className:"Form-group"},m("label",{for:"byobu-addrecipient-search-input-"+this.inputUuid},o().translator.trans("fof-byobu.forum.modal.labels.search_field")),m("div",{className:"AddRecipientModal-form-input Search-input"},m("input",{id:"byobu-addrecipient-search-input-"+this.inputUuid,className:N()("RecipientsInput","FormControl",{open:!!this.searchState.getValue(),focused:!!this.searchState.getValue(),active:!!this.searchState.getValue(),loading:!!this.loadingSources}),oncreate:function(t){return t.dom.focus()},type:"search",placeholder:ut()(o().translator.trans("fof-byobu.forum.input.search_recipients")),value:this.searchState.getValue(),oninput:function(e){return t.searchState.setValue(e.target.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),m("ul",{className:N()("Dropdown-menu","Search-results","fade",{in:!!e})},this.doSearch?this.sources.map((function(e){return e.view(t.searchState.getValue())})):pt().component({size:"tiny",className:"Button Button--icon Button--link"})))))},n.sourceItems=function(){var t=new(K());return(!this.attrs.discussion&&o().forum.attribute("canStartPrivateDiscussionWithUsers")||this.attrs.discussion&&this.attrs.discussion.canEditUserRecipients())&&t.add("users",new it),(!this.attrs.discussion&&o().forum.attribute("canStartPrivateDiscussionWithGroups")||this.attrs.discussion&&this.attrs.discussion.canEditGroupRecipients())&&t.add("groups",new at),t},n.addRecipient=function(t){var e=this,n=t.split(":"),s=n[0],r=n[1],i=this.findRecipient(s,r);"users"!==s||o().forum.attribute("canAddMoreThanTwoUserRecipients")||this.attrs.selected().toArray().forEach((function(t){var n;t instanceof h()&&t.id()!==(null==(n=o().session.user)?void 0:n.id())&&e.attrs.selected().remove("users:"+t.id())})),this.attrs.selected().add(t,i),this.searchState.clear()},n.removeRecipient=function(t,e){var n;e.preventDefault(),t instanceof h()&&(n="users"),t instanceof v()&&(n="groups"),this.attrs.selected().remove(n+":"+t.id())},n.findRecipient=function(t,e){return o().store.getById(t,e)},e}(tt()),ht=function(t){function e(){return t.apply(this,arguments)||this}A(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.selected=Q()(new(K())),this.attrs.discussion?this.assignInitialRecipients(this.attrs.discussion):this.attrs.selectedRecipients&&this.attrs.selectedRecipients.toArray().length>0?this.selected().merge(this.attrs.selectedRecipients):this.selected().add("users:"+o().session.user.id(),o().session.user),this.recipientSearch=new(Y())},n.isDismissible=function(){return!1},n.assignInitialRecipients=function(t){var e=this;t.recipientUsers().map((function(t){e.selected().add("users:"+t.id(),t)})),t.recipientGroups().map((function(t){e.selected().add("groups:"+t.id(),t)}))},n.className=function(){return"AddRecipientModal"},n.title=function(){return this.attrs.discussion?o().translator.trans("fof-byobu.forum.modal.titles.update_recipients",{title:m("em",null,this.attrs.discussion.title())}):o().translator.trans("fof-byobu.forum.modal.titles.add_recipients")},n.helpText=function(){return this.attrs.discussion?o().translator.trans("fof-byobu.forum.modal.help.update_recipients"):o().translator.trans("fof-byobu.forum.modal.help.add_recipients")},n.content=function(){return[m("div",{className:"Modal-body"},m("div",{class:"AddRecipientModal-help"},this.helpText()),m("div",{className:"AddRecipientModal-form"},mt.component({state:this.recipientSearch,selected:this.selected,discussion:this.attrs.discussion}),m("div",{className:"AddRecipientModal-form-submit App-primaryControl"},g().component({type:"submit",className:"Button Button--primary",icon:"fas fa-check"},o().translator.trans("fof-byobu.forum.buttons.submit")),g().component({onclick:this.hide.bind(this),className:"Button Button--cancel"},o().translator.trans("fof-byobu.forum.buttons.cancel")))))]},n.select=function(t){(t.metaKey||t.ctrlKey||-1!==this.selected.indexOf(this.index))&&this.selected().length&&this.$("form").submit()},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected(),s=[],r=[];n.toArray().forEach((function(t){t instanceof h()&&r.push(t),t instanceof v()&&s.push(t)})),e&&e.save({relationships:{recipientUsers:r,recipientGroups:s}}).then((function(){o().current instanceof H()&&o().current.stream.update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),o().modal.close(),this.attrs.discussion||o().composer.show(),t.redraw=!1},e}(W());const bt=flarum.core.compat["tags/components/TagDiscussionModal"];var vt=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.onsubmit=function(t){t.preventDefault();var e=this.selected;this.attrs.resolve&&this.attrs.resolve(e),this.hide()},e}(t.n(bt)());vt.isDismissible=!1;const yt=flarum.core.compat["components/DiscussionPage"];var gt=t.n(yt);var _t=function(t,e,n){var o=[];t.recipientUsers().length&&(o=o.concat(t.recipientUsers())),t.recipientGroups().length&&(o=o.concat(t.recipientGroups())),o&&o.length&&(n?e.add("recipients",T(o),10):e.add("recipients",T(o,{link:!0}),4))};const Pt=flarum.core.compat["forum/utils/UserControls"];var wt=t.n(Pt);const Rt=flarum.core.compat["forum/components/DiscussionComposer"];var Dt=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),s=0;s{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,{discussions:()=>Ht,extend:()=>ce,modals:()=>Ft});const n=flarum.core.compat["forum/app"];var o=t.n(n);const s=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/components/SettingsPage"];var i=t.n(r);const a=flarum.core.compat["common/components/Switch"];var c=t.n(a);const u=flarum.core.compat["common/components/Badge"];var l=t.n(u);const p=flarum.core.compat["common/models/Discussion"];var f=t.n(p);const d=flarum.core.compat["common/models/User"];var h=t.n(d);const b=flarum.core.compat["common/models/Group"];var v=t.n(b);const y=flarum.core.compat["common/components/Button"];var g=t.n(y);const _=flarum.core.compat["forum/components/DiscussionListItem"];var P=t.n(_);const w=flarum.core.compat["forum/components/DiscussionHero"];var R=t.n(w);const S=flarum.core.compat["forum/states/DiscussionListState"];var D=t.n(S);function x(t,e){if(null==t)return{};var n,o,s={},r=Object.keys(t);for(o=0;o=0||(s[n]=t[n]);return s}const k=flarum.core.compat["common/utils/classList"];var N=t.n(k);function U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}function A(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,U(t,e)}const I=flarum.core.compat["common/helpers/username"];var M=t.n(I);const C=flarum.core.compat["common/components/LinkButton"];var L=t.n(C);const j=flarum.core.compat["common/Component"];var O=["recipient","link"],B=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.view=function(t){var e,n=this.attrs,s=n.recipient,r=n.link,i=x(n,O);if(i.style=i.style||{},i.className=N()("RecipientLabel",null==i?void 0:i.className),r&&s instanceof h()&&(i.href=o().route.user(s)),s instanceof h()){var a,c;e=M()(s),i.href||s.id()===(null==o()||null==(a=o().session)||null==(c=a.user)?void 0:c.id())||(i.href=o().route.user(s))}else{if(s instanceof v())return m("span",{class:i.className},s.namePlural());i.className+=" none",e=o().translator.trans("core.lib.username.deleted_text")}return m(L(),i,e)},e}(t.n(j)()),G=["link","className"];function T(t,e){void 0===e&&(e={});var n=e,o=n.link,s=n.className,r=x(n,G);return r.className=N()("RecipientsLabel",s),m("span",r,null==t?void 0:t.map((function(t,e){var n=t instanceof h()?"u":"g";return m(B,{key:n+"-"+e,recipient:t,link:o})})),!t&&m(B,null))}const q=flarum.core.compat["forum/utils/DiscussionControls"];var E=t.n(q);const V=flarum.core.compat["common/utils/ItemList"];var K=t.n(V);const F=flarum.core.compat["common/components/Modal"];var W=t.n(F);const z=flarum.core.compat["forum/components/DiscussionPage"];var H=t.n(z);const J=flarum.core.compat["common/utils/Stream"];var Q=t.n(J);const X=flarum.core.compat["forum/states/SearchState"];var Y=t.n(X);const Z=flarum.core.compat["forum/components/Search"];var tt=t.n(Z);function et(){return et=Object.assign?Object.assign.bind():function(t){for(var e=1;e=3;return this.sources||(this.sources=this.sourceItems().toArray()),m("div",{role:"search",className:"Search"},m("div",{className:"RecipientsInput-selected RecipientsLabel","aria-live":"polite"},m("h4",null,o().translator.trans("fof-byobu.forum.modal.labels.selected_users")),m("p",null,o().translator.trans("fof-byobu.forum.modal.help.selected_users")),this.attrs.selected().toArray().map((function(e){return m(mt(),{text:o().translator.trans("fof-byobu.forum.modal.help.click_user_to_remove_tooltip")},m(B,{"data-container":"[data-modal-number]",recipient:e,onclick:function(n){return t.removeRecipient(e,n)}}))}))),m("div",{className:"Form-group"},m("label",{for:"byobu-addrecipient-search-input-"+this.inputUuid},o().translator.trans("fof-byobu.forum.modal.labels.search_field")),m("div",{className:"AddRecipientModal-form-input Search-input"},m("input",{id:"byobu-addrecipient-search-input-"+this.inputUuid,className:N()("RecipientsInput","FormControl",{open:!!this.searchState.getValue(),focused:!!this.searchState.getValue(),active:!!this.searchState.getValue(),loading:!!this.loadingSources}),oncreate:function(t){return t.dom.focus()},type:"search",placeholder:ut()(o().translator.trans("fof-byobu.forum.input.search_recipients")),value:this.searchState.getValue(),oninput:function(e){return t.searchState.setValue(e.target.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),m("ul",{className:N()("Dropdown-menu","Search-results","fade",{in:!!e})},this.doSearch?this.sources.map((function(e){return e.view(t.searchState.getValue())})):pt().component({size:"tiny",className:"Button Button--icon Button--link"})))))},n.sourceItems=function(){var t=new(K());return(!this.attrs.discussion&&o().forum.attribute("canStartPrivateDiscussionWithUsers")||this.attrs.discussion&&this.attrs.discussion.canEditUserRecipients())&&t.add("users",new it),(!this.attrs.discussion&&o().forum.attribute("canStartPrivateDiscussionWithGroups")||this.attrs.discussion&&this.attrs.discussion.canEditGroupRecipients())&&t.add("groups",new at),t},n.addRecipient=function(t){var e=this,n=t.split(":"),s=n[0],r=n[1],i=this.findRecipient(s,r);"users"!==s||o().forum.attribute("canAddMoreThanTwoUserRecipients")||this.attrs.selected().toArray().forEach((function(t){var n;t instanceof h()&&t.id()!==(null==(n=o().session.user)?void 0:n.id())&&e.attrs.selected().remove("users:"+t.id())})),this.attrs.selected().add(t,i),this.searchState.clear()},n.removeRecipient=function(t,e){var n;e.preventDefault(),t instanceof h()&&(n="users"),t instanceof v()&&(n="groups"),this.attrs.selected().remove(n+":"+t.id())},n.findRecipient=function(t,e){return o().store.getById(t,e)},e}(tt()),ht=function(t){function e(){return t.apply(this,arguments)||this}A(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.selected=Q()(new(K())),this.attrs.discussion?this.assignInitialRecipients(this.attrs.discussion):this.attrs.selectedRecipients&&this.attrs.selectedRecipients.toArray().length>0?this.selected().merge(this.attrs.selectedRecipients):this.selected().add("users:"+o().session.user.id(),o().session.user),this.recipientSearch=new(Y())},n.isDismissible=function(){return!1},n.assignInitialRecipients=function(t){var e=this;t.recipientUsers().map((function(t){e.selected().add("users:"+t.id(),t)})),t.recipientGroups().map((function(t){e.selected().add("groups:"+t.id(),t)}))},n.className=function(){return"AddRecipientModal"},n.title=function(){return this.attrs.discussion?o().translator.trans("fof-byobu.forum.modal.titles.update_recipients",{title:m("em",null,this.attrs.discussion.title())}):o().translator.trans("fof-byobu.forum.modal.titles.add_recipients")},n.helpText=function(){return this.attrs.discussion?o().translator.trans("fof-byobu.forum.modal.help.update_recipients"):o().translator.trans("fof-byobu.forum.modal.help.add_recipients")},n.content=function(){return[m("div",{className:"Modal-body"},m("div",{class:"AddRecipientModal-help"},this.helpText()),m("div",{className:"AddRecipientModal-form"},dt.component({state:this.recipientSearch,selected:this.selected,discussion:this.attrs.discussion}),m("div",{className:"AddRecipientModal-form-submit App-primaryControl"},g().component({type:"submit",className:"Button Button--primary",icon:"fas fa-check"},o().translator.trans("fof-byobu.forum.buttons.submit")),g().component({onclick:this.hide.bind(this),className:"Button Button--cancel"},o().translator.trans("fof-byobu.forum.buttons.cancel")))))]},n.select=function(t){(t.metaKey||t.ctrlKey||-1!==this.selected.indexOf(this.index))&&this.selected().length&&this.$("form").submit()},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected(),s=[],r=[];n.toArray().forEach((function(t){t instanceof h()&&r.push(t),t instanceof v()&&s.push(t)})),e&&e.save({relationships:{recipientUsers:r,recipientGroups:s}}).then((function(){o().current instanceof H()&&o().current.stream.update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),o().modal.close(),this.attrs.discussion||o().composer.show(),t.redraw=!1},e}(W());const bt=flarum.core.compat["tags/components/TagDiscussionModal"];var vt=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e.prototype.onsubmit=function(t){t.preventDefault();var e=this.selected;this.attrs.resolve&&this.attrs.resolve(e),this.hide()},e}(t.n(bt)());vt.isDismissible=!1;const yt=flarum.core.compat["components/DiscussionPage"];var gt=t.n(yt);var _t=function(t,e,n){var o=[];t.recipientUsers().length&&(o=o.concat(t.recipientUsers())),t.recipientGroups().length&&(o=o.concat(t.recipientGroups())),o&&o.length&&(n?e.add("recipients",T(o),10):e.add("recipients",T(o,{link:!0}),4))};const Pt=flarum.core.compat["forum/utils/UserControls"];var wt=t.n(Pt);const Rt=flarum.core.compat["forum/components/DiscussionComposer"];var St=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),s=0;s {\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.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default () => {\n privacyToggle();\n};\n\nfunction privacyToggle() {\n extend(SettingsPage.prototype, 'privacyItems', function (items) {\n items.add(\n 'byobu-block-dm',\n Switch.component(\n {\n state: this.user.blocksPd(),\n onchange: (value) => {\n this.blocksPdLoading = true;\n\n this.user.save({ blocksPd: value }).then(() => {\n this.blocksPdLoading = false;\n m.redraw();\n });\n },\n loading: this.blocksPdLoading,\n },\n app.translator.trans('fof-byobu.forum.user.settings.block_pd')\n )\n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Group'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import type * as Mithril from 'mithril';\nimport username from 'flarum/common/helpers/username';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\n\nexport interface IRecipientLabelAttrs extends ComponentAttrs, Mithril.Attributes {\n recipient: User | Group;\n link: string;\n}\n\nexport default class RecipientLabel extends Component {\n view(vnode: Mithril.Vnode) {\n const { recipient, link, ...newAttrs } = this.attrs;\n\n newAttrs.style = newAttrs.style || {};\n newAttrs.className = classList('RecipientLabel', newAttrs?.className);\n\n if (link && recipient instanceof User) {\n newAttrs.href = app.route.user(recipient);\n }\n\n let label: string | NestedStringArray;\n\n if (recipient instanceof User) {\n label = username(recipient);\n\n if (!newAttrs.href && recipient.id() !== app?.session?.user?.id()) {\n newAttrs.href = app.route.user(recipient);\n }\n } else if (recipient instanceof Group) {\n return {recipient.namePlural()};\n } else {\n newAttrs.className += ' none';\n label = app.translator.trans('core.lib.username.deleted_text');\n }\n\n return {label};\n }\n}\n","import Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\nimport classList from 'flarum/common/utils/classList';\nimport RecipientLabel from './RecipientLabel';\n\nexport default function recipientsLabel(recipients?: (User | Group)[], attrs: Record = {}): JSX.Element {\n const { link, className, ...otherAttrs } = attrs;\n\n otherAttrs.className = classList('RecipientsLabel', className);\n\n return (\n \n {recipients?.map((recipient, index) => {\n const type = recipient instanceof User ? 'u' : 'g';\n\n return ;\n })}\n {!recipients && }\n \n );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/SearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Search'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","import app from 'flarum/forum/app';\nimport highlight from 'flarum/common/helpers/highlight';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\n\nexport default class UserSearchSource {\n view(query) {\n if (query.length < 3 || this.loading) return;\n\n if (!app.cache.byobuResults) {\n app.cache.byobuResults = [];\n }\n\n this.query = query;\n\n if (!app.cache.byobuResults[this.query]) {\n this.loading = true;\n\n app.cache.byobuResults[this.query] = [];\n app.store\n .find('users', {\n filter: { q: this.query + ' allows-pd' },\n page: { limit: 5 },\n })\n .then(this.pushResults.bind(this));\n } else\n return [\n
  • {app.translator.trans('core.forum.search.users_heading')}
  • ,\n app.cache.byobuResults[this.query].map((user) => {\n const name = username(user);\n const children = [highlight(name.text, this.query)];\n\n return (\n
  • \n \n {avatar(user)}\n {{ ...name, text: undefined, children }}\n \n
  • \n );\n }),\n ];\n }\n\n pushResults(results) {\n results.payload.data.map((result) => {\n var user = app.store.getById('users', result.id);\n app.cache.byobuResults[this.query].push(user);\n });\n this.loading = false;\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport highlight from 'flarum/common/helpers/highlight';\n\nexport default class GroupSearchSource {\n search(query) {\n return app.store.find('groups', {\n filter: { q: query },\n page: { limit: 5 },\n });\n }\n\n view(query) {\n query = query.toLowerCase();\n\n const results = app.store.all('groups').filter((group) => group.namePlural().toLowerCase().substr(0, query.length) === query);\n\n if (!results.length) return '';\n\n return [\n
  • {app.translator.trans('fof-byobu.forum.search.headings.groups')}
  • ,\n results.map((group) => {\n const groupName = group.namePlural();\n var name = highlight(groupName, query);\n\n return (\n
  • \n \n {name}\n \n
  • \n );\n }),\n ];\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import app from 'flarum/forum/app';\nimport Search from 'flarum/forum/components/Search';\nimport UserSearchSource from './sources/UserSearchSource';\nimport GroupSearchSource from './sources/GroupSearchSource';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport RecipientLabel from '../pages/labels/RecipientLabel';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class RecipientSearch extends Search {\n /**\n * Used to prevent duplicate IDs. Doesn't remove the possibility, but is extremely low.\n */\n inputUuid;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.inputUuid = Math.random().toString(36).substring(2);\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const $search = this;\n\n this.$('.Search-results').on('click', (e) => {\n const target = this.$('.SearchResult.active');\n\n $search.addRecipient(target.data('index'));\n $search.$('.RecipientsInput').focus();\n });\n\n this.$('.Search-results').on('touchstart', (e) => {\n const target = this.$(e.target.parentNode);\n\n $search.addRecipient(target.data('index'));\n $search.$('.RecipientsInput').focus();\n });\n\n $('.RecipientsInput')\n .on('input', () => {\n clearTimeout(this.typingTimer);\n this.doSearch = false;\n this.typingTimer = setTimeout(() => {\n this.doSearch = true;\n m.redraw();\n }, 900);\n })\n .on('keydown', () => {\n clearTimeout(this.typingTimer);\n });\n\n super.oncreate(vnode);\n }\n\n view() {\n if (typeof this.searchState.getValue() === 'undefined') {\n this.searchState.setValue('');\n }\n\n const loading = this.searchState.getValue() && this.searchState.getValue().length >= 3;\n\n if (!this.sources) {\n this.sources = this.sourceItems().toArray();\n }\n\n return (\n
    \n
    \n

    {app.translator.trans('fof-byobu.forum.modal.labels.selected_users')}

    \n

    {app.translator.trans('fof-byobu.forum.modal.help.selected_users')}

    \n\n {this.attrs\n .selected()\n .toArray()\n .map((recipient) => {\n return (\n \n this.removeRecipient(recipient, e)} />\n \n );\n })}\n
    \n\n
    \n \n\n
    \n vnode.dom.focus()}\n type=\"search\"\n placeholder={extractText(app.translator.trans('fof-byobu.forum.input.search_recipients'))}\n value={this.searchState.getValue()}\n oninput={(e) => this.searchState.setValue(e.target.value)}\n onfocus={() => (this.hasFocus = true)}\n onblur={() => (this.hasFocus = false)}\n />\n \n {!this.doSearch\n ? LoadingIndicator.component({ size: 'tiny', className: 'Button Button--icon Button--link' })\n : this.sources.map((source) => source.view(this.searchState.getValue()))}\n \n
    \n
    \n
    \n );\n }\n\n /**\n * Build an item list of SearchSources.\n *\n * @return {ItemList}\n */\n sourceItems() {\n const items = new ItemList();\n\n // Add user source based on permissions.\n if (\n (!this.attrs.discussion && app.forum.attribute('canStartPrivateDiscussionWithUsers')) ||\n (this.attrs.discussion && this.attrs.discussion.canEditUserRecipients())\n ) {\n items.add('users', new UserSearchSource());\n }\n\n // Add group source based on permissions.\n if (\n (!this.attrs.discussion && app.forum.attribute('canStartPrivateDiscussionWithGroups')) ||\n (this.attrs.discussion && this.attrs.discussion.canEditGroupRecipients())\n ) {\n items.add('groups', new GroupSearchSource());\n }\n\n return items;\n }\n\n /**\n * Adds a recipient.\n *\n * @param value\n */\n addRecipient(value) {\n let values = value.split(':'),\n type = values[0],\n id = values[1];\n\n let recipient = this.findRecipient(type, id);\n\n // If the user is only allowed to add another recipient apart themselves\n // We will remove all other users from the selection when a new value is picked\n if (type === 'users' && !app.forum.attribute('canAddMoreThanTwoUserRecipients')) {\n this.attrs\n .selected()\n .toArray()\n .forEach((recipient) => {\n if (recipient instanceof User && recipient.id() !== app.session.user?.id()) {\n this.attrs.selected().remove('users:' + recipient.id());\n }\n });\n }\n\n this.attrs.selected().add(value, recipient);\n\n this.searchState.clear();\n }\n\n /**\n * Removes a recipient.\n *\n * @param recipient\n */\n removeRecipient(recipient, e) {\n e.preventDefault();\n\n let type;\n\n if (recipient instanceof User) {\n type = 'users';\n }\n if (recipient instanceof Group) {\n type = 'groups';\n }\n\n this.attrs.selected().remove(type + ':' + recipient.id());\n }\n\n /**\n * Loads a recipient from the global store.\n *\n * @param store\n * @param id\n * @returns {Model}\n */\n findRecipient(store, id) {\n return app.store.getById(store, id);\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport SearchState from 'flarum/forum/states/SearchState';\nimport RecipientSearch from '../search/RecipientSearch';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\n\nexport default class AddRecipientModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.selected = Stream(new ItemList());\n\n if (this.attrs.discussion) {\n // Adds recipients of the currently viewed discussion.\n this.assignInitialRecipients(this.attrs.discussion);\n } else if (this.attrs.selectedRecipients && this.attrs.selectedRecipients.toArray().length > 0) {\n // Adds previously selected recipients.\n this.selected().merge(this.attrs.selectedRecipients);\n } else {\n // Adds the current user in case there are no selected recipients yet and this is a new discussion.\n this.selected().add('users:' + app.session.user.id(), app.session.user);\n }\n\n this.recipientSearch = new SearchState();\n }\n\n isDismissible() {\n return false;\n }\n\n assignInitialRecipients(discussion) {\n discussion.recipientUsers().map((user) => {\n this.selected().add('users:' + user.id(), user);\n });\n discussion.recipientGroups().map((group) => {\n this.selected().add('groups:' + group.id(), group);\n });\n }\n\n className() {\n return 'AddRecipientModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('fof-byobu.forum.modal.titles.update_recipients', { title: {this.attrs.discussion.title()} })\n : app.translator.trans('fof-byobu.forum.modal.titles.add_recipients');\n }\n\n helpText() {\n return this.attrs.discussion\n ? app.translator.trans('fof-byobu.forum.modal.help.update_recipients')\n : app.translator.trans('fof-byobu.forum.modal.help.add_recipients');\n }\n\n content() {\n return [\n
    \n
    {this.helpText()}
    \n
    \n {RecipientSearch.component({\n state: this.recipientSearch,\n selected: this.selected,\n discussion: this.attrs.discussion,\n })}\n
    \n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary',\n icon: 'fas fa-check',\n },\n app.translator.trans('fof-byobu.forum.buttons.submit')\n )}\n {Button.component(\n {\n onclick: this.hide.bind(this),\n className: 'Button Button--cancel',\n },\n app.translator.trans('fof-byobu.forum.buttons.cancel')\n )}\n
    \n
    \n
    ,\n ];\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.indexOf(this.index) !== -1) {\n if (this.selected().length) {\n this.$('form').submit();\n }\n }\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n const discussion = this.attrs.discussion;\n const recipients = this.selected();\n\n let recipientGroups = [];\n let recipientUsers = [];\n\n recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n recipientUsers.push(recipient);\n }\n if (recipient instanceof Group) {\n recipientGroups.push(recipient);\n }\n });\n\n // Recipients are updated here for existing discussions here.\n if (discussion) {\n discussion.save({ relationships: { recipientUsers, recipientGroups } }).then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n m.redraw();\n });\n }\n\n // Use the onsubmit callback to trigger an update in the DiscussionComposer\n if (this.attrs.onsubmit) this.attrs.onsubmit(recipients);\n\n app.modal.close();\n\n if (!this.attrs.discussion) {\n app.composer.show();\n }\n\n e.redraw = false;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","import app from 'flarum/forum/app';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\n\nexport default class ByobuTagDiscussionModal extends TagDiscussionModal {\n static isDismissible = false;\n\n onsubmit(e) {\n e.preventDefault();\n\n const tags = this.selected;\n\n if (this.attrs.resolve) this.attrs.resolve(tags);\n\n this.hide();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/DiscussionPage'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport Discussion from 'flarum/common/models/Discussion';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport recipientsLabel from '../pages/labels/recipientsLabels';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport AddRecipientModal from '../modals/AddRecipientModal';\nimport ByobuTagDiscussionModal from '../modals/ByobuTagDiscussionModal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\n\nexport default () => {\n badges();\n index();\n hero();\n apiInclude();\n controls();\n};\n\nconst add = function (discussion, items, long) {\n let recipients = [];\n\n if (discussion.recipientUsers().length) {\n recipients = recipients.concat(discussion.recipientUsers());\n }\n\n if (discussion.recipientGroups().length) {\n recipients = recipients.concat(discussion.recipientGroups());\n }\n\n if (recipients && recipients.length) {\n if (long) {\n items.add('recipients', recipientsLabel(recipients), 10);\n } else {\n items.add('recipients', recipientsLabel(recipients, { link: true }), 4);\n }\n }\n};\n\nfunction badges() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.recipientUsers().length || this.recipientGroups().length) {\n badges.add(\n 'private',\n Badge.component({\n type: 'private',\n label: app.translator.trans('fof-byobu.forum.badges.is_private.tooltip'),\n icon: app.forum.data.attributes['byobu.icon-badge'],\n }),\n 10\n );\n }\n });\n}\n\nfunction index() {\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n\n add(discussion, items, true);\n });\n}\n\nfunction hero() {\n extend(DiscussionHero.prototype, 'items', function (items) {\n const discussion = this.attrs.discussion;\n\n add(discussion, items, false);\n });\n}\n\nfunction apiInclude() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n params.include.push('recipientUsers');\n params.include.push('recipientGroups');\n });\n}\n\nfunction controls() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canEditRecipients()) {\n items.add(\n 'recipients',\n Button.component(\n {\n icon: app.forum.data.attributes['byobu.icon-badge'],\n onclick: () =>\n app.modal.show(AddRecipientModal, {\n discussion,\n /**\n * @param {ItemList} recipients\n */\n onsubmit(recipients) {\n if (recipients.isEmpty()) {\n // The discussion might have been perma-deleted! Let's check...\n app.store\n .find(\n 'discussions',\n discussion.id(),\n {},\n {\n errorHandler(err) {\n if (err.status === 404) {\n // Almost certainly permadeleted, so let's just redirect to the PD list.\n m.route.set(app.route('byobuPrivate'));\n }\n },\n }\n )\n .catch((err) => {\n // some other error... assume not deleted\n console.error(err);\n });\n }\n },\n }),\n },\n app.translator.trans('fof-byobu.forum.buttons.edit_recipients')\n )\n );\n }\n if (discussion && discussion.recipientUsers().find((user) => user.id() === app.session.user.id())) {\n items.add(\n 'remove',\n Button.component(\n {\n icon: 'fas fa-user-slash',\n onclick: () => {\n if (discussion) {\n let recipients = new ItemList();\n discussion.recipientUsers().map((user) => {\n if (app.session.user.id() !== user.id()) {\n recipients.add('users:' + user.id(), user);\n }\n });\n\n let recipientGroups = [];\n let recipientUsers = [];\n\n recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n recipientUsers.push(recipient);\n }\n if (recipient instanceof Group) {\n recipientGroups.push(recipient);\n }\n });\n\n discussion\n .save({\n relationships: {\n recipientUsers,\n recipientGroups,\n },\n })\n .then(() => app.history.back());\n }\n },\n },\n app.translator.trans('fof-byobu.forum.buttons.remove_from_discussion')\n )\n );\n\n if (discussion?.isPrivateDiscussion?.() && discussion?.canMakePublic?.()) {\n items.add(\n 'transform-public',\n {\n if (discussion && confirm(app.translator.trans('fof-byobu.forum.confirm.make_public'))) {\n const recipientGroups = [];\n const recipientUsers = [];\n\n if (flarum.extensions['flarum-tags']) {\n new Promise((resolve, reject) => {\n app.modal.show(ByobuTagDiscussionModal, { discussion, resolve, reject });\n }).then((tags) => {\n discussion.save({ relationships: { recipientUsers, recipientGroups }, public: discussion.id() }).then(() => {\n discussion.save({ relationships: { tags } }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n });\n });\n } else {\n discussion.save({ relationships: { recipientUsers, recipientGroups }, public: discussion.id() }).then(() => m.redraw());\n }\n }\n }}\n >\n {app.translator.trans('fof-byobu.forum.buttons.make_public')}\n \n );\n }\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import app from 'flarum/forum/app';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport AddRecipientModal from '../../modals/AddRecipientModal';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport recipientCountLabel from '../labels/recipientCountLabel';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\n\nexport default class PrivateDiscussionComposer extends DiscussionComposer {\n /**\n * Tells other extensions that this composer is a Byobu composer.\n */\n _isByobuComposer = true;\n\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n attrs.titlePlaceholder = app.translator.trans('fof-byobu.forum.composer_private_discussion.title_placeholder');\n attrs.submitLabel = app.translator.trans('fof-byobu.forum.composer_private_discussion.submit_button');\n }\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.composer.fields.recipients = this.attrs.recipients || new ItemList();\n\n this.composer.fields.recipientUsers = this.attrs.recipientUsers || [];\n this.composer.fields.recipientGroups = this.attrs.recipientGroups || [];\n\n const username = m.route.param('username');\n\n if (typeof username !== 'undefined') {\n this.addDefaultRecipients(username);\n }\n }\n\n data() {\n let data = super.data();\n\n const users = [];\n const groups = [];\n\n if (this.composer.fields.recipients !== undefined) {\n this.composer.fields.recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n users.push(recipient);\n }\n\n if (recipient instanceof Group) {\n groups.push(recipient);\n }\n });\n }\n\n data.relationships = data.relationships || {};\n\n if (users.length) {\n data.relationships.recipientUsers = users;\n }\n\n if (groups.length) {\n data.relationships.recipientGroups = groups;\n }\n\n delete data.relationships.tags;\n\n return data;\n }\n\n chooseRecipients() {\n app.modal.show(AddRecipientModal, {\n selectedRecipients: this.composer.fields.recipients,\n onsubmit: (recipients) => {\n this.composer.fields.recipients = recipients;\n\n // Focus on recipient autocomplete field.\n this.$('.RecipientsInput').focus();\n },\n });\n }\n\n headerItems() {\n let items = super.headerItems();\n\n items.remove('tags');\n\n if (app.session.user && app.forum.attribute('canStartPrivateDiscussion')) {\n const recipients = this.composer.fields.recipients.toArray();\n\n items.add(\n 'recipients',\n \n {recipients.length ? (\n recipientCountLabel(recipients.length)\n ) : (\n {app.translator.trans('fof-byobu.forum.buttons.add_recipients')}\n )}\n ,\n 5\n );\n }\n\n return items;\n }\n\n addDefaultRecipients(username) {\n const user = app.store.getBy('users', 'slug', username);\n\n this.composer.fields.recipients.add('users:' + app.session.user.id(), app.session.user);\n\n if (user.id() !== app.session.user.id()) {\n this.composer.fields.recipients.add('users:' + user.id(), user);\n }\n }\n\n onsubmit() {\n this.loading = true;\n\n const recipients = this.composer.fields.recipients.toArray();\n\n if (recipients.length < 2) {\n this.chooseRecipients();\n\n this.loading = false;\n } else {\n const data = this.data();\n\n app.store\n .createRecord('discussions')\n .save(data)\n .then((discussion) => {\n if (app.cache.discussionList) {\n app.cache.discussionList.refresh();\n }\n m.route.set(app.route.discussion(discussion));\n\n app.composer.hide();\n }, this.loaded.bind(this));\n }\n }\n}\n","import app from 'flarum/forum/app';\n\nexport default function recipientCountLabel(count, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'RecipientLabel ' + (attrs.className || '');\n\n var label = app.translator.trans('fof-byobu.forum.labels.recipients', { count });\n\n return m('span', attrs, {label});\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","import app from 'flarum/forum/app';\n\nexport default function canStartPrivateDiscussion(recipient) {\n return (\n app.session.user &&\n app.session.user.id() !== recipient.id() &&\n app.forum.attribute('canStartPrivateDiscussion') &&\n (!recipient.blocksPd() || (app.forum.attribute('canStartPrivateDiscussionWithBlockers') && recipient.cannotBeDirectMessaged()))\n );\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport PrivateDiscussionComposer from '../pages/discussions/PrivateDiscussionComposer';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport canStartPrivateDiscussion from '../helpers/canStartPrivateDiscussion';\n\nexport default () => {\n message();\n sharedMessageHistory();\n};\n\nfunction message() {\n extend(UserControls, 'userControls', function (items, user) {\n if (canStartPrivateDiscussion(user)) {\n items.add(\n 'private-discussion',\n Button.component(\n {\n icon: app.forum.attribute('byobu.icon-badge'),\n onclick: (e) => {\n e.preventDefault();\n\n return new Promise((resolve) => {\n let recipients = new ItemList();\n recipients.add('users:' + app.session.user.id(), app.session.user);\n recipients.add('users:' + user.id(), user);\n\n PrivateDiscussionComposer.prototype.recipients = recipients;\n\n app.composer.load(PrivateDiscussionComposer, {\n user: app.session.user,\n recipients: recipients,\n recipientUsers: recipients,\n titlePlaceholder: app.translator.trans('fof-byobu.forum.composer_private_discussion.title_placeholder'),\n submitLabel: app.translator.trans('fof-byobu.forum.composer_private_discussion.submit_button'),\n });\n app.composer.show();\n\n return resolve(app.composer);\n });\n },\n },\n app.translator.trans('fof-byobu.forum.buttons.send_pd', { username: user.displayName() })\n )\n );\n }\n\n return items;\n });\n}\n\nfunction sharedMessageHistory() {\n extend(UserPage.prototype, 'navItems', function (items) {\n const href = app.route('byobuUserPrivate', { username: this.user.slug() });\n\n // Hide links from guests if they are not already on the page\n if (!app.session.user && m.route.get() !== href) return;\n // Hide link for your own page.\n if (app.session.user === this.user) return;\n\n items.add(\n 'byobu',\n LinkButton.component(\n {\n href,\n icon: app.forum.attribute('byobu.icon-badge'),\n },\n app.translator.trans('fof-byobu.forum.user.byobu_link')\n ),\n 85\n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","import app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PrivateDiscussionComposer from './discussions/PrivateDiscussionComposer';\n\nexport default class PrivateComposing {\n constructor(recipient) {\n this.recipient = recipient;\n }\n\n action(e) {\n e.preventDefault();\n\n return new Promise((resolve, reject) => {\n if (app.session.user) {\n let recipients = new ItemList();\n\n recipients.add('users:' + app.session.user.id(), app.session.user);\n\n if (this.recipient && app.session.user.id() !== this.recipient.id()) {\n recipients.add('users:' + this.recipient.id(), this.recipient);\n }\n\n app.composer.load(PrivateDiscussionComposer, {\n user: app.session.user,\n recipients: recipients,\n recipientUsers: recipients,\n });\n\n app.composer.show();\n\n return resolve();\n } else {\n app.modal.show(LogInModal);\n\n return reject();\n }\n });\n }\n\n component() {\n return Button.component(\n {\n icon: 'fas fa-pen',\n className: 'Button Button--primary IndexPage-newDiscussion',\n itemClassName: 'App-primaryControl fof-byobu_primaryControl',\n onclick: this.action.bind(this),\n disabled: !this.canStartDiscussion,\n },\n app.translator.trans(this.canStartDiscussion ? 'fof-byobu.forum.nav.start_button' : 'core.forum.index.cannot_start_discussion_button')\n );\n }\n\n get canStartDiscussion() {\n return app.session.user && app.forum.attribute('canStartPrivateDiscussion');\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport PrivateComposing from './PrivateComposing';\n\nexport default () => {\n extend(IndexPage.prototype, 'navItems', (items) => {\n const user = app.session.user;\n\n if (user) {\n items.add(\n 'privateDiscussions',\n LinkButton.component(\n {\n icon: app.forum.data.attributes['byobu.icon-badge'],\n href: app.route('byobuPrivate'),\n },\n app.translator.trans('fof-byobu.forum.nav.nav_item')\n ),\n 75\n );\n }\n });\n\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'byobuPrivate') {\n app.setTitle(app.translator.trans('fof-byobu.forum.user.dropdown_label'));\n }\n });\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.get('routeName') === 'byobuPrivate') {\n params.filter.q = (params.filter.q || '') + ' is:private';\n\n params.include.push('recipientUsers');\n params.include.push('recipientGroups');\n }\n });\n\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\n if (app.current.get('routeName') === 'byobuPrivate') {\n let compose = new PrivateComposing();\n\n items.setContent('newDiscussion', compose.component());\n }\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionReplyNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_reply_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionUserLeftNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_user_left_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionAddedNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_added_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\n\nexport default class PrivateDiscussionMadePublicNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.props.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.props.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_made_public_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import AddRecipientModal from './AddRecipientModal';\n\nexport const modals = {\n AddRecipientModal: AddRecipientModal,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionList'];","import DiscussionList from 'flarum/forum/components/DiscussionList';\n\nexport default class PrivateDiscussionList extends DiscussionList {}\n","import PrivateDiscussionComposer from './PrivateDiscussionComposer';\nimport PrivateDiscussionList from './PrivateDiscussionList';\n\nexport const discussions = {\n PrivateDiscussionComposer: PrivateDiscussionComposer,\n PrivateDiscussionList: PrivateDiscussionList,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\n\nexport default class MadePublic extends EventPost {\n static initAttrs(attrs: any) {\n super.initAttrs(attrs);\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n return 'fof-byobu.forum.post.recipients_modified.made_public';\n }\n}\n","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\n\nexport default class RecipientLeft extends EventPost {\n static initAttrs(attrs: any) {\n super.initAttrs(attrs);\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n return 'fof-byobu.forum.post.recipients_modified.removed_self';\n }\n}\n","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\nimport recipientsLabel from '../pages/labels/recipientsLabels';\n\nexport default class RecipientsModified extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n function diff(diff1, diff2, store) {\n return diff1.filter((item) => diff2.indexOf(item) === -1).map((id) => app.store.getById(store, id));\n }\n\n const content = attrs.post.content();\n\n // For event posts existing before groups functionality.\n if (!content['new'] && content.length == 2) {\n const oldRecipients = attrs.post.content()[0];\n const newRecipients = attrs.post.content()[1];\n attrs.added = diff(newRecipients, oldRecipients, 'users');\n attrs.removed = diff(oldRecipients, newRecipients, 'users');\n } else {\n let usersAdded = diff(content['new']['users'], content['old']['users'], 'users');\n let usersRemoved = diff(content['old']['users'], content['new']['users'], 'users');\n let groupsAdded = diff(content['new']['groups'], content['old']['groups'], 'groups');\n let groupsRemoved = diff(content['old']['groups'], content['new']['groups'], 'groups');\n\n attrs.added = usersAdded.concat(groupsAdded);\n attrs.removed = usersRemoved.concat(groupsRemoved);\n }\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n var localeBase = 'fof-byobu.forum.post.recipients_modified.';\n\n if (this.attrs.added.length) {\n if (this.attrs.removed.length) {\n return localeBase + 'added_and_removed';\n }\n\n return localeBase + 'added';\n }\n\n return localeBase + 'removed';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.attrs.added.length) {\n data.added = recipientsLabel(this.attrs.added, { link: true });\n }\n\n if (this.attrs.removed.length) {\n data.removed = recipientsLabel(this.attrs.removed, { link: true });\n }\n\n return data;\n }\n}\n","import DiscussionListState from 'flarum/forum/states/DiscussionListState';\n\nexport default class PrivateDiscussionListState extends DiscussionListState {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport PrivateDiscussionListState from '../states/PrivateDiscussionListState';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport PrivateDiscussionList from './discussions/PrivateDiscussionList';\nimport PrivateComposing from './PrivateComposing';\nimport canStartPrivateDiscussion from '../helpers/canStartPrivateDiscussion';\n\nexport default class PrivateDiscussionsUserPage extends UserPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.changeSort('latest');\n }\n\n show(user) {\n // We can not create the list in init because the user will not be available if it has to be loaded asynchronously\n this.list = new PrivateDiscussionListState({\n q: `byobu:${user.slug()} is:private`,\n sort: this.sort,\n });\n\n this.list.refresh();\n\n // We call the parent method after creating the list, this way the this.list property\n // is set before content() is called for the first time\n super.show(user);\n }\n\n handleChangeSort(sort, e) {\n e.preventDefault();\n\n this.changeSort(sort);\n }\n\n changeSort(sort) {\n this.sort = sort;\n this.loadUser(m.route.param('username'));\n }\n\n content() {\n return (\n
    \n
    \n
      {listItems(this.actionItems().toArray())}
    \n
      {listItems(this.viewItems().toArray())}
    \n
    \n \n
    \n );\n }\n\n actionItems() {\n let composing = new PrivateComposing(this.user);\n\n const items = new ItemList();\n\n if (canStartPrivateDiscussion(this.user)) {\n items.add('start_private', composing.component());\n }\n\n return items;\n }\n\n viewItems() {\n const items = new ItemList();\n const sortMap = this.list.sortMap();\n\n const sortOptions = {};\n for (const i in sortMap) {\n sortOptions[i] = app.translator.trans('core.forum.index_sort.' + i + '_button');\n }\n\n items.add(\n 'sort',\n Dropdown.component(\n {\n buttonClassName: 'Button',\n label: sortOptions[this.sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0],\n },\n Object.keys(sortOptions).map((value) => {\n const label = sortOptions[value];\n const active = (this.sort || Object.keys(sortMap)[0]) === value;\n\n return Button.component(\n {\n icon: active ? 'fas fa-check' : true,\n onclick: this.handleChangeSort.bind(this, value),\n active: active,\n },\n label\n );\n })\n )\n );\n\n return items;\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport MadePublic from './events/MadePublic';\nimport RecipientLeft from './events/RecipientLeft';\nimport RecipientsModified from './events/RecipientsModified';\nimport PrivateDiscussionsUserPage from './pages/PrivateDiscussionsUserPage';\n\nexport default [\n new Extend.PostTypes().add('recipientsModified', RecipientsModified).add('recipientLeft', RecipientLeft).add('madePublic', MadePublic),\n\n new Extend.Routes().add('byobuUserPrivate', '/u/:username/private', PrivateDiscussionsUserPage).add('byobuPrivate', '/private', IndexPage),\n\n new Extend.Model(Discussion)\n .hasMany('recipientUsers')\n .hasMany('oldRecipientUsers')\n .hasMany('recipientGroups')\n .hasMany('oldRecipientGroups')\n .attribute('canEditRecipients')\n .attribute('canEditUserRecipients')\n .attribute('canEditGroupRecipients')\n .attribute('canMakePublic')\n .attribute('isPrivateDiscussion'),\n\n new Extend.Model(User).attribute('blocksPd').attribute('cannotBeDirectMessaged').attribute('unreadPrivateMessagesCount'),\n];\n","import app from 'flarum/forum/app';\nimport extenders from './extenders';\nimport pages from './pages';\nimport notifications from './notifications';\n\nexport * from './modals';\nexport * from './pages/discussions';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof-byobu', function () {\n extenders();\n\n pages();\n notifications();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\nimport PrivateDiscussionNotification from './PrivateDiscussionNotification';\nimport PrivateDiscussionRepliedNotification from './PrivateDiscussionReplyNotification';\nimport PrivateDiscussionUserLeftNotification from './PrivateDiscussionUserLeftNotification';\nimport PrivateDiscussionAddedNotification from './PrivateDiscussionAddedNotification';\nimport PrivateDiscussionMadePublicNotification from './PrivateDiscussionMadePublicNotification';\n\nexport default function () {\n app.notificationComponents.byobuPrivateDiscussionCreated = PrivateDiscussionNotification;\n app.notificationComponents.byobuPrivateDiscussionReplied = PrivateDiscussionRepliedNotification;\n app.notificationComponents.byobuRecipientRemoved = PrivateDiscussionUserLeftNotification;\n app.notificationComponents.byobuPrivateDiscussionAdded = PrivateDiscussionAddedNotification;\n app.notificationComponents.byobuPrivateDiscussionMadePubic = PrivateDiscussionMadePublicNotification;\n\n grid();\n}\n\nfunction grid() {\n // Add notification preferences.\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('byobuPrivateDiscussionCreated', {\n name: 'byobuPrivateDiscussionCreated',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_label'),\n });\n items.add('byobuPrivateDiscussionReplied', {\n name: 'byobuPrivateDiscussionReplied',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_reply_label'),\n });\n items.add('byobuPrivateDiscussionAdded', {\n name: 'byobuPrivateDiscussionAdded',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_added_label'),\n });\n items.add('byobuRecipientRemoved', {\n name: 'byobuRecipientRemoved',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_user_left_label'),\n });\n });\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","core","compat","_objectWithoutPropertiesLoose","source","excluded","i","target","sourceKeys","keys","length","indexOf","_setPrototypeOf","p","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","RecipientLabel","view","vnode","label","this","attrs","recipient","link","newAttrs","style","className","classList","User","href","app","username","id","user","Group","class","namePlural","Component","recipientsLabel","recipients","otherAttrs","map","index","type","_extends","assign","arguments","apply","UserSearchSource","query","loading","name","children","highlight","text","avatar","undefined","filter","q","page","limit","then","pushResults","bind","results","payload","data","result","push","m","redraw","GroupSearchSource","search","toLowerCase","group","substr","groupName","RecipientSearch","inputUuid","oninit","Math","random","toString","substring","oncreate","$search","$","on","e","addRecipient","focus","parentNode","clearTimeout","typingTimer","doSearch","setTimeout","searchState","getValue","setValue","sources","sourceItems","toArray","role","selected","onclick","removeRecipient","for","open","focused","active","loadingSources","dom","placeholder","extractText","oninput","onfocus","hasFocus","onblur","in","LoadingIndicator","size","items","ItemList","discussion","canEditUserRecipients","add","canEditGroupRecipients","values","split","findRecipient","forEach","remove","clear","preventDefault","store","Search","AddRecipientModal","Stream","assignInitialRecipients","selectedRecipients","merge","recipientSearch","SearchState","isDismissible","recipientUsers","recipientGroups","title","helpText","content","component","state","Button","icon","hide","select","metaKey","ctrlKey","submit","onsubmit","save","relationships","DiscussionPage","Modal","ByobuTagDiscussionModal","tags","resolve","TagDiscussionModal","long","concat","PrivateDiscussionComposer","_isByobuComposer","initAttrs","titlePlaceholder","submitLabel","composer","fields","route","param","addDefaultRecipients","users","groups","chooseRecipients","headerItems","count","recipientCountLabel","set","loaded","DiscussionComposer","canStartPrivateDiscussion","blocksPd","cannotBeDirectMessaged","_defineProperties","props","descriptor","configurable","writable","PrivateComposing","Constructor","protoProps","action","Promise","reject","LogInModal","itemClassName","disabled","canStartDiscussion","PrivateDiscussionNotification","notification","subject","fromUser","excerpt","Notification","PrivateDiscussionReplyNotification","postNumber","PrivateDiscussionUserLeftNotification","PrivateDiscussionAddedNotification","PrivateDiscussionMadePublicNotification","modals","PrivateDiscussionList","DiscussionList","discussions","MadePublic","descriptionKey","EventPost","RecipientLeft","RecipientsModified","diff","diff1","diff2","item","post","usersAdded","usersRemoved","groupsAdded","groupsRemoved","added","removed","oldRecipients","newRecipients","localeBase","descriptionData","PrivateDiscussionListState","DiscussionListState","PrivateDiscussionsUserPage","changeSort","show","list","slug","sort","refresh","handleChangeSort","loadUser","listItems","actionItems","viewItems","composing","sortMap","sortOptions","Dropdown","buttonClassName","UserPage","Extend","IndexPage","Discussion","hasMany","attribute","extend","badges","Badge","DiscussionListItem","DiscussionHero","params","include","DiscussionControls","canEditRecipients","isEmpty","errorHandler","err","status","console","error","find","isPrivateDiscussion","canMakePublic","confirm","extensions","public","update","SettingsPage","Switch","onchange","blocksPdLoading","UserControls","displayName","LinkButton","compose","setContent","PrivateDiscussionRepliedNotification","NotificationGrid"],"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,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA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ACvCjF,KAAM,8BACN8G,KAAMxI,IAAAA,MAAAA,KAAAA,WAAAA,oBACNb,MAAOa,IAAAA,WAAAA,MAAqB,kDAE9BuG,EAAMI,IAAI,wBAAyB,CACjCjF,KAAM,wBACN8G,KAAMxI,IAAAA,MAAAA,KAAAA,WAAAA,oBACNb,MAAOa,IAAAA,WAAAA,MAAqB,qDAEhC,GD3BF,G","sources":["webpack://@fof/byobu/webpack/bootstrap","webpack://@fof/byobu/webpack/runtime/compat get default export","webpack://@fof/byobu/webpack/runtime/define property getters","webpack://@fof/byobu/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/byobu/webpack/runtime/make namespace object","webpack://@fof/byobu/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/byobu/./src/forum/extenders/SettingsPage.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/User']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/models/Group']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/byobu/./src/forum/pages/labels/RecipientLabel.tsx","webpack://@fof/byobu/./src/forum/pages/labels/recipientsLabels.tsx","webpack://@fof/byobu/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/states/SearchState']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/Search']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/byobu/./src/forum/search/sources/UserSearchSource.js","webpack://@fof/byobu/./src/forum/search/sources/GroupSearchSource.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/byobu/./src/forum/search/RecipientSearch.js","webpack://@fof/byobu/./src/forum/modals/AddRecipientModal.js","webpack://@fof/byobu/external root \"flarum.core.compat['tags/components/TagDiscussionModal']\"","webpack://@fof/byobu/./src/forum/modals/ByobuTagDiscussionModal.js","webpack://@fof/byobu/external root \"flarum.core.compat['components/DiscussionPage']\"","webpack://@fof/byobu/./src/forum/extenders/Discussion.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/utils/UserControls']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/byobu/./src/forum/pages/discussions/PrivateDiscussionComposer.js","webpack://@fof/byobu/./src/forum/pages/labels/recipientCountLabel.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/UserPage']\"","webpack://@fof/byobu/./src/forum/helpers/canStartPrivateDiscussion.js","webpack://@fof/byobu/./src/forum/extenders/User.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/byobu/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/byobu/./src/forum/pages/PrivateComposing.js","webpack://@fof/byobu/./src/forum/pages/PrivateDiscussionsPage.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@fof/byobu/./src/forum/notifications/PrivateDiscussionNotification.js","webpack://@fof/byobu/./src/forum/notifications/PrivateDiscussionReplyNotification.js","webpack://@fof/byobu/./src/forum/notifications/PrivateDiscussionUserLeftNotification.js","webpack://@fof/byobu/./src/forum/notifications/PrivateDiscussionAddedNotification.js","webpack://@fof/byobu/external root \"flarum.core.compat['components/Notification']\"","webpack://@fof/byobu/./src/forum/notifications/PrivateDiscussionMadePublicNotification.js","webpack://@fof/byobu/./src/forum/modals/index.js","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/byobu/./src/forum/pages/discussions/PrivateDiscussionList.js","webpack://@fof/byobu/./src/forum/pages/discussions/index.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/byobu/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@fof/byobu/./src/forum/events/MadePublic.ts","webpack://@fof/byobu/./src/forum/events/RecipientLeft.ts","webpack://@fof/byobu/./src/forum/events/RecipientsModified.js","webpack://@fof/byobu/./src/forum/states/PrivateDiscussionListState.js","webpack://@fof/byobu/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/byobu/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/byobu/./src/forum/pages/PrivateDiscussionsUserPage.js","webpack://@fof/byobu/./src/forum/extend.ts","webpack://@fof/byobu/./src/forum/index.ts","webpack://@fof/byobu/./src/forum/notifications/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.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport Switch from 'flarum/common/components/Switch';\n\nexport default () => {\n privacyToggle();\n};\n\nfunction privacyToggle() {\n extend(SettingsPage.prototype, 'privacyItems', function (items) {\n items.add(\n 'byobu-block-dm',\n Switch.component(\n {\n state: this.user.blocksPd(),\n onchange: (value) => {\n this.blocksPdLoading = true;\n\n this.user.save({ blocksPd: value }).then(() => {\n this.blocksPdLoading = false;\n m.redraw();\n });\n },\n loading: this.blocksPdLoading,\n },\n app.translator.trans('fof-byobu.forum.user.settings.block_pd')\n )\n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Group'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import type * as Mithril from 'mithril';\nimport username from 'flarum/common/helpers/username';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\n\nexport interface IRecipientLabelAttrs extends ComponentAttrs, Mithril.Attributes {\n recipient: User | Group;\n link: string;\n}\n\nexport default class RecipientLabel extends Component {\n view(vnode: Mithril.Vnode) {\n const { recipient, link, ...newAttrs } = this.attrs;\n\n newAttrs.style = newAttrs.style || {};\n newAttrs.className = classList('RecipientLabel', newAttrs?.className);\n\n if (link && recipient instanceof User) {\n newAttrs.href = app.route.user(recipient);\n }\n\n let label: string | NestedStringArray;\n\n if (recipient instanceof User) {\n label = username(recipient);\n\n if (!newAttrs.href && recipient.id() !== app?.session?.user?.id()) {\n newAttrs.href = app.route.user(recipient);\n }\n } else if (recipient instanceof Group) {\n return {recipient.namePlural()};\n } else {\n newAttrs.className += ' none';\n label = app.translator.trans('core.lib.username.deleted_text');\n }\n\n return {label};\n }\n}\n","import Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\nimport classList from 'flarum/common/utils/classList';\nimport RecipientLabel from './RecipientLabel';\n\nexport default function recipientsLabel(recipients?: (User | Group)[], attrs: Record = {}): JSX.Element {\n const { link, className, ...otherAttrs } = attrs;\n\n otherAttrs.className = classList('RecipientsLabel', className);\n\n return (\n \n {recipients?.map((recipient, index) => {\n const type = recipient instanceof User ? 'u' : 'g';\n\n return ;\n })}\n {!recipients && }\n \n );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/SearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Search'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","import app from 'flarum/forum/app';\nimport highlight from 'flarum/common/helpers/highlight';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\n\nexport default class UserSearchSource {\n view(query) {\n if (query.length < 3 || this.loading) return;\n\n if (!app.cache.byobuResults) {\n app.cache.byobuResults = [];\n }\n\n this.query = query;\n\n if (!app.cache.byobuResults[this.query]) {\n this.loading = true;\n\n app.cache.byobuResults[this.query] = [];\n app.store\n .find('users', {\n filter: { q: this.query + ' allows-pd' },\n page: { limit: 5 },\n })\n .then(this.pushResults.bind(this));\n } else\n return [\n
  • {app.translator.trans('core.forum.search.users_heading')}
  • ,\n app.cache.byobuResults[this.query].map((user) => {\n const name = username(user);\n const children = [highlight(name.text, this.query)];\n\n return (\n
  • \n \n {avatar(user)}\n {{ ...name, text: undefined, children }}\n \n
  • \n );\n }),\n ];\n }\n\n pushResults(results) {\n results.payload.data.map((result) => {\n var user = app.store.getById('users', result.id);\n app.cache.byobuResults[this.query].push(user);\n });\n this.loading = false;\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport highlight from 'flarum/common/helpers/highlight';\n\nexport default class GroupSearchSource {\n search(query) {\n return app.store.find('groups', {\n filter: { q: query },\n page: { limit: 5 },\n });\n }\n\n view(query) {\n query = query.toLowerCase();\n\n const results = app.store.all('groups').filter((group) => group.namePlural().toLowerCase().substr(0, query.length) === query);\n\n if (!results.length) return '';\n\n return [\n
  • {app.translator.trans('fof-byobu.forum.search.headings.groups')}
  • ,\n results.map((group) => {\n const groupName = group.namePlural();\n var name = highlight(groupName, query);\n\n return (\n
  • \n \n {name}\n \n
  • \n );\n }),\n ];\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","import app from 'flarum/forum/app';\nimport Search from 'flarum/forum/components/Search';\nimport UserSearchSource from './sources/UserSearchSource';\nimport GroupSearchSource from './sources/GroupSearchSource';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport RecipientLabel from '../pages/labels/RecipientLabel';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\nexport default class RecipientSearch extends Search {\n /**\n * Used to prevent duplicate IDs. Doesn't remove the possibility, but is extremely low.\n */\n inputUuid;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.inputUuid = Math.random().toString(36).substring(2);\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n const $search = this;\n\n this.$('.Search-results').on('click', (e) => {\n const target = this.$('.SearchResult.active');\n\n $search.addRecipient(target.data('index'));\n $search.$('.RecipientsInput').focus();\n });\n\n this.$('.Search-results').on('touchstart', (e) => {\n const target = this.$(e.target.parentNode);\n\n $search.addRecipient(target.data('index'));\n $search.$('.RecipientsInput').focus();\n });\n\n $('.RecipientsInput')\n .on('input', () => {\n clearTimeout(this.typingTimer);\n this.doSearch = false;\n this.typingTimer = setTimeout(() => {\n this.doSearch = true;\n m.redraw();\n }, 900);\n })\n .on('keydown', () => {\n clearTimeout(this.typingTimer);\n });\n\n super.oncreate(vnode);\n }\n\n view() {\n if (typeof this.searchState.getValue() === 'undefined') {\n this.searchState.setValue('');\n }\n\n const loading = this.searchState.getValue() && this.searchState.getValue().length >= 3;\n\n if (!this.sources) {\n this.sources = this.sourceItems().toArray();\n }\n\n return (\n
    \n
    \n

    {app.translator.trans('fof-byobu.forum.modal.labels.selected_users')}

    \n

    {app.translator.trans('fof-byobu.forum.modal.help.selected_users')}

    \n\n {this.attrs\n .selected()\n .toArray()\n .map((recipient) => {\n return (\n \n this.removeRecipient(recipient, e)} />\n \n );\n })}\n
    \n\n
    \n \n\n
    \n vnode.dom.focus()}\n type=\"search\"\n placeholder={extractText(app.translator.trans('fof-byobu.forum.input.search_recipients'))}\n value={this.searchState.getValue()}\n oninput={(e) => this.searchState.setValue(e.target.value)}\n onfocus={() => (this.hasFocus = true)}\n onblur={() => (this.hasFocus = false)}\n />\n \n {!this.doSearch\n ? LoadingIndicator.component({ size: 'tiny', className: 'Button Button--icon Button--link' })\n : this.sources.map((source) => source.view(this.searchState.getValue()))}\n \n
    \n
    \n
    \n );\n }\n\n /**\n * Build an item list of SearchSources.\n *\n * @return {ItemList}\n */\n sourceItems() {\n const items = new ItemList();\n\n // Add user source based on permissions.\n if (\n (!this.attrs.discussion && app.forum.attribute('canStartPrivateDiscussionWithUsers')) ||\n (this.attrs.discussion && this.attrs.discussion.canEditUserRecipients())\n ) {\n items.add('users', new UserSearchSource());\n }\n\n // Add group source based on permissions.\n if (\n (!this.attrs.discussion && app.forum.attribute('canStartPrivateDiscussionWithGroups')) ||\n (this.attrs.discussion && this.attrs.discussion.canEditGroupRecipients())\n ) {\n items.add('groups', new GroupSearchSource());\n }\n\n return items;\n }\n\n /**\n * Adds a recipient.\n *\n * @param value\n */\n addRecipient(value) {\n let values = value.split(':'),\n type = values[0],\n id = values[1];\n\n let recipient = this.findRecipient(type, id);\n\n // If the user is only allowed to add another recipient apart themselves\n // We will remove all other users from the selection when a new value is picked\n if (type === 'users' && !app.forum.attribute('canAddMoreThanTwoUserRecipients')) {\n this.attrs\n .selected()\n .toArray()\n .forEach((recipient) => {\n if (recipient instanceof User && recipient.id() !== app.session.user?.id()) {\n this.attrs.selected().remove('users:' + recipient.id());\n }\n });\n }\n\n this.attrs.selected().add(value, recipient);\n\n this.searchState.clear();\n }\n\n /**\n * Removes a recipient.\n *\n * @param recipient\n */\n removeRecipient(recipient, e) {\n e.preventDefault();\n\n let type;\n\n if (recipient instanceof User) {\n type = 'users';\n }\n if (recipient instanceof Group) {\n type = 'groups';\n }\n\n this.attrs.selected().remove(type + ':' + recipient.id());\n }\n\n /**\n * Loads a recipient from the global store.\n *\n * @param store\n * @param id\n * @returns {Model}\n */\n findRecipient(store, id) {\n return app.store.getById(store, id);\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport SearchState from 'flarum/forum/states/SearchState';\nimport RecipientSearch from '../search/RecipientSearch';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\n\nexport default class AddRecipientModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.selected = Stream(new ItemList());\n\n if (this.attrs.discussion) {\n // Adds recipients of the currently viewed discussion.\n this.assignInitialRecipients(this.attrs.discussion);\n } else if (this.attrs.selectedRecipients && this.attrs.selectedRecipients.toArray().length > 0) {\n // Adds previously selected recipients.\n this.selected().merge(this.attrs.selectedRecipients);\n } else {\n // Adds the current user in case there are no selected recipients yet and this is a new discussion.\n this.selected().add('users:' + app.session.user.id(), app.session.user);\n }\n\n this.recipientSearch = new SearchState();\n }\n\n isDismissible() {\n return false;\n }\n\n assignInitialRecipients(discussion) {\n discussion.recipientUsers().map((user) => {\n this.selected().add('users:' + user.id(), user);\n });\n discussion.recipientGroups().map((group) => {\n this.selected().add('groups:' + group.id(), group);\n });\n }\n\n className() {\n return 'AddRecipientModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('fof-byobu.forum.modal.titles.update_recipients', { title: {this.attrs.discussion.title()} })\n : app.translator.trans('fof-byobu.forum.modal.titles.add_recipients');\n }\n\n helpText() {\n return this.attrs.discussion\n ? app.translator.trans('fof-byobu.forum.modal.help.update_recipients')\n : app.translator.trans('fof-byobu.forum.modal.help.add_recipients');\n }\n\n content() {\n return [\n
    \n
    {this.helpText()}
    \n
    \n {RecipientSearch.component({\n state: this.recipientSearch,\n selected: this.selected,\n discussion: this.attrs.discussion,\n })}\n
    \n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary',\n icon: 'fas fa-check',\n },\n app.translator.trans('fof-byobu.forum.buttons.submit')\n )}\n {Button.component(\n {\n onclick: this.hide.bind(this),\n className: 'Button Button--cancel',\n },\n app.translator.trans('fof-byobu.forum.buttons.cancel')\n )}\n
    \n
    \n
    ,\n ];\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.indexOf(this.index) !== -1) {\n if (this.selected().length) {\n this.$('form').submit();\n }\n }\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n const discussion = this.attrs.discussion;\n const recipients = this.selected();\n\n let recipientGroups = [];\n let recipientUsers = [];\n\n recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n recipientUsers.push(recipient);\n }\n if (recipient instanceof Group) {\n recipientGroups.push(recipient);\n }\n });\n\n // Recipients are updated here for existing discussions here.\n if (discussion) {\n discussion.save({ relationships: { recipientUsers, recipientGroups } }).then(() => {\n if (app.current instanceof DiscussionPage) {\n app.current.stream.update();\n }\n m.redraw();\n });\n }\n\n // Use the onsubmit callback to trigger an update in the DiscussionComposer\n if (this.attrs.onsubmit) this.attrs.onsubmit(recipients);\n\n app.modal.close();\n\n if (!this.attrs.discussion) {\n app.composer.show();\n }\n\n e.redraw = false;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","import app from 'flarum/forum/app';\nimport TagDiscussionModal from 'flarum/tags/components/TagDiscussionModal';\n\nexport default class ByobuTagDiscussionModal extends TagDiscussionModal {\n static isDismissible = false;\n\n onsubmit(e) {\n e.preventDefault();\n\n const tags = this.selected;\n\n if (this.attrs.resolve) this.attrs.resolve(tags);\n\n this.hide();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/DiscussionPage'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport Discussion from 'flarum/common/models/Discussion';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\nimport Button from 'flarum/common/components/Button';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport recipientsLabel from '../pages/labels/recipientsLabels';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport AddRecipientModal from '../modals/AddRecipientModal';\nimport ByobuTagDiscussionModal from '../modals/ByobuTagDiscussionModal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\n\nexport default () => {\n badges();\n index();\n hero();\n apiInclude();\n controls();\n};\n\nconst add = function (discussion, items, long) {\n let recipients = [];\n\n if (discussion.recipientUsers().length) {\n recipients = recipients.concat(discussion.recipientUsers());\n }\n\n if (discussion.recipientGroups().length) {\n recipients = recipients.concat(discussion.recipientGroups());\n }\n\n if (recipients && recipients.length) {\n if (long) {\n items.add('recipients', recipientsLabel(recipients), 10);\n } else {\n items.add('recipients', recipientsLabel(recipients, { link: true }), 4);\n }\n }\n};\n\nfunction badges() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.recipientUsers().length || this.recipientGroups().length) {\n badges.add(\n 'private',\n Badge.component({\n type: 'private',\n label: app.translator.trans('fof-byobu.forum.badges.is_private.tooltip'),\n icon: app.forum.data.attributes['byobu.icon-badge'],\n }),\n 10\n );\n }\n });\n}\n\nfunction index() {\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n\n add(discussion, items, true);\n });\n}\n\nfunction hero() {\n extend(DiscussionHero.prototype, 'items', function (items) {\n const discussion = this.attrs.discussion;\n\n add(discussion, items, false);\n });\n}\n\nfunction apiInclude() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n params.include.push('recipientUsers');\n params.include.push('recipientGroups');\n });\n}\n\nfunction controls() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canEditRecipients()) {\n items.add(\n 'recipients',\n Button.component(\n {\n icon: app.forum.data.attributes['byobu.icon-badge'],\n onclick: () =>\n app.modal.show(AddRecipientModal, {\n discussion,\n /**\n * @param {ItemList} recipients\n */\n onsubmit(recipients) {\n if (recipients.isEmpty()) {\n // The discussion might have been perma-deleted! Let's check...\n app.store\n .find(\n 'discussions',\n discussion.id(),\n {},\n {\n errorHandler(err) {\n if (err.status === 404) {\n // Almost certainly permadeleted, so let's just redirect to the PD list.\n m.route.set(app.route('byobuPrivate'));\n }\n },\n }\n )\n .catch((err) => {\n // some other error... assume not deleted\n console.error(err);\n });\n }\n },\n }),\n },\n app.translator.trans('fof-byobu.forum.buttons.edit_recipients')\n )\n );\n }\n if (discussion && discussion.recipientUsers().find((user) => user.id() === app.session.user.id())) {\n items.add(\n 'remove',\n Button.component(\n {\n icon: 'fas fa-user-slash',\n onclick: () => {\n if (discussion) {\n let recipients = new ItemList();\n discussion.recipientUsers().map((user) => {\n if (app.session.user.id() !== user.id()) {\n recipients.add('users:' + user.id(), user);\n }\n });\n\n let recipientGroups = [];\n let recipientUsers = [];\n\n recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n recipientUsers.push(recipient);\n }\n if (recipient instanceof Group) {\n recipientGroups.push(recipient);\n }\n });\n\n discussion\n .save({\n relationships: {\n recipientUsers,\n recipientGroups,\n },\n })\n .then(() => app.history.back());\n }\n },\n },\n app.translator.trans('fof-byobu.forum.buttons.remove_from_discussion')\n )\n );\n\n if (discussion?.isPrivateDiscussion?.() && discussion?.canMakePublic?.()) {\n items.add(\n 'transform-public',\n {\n if (discussion && confirm(app.translator.trans('fof-byobu.forum.confirm.make_public'))) {\n const recipientGroups = [];\n const recipientUsers = [];\n\n if (flarum.extensions['flarum-tags']) {\n new Promise((resolve, reject) => {\n app.modal.show(ByobuTagDiscussionModal, { discussion, resolve, reject });\n }).then((tags) => {\n discussion.save({ relationships: { recipientUsers, recipientGroups }, public: discussion.id() }).then(() => {\n discussion.save({ relationships: { tags } }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n });\n });\n } else {\n discussion.save({ relationships: { recipientUsers, recipientGroups }, public: discussion.id() }).then(() => m.redraw());\n }\n }\n }}\n >\n {app.translator.trans('fof-byobu.forum.buttons.make_public')}\n \n );\n }\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/UserControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import app from 'flarum/forum/app';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport AddRecipientModal from '../../modals/AddRecipientModal';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport recipientCountLabel from '../labels/recipientCountLabel';\nimport User from 'flarum/common/models/User';\nimport Group from 'flarum/common/models/Group';\n\nexport default class PrivateDiscussionComposer extends DiscussionComposer {\n /**\n * Tells other extensions that this composer is a Byobu composer.\n */\n _isByobuComposer = true;\n\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n attrs.titlePlaceholder = app.translator.trans('fof-byobu.forum.composer_private_discussion.title_placeholder');\n attrs.submitLabel = app.translator.trans('fof-byobu.forum.composer_private_discussion.submit_button');\n }\n\n oninit(vnode) {\n super.oninit(vnode);\n\n this.composer.fields.recipients = this.attrs.recipients || new ItemList();\n\n this.composer.fields.recipientUsers = this.attrs.recipientUsers || [];\n this.composer.fields.recipientGroups = this.attrs.recipientGroups || [];\n\n const username = m.route.param('username');\n\n if (typeof username !== 'undefined') {\n this.addDefaultRecipients(username);\n }\n }\n\n data() {\n let data = super.data();\n\n const users = [];\n const groups = [];\n\n if (this.composer.fields.recipients !== undefined) {\n this.composer.fields.recipients.toArray().forEach((recipient) => {\n if (recipient instanceof User) {\n users.push(recipient);\n }\n\n if (recipient instanceof Group) {\n groups.push(recipient);\n }\n });\n }\n\n data.relationships = data.relationships || {};\n\n if (users.length) {\n data.relationships.recipientUsers = users;\n }\n\n if (groups.length) {\n data.relationships.recipientGroups = groups;\n }\n\n delete data.relationships.tags;\n\n return data;\n }\n\n chooseRecipients() {\n app.modal.show(AddRecipientModal, {\n selectedRecipients: this.composer.fields.recipients,\n onsubmit: (recipients) => {\n this.composer.fields.recipients = recipients;\n\n // Focus on recipient autocomplete field.\n this.$('.RecipientsInput').focus();\n },\n });\n }\n\n headerItems() {\n let items = super.headerItems();\n\n items.remove('tags');\n\n if (app.session.user && app.forum.attribute('canStartPrivateDiscussion')) {\n const recipients = this.composer.fields.recipients.toArray();\n\n items.add(\n 'recipients',\n \n {recipients.length ? (\n recipientCountLabel(recipients.length)\n ) : (\n {app.translator.trans('fof-byobu.forum.buttons.add_recipients')}\n )}\n ,\n 5\n );\n }\n\n return items;\n }\n\n addDefaultRecipients(username) {\n const user = app.store.getBy('users', 'slug', username);\n\n this.composer.fields.recipients.add('users:' + app.session.user.id(), app.session.user);\n\n if (user.id() !== app.session.user.id()) {\n this.composer.fields.recipients.add('users:' + user.id(), user);\n }\n }\n\n onsubmit() {\n this.loading = true;\n\n const recipients = this.composer.fields.recipients.toArray();\n\n if (recipients.length < 2) {\n this.chooseRecipients();\n\n this.loading = false;\n } else {\n const data = this.data();\n\n app.store\n .createRecord('discussions')\n .save(data)\n .then((discussion) => {\n if (app.cache.discussionList) {\n app.cache.discussionList.refresh();\n }\n m.route.set(app.route.discussion(discussion));\n\n app.composer.hide();\n }, this.loaded.bind(this));\n }\n }\n}\n","import app from 'flarum/forum/app';\n\nexport default function recipientCountLabel(count, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'RecipientLabel ' + (attrs.className || '');\n\n var label = app.translator.trans('fof-byobu.forum.labels.recipients', { count });\n\n return m('span', attrs, {label});\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserPage'];","import app from 'flarum/forum/app';\n\nexport default function canStartPrivateDiscussion(recipient) {\n return (\n app.session.user &&\n app.session.user.id() !== recipient.id() &&\n app.forum.attribute('canStartPrivateDiscussion') &&\n (!recipient.blocksPd() || (app.forum.attribute('canStartPrivateDiscussionWithBlockers') && recipient.cannotBeDirectMessaged()))\n );\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport PrivateDiscussionComposer from '../pages/discussions/PrivateDiscussionComposer';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport canStartPrivateDiscussion from '../helpers/canStartPrivateDiscussion';\n\nexport default () => {\n message();\n sharedMessageHistory();\n};\n\nfunction message() {\n extend(UserControls, 'userControls', function (items, user) {\n if (canStartPrivateDiscussion(user)) {\n items.add(\n 'private-discussion',\n Button.component(\n {\n icon: app.forum.attribute('byobu.icon-badge'),\n onclick: (e) => {\n e.preventDefault();\n\n return new Promise((resolve) => {\n let recipients = new ItemList();\n recipients.add('users:' + app.session.user.id(), app.session.user);\n recipients.add('users:' + user.id(), user);\n\n PrivateDiscussionComposer.prototype.recipients = recipients;\n\n app.composer.load(PrivateDiscussionComposer, {\n user: app.session.user,\n recipients: recipients,\n recipientUsers: recipients,\n titlePlaceholder: app.translator.trans('fof-byobu.forum.composer_private_discussion.title_placeholder'),\n submitLabel: app.translator.trans('fof-byobu.forum.composer_private_discussion.submit_button'),\n });\n app.composer.show();\n\n return resolve(app.composer);\n });\n },\n },\n app.translator.trans('fof-byobu.forum.buttons.send_pd', { username: user.displayName() })\n )\n );\n }\n\n return items;\n });\n}\n\nfunction sharedMessageHistory() {\n extend(UserPage.prototype, 'navItems', function (items) {\n const href = app.route('byobuUserPrivate', { username: this.user.slug() });\n\n // Hide links from guests if they are not already on the page\n if (!app.session.user && m.route.get() !== href) return;\n // Hide link for your own page.\n if (app.session.user === this.user) return;\n\n items.add(\n 'byobu',\n LinkButton.component(\n {\n href,\n icon: app.forum.attribute('byobu.icon-badge'),\n },\n app.translator.trans('fof-byobu.forum.user.byobu_link')\n ),\n 85\n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","import app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PrivateDiscussionComposer from './discussions/PrivateDiscussionComposer';\n\nexport default class PrivateComposing {\n constructor(recipient) {\n this.recipient = recipient;\n }\n\n action(e) {\n e.preventDefault();\n\n return new Promise((resolve, reject) => {\n if (app.session.user) {\n let recipients = new ItemList();\n\n recipients.add('users:' + app.session.user.id(), app.session.user);\n\n if (this.recipient && app.session.user.id() !== this.recipient.id()) {\n recipients.add('users:' + this.recipient.id(), this.recipient);\n }\n\n app.composer.load(PrivateDiscussionComposer, {\n user: app.session.user,\n recipients: recipients,\n recipientUsers: recipients,\n });\n\n app.composer.show();\n\n return resolve();\n } else {\n app.modal.show(LogInModal);\n\n return reject();\n }\n });\n }\n\n component() {\n return Button.component(\n {\n icon: 'fas fa-pen',\n className: 'Button Button--primary IndexPage-newDiscussion',\n itemClassName: 'App-primaryControl fof-byobu_primaryControl',\n onclick: this.action.bind(this),\n disabled: !this.canStartDiscussion,\n },\n app.translator.trans(this.canStartDiscussion ? 'fof-byobu.forum.nav.start_button' : 'core.forum.index.cannot_start_discussion_button')\n );\n }\n\n get canStartDiscussion() {\n return app.session.user && app.forum.attribute('canStartPrivateDiscussion');\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport PrivateComposing from './PrivateComposing';\n\nexport default () => {\n extend(IndexPage.prototype, 'navItems', (items) => {\n const user = app.session.user;\n\n if (user) {\n items.add(\n 'privateDiscussions',\n LinkButton.component(\n {\n icon: app.forum.data.attributes['byobu.icon-badge'],\n href: app.route('byobuPrivate'),\n },\n app.translator.trans('fof-byobu.forum.nav.nav_item')\n ),\n 75\n );\n }\n });\n\n extend(IndexPage.prototype, 'setTitle', function () {\n if (app.current.get('routeName') === 'byobuPrivate') {\n app.setTitle(app.translator.trans('fof-byobu.forum.user.dropdown_label'));\n }\n });\n\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.get('routeName') === 'byobuPrivate') {\n params.filter.q = (params.filter.q || '') + ' is:private';\n\n params.include.push('recipientUsers');\n params.include.push('recipientGroups');\n }\n });\n\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\n if (app.current.get('routeName') === 'byobuPrivate') {\n let compose = new PrivateComposing();\n\n items.setContent('newDiscussion', compose.component());\n }\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionReplyNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_reply_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionUserLeftNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_user_left_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class PrivateDiscussionAddedNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_added_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/components/Notification';\n\nexport default class PrivateDiscussionMadePublicNotification extends Notification {\n icon() {\n return app.forum.attribute('byobu.icon-badge');\n }\n\n href() {\n const notification = this.props.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n const user = this.props.notification.fromUser();\n return app.translator.trans('fof-byobu.forum.notifications.pd_made_public_text', {\n user: user,\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import AddRecipientModal from './AddRecipientModal';\n\nexport const modals = {\n AddRecipientModal: AddRecipientModal,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionList'];","import DiscussionList from 'flarum/forum/components/DiscussionList';\n\nexport default class PrivateDiscussionList extends DiscussionList {}\n","import PrivateDiscussionComposer from './PrivateDiscussionComposer';\nimport PrivateDiscussionList from './PrivateDiscussionList';\n\nexport const discussions = {\n PrivateDiscussionComposer: PrivateDiscussionComposer,\n PrivateDiscussionList: PrivateDiscussionList,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\n\nexport default class MadePublic extends EventPost {\n static initAttrs(attrs: any) {\n super.initAttrs(attrs);\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n return 'fof-byobu.forum.post.recipients_modified.made_public';\n }\n}\n","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\n\nexport default class RecipientLeft extends EventPost {\n static initAttrs(attrs: any) {\n super.initAttrs(attrs);\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n return 'fof-byobu.forum.post.recipients_modified.removed_self';\n }\n}\n","import app from 'flarum/forum/app';\nimport EventPost from 'flarum/forum/components/EventPost';\nimport recipientsLabel from '../pages/labels/recipientsLabels';\n\nexport default class RecipientsModified extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n function diff(diff1, diff2, store) {\n return diff1.filter((item) => diff2.indexOf(item) === -1).map((id) => app.store.getById(store, id));\n }\n\n const content = attrs.post.content();\n\n // For event posts existing before groups functionality.\n if (!content['new'] && content.length == 2) {\n const oldRecipients = attrs.post.content()[0];\n const newRecipients = attrs.post.content()[1];\n attrs.added = diff(newRecipients, oldRecipients, 'users');\n attrs.removed = diff(oldRecipients, newRecipients, 'users');\n } else {\n let usersAdded = diff(content['new']['users'], content['old']['users'], 'users');\n let usersRemoved = diff(content['old']['users'], content['new']['users'], 'users');\n let groupsAdded = diff(content['new']['groups'], content['old']['groups'], 'groups');\n let groupsRemoved = diff(content['old']['groups'], content['new']['groups'], 'groups');\n\n attrs.added = usersAdded.concat(groupsAdded);\n attrs.removed = usersRemoved.concat(groupsRemoved);\n }\n }\n\n icon() {\n return app.forum.attribute('byobu.icon-postAction');\n }\n\n descriptionKey() {\n var localeBase = 'fof-byobu.forum.post.recipients_modified.';\n\n if (this.attrs.added.length) {\n if (this.attrs.removed.length) {\n return localeBase + 'added_and_removed';\n }\n\n return localeBase + 'added';\n }\n\n return localeBase + 'removed';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.attrs.added.length) {\n data.added = recipientsLabel(this.attrs.added, { link: true });\n }\n\n if (this.attrs.removed.length) {\n data.removed = recipientsLabel(this.attrs.removed, { link: true });\n }\n\n return data;\n }\n}\n","import DiscussionListState from 'flarum/forum/states/DiscussionListState';\n\nexport default class PrivateDiscussionListState extends DiscussionListState {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import app from 'flarum/forum/app';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport PrivateDiscussionListState from '../states/PrivateDiscussionListState';\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport PrivateDiscussionList from './discussions/PrivateDiscussionList';\nimport PrivateComposing from './PrivateComposing';\nimport canStartPrivateDiscussion from '../helpers/canStartPrivateDiscussion';\n\nexport default class PrivateDiscussionsUserPage extends UserPage {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.changeSort('latest');\n }\n\n show(user) {\n // We can not create the list in init because the user will not be available if it has to be loaded asynchronously\n this.list = new PrivateDiscussionListState({\n q: `byobu:${user.slug()} is:private`,\n sort: this.sort,\n });\n\n this.list.refresh();\n\n // We call the parent method after creating the list, this way the this.list property\n // is set before content() is called for the first time\n super.show(user);\n }\n\n handleChangeSort(sort, e) {\n e.preventDefault();\n\n this.changeSort(sort);\n }\n\n changeSort(sort) {\n this.sort = sort;\n this.loadUser(m.route.param('username'));\n }\n\n content() {\n return (\n
    \n
    \n
      {listItems(this.actionItems().toArray())}
    \n
      {listItems(this.viewItems().toArray())}
    \n
    \n \n
    \n );\n }\n\n actionItems() {\n let composing = new PrivateComposing(this.user);\n\n const items = new ItemList();\n\n if (canStartPrivateDiscussion(this.user)) {\n items.add('start_private', composing.component());\n }\n\n return items;\n }\n\n viewItems() {\n const items = new ItemList();\n const sortMap = this.list.sortMap();\n\n const sortOptions = {};\n for (const i in sortMap) {\n sortOptions[i] = app.translator.trans('core.forum.index_sort.' + i + '_button');\n }\n\n items.add(\n 'sort',\n Dropdown.component(\n {\n buttonClassName: 'Button',\n label: sortOptions[this.sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0],\n },\n Object.keys(sortOptions).map((value) => {\n const label = sortOptions[value];\n const active = (this.sort || Object.keys(sortMap)[0]) === value;\n\n return Button.component(\n {\n icon: active ? 'fas fa-check' : true,\n onclick: this.handleChangeSort.bind(this, value),\n active: active,\n },\n label\n );\n })\n )\n );\n\n return items;\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Group from 'flarum/common/models/Group';\nimport User from 'flarum/common/models/User';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport MadePublic from './events/MadePublic';\nimport RecipientLeft from './events/RecipientLeft';\nimport RecipientsModified from './events/RecipientsModified';\nimport PrivateDiscussionsUserPage from './pages/PrivateDiscussionsUserPage';\n\nexport default [\n new Extend.PostTypes().add('recipientsModified', RecipientsModified).add('recipientLeft', RecipientLeft).add('madePublic', MadePublic),\n\n new Extend.Routes().add('byobuUserPrivate', '/u/:username/private', PrivateDiscussionsUserPage).add('byobuPrivate', '/private', IndexPage),\n\n new Extend.Model(Discussion)\n .hasMany('recipientUsers')\n .hasMany('oldRecipientUsers')\n .hasMany('recipientGroups')\n .hasMany('oldRecipientGroups')\n .attribute('canEditRecipients')\n .attribute('canEditUserRecipients')\n .attribute('canEditGroupRecipients')\n .attribute('canMakePublic')\n .attribute('isPrivateDiscussion'),\n\n new Extend.Model(User).attribute('blocksPd').attribute('cannotBeDirectMessaged').attribute('unreadPrivateMessagesCount'),\n];\n","import app from 'flarum/forum/app';\nimport extenders from './extenders';\nimport pages from './pages';\nimport notifications from './notifications';\n\nexport * from './modals';\nexport * from './pages/discussions';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('fof-byobu', function () {\n extenders();\n\n pages();\n notifications();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\nimport PrivateDiscussionNotification from './PrivateDiscussionNotification';\nimport PrivateDiscussionRepliedNotification from './PrivateDiscussionReplyNotification';\nimport PrivateDiscussionUserLeftNotification from './PrivateDiscussionUserLeftNotification';\nimport PrivateDiscussionAddedNotification from './PrivateDiscussionAddedNotification';\nimport PrivateDiscussionMadePublicNotification from './PrivateDiscussionMadePublicNotification';\n\nexport default function () {\n app.notificationComponents.byobuPrivateDiscussionCreated = PrivateDiscussionNotification;\n app.notificationComponents.byobuPrivateDiscussionReplied = PrivateDiscussionRepliedNotification;\n app.notificationComponents.byobuRecipientRemoved = PrivateDiscussionUserLeftNotification;\n app.notificationComponents.byobuPrivateDiscussionAdded = PrivateDiscussionAddedNotification;\n app.notificationComponents.byobuPrivateDiscussionMadePubic = PrivateDiscussionMadePublicNotification;\n\n grid();\n}\n\nfunction grid() {\n // Add notification preferences.\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('byobuPrivateDiscussionCreated', {\n name: 'byobuPrivateDiscussionCreated',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_label'),\n });\n items.add('byobuPrivateDiscussionReplied', {\n name: 'byobuPrivateDiscussionReplied',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_reply_label'),\n });\n items.add('byobuPrivateDiscussionAdded', {\n name: 'byobuPrivateDiscussionAdded',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_added_label'),\n });\n items.add('byobuRecipientRemoved', {\n name: 'byobuRecipientRemoved',\n icon: app.forum.data.attributes['byobu.icon-badge'],\n label: app.translator.trans('fof-byobu.forum.notifications.pd_user_left_label'),\n });\n });\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","core","compat","_objectWithoutPropertiesLoose","source","excluded","i","target","sourceKeys","keys","length","indexOf","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","RecipientLabel","_Component","apply","arguments","view","vnode","label","_this$attrs","this","attrs","recipient","link","newAttrs","_excluded","style","className","classList","User","href","app","_app$session","_app$session$user","username","id","user","Group","m","class","namePlural","LinkButton","Component","recipientsLabel","recipients","_attrs","otherAttrs","map","index","type","_extends","assign","UserSearchSource","_proto","query","_this","loading","name","children","highlight","text","avatar","undefined","filter","q","page","limit","then","pushResults","results","_this2","payload","data","result","push","redraw","GroupSearchSource","search","toLowerCase","group","substr","groupName","RecipientSearch","_Search","_len","args","Array","_key","concat","inputUuid","oninit","Math","random","toString","substring","oncreate","$search","$","on","e","addRecipient","focus","parentNode","clearTimeout","typingTimer","doSearch","setTimeout","_this3","searchState","getValue","setValue","sources","sourceItems","toArray","role","selected","Tooltip","onclick","removeRecipient","for","open","focused","active","loadingSources","dom","placeholder","extractText","oninput","onfocus","hasFocus","onblur","in","LoadingIndicator","size","items","ItemList","discussion","canEditUserRecipients","add","canEditGroupRecipients","_this4","values","split","findRecipient","forEach","remove","clear","preventDefault","store","Search","AddRecipientModal","_Modal","Stream","assignInitialRecipients","selectedRecipients","merge","recipientSearch","SearchState","isDismissible","recipientUsers","recipientGroups","title","helpText","content","component","state","Button","icon","hide","select","metaKey","ctrlKey","submit","onsubmit","save","relationships","DiscussionPage","Modal","ByobuTagDiscussionModal","_TagDiscussionModal","tags","resolve","TagDiscussionModal","long","PrivateDiscussionComposer","_DiscussionComposer","_isByobuComposer","initAttrs","titlePlaceholder","submitLabel","composer","fields","route","param","addDefaultRecipients","users","groups","chooseRecipients","headerItems","count","recipientCountLabel","set","loaded","DiscussionComposer","canStartPrivateDiscussion","blocksPd","cannotBeDirectMessaged","_typeof","iterator","_defineProperties","props","descriptor","configurable","writable","arg","input","hint","prim","toPrimitive","res","TypeError","String","PrivateComposing","Constructor","protoProps","action","Promise","reject","LogInModal","itemClassName","disabled","canStartDiscussion","PrivateDiscussionNotification","_Notification","notification","subject","fromUser","excerpt","Notification","PrivateDiscussionReplyNotification","postNumber","PrivateDiscussionUserLeftNotification","PrivateDiscussionAddedNotification","PrivateDiscussionMadePublicNotification","modals","PrivateDiscussionList","_DiscussionList","DiscussionList","discussions","MadePublic","_EventPost","descriptionKey","EventPost","RecipientLeft","RecipientsModified","diff","diff1","diff2","item","post","usersAdded","usersRemoved","groupsAdded","groupsRemoved","added","removed","oldRecipients","newRecipients","localeBase","descriptionData","PrivateDiscussionListState","_DiscussionListState","DiscussionListState","PrivateDiscussionsUserPage","_UserPage","changeSort","show","list","slug","sort","refresh","handleChangeSort","loadUser","listItems","actionItems","viewItems","composing","sortMap","sortOptions","Dropdown","buttonClassName","UserPage","Extend","IndexPage","Discussion","hasMany","attribute","extend","badges","Badge","DiscussionListItem","DiscussionHero","params","include","DiscussionControls","canEditRecipients","isEmpty","errorHandler","err","status","console","error","find","isPrivateDiscussion","canMakePublic","confirm","extensions","public","update","SettingsPage","Switch","onchange","blocksPdLoading","UserControls","displayName","compose","setContent","PrivateDiscussionRepliedNotification","NotificationGrid"],"sourceRoot":""} \ No newline at end of file