diff --git a/extensions/flags/js/dist/admin.js b/extensions/flags/js/dist/admin.js index d1eca5edc..20b23605e 100644 --- a/extensions/flags/js/dist/admin.js +++ b/extensions/flags/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}({0:function(e,t){e.exports=flarum.core.compat.app},23:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n);a.a.initializers.add("flarum-flags",(function(){a.a.extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:a.a.translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:a.a.translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))}}); +module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=26)}({0:function(e,t){e.exports=flarum.core.compat.app},26:function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n);a.a.initializers.add("flarum-flags",(function(){a.a.extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:a.a.translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:a.a.translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))}}); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/flags/js/dist/admin.js.map b/extensions/flags/js/dist/admin.js.map index 1bc80b75f..be5d868a7 100644 --- a/extensions/flags/js/dist/admin.js.map +++ b/extensions/flags/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/external \"flarum.core.compat['app']\"","webpack://@flarum/flags/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","registerPermission","icon","permission"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I,kBClFrDhC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAY,K,2DCEzCC,IAAIC,aAAaC,IAAI,gBAAgB,WACnCF,IAAIG,cAAJ,IAAsB,gBACnBC,gBAAgB,CACfC,QAAS,8BACTC,KAAM,OACNC,MAAOP,IAAIQ,WAAWC,MAAM,qDAC3B,IACFL,gBAAgB,CACfC,QAAS,4BACTC,KAAM,UACNC,MAAOP,IAAIQ,WAAWC,MAAM,sDAE7BC,mBAAmB,CAChBC,KAAM,cACNJ,MAAOP,IAAIQ,WAAWC,MAAM,mDAC5BG,WAAY,wBACX,WAAY,IAEhBF,mBAAmB,CAChBC,KAAM,cACNJ,MAAOP,IAAIQ,WAAWC,MAAM,mDAC5BG,WAAY,wBACX,QAAS","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 23);\n","module.exports = flarum.core.compat['app'];","import app from 'flarum/app';\n\napp.initializers.add('flarum-flags', () => {\n app.extensionData.for('flarum-flags')\n .registerSetting({\n setting: 'flarum-flags.guidelines_url',\n type: 'text',\n label: app.translator.trans('flarum-flags.admin.settings.guidelines_url_label')\n }, 15)\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 icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.view_flags_label'),\n permission: 'discussion.viewFlags'\n }, 'moderate', 65)\n\n .registerPermission({\n icon: 'fas fa-flag',\n label: app.translator.trans('flarum-flags.admin.permissions.flag_posts_label'),\n permission: 'discussion.flagPosts'\n }, 'reply', 65);\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/external \"flarum.core.compat['app']\"","webpack://@flarum/flags/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","registerPermission","icon","permission"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoB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,gBACJC,gBACC,CACEC,QAAS,8BACTC,KAAM,OACNC,MAAOP,IAAIQ,WAAWC,MAAM,qDAE9B,IAEDL,gBAAgB,CACfC,QAAS,4BACTC,KAAM,UACNC,MAAOP,IAAIQ,WAAWC,MAAM,sDAE7BC,mBACC,CACEC,KAAM,cACNJ,MAAOP,IAAIQ,WAAWC,MAAM,mDAC5BG,WAAY,wBAEd,WACA,IAGDF,mBACC,CACEC,KAAM,cACNJ,MAAOP,IAAIQ,WAAWC,MAAM,mDAC5BG,WAAY,wBAEd,QACA","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 26);\n","module.exports = flarum.core.compat['app'];","import app from 'flarum/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"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/flags/js/dist/forum.js b/extensions/flags/js/dist/forum.js index b3c9529b9..38ca989a4 100644 --- a/extensions/flags/js/dist/forum.js +++ b/extensions/flags/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var s in t)o.d(e,s,function(a){return t[a]}.bind(null,s));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=22)}([function(t,a){t.exports=flarum.core.compat.app},function(t,a){t.exports=flarum.core.compat.Model},function(t,a){t.exports=flarum.core.compat["utils/withAttr"]},function(t,a){t.exports=flarum.core.compat.extend},function(t,a){t.exports=flarum.core.compat["components/Button"]},function(t,a){t.exports=flarum.core.compat["components/Post"]},function(t,a){t.exports=flarum.core.compat["utils/PostControls"]},function(t,a){t.exports=flarum.core.compat["utils/Stream"]},function(t,a){t.exports=flarum.core.compat["components/Page"]},function(t,a){t.exports=flarum.core.compat.Component},function(t,a){t.exports=flarum.core.compat["components/Link"]},function(t,a){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,a){t.exports=flarum.core.compat["helpers/avatar"]},function(t,a){t.exports=flarum.core.compat["helpers/username"]},function(t,a){t.exports=flarum.core.compat["helpers/icon"]},function(t,a){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,a){t.exports=flarum.core.compat["components/Modal"]},function(t,a){t.exports=flarum.core.compat["components/HeaderSecondary"]},function(t,a){t.exports=flarum.core.compat["components/NotificationsDropdown"]},function(t,a){t.exports=flarum.core.compat["utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["utils/humanTime"]},function(t,a){t.exports=flarum.core},function(t,a,o){"use strict";o.r(a);var e=o(0),s=o.n(e),n=o(1),r=o.n(n);function l(t,a){return(l=Object.setPrototypeOf||function(t,a){return t.__proto__=a,t})(t,a)}function i(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,l(t,a)}var c=function(t){function a(){return t.apply(this,arguments)||this}return i(a,t),a}(r.a);Object.assign(c.prototype,{type:r.a.attribute("type"),reason:r.a.attribute("reason"),reasonDetail:r.a.attribute("reasonDetail"),createdAt:r.a.attribute("createdAt",r.a.transformDate),post:r.a.hasOne("post"),user:r.a.hasOne("user")});var u=c,p=o(8),f=o.n(p),g=o(9),d=o.n(g),h=o(10),b=o.n(h),v=o(11),_=o.n(v),y=o(12),x=o.n(y),N=o(13),F=o.n(N),k=o(14),w=o.n(k),C=o(15),D=o.n(C),P=function(t){function a(){return t.apply(this,arguments)||this}i(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"},app.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(b.a,{href:app.route.post(a),className:"Notification Flag",onclick:function(t){app.flags.index=a,t.redraw=!1}},x()(a.user()),w()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},app.translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:F()(a.user()),em:m("em",null),discussion:a.discussion().title()})),D()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?_.a.component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},app.translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(d.a),O=function(t){function a(){return t.apply(this,arguments)||this}i(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),app.history.push("flags"),app.flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(P,{state:app.flags}))},a}(f.a),A=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}(),j=o(3),M=o(6),L=o.n(M),B=o(4),T=o.n(B),S=o(16),E=o.n(S),I=o(7),H=o.n(I),R=o(2),U=o.n(R),G=function(t){function a(){return t.apply(this,arguments)||this}i(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=H()(""),this.reasonDetail=H()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return app.translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){if(this.success)return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(T.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("flarum-flags.forum.flag_post.dismiss_button")))));var t=app.forum.attribute("guidelinesUrl");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:t?m("a",{href:t,target:"_blank"}):void 0}),"inappropriate"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),app.translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:app.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""),m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:U()("value",this.reason)}),m("strong",null,app.translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:U()("value",this.reasonDetail)}):""))),m("div",{className:"Form-group"},m(T.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},app.translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,app.store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:app.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}(E.a),q=function(){Object(j.extend)(L.a,"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(T.a,{icon:"fas fa-flag",onclick:function(){return s.a.modal.show(G,{post:a})}},s.a.translator.trans("flarum-flags.forum.post_controls.flag_button")))}))},z=o(17),V=o.n(z),J=o(18),K=function(t){function a(){return t.apply(this,arguments)||this}i(a,t),a.initAttrs=function(a){a.label=a.label||app.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(app.route("flags"))},o.getUnreadCount=function(){return app.flags.cache?app.flags.cache.length:app.forum.attribute("flagCount")},o.getNewCount=function(){return app.session.user.attribute("newFlagCount")},a}(o.n(J).a),Q=function(){Object(j.extend)(V.a.prototype,"items",(function(t){s.a.forum.attribute("canViewFlags")&&t.add("flags",m(K,{state:s.a.flags}),15)}))},W=o(5),X=o.n(W),Y=o(19),Z=o.n(Y),$=o(20),tt=o.n($),at=function(){Object(j.extend)(X.a.prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),X.a.prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s.a.flags.cache&&s.a.flags.cache.some((function(t,o){if(t.post()===a){if(s.a.flags.cache.splice(o,1),s.a.flags.index===a){var e=s.a.flags.cache[o];if(e||(e=s.a.flags.cache[0]),e){var n=e.post();s.a.flags.index=n,m.route.set(s.a.route.post(n))}}return!0}})),s.a.request({url:s.a.forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},X.a.prototype.flagActionItems=function(){var t=this,a=new Z.a,o=L.a.destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var e=o.get(a).attrs;e.className="Button",Object(j.extend)(e,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(T.a,{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s.a.translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},Object(j.extend)(X.a.prototype,"content",(function(t){var a=this,o=this.attrs.post,e=o.flags();e.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},e.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),X.a.prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s.a.translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=tt()(t.createdAt());return[s.a.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):""]}}},ot={"flags/addFlagsToPosts":at,"flags/addFlagControl":q,"flags/addFlagsDropdown":Q,"flags/models/Flag":u,"flags/components/FlagList":P,"flags/components/FlagPostModal":G,"flags/components/FlagsPage":O,"flags/components/FlagsDropdown":K},et=o(21);s.a.initializers.add("flarum-flags",(function(){s.a.store.models.posts.prototype.flags=r.a.hasMany("flags"),s.a.store.models.posts.prototype.canFlag=r.a.attribute("canFlag"),s.a.store.models.flags=u,s.a.routes.flags={path:"/flags",component:O},s.a.flags=new A(s.a),q(),Q(),at()})),Object.assign(et.compat,ot)}]); +module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var n in t)o.d(e,n,function(a){return t[a]}.bind(null,n));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=25)}([function(t,a){t.exports=flarum.core.compat.app},function(t,a){t.exports=flarum.core.compat["forum/app"]},function(t,a){t.exports=flarum.core.compat.Model},function(t,a){t.exports=flarum.core.compat["common/utils/withAttr"]},function(t,a){t.exports=flarum.core.compat.extend},function(t,a){t.exports=flarum.core.compat["components/Post"]},function(t,a){t.exports=flarum.core.compat["utils/PostControls"]},function(t,a){t.exports=flarum.core.compat["components/Button"]},function(t,a){t.exports=flarum.core.compat["common/components/Button"]},function(t,a){t.exports=flarum.core.compat["common/utils/Stream"]},function(t,a){t.exports=flarum.core.compat["components/Page"]},function(t,a){t.exports=flarum.core.compat.Component},function(t,a){t.exports=flarum.core.compat["components/Link"]},function(t,a){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,a){t.exports=flarum.core.compat["helpers/avatar"]},function(t,a){t.exports=flarum.core.compat["helpers/username"]},function(t,a){t.exports=flarum.core.compat["helpers/icon"]},function(t,a){t.exports=flarum.core.compat["helpers/humanTime"]},function(t,a){t.exports=flarum.core.compat["common/components/Modal"]},function(t,a){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["components/HeaderSecondary"]},function(t,a){t.exports=flarum.core.compat["components/NotificationsDropdown"]},function(t,a){t.exports=flarum.core.compat["utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["utils/humanTime"]},function(t,a){t.exports=flarum.core},function(t,a,o){"use strict";o.r(a);var e=o(0),n=o.n(e),s=o(2),r=o.n(s);function l(t,a){return(l=Object.setPrototypeOf||function(t,a){return t.__proto__=a,t})(t,a)}function i(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,l(t,a)}var c=function(t){function a(){return t.apply(this,arguments)||this}return i(a,t),a}(r.a);Object.assign(c.prototype,{type:r.a.attribute("type"),reason:r.a.attribute("reason"),reasonDetail:r.a.attribute("reasonDetail"),createdAt:r.a.attribute("createdAt",r.a.transformDate),post:r.a.hasOne("post"),user:r.a.hasOne("user")});var u=c,f=o(10),p=o.n(f),d=o(11),g=o.n(d),h=o(12),b=o.n(h),v=o(13),_=o.n(v),y=o(14),x=o.n(y),N=o(15),F=o.n(N),k=o(16),w=o.n(k),C=o(17),D=o.n(C),P=function(t){function a(){return t.apply(this,arguments)||this}i(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"},app.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(b.a,{href:app.route.post(a),className:"Notification Flag",onclick:function(t){app.flags.index=a,t.redraw=!1}},x()(a.user()),w()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},app.translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:F()(a.user()),em:m("em",null),discussion:a.discussion().title()})),D()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?_.a.component({className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},app.translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(g.a),O=function(t){function a(){return t.apply(this,arguments)||this}i(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),app.history.push("flags"),app.flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(P,{state:app.flags}))},a}(p.a),A=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}(),j=o(4),M=o(6),L=o.n(M),B=o(7),T=o.n(B),S=o(1),I=o.n(S),R=o(18),E=o.n(R),H=o(8),U=o.n(H),G=o(9),q=o.n(G),z=o(3),V=o.n(z),J=o(19),K=o.n(J),Q=function(t){function a(){return t.apply(this,arguments)||this}i(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=q()(""),this.reasonDetail=q()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return I.a.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"},I.a.translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(U.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},I.a.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(U.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},I.a.translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new K.a,a=I.a.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:V()("value",this.reason)}),m("strong",null,I.a.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),I.a.translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()?m("textarea",{className:"FormControl",placeholder:I.a.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:V()("value",this.reasonDetail)}):""),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:V()("value",this.reason)}),m("strong",null,I.a.translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),I.a.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:I.a.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:V()("value",this.reasonDetail)}):""),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:V()("value",this.reason)}),m("strong",null,I.a.translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),I.a.translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()?m("textarea",{className:"FormControl",placeholder:I.a.translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:V()("value",this.reasonDetail)}):""),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:V()("value",this.reason)}),m("strong",null,I.a.translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()?m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:V()("value",this.reasonDetail)}):""),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,I.a.store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:I.a.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}(E.a),W=function(){Object(j.extend)(L.a,"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(T.a,{icon:"fas fa-flag",onclick:function(){return n.a.modal.show(Q,{post:a})}},n.a.translator.trans("flarum-flags.forum.post_controls.flag_button")))}))},X=o(20),Y=o.n(X),Z=o(21),$=function(t){function a(){return t.apply(this,arguments)||this}i(a,t),a.initAttrs=function(a){a.label=a.label||app.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(app.route("flags"))},o.getUnreadCount=function(){return app.flags.cache?app.flags.cache.length:app.forum.attribute("flagCount")},o.getNewCount=function(){return app.session.user.attribute("newFlagCount")},a}(o.n(Z).a),tt=function(){Object(j.extend)(Y.a.prototype,"items",(function(t){n.a.forum.attribute("canViewFlags")&&t.add("flags",m($,{state:n.a.flags}),15)}))},at=o(5),ot=o.n(at),et=o(22),nt=o.n(et),st=o(23),rt=o.n(st),lt=function(){Object(j.extend)(ot.a.prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),ot.a.prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),n.a.flags.cache&&n.a.flags.cache.some((function(t,o){if(t.post()===a){if(n.a.flags.cache.splice(o,1),n.a.flags.index===a){var e=n.a.flags.cache[o];if(e||(e=n.a.flags.cache[0]),e){var s=e.post();n.a.flags.index=s,m.route.set(n.a.route.post(s))}}return!0}})),n.a.request({url:n.a.forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},ot.a.prototype.flagActionItems=function(){var t=this,a=new nt.a,o=L.a.destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var e=o.get(a).attrs;e.className="Button",Object(j.extend)(e,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(T.a,{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},n.a.translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},Object(j.extend)(ot.a.prototype,"content",(function(t){var a=this,o=this.attrs.post,e=o.flags();e.length&&(o.isHidden()&&(this.revealContent=!0),t.unshift(m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},e.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray()))))})),ot.a.prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?n.a.translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),s=rt()(t.createdAt());return[n.a.translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:s,user:a,reason:o}),e?m("span",{className:"Post-flagged-detail"},e):""]}}},it={"flags/addFlagsToPosts":lt,"flags/addFlagControl":W,"flags/addFlagsDropdown":tt,"flags/models/Flag":u,"flags/components/FlagList":P,"flags/components/FlagPostModal":Q,"flags/components/FlagsPage":O,"flags/components/FlagsDropdown":$},ct=o(24);n.a.initializers.add("flarum-flags",(function(){n.a.store.models.posts.prototype.flags=r.a.hasMany("flags"),n.a.store.models.posts.prototype.canFlag=r.a.attribute("canFlag"),n.a.store.models.flags=u,n.a.routes.flags={path:"/flags",component:O},n.a.flags=new A(n.a),W(),tt(),lt()})),Object.assign(ct.compat,it)}]); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/flags/js/dist/forum.js.map b/extensions/flags/js/dist/forum.js.map index 400d65d75..a006ced4f 100644 --- a/extensions/flags/js/dist/forum.js.map +++ b/extensions/flags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/external \"flarum.core.compat['app']\"","webpack://@flarum/flags/external \"flarum.core.compat['Model']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/withAttr']\"","webpack://@flarum/flags/external \"flarum.core.compat['extend']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Post']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/PostControls']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/external \"flarum.core.compat['Component']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Link']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/avatar']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/username']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/icon']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/HeaderSecondary']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/NotificationsDropdown']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/humanTime']\"","webpack://@flarum/flags/external \"flarum.core\"","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.js","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/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","Flag","Model","assign","type","attribute","reason","reasonDetail","createdAt","transformDate","post","hasOne","user","FlagList","oninit","vnode","this","state","attrs","view","flags","cache","className","app","translator","trans","length","map","flag","href","route","onclick","e","index","redraw","avatar","icon","username","em","discussion","title","humanTime","contentPlain","loading","LoadingIndicator","component","Component","FlagsPage","history","push","load","bodyClass","Page","FlagListState","session","store","find","then","pushAttributes","newFlagCount","sort","a","b","FlagPostModal","success","Stream","content","hide","guidelinesUrl","forum","checked","withAttr","placeholder","oninput","target","undefined","disabled","onsubmit","preventDefault","createRecord","save","relationships","errorHandler","onerror","loaded","Modal","extend","PostControls","items","isHidden","contentType","canFlag","add","modal","show","FlagsDropdown","initAttrs","label","getMenu","menuClassName","menuClick","showing","goToRoute","set","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","dismissFlag","body","data","subtree","invalidate","some","splice","next","nextPost","request","url","apiEndpoint","method","flagActionItems","ItemList","controls","destructiveControls","keys","forEach","k","toArray","vdom","revealContent","unshift","flagReason","detail","time","addFlagsToPosts","addFlagControl","addFlagsDropdown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OAAmB,CAC1B,IAAMQ,EAAOgB,EAAKhB,OACZN,EAASsB,EAAKtB,SAAWiB,IAAIC,WAAWC,MAAf,uCAA4DG,EAAKtB,SAAjE,UAAqF,KAC9GgI,EAAS1G,EAAKrB,eACdgI,EAAO9F,KAAUb,EAAKpB,aAE5B,MAAO,CACLe,IAAIC,WAAWC,MAAMnB,EAAS,sDAAwD,0CAA2C,CAACiI,OAAM3H,OAAMN,WAC9IgI,EAAS,UAAMhH,UAAU,uBAAuBgH,GAAiB,OCvG1D,IACb,wBAAyBE,GACzB,uBAAwBC,EACxB,yBAA0BC,EAC1B,oBAAqBzI,EACrB,4BAA6BY,EAC7B,iCAAkCkD,EAClC,6BAA8BhB,EAC9B,iCAAkCgD,G,SCPpCxE,IAAIoH,aAAa/C,IAAI,gBAAgB,WACnCrE,IAAIgC,MAAMqF,OAAOC,MAAM1J,UAAUiC,MAAQlB,IAAM4I,QAAQ,SACvDvH,IAAIgC,MAAMqF,OAAOC,MAAM1J,UAAUwG,QAAUzF,IAAMG,UAAU,WAE3DkB,IAAIgC,MAAMqF,OAAOxH,MAAQnB,EAEzBsB,IAAIwH,OAAO3H,MAAQ,CAAE4H,KAAM,SAAUnG,UAAWE,GAEhDxB,IAAIH,MAAQ,IAAIiC,EAAc9B,KAE9BkH,IACAC,IACAF,QAOFvK,OAAOkC,OAAOV,UAAQwJ","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['utils/withAttr'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Post'];","module.exports = flarum.core.compat['utils/PostControls'];","module.exports = flarum.core.compat['utils/Stream'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/Link'];","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['helpers/avatar'];","module.exports = flarum.core.compat['helpers/username'];","module.exports = flarum.core.compat['helpers/icon'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/Modal'];","module.exports = flarum.core.compat['components/HeaderSecondary'];","module.exports = flarum.core.compat['components/NotificationsDropdown'];","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['utils/humanTime'];","module.exports = flarum.core;","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/Model';\n\nclass Flag extends Model {}\n\nObject.assign(Flag.prototype, {\n type: Model.attribute('type'),\n reason: Model.attribute('reason'),\n reasonDetail: Model.attribute('reasonDetail'),\n createdAt: Model.attribute('createdAt', Model.transformDate),\n\n post: Model.hasOne('post'),\n user: Model.hasOne('user')\n});\n\nexport default Flag;\n","import Component from 'flarum/Component';\nimport Link from 'flarum/components/Link';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport avatar from 'flarum/helpers/avatar';\nimport username from 'flarum/helpers/username';\nimport icon from 'flarum/helpers/icon';\nimport humanTime from 'flarum/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
{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}
\n{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}
\n