From 3f2e3d281b74b033d7dcff4bb2dbf4e90bb32eb3 Mon Sep 17 00:00:00 2001
From: flarum-bot
Date: Mon, 17 May 2021 14:52:58 +0000
Subject: [PATCH] Bundled output for commit
c592688704f87c487cc0f02d38585794bc7137f2
Includes transpiled JS/TS.
[skip ci]
---
js/dist/forum.js.map | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map
index 70cbf46..6d2c0ac 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['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","bioPlaceholder","session","user","id","attrs","translator","trans","username","view","content","editable","className","placeholder","extractText","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,EAA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,UAAU,uBAAuB3B,KAAKgB,iBAI9DS,EACI,SAAKE,UAAU,kBAAkBY,QAASb,EAAW1B,KAAKwC,KAAKhE,KAAKwB,MAAQ,cACvEiC,GAKb,OACI,SACIN,UACI,WACAc,IAAU,CACNf,WACAhB,QAASV,KAAKU,WAIrBe,I,EAQbe,KAAA,WACIxC,KAAKU,SAAU,EACftD,EAAEsF,OAAOC,OAET,IAAMX,EAAMhC,KACN4C,EAAO,SAASlD,GACdA,EAAEmD,WACNnD,EAAEoD,iBACFd,EAAIY,KAAKG,EAAE/C,MAAMgD,SAGrBhD,KAAK+C,EAAE,YACFE,QACAzE,KAAK,OAAQoE,GACbpE,KAAK,UAAW,SAAUoE,GAC/BxF,EAAEsF,U,EAQNE,KAAA,SAAK3E,GAAO,WACFiD,EAAOlB,KAAKoB,MAAMF,KAEpBA,EAAKc,QAAU/D,IACf+B,KAAKW,SAAU,EAEfO,EAAK0B,KAAK,CAAEZ,IAAK/D,IAAjB,OACW,eACNiF,MAAK,WACF,EAAKvC,SAAU,EACfvD,EAAEsF,aAId1C,KAAKU,SAAU,EACftD,EAAEsF,U,GAhI2BS,KEFrCtC,IAAIuC,aAAaC,IAAI,gBAAgB,WACjCC,IAAK1E,UAAUoD,IAAMuB,IAAMxC,UAAU,OACrCuC,IAAK1E,UAAUyD,QAAUmB,IAAS,OAAO,SAAAxB,GAAG,OACxCA,EACM,MACAe,EAAE,UACGU,KAAKzB,GACL0B,OACAzD,QAAQ,MAAO,QACfX,SAAS,CAAEqE,IAAK,iBACrB,OACA,MAGVC,iBAAOC,IAASjF,UAAW,aAAa,SAASkF,GAC7C,IAAI5C,EAAOlB,KAAKoB,MAAMF,KAEjBA,EAAKH,UAAU,eAIpB+C,EAAMT,IACF,MACAlD,EAAQgC,UAAU,CACdjB","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 * The placeholder shown in the bio textbox when no input is set.\n */\n this.bioPlaceholder =\n app.session && app.session.user && app.session.user.id() === this.attrs.user.id()\n ? // Normal placeholder if they're looking at their own profile\n app.translator.trans('fof-user-bio.forum.userbioPlaceholder')\n : // Special placeholder if someone else is viewing their profile with edit access\n app.translator.trans('fof-user-bio.forum.userbioPlaceholderOtherUser', {\n username: this.attrs.user.username(),\n });\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 = {this.bioPlaceholder}
;\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
+{"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","bioPlaceholder","session","user","id","attrs","translator","trans","username","view","content","editable","className","placeholder","extractText","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,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.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 * The placeholder shown in the bio textbox when no input is set.\n */\n this.bioPlaceholder =\n app.session && app.session.user && app.session.user.id() === this.attrs.user.id()\n ? // Normal placeholder if they're looking at their own profile\n app.translator.trans('fof-user-bio.forum.userbioPlaceholder')\n : // Special placeholder if someone else is viewing their profile with edit access\n app.translator.trans('fof-user-bio.forum.userbioPlaceholderOtherUser', {\n username: this.attrs.user.username(),\n });\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 = {this.bioPlaceholder}
;\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').focus().bind('blur', save).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 ? '' + $('
').text(bio).html().replace(/\\n/g, '
').autoLink({ rel: 'nofollow ugc' }) + '' : ''\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