From bb263c677aa79fb3b3750dd7d9631d4c68e11aad Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Tue, 16 Mar 2021 12:07:27 +0000 Subject: [PATCH] Bundled output for commit 174eaa1a00f04abeb3d2a96909ecdc603f012678 [skip ci] --- js/dist/admin.js | 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/admin.js b/js/dist/admin.js index cbe15f6..70a5792 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=12)}({0:function(e,r){e.exports=flarum.core.compat.app},12:function(e,r,t){"use strict";t.r(r);var n=t(0),o=t.n(n);o.a.initializers.add("fof-user-bio",(function(){o.a.extensionData.for("fof-user-bio").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.view"),permission:"fof-user-bio.view",allowGuest:!0},"view").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.editOwn"),permission:"fof-user-bio.editOwn"},"start").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.editAny"),permission:"fof-user-bio.editAny"},"moderate").registerSetting({label:o.a.translator.trans("fof-user-bio.admin.setting.bioLimit"),setting:"fof-user-bio.maxLength",type:"number"})}))}}); +module.exports=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=12)}({0:function(e,r){e.exports=flarum.core.compat["common/app"]},12:function(e,r,t){"use strict";t.r(r);var n=t(0),o=t.n(n);o.a.initializers.add("fof-user-bio",(function(){o.a.extensionData.for("fof-user-bio").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.view"),permission:"fof-user-bio.view",allowGuest:!0},"view").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.editOwn"),permission:"fof-user-bio.editOwn"},"start").registerPermission({icon:"fas fa-pen",label:o.a.translator.trans("fof-user-bio.admin.permission.editAny"),permission:"fof-user-bio.editAny"},"moderate").registerSetting({label:o.a.translator.trans("fof-user-bio.admin.setting.bioLimit"),setting:"fof-user-bio.maxLength",type:"number"})}))}}); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index b895db7..b84f629 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@fof/user-bio/webpack/bootstrap","webpack://@fof/user-bio/external \"flarum.core.compat['app']\"","webpack://@fof/user-bio/./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","registerPermission","icon","label","translator","trans","permission","allowGuest","registerSetting","setting","type"],"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,WACjCF,IAAIG,cAAJ,IACS,gBACJC,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,sCAC5BC,WAAY,oBACZC,YAAY,GAEhB,QAEHN,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,yCAC5BC,WAAY,wBAEhB,SAEHL,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,yCAC5BC,WAAY,wBAEhB,YAEHE,gBAAgB,CACbL,MAAON,IAAIO,WAAWC,MAAM,uCAC5BI,QAAS,yBACTC,KAAM","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 = 12);\n","module.exports = flarum.core.compat['app'];","import app from 'flarum/app';\n\napp.initializers.add('fof-user-bio', () => {\n app.extensionData\n .for('fof-user-bio')\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.view'),\n permission: 'fof-user-bio.view',\n allowGuest: true,\n },\n 'view'\n )\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.editOwn'),\n permission: 'fof-user-bio.editOwn',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.editAny'),\n permission: 'fof-user-bio.editAny',\n },\n 'moderate'\n )\n .registerSetting({\n label: app.translator.trans('fof-user-bio.admin.setting.bioLimit'),\n setting: 'fof-user-bio.maxLength',\n type: 'number',\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/user-bio/webpack/bootstrap","webpack://@fof/user-bio/external \"flarum.core.compat['common/app']\"","webpack://@fof/user-bio/./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","registerPermission","icon","label","translator","trans","permission","allowGuest","registerSetting","setting","type"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,O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AAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I,kBClFrDhC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,e,2DCEpCC,IAAIC,aAAaC,IAAI,gBAAgB,WACjCF,IAAIG,cAAJ,IACS,gBACJC,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,sCAC5BC,WAAY,oBACZC,YAAY,GAEhB,QAEHN,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,yCAC5BC,WAAY,wBAEhB,SAEHL,mBACG,CACIC,KAAM,aACNC,MAAON,IAAIO,WAAWC,MAAM,yCAC5BC,WAAY,wBAEhB,YAEHE,gBAAgB,CACbL,MAAON,IAAIO,WAAWC,MAAM,uCAC5BI,QAAS,yBACTC,KAAM","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 = 12);\n","module.exports = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\napp.initializers.add('fof-user-bio', () => {\n app.extensionData\n .for('fof-user-bio')\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.view'),\n permission: 'fof-user-bio.view',\n allowGuest: true,\n },\n 'view'\n )\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.editOwn'),\n permission: 'fof-user-bio.editOwn',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pen',\n label: app.translator.trans('fof-user-bio.admin.permission.editAny'),\n permission: 'fof-user-bio.editAny',\n },\n 'moderate'\n )\n .registerSetting({\n label: app.translator.trans('fof-user-bio.admin.setting.bioLimit'),\n setting: 'fof-user-bio.maxLength',\n type: 'number',\n });\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 686cf72..f17c8d1 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=11)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["models/User"]},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/UserCard"]},function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.Component},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},function(t,e){(function(){var t=[].slice;String.prototype.autoLink=function(){var e,o,r,n,i,a;return i=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(n=1<=arguments.length?t.call(arguments,0):[]).length?(r=n[0],o=function(){var t;for(e in t=[],r)a=r[e],"callback"!==e&&t.push(" "+e+"='"+a+"'");return t}().join(""),this.replace(i,(function(t,e,n){return""+e+(("function"==typeof r.callback?r.callback(n):void 0)||""+n+"")}))):this.replace(i,"$1$2")}}).call(this)},function(t,e,o){"use strict";o.r(e);var r=o(2),n=(o(10),o(3)),i=o.n(n),a=o(4),u=o.n(a),c=o(1),s=o.n(c),l=o(5),f=o.n(l);var p=o(0),d=o.n(p),h=o(6),b=o.n(h),v=o(7),g=o.n(v),x=o(8),y=o.n(x),_=o(9),j=o.n(_),w=function(t){var e,o;function r(){return t.apply(this,arguments)||this}o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o;var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.editing=!1,this.loading=!1,this.bioMaxLength=d.a.forum.attribute("fof-user-bio.maxLength")},n.view=function(){var t,e=this.attrs.user,o=this.attrs.user.attribute("canEditBio");if(this.editing)t=m("textarea",{className:"FormControl",placeholder:j()(d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")),rows:"3",maxlength:this.bioMaxLength,value:e.bio()});else{var r;if(this.loading)r=m("p",{className:"UserBio-placeholder"},g.a.component({size:"tiny"}));else{var n=e.bioHtml();n?r=m.trust(n):o&&(r=m("p",{className:"UserBio-placeholder"},d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")))}t=m("div",{className:"UserBio-content",onclick:o?this.edit.bind(this):function(){}},r)}return m("div",{className:"UserBio "+y()({editable:o,editing:this.editing})},t)},n.edit=function(){this.editing=!0,m.redraw.sync();var t=this,e=function(e){e.shiftKey||(e.preventDefault(),t.save($(this).val()))};this.$("textarea").focus().bind("blur",e).bind("keydown","return",e),m.redraw()},n.save=function(t){var e=this,o=this.attrs.user;o.bio()!==t&&(this.loading=!0,o.save({bio:t}).catch((function(){})).then((function(){e.loading=!1,m.redraw()}))),this.editing=!1,m.redraw()},r}(b.a);app.initializers.add("fof-user-bio",(function(){s.a.prototype.bio=f.a.attribute("bio"),s.a.prototype.bioHtml=i()("bio",(function(t){return t?"

"+$("

").text(t).html().replace(/\n/g,"
").autoLink({rel:"nofollow ugc"})+"

":""})),Object(r.extend)(u.a.prototype,"infoItems",(function(t){var e=this.attrs.user;e.attribute("canViewBio")&&t.add("bio",w.component({user:e}))}))}))}]); +module.exports=function(t){var o={};function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var r in t)e.d(n,r,function(o){return t[o]}.bind(null,r));return n},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s=11)}([function(t,o){t.exports=flarum.core.compat["common/app"]},function(t,o){t.exports=flarum.core.compat["common/models/User"]},function(t,o){t.exports=flarum.core.compat["common/extend"]},function(t,o){t.exports=flarum.core.compat["common/utils/computed"]},function(t,o){t.exports=flarum.core.compat["common/components/UserCard"]},function(t,o){t.exports=flarum.core.compat["common/Model"]},function(t,o){t.exports=flarum.core.compat["common/Component"]},function(t,o){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,o){t.exports=flarum.core.compat["common/utils/classList"]},function(t,o){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,o){(function(){var t=[].slice;String.prototype.autoLink=function(){var o,e,n,r,i,a;return i=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(r=1<=arguments.length?t.call(arguments,0):[]).length?(n=r[0],e=function(){var t;for(o in t=[],n)a=n[o],"callback"!==o&&t.push(" "+o+"='"+a+"'");return t}().join(""),this.replace(i,(function(t,o,r){return""+o+(("function"==typeof n.callback?n.callback(r):void 0)||""+r+"")}))):this.replace(i,"$1$2")}}).call(this)},function(t,o,e){"use strict";e.r(o);var n=e(2),r=(e(10),e(3)),i=e.n(r),a=e(4),c=e.n(a),u=e(1),s=e.n(u),l=e(5),f=e.n(l);var p=e(0),d=e.n(p),h=e(6),b=e.n(h),v=e(7),g=e.n(v),x=e(8),y=e.n(x),_=e(9),j=e.n(_),w=function(t){var o,e;function n(){return t.apply(this,arguments)||this}e=t,(o=n).prototype=Object.create(e.prototype),o.prototype.constructor=o,o.__proto__=e;var r=n.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),this.editing=!1,this.loading=!1,this.bioMaxLength=d.a.forum.attribute("fof-user-bio.maxLength")},r.view=function(){var t,o=this.attrs.user,e=this.attrs.user.attribute("canEditBio");if(this.editing)t=m("textarea",{className:"FormControl",placeholder:j()(d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")),rows:"3",maxlength:this.bioMaxLength,value:o.bio()});else{var n;if(this.loading)n=m("p",{className:"UserBio-placeholder"},g.a.component({size:"tiny"}));else{var r=o.bioHtml();r?n=m.trust(r):e&&(n=m("p",{className:"UserBio-placeholder"},d.a.translator.trans("fof-user-bio.forum.userbioPlaceholder")))}t=m("div",{className:"UserBio-content",onclick:e?this.edit.bind(this):function(){}},n)}return m("div",{className:"UserBio "+y()({editable:e,editing:this.editing})},t)},r.edit=function(){this.editing=!0,m.redraw.sync();var t=this,o=function(o){o.shiftKey||(o.preventDefault(),t.save($(this).val()))};this.$("textarea").focus().bind("blur",o).bind("keydown","return",o),m.redraw()},r.save=function(t){var o=this,e=this.attrs.user;e.bio()!==t&&(this.loading=!0,e.save({bio:t}).catch((function(){})).then((function(){o.loading=!1,m.redraw()}))),this.editing=!1,m.redraw()},n}(b.a);app.initializers.add("fof-user-bio",(function(){s.a.prototype.bio=f.a.attribute("bio"),s.a.prototype.bioHtml=i()("bio",(function(t){return t?"

"+$("

").text(t).html().replace(/\n/g,"
").autoLink({rel:"nofollow ugc"})+"

":""})),Object(n.extend)(c.a.prototype,"infoItems",(function(t){var o=this.attrs.user;o.attribute("canViewBio")&&t.add("bio",w.component({user:o}))}))}))}]); //# 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 30dcd27..a338d1c 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@fof/user-bio/webpack/bootstrap","webpack://@fof/user-bio/external \"flarum.core.compat['app']\"","webpack://@fof/user-bio/external \"flarum.core.compat['models/User']\"","webpack://@fof/user-bio/external \"flarum.core.compat['extend']\"","webpack://@fof/user-bio/external \"flarum.core.compat['utils/computed']\"","webpack://@fof/user-bio/external \"flarum.core.compat['components/UserCard']\"","webpack://@fof/user-bio/external \"flarum.core.compat['Model']\"","webpack://@fof/user-bio/external \"flarum.core.compat['Component']\"","webpack://@fof/user-bio/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@fof/user-bio/external \"flarum.core.compat['utils/classList']\"","webpack://@fof/user-bio/external \"flarum.core.compat['utils/extractText']\"","webpack://@fof/user-bio/./node_modules/autolink-js/autolink-min.js","webpack://@fof/user-bio/./src/forum/components/UserBio.js","webpack://@fof/user-bio/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/user-bio/./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","h","slice","String","autoLink","b","f","a","e","g","arguments","length","push","join","this","replace","callback","UserBio","subClass","superClass","constructor","__proto__","oninit","vnode","editing","loading","bioMaxLength","app","forum","attribute","view","content","user","attrs","editable","className","placeholder","extractText","translator","trans","rows","maxlength","bio","subContent","LoadingIndicator","component","size","bioHtml","trust","onclick","edit","classList","redraw","sync","save","shiftKey","preventDefault","$","val","focus","then","Component","initializers","add","User","Model","computed","text","html","rel","extend","UserCard","items"],"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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BA,EAAKH,UAAU,eAIpB2C,EAAMT,IACF,MACA9C,EAAQ4B,UAAU,CACdb","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 = 11);\n","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['models/User'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/UserCard'];","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['utils/classList'];","module.exports = flarum.core.compat['utils/extractText'];","(function(){var h=[].slice;String.prototype.autoLink=function(){var b,f,d,a,e,g;a=1<=arguments.length?h.call(arguments,0):[];e=/(^|[\\s\\n]|<[A-Za-z]*\\/?>)((?:https?|ftp):\\/\\/[\\-A-Z0-9+\\u0026\\u2019@#\\/%?=()~_|!:,.;]*[\\-A-Z0-9+\\u0026@#\\/%=~()_|])/gi;if(!(0$2\");d=a[0];f=function(){var c;c=[];for(b in d)g=d[b],\"callback\"!==b&&c.push(\" \"+b+\"='\"+g+\"'\");return c}().join(\"\");return this.replace(e,function(c,b,a){c=(\"function\"===typeof d.callback?d.callback(a):\nvoid 0)||\"\"+a+\"\";return\"\"+b+c})}}).call(this);\n","import app from 'flarum/app';\nimport Component from 'flarum/Component';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport classList from 'flarum/utils/classList';\nimport extractText from 'flarum/utils/extractText';\n\n/**\n * The `UserBio` component displays a user's bio, optionally letting the user\n * edit it.\n */\nexport default class UserBio extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n /**\n * Whether or not the bio is currently being edited.\n *\n * @type {Boolean}\n */\n this.editing = false;\n\n /**\n * Whether or not the bio is currently being saved.\n *\n * @type {Boolean}\n */\n this.loading = false;\n\n /**\n * The max configured character count the bio may be\n */\n this.bioMaxLength = app.forum.attribute('fof-user-bio.maxLength');\n }\n\n view() {\n const user = this.attrs.user;\n const editable = this.attrs.user.attribute('canEditBio');\n let content;\n\n if (this.editing) {\n content = (\n \n );\n } else {\n let subContent;\n\n if (this.loading) {\n subContent =

{LoadingIndicator.component({ size: 'tiny' })}

;\n } else {\n const bioHtml = user.bioHtml();\n\n if (bioHtml) {\n subContent = m.trust(bioHtml);\n } else if (editable) {\n subContent =

{app.translator.trans('fof-user-bio.forum.userbioPlaceholder')}

;\n }\n }\n\n content = (\n
undefined}>\n {subContent}\n
\n );\n }\n\n return (\n \n {content}\n
\n );\n }\n\n /**\n * Edit the bio.\n */\n edit() {\n this.editing = true;\n m.redraw.sync();\n\n const bio = this;\n const save = function(e) {\n if (e.shiftKey) return;\n e.preventDefault();\n bio.save($(this).val());\n };\n\n this.$('textarea')\n .focus()\n .bind('blur', save)\n .bind('keydown', 'return', save);\n m.redraw();\n }\n\n /**\n * Save the bio.\n *\n * @param {String} value\n */\n save(value) {\n const user = this.attrs.user;\n\n if (user.bio() !== value) {\n this.loading = true;\n\n user.save({ bio: value })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n this.editing = false;\n m.redraw();\n }\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import { extend } from 'flarum/extend';\nimport 'autolink-js';\nimport computed from 'flarum/utils/computed';\nimport UserCard from 'flarum/components/UserCard';\nimport User from 'flarum/models/User';\nimport Model from 'flarum/Model';\nimport UserBio from './components/UserBio';\n\napp.initializers.add('fof-user-bio', () => {\n User.prototype.bio = Model.attribute('bio');\n User.prototype.bioHtml = computed('bio', bio =>\n bio\n ? '

' +\n $('

')\n .text(bio)\n .html()\n .replace(/\\n/g, '
')\n .autoLink({ rel: 'nofollow ugc' }) +\n '

'\n : ''\n );\n\n extend(UserCard.prototype, 'infoItems', function(items) {\n let user = this.attrs.user;\n\n if (!user.attribute('canViewBio')) {\n return;\n }\n\n items.add(\n 'bio',\n UserBio.component({\n user,\n })\n );\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/user-bio/webpack/bootstrap","webpack://@fof/user-bio/external \"flarum.core.compat['common/app']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/models/User']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/extend']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/components/UserCard']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/Model']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/Component']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/user-bio/external \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/user-bio/./node_modules/autolink-js/autolink-min.js","webpack://@fof/user-bio/./src/forum/components/UserBio.js","webpack://@fof/user-bio/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/user-bio/./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","h","slice","String","autoLink","b","f","a","e","g","arguments","length","push","join","this","replace","callback","UserBio","subClass","superClass","constructor","__proto__","oninit","vnode","editing","loading","bioMaxLength","app","forum","attribute","view","content","user","attrs","editable","className","placeholder","extractText","translator","trans","rows","maxlength","bio","subContent","LoadingIndicator","component","size","bioHtml","trust","onclick","edit","classList","redraw","sync","save","shiftKey","preventDefault","$","val","focus","then","Component","initializers","add","User","Model","computed","text","html","rel","extend","UserCard","items"],"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,EA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KAAA,WACIpC,KAAKU,SAAU,EACftD,EAAEkF,OAAOC,OAET,IAAMX,EAAM5B,KACNwC,EAAO,SAAS9C,GACdA,EAAE+C,WACN/C,EAAEgD,iBACFd,EAAIY,KAAKG,EAAE3C,MAAM4C,SAGrB5C,KAAK2C,EAAE,YACFE,QACArE,KAAK,OAAQgE,GACbhE,KAAK,UAAW,SAAUgE,GAC/BpF,EAAEkF,U,EAQNE,KAAA,SAAKvE,GAAO,WACFiD,EAAOlB,KAAKmB,MAAMD,KAEpBA,EAAKU,QAAU3D,IACf+B,KAAKW,SAAU,EAEfO,EAAKsB,KAAK,CAAEZ,IAAK3D,IAAjB,OACW,eACN6E,MAAK,WACF,EAAKnC,SAAU,EACfvD,EAAEkF,aAIdtC,KAAKU,SAAU,EACftD,EAAEkF,U,GApH2BS,KEFrClC,IAAImC,aAAaC,IAAI,gBAAgB,WACjCC,IAAKtE,UAAUgD,IAAMuB,IAAMpC,UAAU,OACrCmC,IAAKtE,UAAUqD,QAAUmB,IAAS,OAAO,SAAAxB,GAAG,OACxCA,EACM,MACAe,EAAE,UACGU,KAAKzB,GACL0B,OACArD,QAAQ,MAAO,QACfX,SAAS,CAAEiE,IAAK,iBACrB,OACA,MAGVC,iBAAOC,IAAS7E,UAAW,aAAa,SAAS8E,GAC7C,IAAIxC,EAAOlB,KAAKmB,MAAMD,KAEjBA,EAAKH,UAAU,eAIpB2C,EAAMT,IACF,MACA9C,EAAQ4B,UAAU,CACdb","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 = 11);\n","module.exports = flarum.core.compat['common/app'];","module.exports = flarum.core.compat['common/models/User'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/components/UserCard'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/extractText'];","(function(){var h=[].slice;String.prototype.autoLink=function(){var b,f,d,a,e,g;a=1<=arguments.length?h.call(arguments,0):[];e=/(^|[\\s\\n]|<[A-Za-z]*\\/?>)((?:https?|ftp):\\/\\/[\\-A-Z0-9+\\u0026\\u2019@#\\/%?=()~_|!:,.;]*[\\-A-Z0-9+\\u0026@#\\/%=~()_|])/gi;if(!(0$2\");d=a[0];f=function(){var c;c=[];for(b in d)g=d[b],\"callback\"!==b&&c.push(\" \"+b+\"='\"+g+\"'\");return c}().join(\"\");return this.replace(e,function(c,b,a){c=(\"function\"===typeof d.callback?d.callback(a):\nvoid 0)||\"\"+a+\"\";return\"\"+b+c})}}).call(this);\n","import app from 'flarum/common/app';\nimport Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * The `UserBio` component displays a user's bio, optionally letting the user\n * edit it.\n */\nexport default class UserBio extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n /**\n * Whether or not the bio is currently being edited.\n *\n * @type {Boolean}\n */\n this.editing = false;\n\n /**\n * Whether or not the bio is currently being saved.\n *\n * @type {Boolean}\n */\n this.loading = false;\n\n /**\n * The max configured character count the bio may be\n */\n this.bioMaxLength = app.forum.attribute('fof-user-bio.maxLength');\n }\n\n view() {\n const user = this.attrs.user;\n const editable = this.attrs.user.attribute('canEditBio');\n let content;\n\n if (this.editing) {\n content = (\n \n );\n } else {\n let subContent;\n\n if (this.loading) {\n subContent =

{LoadingIndicator.component({ size: 'tiny' })}

;\n } else {\n const bioHtml = user.bioHtml();\n\n if (bioHtml) {\n subContent = m.trust(bioHtml);\n } else if (editable) {\n subContent =

{app.translator.trans('fof-user-bio.forum.userbioPlaceholder')}

;\n }\n }\n\n content = (\n
undefined}>\n {subContent}\n
\n );\n }\n\n return (\n \n {content}\n
\n );\n }\n\n /**\n * Edit the bio.\n */\n edit() {\n this.editing = true;\n m.redraw.sync();\n\n const bio = this;\n const save = function(e) {\n if (e.shiftKey) return;\n e.preventDefault();\n bio.save($(this).val());\n };\n\n this.$('textarea')\n .focus()\n .bind('blur', save)\n .bind('keydown', 'return', save);\n m.redraw();\n }\n\n /**\n * Save the bio.\n *\n * @param {String} value\n */\n save(value) {\n const user = this.attrs.user;\n\n if (user.bio() !== value) {\n this.loading = true;\n\n user.save({ bio: value })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n this.editing = false;\n m.redraw();\n }\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import { extend } from 'flarum/common/extend';\nimport 'autolink-js';\nimport computed from 'flarum/common/utils/computed';\nimport UserCard from 'flarum/common/components/UserCard';\nimport User from 'flarum/common/models/User';\nimport Model from 'flarum/common/Model';\nimport UserBio from './components/UserBio';\n\napp.initializers.add('fof-user-bio', () => {\n User.prototype.bio = Model.attribute('bio');\n User.prototype.bioHtml = computed('bio', bio =>\n bio\n ? '

' +\n $('

')\n .text(bio)\n .html()\n .replace(/\\n/g, '
')\n .autoLink({ rel: 'nofollow ugc' }) +\n '

'\n : ''\n );\n\n extend(UserCard.prototype, 'infoItems', function(items) {\n let user = this.attrs.user;\n\n if (!user.attribute('canViewBio')) {\n return;\n }\n\n items.add(\n 'bio',\n UserBio.component({\n user,\n })\n );\n });\n});\n"],"sourceRoot":""} \ No newline at end of file