From e36e83f70b812086b6aa83095cfaddc371758739 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Thu, 10 Nov 2022 23:30:18 +0000 Subject: [PATCH] Bundled output for commit 259db92b9a8da063116e38c4034fe6c1bef42cbf Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- js/dist-typings/forum/compat.d.ts | 2 +- js/dist/admin.js.map | 2 +- js/dist/forum.js | 2 +- js/dist/forum.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/dist-typings/forum/compat.d.ts b/js/dist-typings/forum/compat.d.ts index 5098b68..f092096 100644 --- a/js/dist-typings/forum/compat.d.ts +++ b/js/dist-typings/forum/compat.d.ts @@ -1,4 +1,4 @@ -declare var _default: { +declare const _default: { 'flags/addFlagsToPosts': typeof addFlagsToPosts; 'flags/addFlagControl': typeof addFlagControl; 'flags/addFlagsDropdown': typeof addFlagsDropdown; diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 5cd515c..669a70c 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,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCExDC,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCA,IAAAA,cAAAA,IACO,gBACJC,gBACC,CACEC,QAAS,8BACTC,KAAM,OACNC,MAAOJ,IAAAA,WAAAA,MAAqB,qDAE9B,IAEDC,gBAAgB,CACfC,QAAS,4BACTC,KAAM,UACNC,MAAOJ,IAAAA,WAAAA,MAAqB,sDAE7BK,mBACC,CACEC,KAAM,cACNF,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BO,WAAY,wBAEd,WACA,IAGDF,mBACC,CACEC,KAAM,cACNF,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BO,WAAY,wBAEd,QACA,GAEL,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/flags/./src/admin/index.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'];","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-flags', () => {\n app.extensionData\n .for('flarum-flags')\n .registerSetting(\n {\n setting: 'flarum-flags.guidelines_url',\n type: 'text',\n label: app.translator.trans('flarum-flags.admin.settings.guidelines_url_label'),\n },\n 15\n )\n .registerSetting({\n setting: 'flarum-flags.can_flag_own',\n type: 'boolean',\n label: app.translator.trans('flarum-flags.admin.settings.flag_own_posts_label'),\n })\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),\n permission: 'discussion.viewFlags',\n },\n 'moderate',\n 65\n )\n\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.flag_posts_label'),\n permission: 'discussion.flagPosts',\n },\n 'reply',\n 65\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","app","registerSetting","setting","type","label","registerPermission","icon","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCExDC,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCA,IAAAA,cAAAA,IACO,gBACJC,gBACC,CACEC,QAAS,8BACTC,KAAM,OACNC,MAAOJ,IAAAA,WAAAA,MAAqB,qDAE9B,IAEDC,gBAAgB,CACfC,QAAS,4BACTC,KAAM,UACNC,MAAOJ,IAAAA,WAAAA,MAAqB,sDAE7BK,mBACC,CACEC,KAAM,cACNF,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BO,WAAY,wBAEd,WACA,IAGDF,mBACC,CACEC,KAAM,cACNF,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BO,WAAY,wBAEd,QACA,GAEN,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/flags/./src/admin/index.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'];","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-flags', () => {\n app.extensionData\n .for('flarum-flags')\n .registerSetting(\n {\n setting: 'flarum-flags.guidelines_url',\n type: 'text',\n label: app.translator.trans('flarum-flags.admin.settings.guidelines_url_label'),\n },\n 15\n )\n .registerSetting({\n setting: 'flarum-flags.can_flag_own',\n type: 'boolean',\n label: app.translator.trans('flarum-flags.admin.settings.flag_own_posts_label'),\n })\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),\n permission: 'discussion.viewFlags',\n },\n 'moderate',\n 65\n )\n\n .registerPermission(\n {\n icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.flag_posts_label'),\n permission: 'discussion.flagPosts',\n },\n 'reply',\n 65\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","app","registerSetting","setting","type","label","registerPermission","icon","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index d1050ef..f8ad1d0 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a);const o=flarum.core.compat["forum/app"];var s=t.n(o);const e=flarum.core.compat["common/Model"];var n=t.n(e);function r(t,a){return r=Object.setPrototypeOf||function(t,a){return t.__proto__=a,t},r(t,a)}function l(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,r(t,a)}var i=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.type=function(){return n().attribute("type").call(this)},o.reason=function(){return n().attribute("reason").call(this)},o.reasonDetail=function(){return n().attribute("reasonDetail").call(this)},o.createdAt=function(){return n().attribute("createdAt",n().transformDate).call(this)},o.post=function(){return n().hasOne("post").call(this)},o.user=function(){return n().hasOne("user").call(this)},a}(n());const c=flarum.core.compat["components/Page"];var u=t.n(c);const f=flarum.core.compat["common/Component"];var p=t.n(f);const d=flarum.core.compat["common/components/Link"];var g=t.n(d);const h=flarum.core.compat["common/components/LoadingIndicator"];var v=t.n(h);const _=flarum.core.compat["common/helpers/avatar"];var b=t.n(_);const y=flarum.core.compat["common/helpers/username"];var N=t.n(y);const F=flarum.core.compat["common/helpers/icon"];var x=t.n(F);const k=flarum.core.compat["common/helpers/humanTime"];var w=t.n(k),C=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(g(),{href:s().route.post(a),className:"Notification Flag",onclick:function(t){s().flags.index=a,t.redraw=!1}},b()(a.user()),x()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:N()(a.user()),em:m("em",null),discussion:a.discussion().title()})),w()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?v().component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(p()),D=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(C,{state:s().flags}))},a}(u()),P=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const A=flarum.core.compat["common/extend"],M=flarum.core.compat["forum/utils/PostControls"];var O=t.n(M);const L=flarum.core.compat["common/components/Button"];var B=t.n(L);const T=flarum.core.compat["common/components/Modal"];var j=t.n(T);const S=flarum.core.compat["common/utils/Stream"];var R=t.n(S);const E=flarum.core.compat["common/utils/withAttr"];var I=t.n(E);const H=flarum.core.compat["common/utils/ItemList"];var U=t.n(H),G=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=R()(""),this.reasonDetail=R()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(B(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(B(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(U()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0})).catch((function(){})).then(this.loaded.bind(this))},a}(j());function q(){(0,A.extend)(O(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(B(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(G,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const z=flarum.core.compat["forum/components/HeaderSecondary"];var V=t.n(z);const J=flarum.core.compat["components/NotificationsDropdown"];var K=function(t){function a(){return t.apply(this,arguments)||this}l(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?C.component({state:this.attrs.state}):"")},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(t.n(J)());function Q(){(0,A.extend)(V().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(K,{state:s().flags}),15)}))}const W=flarum.core.compat["forum/components/Post"];var X=t.n(W);const Y=flarum.core.compat["common/utils/humanTime"];var Z=t.n(Y);function $(){(0,A.extend)(X().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),X().prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},X().prototype.flagActionItems=function(){var t=this,a=new(U()),o=O().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,A.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(B(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,A.extend)(X().prototype,"content",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),X().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=Z()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),e?m("span",{className:"Post-flagged-detail"},e):""]}}}const tt={"flags/addFlagsToPosts":$,"flags/addFlagControl":q,"flags/addFlagsDropdown":Q,"flags/models/Flag":i,"flags/components/FlagList":C,"flags/components/FlagPostModal":G,"flags/components/FlagsPage":D,"flags/components/FlagsDropdown":K},at=flarum.core,ot=flarum.core.compat["common/models/Post"];var st=t.n(ot);s().initializers.add("flarum-flags",(function(){st().prototype.flags=n().hasMany("flags"),st().prototype.canFlag=n().attribute("canFlag"),s().store.models.flags=i,s().routes.flags={path:"/flags",component:D},s().flags=new P(s()),q(),Q(),$()})),Object.assign(at.compat,tt)})(),module.exports=a})(); +(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a);const o=flarum.core.compat["forum/app"];var s=t.n(o);const e=flarum.core.compat["common/Model"];var n=t.n(e);function r(t,a){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},r(t,a)}function l(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,r(t,a)}var i=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.type=function(){return n().attribute("type").call(this)},o.reason=function(){return n().attribute("reason").call(this)},o.reasonDetail=function(){return n().attribute("reasonDetail").call(this)},o.createdAt=function(){return n().attribute("createdAt",n().transformDate).call(this)},o.post=function(){return n().hasOne("post").call(this)},o.user=function(){return n().hasOne("user").call(this)},a}(n());const c=flarum.core.compat["components/Page"];var u=t.n(c);const f=flarum.core.compat["common/Component"];var p=t.n(f);const d=flarum.core.compat["common/components/Link"];var g=t.n(d);const h=flarum.core.compat["common/components/LoadingIndicator"];var v=t.n(h);const _=flarum.core.compat["common/helpers/avatar"];var b=t.n(_);const y=flarum.core.compat["common/helpers/username"];var N=t.n(y);const F=flarum.core.compat["common/helpers/icon"];var x=t.n(F);const k=flarum.core.compat["common/helpers/humanTime"];var w=t.n(k),P=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(g(),{href:s().route.post(a),className:"Notification Flag",onclick:function(t){s().flags.index=a,t.redraw=!1}},b()(a.user()),x()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:N()(a.user()),em:m("em",null),discussion:a.discussion().title()})),w()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?v().component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(p()),C=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(P,{state:s().flags}))},a}(u()),D=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const A=flarum.core.compat["common/extend"],O=flarum.core.compat["forum/utils/PostControls"];var M=t.n(O);const L=flarum.core.compat["common/components/Button"];var B=t.n(L);const j=flarum.core.compat["common/components/Modal"];var T=t.n(j);const S=flarum.core.compat["common/utils/Stream"];var R=t.n(S);const E=flarum.core.compat["common/utils/withAttr"];var I=t.n(E);const H=flarum.core.compat["common/utils/ItemList"];var U=t.n(H),G=function(t){function a(){return t.apply(this,arguments)||this}l(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=R()(""),this.reasonDetail=R()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(B(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(B(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(U()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:I()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:I()("value",this.reasonDetail)}):""),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0})).catch((function(){})).then(this.loaded.bind(this))},a}(T());function q(){(0,A.extend)(M(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(B(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(G,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const z=flarum.core.compat["forum/components/HeaderSecondary"];var V=t.n(z);const J=flarum.core.compat["components/NotificationsDropdown"];var K=function(t){function a(){return t.apply(this,arguments)||this}l(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing?P.component({state:this.attrs.state}):"")},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(t.n(J)());function Q(){(0,A.extend)(V().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(K,{state:s().flags}),15)}))}const W=flarum.core.compat["forum/components/Post"];var X=t.n(W);const Y=flarum.core.compat["common/utils/humanTime"];var Z=t.n(Y);function $(){(0,A.extend)(X().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),X().prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},X().prototype.flagActionItems=function(){var t=this,a=new(U()),o=M().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,A.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(B(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,A.extend)(X().prototype,"content",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),X().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=Z()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),e?m("span",{className:"Post-flagged-detail"},e):""]}}}const tt={"flags/addFlagsToPosts":$,"flags/addFlagControl":q,"flags/addFlagsDropdown":Q,"flags/models/Flag":i,"flags/components/FlagList":P,"flags/components/FlagPostModal":G,"flags/components/FlagsPage":C,"flags/components/FlagsDropdown":K},at=flarum.core,ot=flarum.core.compat["common/models/Post"];var st=t.n(ot);s().initializers.add("flarum-flags",(function(){st().prototype.flags=n().hasMany("flags"),st().prototype.canFlag=n().attribute("canFlag"),s().store.models.flags=i,s().routes.flags={path:"/flags",component:C},s().flags=new D(s()),q(),Q(),$()})),Object.assign(at.compat,tt)})(),module.exports=a})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 1ef134d..7b3f6fd 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IA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B9B,GAA+BjG,OAAOC,KCAtC,GAA+BD,OAAOC,KAAKC,OAAO,sB,eCUxD4B,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCkF,KAAAA,UAAAA,MAAuBlG,IAAAA,QAAoB,SAC3CkG,KAAAA,UAAAA,QAAyBlG,IAAAA,UAAyB,WAElDgB,IAAAA,MAAAA,OAAAA,MAAyBlB,EAEzBkB,IAAAA,OAAAA,MAAmB,CAAE4G,KAAM,SAAUlC,UAAWvD,GAEhDnB,IAAAA,MAAY,IAAIsB,EAActB,KAE9B0G,IACAC,IACAF,GACD,IAODnJ,OAAOuJ,OAAOzI,GAAAA,OAAQ0I,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/./src/forum/models/Flag.ts","webpack://@flarum/flags/external root \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/HeaderSecondary']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/NotificationsDropdown']\"","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/humanTime']\"","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/external assign \"flarum.core\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/flags/./src/forum/index.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['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","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}","import Model from 'flarum/common/Model';\nimport type Post from 'flarum/common/models/Post';\nimport type User from 'flarum/common/models/User';\n\nexport default class Flag extends Model {\n type() {\n return Model.attribute('type').call(this);\n }\n reason() {\n return Model.attribute('reason').call(this);\n }\n reasonDetail() {\n return Model.attribute('reasonDetail').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n post() {\n return Model.hasOne('post').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nexport default class FlagList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = this.attrs.state;\n }\n\n view() {\n const flags = this.state.cache || [];\n\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n
    \n {flags.length ? (\n flags.map((flag) => {\n const post = flag.post();\n\n return (\n
  • \n {\n app.flags.index = post;\n e.redraw = false;\n }}\n >\n {avatar(post.user())}\n {icon('fas fa-flag', { className: 'Notification-icon' })}\n \n {app.translator.trans('flarum-flags.forum.flagged_posts.item_text', {\n username: username(post.user()),\n em: ,\n discussion: post.discussion().title(),\n })}\n \n {humanTime(flag.createdAt())}\n
    {post.contentPlain()}
    \n \n
  • \n );\n })\n ) : !this.state.loading ? (\n
    {app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}
    \n ) : (\n LoadingIndicator.component({ className: 'LoadingIndicator--block' })\n )}\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('flags');\n\n app.flags.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","export default class FlagListState {\n constructor(app) {\n this.app = app;\n\n /**\n * Whether or not the flags are loading.\n *\n * @type {Boolean}\n */\n this.loading = false;\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (this.cache && !this.app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n this.app.store\n .find('flags')\n .then((flags) => {\n this.app.session.user.pushAttributes({ newFlagCount: 0 });\n this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class FlagPostModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.success = false;\n\n this.reason = Stream('');\n this.reasonDetail = Stream('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n return (\n
\n
\n
\n
{this.flagReasons().toArray()}
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n flagReasons() {\n const items = new ItemList();\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n items.add(\n 'off-topic',\n ,\n 70\n );\n\n items.add(\n 'inappropriate',\n ,\n 60\n );\n\n items.add(\n 'spam',\n ,\n 50\n );\n\n items.add(\n 'other',\n ,\n 10\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store\n .createRecord('flags')\n .save(\n {\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.attrs.post,\n },\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(() => (this.success = true))\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport Button from 'flarum/common/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function () {\n extend(PostControls, 'userControls', function (items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add(\n 'flag',\n \n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/NotificationsDropdown'];","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initAttrs(attrs) {\n attrs.label = attrs.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n attrs.icon = attrs.icon || 'fas fa-flag';\n\n super.initAttrs(attrs);\n }\n\n getMenu() {\n return (\n
\n {this.showing ? FlagList.component({ state: this.attrs.state }) : ''}\n
\n );\n }\n\n goToRoute() {\n m.route.set(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function () {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/humanTime'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Post from 'flarum/forum/components/Post';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport humanTime from 'flarum/common/utils/humanTime';\n\nexport default function () {\n extend(Post.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function (body) {\n const post = this.attrs.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.flags.cache) {\n app.flags.cache.some((flag, i) => {\n if (flag.post() === post) {\n app.flags.cache.splice(i, 1);\n\n if (app.flags.index === post) {\n let next = app.flags.cache[i];\n\n if (!next) next = app.flags.cache[0];\n\n if (next) {\n const nextPost = next.post();\n app.flags.index = nextPost;\n m.route.set(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n body,\n });\n };\n\n Post.prototype.flagActionItems = function () {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.attrs.post);\n\n Object.keys(controls.items).forEach((k) => {\n const attrs = controls.get(k).attrs;\n\n attrs.className = 'Button';\n\n extend(attrs, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls',
{controls.toArray()}
);\n\n items.add(\n 'dismiss',\n ,\n -100\n );\n\n return items;\n };\n\n extend(Post.prototype, 'content', function (vdom) {\n const post = this.attrs.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map((flag) => (\n
{this.flagReason(flag)}
\n ))}\n
\n
{this.flagActionItems().toArray()}
\n
\n );\n });\n\n Post.prototype.flagReason = function (flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {\n time,\n user,\n reason,\n }),\n detail ? {detail} : '',\n ];\n }\n };\n}\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\n\nimport Flag from './models/Flag';\nimport FlagsPage from './components/FlagsPage';\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\napp.initializers.add('flarum-flags', () => {\n Post.prototype.flags = Model.hasMany('flags');\n Post.prototype.canFlag = Model.attribute('canFlag');\n\n app.store.models.flags = Flag;\n\n app.routes.flags = { path: '/flags', component: FlagsPage };\n\n app.flags = new FlagListState(app);\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\nimport Post from 'flarum/common/models/Post';\n\nObject.assign(compat, flagsCompat);\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__","_inheritsLoose","subClass","superClass","create","constructor","Flag","type","Model","this","reason","reasonDetail","createdAt","post","user","FlagList","oninit","vnode","state","attrs","view","flags","cache","className","app","length","map","flag","href","onclick","e","redraw","avatar","icon","username","em","discussion","title","humanTime","contentPlain","loading","LoadingIndicator","Component","FlagsPage","bodyClass","Page","FlagListState","load","session","attribute","m","store","find","then","pushAttributes","newFlagCount","sort","b","FlagPostModal","success","Stream","content","hide","bind","flagReasons","toArray","disabled","items","ItemList","guidelinesUrl","add","name","checked","withAttr","placeholder","oninput","target","undefined","onsubmit","preventDefault","save","relationships","errorHandler","onerror","loaded","Modal","extend","PostControls","isHidden","contentType","canFlag","FlagsDropdown","initAttrs","label","getMenu","menuClassName","menuClick","showing","component","goToRoute","route","set","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","body","data","subtree","invalidate","i","next","nextPost","url","apiEndpoint","method","controls","keys","forEach","k","dismissFlag","vdom","revealContent","unshift","flagReason","flagActionItems","detail","time","addFlagsToPosts","addFlagControl","addFlagsDropdown","path","assign","flagsCompat"],"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,E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EAAKf,aAE5B,MAAO,CACLY,IAAAA,WAAAA,MAAqBd,EAAS,sDAAwD,0CAA2C,CAC/HqH,KAAAA,EACAjH,KAAAA,EACAJ,OAAAA,IAEFoH,EAAS,UAAMvG,UAAU,uBAAuBuG,GAAiB,GAErE,CACF,CACF,CCzGA,UACE,wBAAyBE,EACzB,uBAAwBC,EACxB,yBAA0BC,EAC1B,oBAAqB5H,EACrB,4BAA6BS,EAC7B,iCAAkC2C,EAClC,6BAA8Bf,EAC9B,iCAAkC+C,GCjB9B,GAA+BjG,OAAOC,KCAtC,GAA+BD,OAAOC,KAAKC,OAAO,sB,eCUxD6B,IAAAA,aAAAA,IAAqB,gBAAgB,WACnCiF,KAAAA,UAAAA,MAAuBjG,IAAAA,QAAoB,SAC3CiG,KAAAA,UAAAA,QAAyBjG,IAAAA,UAAyB,WAElDgB,IAAAA,MAAAA,OAAAA,MAAyBlB,EAEzBkB,IAAAA,OAAAA,MAAmB,CAAE2G,KAAM,SAAUlC,UAAWtD,GAEhDnB,IAAAA,MAAY,IAAIsB,EAActB,KAE9ByG,IACAC,IACAF,GACF,IAOAnJ,OAAOuJ,OAAOzI,GAAAA,OAAQ0I,G","sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/webpack/runtime/compat get default export","webpack://@flarum/flags/webpack/runtime/define property getters","webpack://@flarum/flags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/flags/webpack/runtime/make namespace object","webpack://@flarum/flags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/flags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/./src/forum/models/Flag.ts","webpack://@flarum/flags/external root \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/flags/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/withAttr']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/HeaderSecondary']\"","webpack://@flarum/flags/external root \"flarum.core.compat['components/NotificationsDropdown']\"","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/utils/humanTime']\"","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/external assign \"flarum.core\"","webpack://@flarum/flags/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/flags/./src/forum/index.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['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","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}","import Model from 'flarum/common/Model';\nimport type Post from 'flarum/common/models/Post';\nimport type User from 'flarum/common/models/User';\n\nexport default class Flag extends Model {\n type() {\n return Model.attribute('type').call(this);\n }\n reason() {\n return Model.attribute('reason').call(this);\n }\n reasonDetail() {\n return Model.attribute('reasonDetail').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n post() {\n return Model.hasOne('post').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport icon from 'flarum/common/helpers/icon';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nexport default class FlagList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = this.attrs.state;\n }\n\n view() {\n const flags = this.state.cache || [];\n\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n
    \n {flags.length ? (\n flags.map((flag) => {\n const post = flag.post();\n\n return (\n
  • \n {\n app.flags.index = post;\n e.redraw = false;\n }}\n >\n {avatar(post.user())}\n {icon('fas fa-flag', { className: 'Notification-icon' })}\n \n {app.translator.trans('flarum-flags.forum.flagged_posts.item_text', {\n username: username(post.user()),\n em: ,\n discussion: post.discussion().title(),\n })}\n \n {humanTime(flag.createdAt())}\n
    {post.contentPlain()}
    \n \n
  • \n );\n })\n ) : !this.state.loading ? (\n
    {app.translator.trans('flarum-flags.forum.flagged_posts.empty_text')}
    \n ) : (\n LoadingIndicator.component({ className: 'LoadingIndicator--block' })\n )}\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('flags');\n\n app.flags.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","export default class FlagListState {\n constructor(app) {\n this.app = app;\n\n /**\n * Whether or not the flags are loading.\n *\n * @type {Boolean}\n */\n this.loading = false;\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (this.cache && !this.app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n this.app.store\n .find('flags')\n .then((flags) => {\n this.app.session.user.pushAttributes({ newFlagCount: 0 });\n this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/withAttr'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\n\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class FlagPostModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.success = false;\n\n this.reason = Stream('');\n this.reasonDetail = Stream('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n return (\n
\n
\n
\n
{this.flagReasons().toArray()}
\n
\n\n
\n \n
\n
\n
\n );\n }\n\n flagReasons() {\n const items = new ItemList();\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n items.add(\n 'off-topic',\n ,\n 70\n );\n\n items.add(\n 'inappropriate',\n
: undefined,\n })}\n {this.reason() === 'inappropriate' ? (\n \n ) : (\n ''\n )}\n ,\n 60\n );\n\n items.add(\n 'spam',\n ,\n 50\n );\n\n items.add(\n 'other',\n ,\n 10\n );\n\n return items;\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store\n .createRecord('flags')\n .save(\n {\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.attrs.post,\n },\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(() => (this.success = true))\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport Button from 'flarum/common/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function () {\n extend(PostControls, 'userControls', function (items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add(\n 'flag',\n \n );\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/NotificationsDropdown'];","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initAttrs(attrs) {\n attrs.label = attrs.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n attrs.icon = attrs.icon || 'fas fa-flag';\n\n super.initAttrs(attrs);\n }\n\n getMenu() {\n return (\n
\n {this.showing ? FlagList.component({ state: this.attrs.state }) : ''}\n
\n );\n }\n\n goToRoute() {\n m.route.set(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function () {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/humanTime'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Post from 'flarum/forum/components/Post';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport humanTime from 'flarum/common/utils/humanTime';\n\nexport default function () {\n extend(Post.prototype, 'elementAttrs', function (attrs) {\n if (this.attrs.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function (body) {\n const post = this.attrs.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.flags.cache) {\n app.flags.cache.some((flag, i) => {\n if (flag.post() === post) {\n app.flags.cache.splice(i, 1);\n\n if (app.flags.index === post) {\n let next = app.flags.cache[i];\n\n if (!next) next = app.flags.cache[0];\n\n if (next) {\n const nextPost = next.post();\n app.flags.index = nextPost;\n m.route.set(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n body,\n });\n };\n\n Post.prototype.flagActionItems = function () {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.attrs.post);\n\n Object.keys(controls.items).forEach((k) => {\n const attrs = controls.get(k).attrs;\n\n attrs.className = 'Button';\n\n extend(attrs, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls',
{controls.toArray()}
);\n\n items.add(\n 'dismiss',\n ,\n -100\n );\n\n return items;\n };\n\n extend(Post.prototype, 'content', function (vdom) {\n const post = this.attrs.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map((flag) => (\n
{this.flagReason(flag)}
\n ))}\n
\n
{this.flagActionItems().toArray()}
\n
\n );\n });\n\n Post.prototype.flagReason = function (flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason() ? app.translator.trans(`flarum-flags.forum.flag_post.reason_${flag.reason()}_label`) : null;\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {\n time,\n user,\n reason,\n }),\n detail ? {detail} : '',\n ];\n }\n };\n}\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\n\nimport Flag from './models/Flag';\nimport FlagsPage from './components/FlagsPage';\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\napp.initializers.add('flarum-flags', () => {\n Post.prototype.flags = Model.hasMany('flags');\n Post.prototype.canFlag = Model.attribute('canFlag');\n\n app.store.models.flags = Flag;\n\n app.routes.flags = { path: '/flags', component: FlagsPage };\n\n app.flags = new FlagListState(app);\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\nimport Post from 'flarum/common/models/Post';\n\nObject.assign(compat, flagsCompat);\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__","_inheritsLoose","subClass","superClass","create","constructor","Flag","type","Model","this","reason","reasonDetail","createdAt","post","user","FlagList","oninit","vnode","state","attrs","view","flags","cache","className","app","length","map","flag","href","onclick","e","redraw","avatar","icon","username","em","discussion","title","humanTime","contentPlain","loading","LoadingIndicator","Component","FlagsPage","bodyClass","Page","FlagListState","load","session","attribute","m","store","find","then","pushAttributes","newFlagCount","sort","b","FlagPostModal","success","Stream","content","hide","flagReasons","toArray","disabled","items","ItemList","guidelinesUrl","add","name","checked","withAttr","placeholder","oninput","target","undefined","onsubmit","preventDefault","save","relationships","errorHandler","onerror","loaded","Modal","extend","PostControls","isHidden","contentType","canFlag","FlagsDropdown","initAttrs","label","getMenu","menuClassName","menuClick","showing","component","goToRoute","route","set","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","body","data","subtree","invalidate","i","next","nextPost","url","apiEndpoint","method","controls","keys","forEach","k","dismissFlag","vdom","revealContent","unshift","flagReason","flagActionItems","detail","time","addFlagsToPosts","addFlagControl","addFlagsDropdown","path","assign","flagsCompat"],"sourceRoot":""} \ No newline at end of file