diff --git a/js/dist/forum.js b/js/dist/forum.js index 6177762..f0ab898 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={195:(t,e,o)=>{t.exports=o(236)},236:t=>{var e=function(t){"use strict";var e,o=Object.prototype,a=o.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,o){return t[e]=o}}function u(t,e,o,a){var r=e&&e.prototype instanceof f?e:f,n=Object.create(r.prototype),i=new k(a||[]);return n._invoke=function(t,e,o){var a=c;return function(r,n){if(a===g)throw new Error("Generator is already running");if(a===p){if("throw"===r)throw n;return x()}for(o.method=r,o.arg=n;;){var i=o.delegate;if(i){var s=I(i,o);if(s){if(s===h)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===c)throw a=p,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=g;var l=m(t,e,o);if("normal"===l.type){if(a=o.done?p:d,l.arg===h)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(a=p,o.method="throw",o.arg=l.arg)}}}(t,o,i),n}function m(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",d="suspendedYield",g="executing",p="completed",h={};function f(){}function v(){}function b(){}var y={};y[n]=function(){return this};var w=Object.getPrototypeOf,B=w&&w(w(C([])));B&&B!==o&&a.call(B,n)&&(y=B);var N=b.prototype=f.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function o(r,n,i,s){var l=m(t[r],t,n);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&a.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,i,s)}),(function(t){o("throw",t,i,s)})):e.resolve(c).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,s)}))}s(l.arg)}var r;this._invoke=function(t,a){function n(){return new e((function(e,r){o(t,a,e,r)}))}return r=r?r.then(n,n):n()}}function I(t,o){var a=t.iterator[o.method];if(a===e){if(o.delegate=null,"throw"===o.method){if(t.iterator.return&&(o.method="return",o.arg=e,I(t,o),"throw"===o.method))return h;o.method="throw",o.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=m(a,t.iterator,o.arg);if("throw"===r.type)return o.method="throw",o.arg=r.arg,o.delegate=null,h;var n=r.arg;return n?n.done?(o[t.resultName]=n.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=e),o.delegate=null,h):n:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t){var o=t[n];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function o(){for(;++r=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),L(o),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var a=o.completion;if("throw"===a.type){var r=a.arg;L(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,o,a){return this.delegate={iterator:C(t),resultName:o,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(a){var r=e[a];if(void 0!==r)return r.exports;var n=e[a]={exports:{}};return t[a](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};(()=>{"use strict";function t(e,o){return t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t(e,o)}function e(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,t(e,o)}o.r(a);const r=flarum.core.compat["common/components/Page"];var n=o.n(r);const i=flarum.core.compat["components/IndexPage"];var s=o.n(i);const l=flarum.core.compat["forum/components/CommentPost"];var u=o.n(l);const c=flarum.core.compat["forum/components/PostStream"];var d=o.n(c);const g=flarum.core.compat["forum/states/PostStreamState"];var p=o.n(g);const h=flarum.core.compat["common/Component"];var f=o.n(h);const v=flarum.core.compat["tags/components/TagDiscussionModal"];var b=o.n(v);const y=flarum.core.compat["forum/utils/DiscussionControls"];var w=o.n(y);const B=flarum.core.compat["common/components/Alert"];var N=o.n(B);const A=flarum.core.compat["common/components/Button"];var F=o.n(A);const I=flarum.core.compat["common/components/Dropdown"];var _=o.n(I);function L(t,e,o,a,r,n,i){try{var s=t[n](i),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(a,r)}function k(t){return function(){var e=this,o=arguments;return new Promise((function(a,r){var n=t.apply(e,o);function i(t){L(n,a,r,i,s,"next",t)}function s(t){L(n,a,r,i,s,"throw",t)}i(void 0)}))}}var C=o(195),x=o.n(C);const P=flarum.core.compat["forum/app"];var M=o.n(P);const S=flarum.core.compat["common/components/Modal"];var T=o.n(S);const E=flarum.core.compat["common/utils/ItemList"];var R=o.n(E);const D=flarum.core.compat["common/utils/Stream"];var O=o.n(D);const j=flarum.core.compat["common/components/Switch"];var G=o.n(j),H=function(t){function a(){return t.apply(this,arguments)||this}e(a,t);var r=a.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.attrs.article?this.meta=this.attrs.article&&this.attrs.article.blogMeta()?this.attrs.article.blogMeta():M().store.createRecord("blogMeta"):this.meta=this.attrs.meta?this.attrs.meta:M().store.createRecord("blogMeta"),this.isNew=!this.meta.exists,this.summary=O()(this.meta.summary()||""),this.featuredImage=O()(this.meta.featuredImage()||""),this.isFeatured=O()(this.meta.isFeatured()||!1),this.isSized=O()(this.meta.isSized()||!1),this.isPendingReview=O()(this.meta.isPendingReview()||!1)},r.className=function(){return"Modal--small Support-Modal"},r.title=function(){return"Blog post settings"},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},r.fields=function(){var t=this,e=new(R());e.add("summary",m("div",{className:"Form-group"},m("label",null,"Article summary:"),m("textarea",{className:"FormControl",style:{maxWidth:"100%",minWidth:"100%",width:"100%",minHeight:"120px"},bidi:this.summary,placeholder:"Please enter a summary"}),m("small",null,"This summary will be visible on the blog overview page and will be used for SEO purposes.")),30);var a=null;if("fof-upload"in flarum.extensions&&M().forum.attribute("fof-upload.canUpload")){var r=o(482).components,n=r.Uploader,i=r.FileManagerModal,s=new n;a=m(F(),{class:"Button Button--icon",onclick:k(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M().modal.show(i,{uploader:s,onSelect:function(e){var o=M().store.getById("files",e[0]);t.featuredImage(o.url())}},!0);case 1:case"end":return e.stop()}}),e)}))),icon:"fas fa-cloud-upload-alt"})}return e.add("image",m("div",{className:"Form-group V17Blog-ArticleImage"},m("label",null,"Article image URL:"),m("div",{"data-upload-enabled":!!a},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),a),m("small",null,"Best image resolution for social media: 1200x630"),""!==this.featuredImage()&&m("img",{src:this.featuredImage(),alt:"Article image",title:"Blog post image",style:{width:"100%",marginTop:"15px"}})),30),e.add("sized",m("div",{className:"Form-group"},G().component({state:1==this.isSized(),onchange:function(e){t.isSized(e)}},[m("b",null,"Highlighted post"),m("div",{className:"helpText",style:{fontWeight:500}},"Give this post a big image on the blog overview page.")])),-10),e.add("submit",m("div",{className:"Form-group"},F().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},"Update")),-10),e},r.submitData=function(){return{summary:this.summary(),featuredImage:this.featuredImage(),isFeatured:this.isFeatured(),isSized:this.isSized(),isPendingReview:this.isPendingReview(),relationships:this.isNew&&!this.attrs.isComposer?{discussion:this.attrs.article}:null}},r.onsubmit=function(t){var e=this;if(t.preventDefault(),this.attrs.onsubmit)return this.meta.pushData({attributes:this.submitData()}),this.attrs.onsubmit(this.meta),void this.hide();this.loading=!0,this.meta.save(this.submitData()).then((function(){e.attrs.article&&e.attrs.article.pushData({relationships:{blogMeta:e.meta}}),e.hide(),m.redraw()}),(function(t){e.loading=!1,e.handleErrors(t)}))},a}(T());const z=flarum.core.compat["forum/components/EditPostComposer"];var W=o.n(z);const U=flarum.core.compat["common/utils/extractText"];var q=o.n(U),Y=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.article=this.attrs.article,this.name=O()(this.article.title()||""),this.redirect=this.attrs.redirect},a.className=function(){return"Modal--small Support-Modal"},a.title=function(){return app.translator.trans("v17development-flarum-blog.forum.tools.rename_article")},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},a.fields=function(){var t=new(R());return t.add("name",m("div",{className:"Form-group"},m("label",null,app.translator.trans("v17development-flarum-blog.forum.article.title"),":"),m("input",{className:"FormControl",placeholder:app.translator.trans("v17development-flarum-blog.forum.article.title"),bidi:this.name})),50),t.add("submit",m("div",{className:"Form-group"},F().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},"Update")),-10),t},a.submitData=function(){return{title:this.name()}},a.onsubmit=function(t){var e=this;if(t.preventDefault(),this.loading=!0,this.attrs.onChange)return this.attrs.onChange(this.name()),void this.hide();this.article.save({title:this.name()}).then((function(){if(e.hide(),e.redirect){var t="/blog/"+e.article.slug();m.route.set(t,!0),window.history.replaceState(null,document.title,t)}}),(function(t){e.loading=!1,e.handleErrors(t)}))},o}(T()),V=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.init=function(){this.loadedPost=!1},a.manageArticleButtons=function(){var t=this,e=this.attrs.article,o=new(R()),a=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;e.canRename()&&o.add("rename",F().component({className:"Button",onclick:function(){return M().modal.show(Y,{article:e})},icon:"fas fa-pencil-alt"},M().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var r=e.firstPost();return o.add("edit",F().component({className:"Button",disabled:!r||!r.canEdit(),onclick:function(){M().composer.load(W(),{post:r}),M().composer.show()},icon:"fas fa-edit"},M().translator.trans("v17development-flarum-blog.forum.tools.edit_article")),90),o.add("articleSettings",F().component({className:"Button",onclick:function(){return M().modal.show(H,{article:e})},icon:"fas fa-cogs"},M().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),e.canTag()&&o.add("tag",F().component({className:"Button",onclick:function(){return M().modal.show(b(),{discussion:e})},icon:"fas fa-tag"},M().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),e.blogMeta()&&e.blogMeta().isPendingReview()&&(o.add("separator1",m("li",{className:"Dropdown-separator"}),65),o.add("approve",F().component({className:"Button",disabled:!M().forum.attribute("canApproveBlogPosts"),onclick:function(){e.blogMeta().save({isPendingReview:!1}).then((function(){M().alerts.show(N(),{type:"success"},M().translator.trans("v17development-flarum-blog.forum.review_article.approve_article_approved"))}),(function(e){t.loading=!1,t.handleErrors(e)}))},icon:"fas fa-thumbs-up"},M().translator.trans("v17development-flarum-blog.forum.review_article.approve_article")),60)),e.canChangeLanguage&&e.canChangeLanguage()&&a&&o.add("lang",F().component({icon:"fas fa-globe",onclick:function(){return M().modal.show(a,{discussion:e})}},M().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),o.add("separator2",m("li",{className:"Dropdown-separator"}),40),e.canLock()&&o.add("lock",F().component({className:"Button",onclick:w().lockAction.bind(e),icon:"fas "+(e.isLocked()?"fa-comments":"fa-comment-slash")},e.isLocked()?M().translator.trans("v17development-flarum-blog.forum.tools.enable_comments"):M().translator.trans("v17development-flarum-blog.forum.tools.disable_comments")),30),e.canHide()&&(e.isHidden()?(o.add("recover",F().component({className:"Button",onclick:w().restoreAction.bind(e),icon:"fas fa-eye"},M().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),e.canDelete()&&buttons.add("delete",F().component({className:"Button",onclick:function(){if(confirm(q()(M().translator.trans("core.forum.discussion_controls.delete_confirmation"))))return"blogArticle"===M().history.getCurrent().name&&(M().previous?M().history.back():m.route.set(M().route("blog"))),e.delete().then((function(){m.redraw()}))},icon:"far fa-trash-alt"},M().translator.trans("v17development-flarum-blog.forum.tools.delete_forever")),10)):o.add("hide",F().component({className:"Button",onclick:w().hideAction.bind(e),icon:"fas fa-eye-slash"},M().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),o},a.view=function(){var t=this,e=this.attrs.article.firstPost();return m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:"FlarumBlog-Article-Content-Edit-Dropdown"},_().component({icon:"fas fa-cog",label:"Manage",buttonClassName:"Button",menuClassName:"Dropdown-menu--right",onshow:function(){!e||e.canEdit()||t.loadedPost||(t.loadedPost=!0,m.redraw())}},this.manageArticleButtons().toArray())))},o}(f());const J=flarum.core.compat["common/helpers/listItems"];var K=o.n(J);const Q=flarum.core.compat["common/helpers/avatar"];var X=o.n(Q);const Z=flarum.core.compat["common/components/Link"];var tt=o.n(Z),et=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){var t=this.attrs.loading?null:this.attrs.article?this.attrs.article.user():this.attrs.user;return m("div",{className:"FlarumBlog-Article-Author"},m("div",{className:"FlarumBlog-Article-Author-background "+(this.attrs.loading?"FlarumBlog-Author-Ghost":""),style:{backgroundColor:t&&t.color()?t.color():null}}),m("div",{className:"FlarumBlog-Article-Author-Avatar"},t?m(tt(),{href:app.route("user",{username:t.username()})},X()(t)):m("span",{className:"Avatar FlarumBlog-Author-Ghost"})),t&&m("div",{className:"FlarumBlog-Article-Author-Info"},m(tt(),{href:app.route("user",{username:t.username()}),className:"FlarumBlog-Article-Author-Name"},t.displayName()),m("p",{className:"FlarumBlog-Article-Author-Bio"},t.bio&&t.bio()),m("ul",{className:"FlarumBlog-Article-Author-Extended"},K()(this.items().toArray()))),this.attrs.loading&&m("div",null,m("span",{className:"FlarumBlog-Article-Author-Name FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," ")))},a.items=function(){return new(R())},o}(f()),ot=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.blogCategories=app.forum.attribute("blogTags")},a.view=function(){var t=this;return m("div",{className:"BlogCategories BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.categories")),this.blogCategories&&this.blogCategories.map((function(e){var o=app.store.getById("tags",e);if(!o)return null;var a=[],r=1===t.blogCategories.length||o.slug()===m.route.param("slug");return app.store.all("tags").forEach((function(e){e.isChild()&&e.parent()===o&&(e.slug()===m.route.param("slug")&&(r=!0),a.push(t.categoryItem(e)))})),r?[t.categoryItem(o)].concat(a):t.categoryItem(o)})))},a.categoryItem=function(t){return m(tt(),{href:app.route("blogCategory",{slug:t.slug()}),className:"BlogSideWidget-item BlogSideWidget-item-"+t.id()+" "+(t.isChild()&&1==app.forum.attribute("blogCategoryHierarchy")?"BlogSideWidget-item-child":"")},m("span",{className:""===t.icon()?"BlogSideWidget-item-colored":"",style:{backgroundColor:""===t.icon()?t.color():null}},m("i",{className:t.icon()})),t.name())},o}(f());const at=flarum.core.compat["forum/components/IndexPage"];var rt=o.n(at);const nt=flarum.core.compat["common/components/SelectDropdown"];var it=o.n(nt),st=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",{className:"BlogForumNav BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.forum_nav")),m("nav",{className:"IndexPage-nav sideNav"},m(it(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},a.navItems=function(){return rt().prototype.navItems()},o}(f()),lt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",{className:"FlarumBlog-Article-Sidebar"},m("ul",null,K()(this.items().toArray())))},a.items=function(){var t=new(R());return t.add("author",et.component(this.attrs),0),t.add("categories",ot.component(this.attrs),0),t.add("nav",st.component(this.attrs),0),t},o}(f()),ut=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m("span",null,m("i",{className:"fas fa-globe"})," ",e.name()),t}),this.attrs.extra||{})},a.view=function(){var t=this.attrs,e=t.language,o=t.uppercase,a=e.name()||"";return m("span",null,m("i",{className:"fas fa-globe"})," ",o?a.toUpperCase():a)},o}(f()),mt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m(ut,{language:e}),t}),this.attrs.extra||{})},a.view=function(){var t=this,e=this.attrs.selected;return _().component({buttonClassName:"Button",label:this.options[e]||this.options[this.attrs.default]},Object.keys(this.options).map((function(o){var a;a=app.forum.attribute("fof-discussion-language.composerLocaleDefault")?"any":app.translator.formatter.locale;var r=o===(e||a);return F().component({active:r,icon:!r||"fas fa-check",onclick:function(){return t.attrs.onclick(o)}},t.options[o])})))},o}(f());const ct=flarum.core.compat["common/components/Tooltip"];var dt=o.n(ct);const gt=flarum.core.compat["common/helpers/humanTime"];var pt=o.n(gt);const ht=flarum.core.compat["common/helpers/icon"];var ft=o.n(ht);const vt=flarum.core.compat["common/utils/classList"];var bt=o.n(vt),yt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.titleItems=function(){var t,e,o=this.attrs.article,a=new(R());return a.add("title",m("[",null,o.title()),100),(null!=(t=o.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||o.isHidden())&&a.add("hidden",ft()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(e=o.blogMeta())&&null!=e.isPendingReview&&e.isPendingReview()&&a.add("pendingReview",m(dt(),{text:M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},ft()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),a},a.dataItems=function(){var t,e=this.attrs.article,o=new(R());return o.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},ft()("far fa-clock")," ",pt()(e.createdAt())),100),o.add("author",m("span",{class:"BlogList-item-details-author"},ft()("far fa-user")," ",(null==(t=e.user())||null==t.displayName?void 0:t.displayName())||M().translator.trans("core.lib.username.deleted_text")),80),o.add("replies",m("span",{class:"BlogList-item-details-replies"},ft()("far fa-comment")," ",(e.commentCount()||1)-1),60),o},a.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(R());return o.add("title",m("h4",null,this.titleItems().toArray()),100),e&&o.add("summary",m("p",null,e),80),o.add("data",m("div",{class:"data"},this.dataItems().toArray()),60),o},a.getImage=function(){var t,e=this.attrs,o=e.article,a=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":a},a.view=function(t){var e,o=this.attrs,a=o.article,r=o.defaultImage,n=this.getImage(),i=null==(e=a.blogMeta())||null==e.isSized?void 0:e.isSized();return m(tt(),{href:M().route("blogArticle",{id:""+a.slug()}),className:bt()("BlogList-item",{"BlogList-item-sized":i,"BlogList-item-default":!i},a.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:bt()("BlogList-item-photo",{"FlarumBlog-default-image":n===r}),style:{backgroundImage:n}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(f()),wt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.topItems=function(){var t,e,o,a=this.attrs.article,r=new(R());return r.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=a.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),a.isSticky()&&r.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},ft()("fas fa-thumbtack")),80),(null!=(e=a.blogMeta())&&null!=e.isPendingReview&&e.isPendingReview()||a.isHidden())&&r.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},ft()("fas fa-eye-slash")),60),null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&r.add("pendingReview",m(dt(),{text:M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},ft()("far fa-clock")," ",M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),r},a.dataItems=function(){var t,e=this.attrs.article,o=new(R());return o.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},ft()("far fa-clock")," ",pt()(e.createdAt())),100),o.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},ft()("far fa-user")," ",(null==(t=e.user())?void 0:t.displayName())||M().translator.trans("core.lib.username.deleted_text")),80),o.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},ft()("far fa-comment")," ",e.commentCount()-1),60),o},a.view=function(t){var e,o=this.attrs,a=o.article,r=o.defaultImage,n=null!=(e=a.blogMeta())&&null!=e.featuredImage&&e.featuredImage()?"url("+a.blogMeta().featuredImage()+")":r;return m(tt(),{href:M().route("blogArticle",{id:""+a.slug()}),className:bt()("BlogFeatured-list-item",a.tags().map((function(t){return"BlogFeatured-list-item-category-"+t.id()})),"FlarumBlog-default-image"),style:{backgroundImage:n}},m("div",{class:"BlogFeatured-list-item-top"},this.topItems().toArray()),m("div",{className:"BlogFeatured-list-item-details"},m("h4",null,a.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(f()),Bt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),this.bodyClass="BlogOverviewPage",this.isLoading=!0,this.featuredPosts=[],this.posts=[],this.hasMore=null,this.isLoadingMore=!1,this.languages=M().store.all("discussion-languages"),this.currentSelectedLanguage=m.route.param("lang")?m.route.param("lang"):M().translator.formatter.locale,M().history.push("blog"),this.loadBlogOverview(),this.featuredCount=parseInt(M().forum.attribute("blogFeaturedCount")),this.showCategories=!0,this.showForumNav=!0},a.loadBlogOverview=function(){var t=M().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},a.reloadData=function(){var t="is:blog"+(m.route.param("slug")?" tag:"+m.route.param("slug"):"");null!==this.languages&&this.languages.length>=1&&(t+=" language:"+this.currentSelectedLanguage),M().store.find("discussions",{filter:{q:t},sort:"-createdAt"}).then(this.show.bind(this)).catch((function(){m.redraw()}))},a.show=function(t){if(0===t.length)return this.isLoading=!1,void m.redraw();this.hasMore=t.payload.links&&t.payload.links.next?t.payload.links.next:null,this.featuredPosts=t.slice(0,this.featuredCount),this.posts=t.length>this.featuredCount?t.slice(this.featuredCount,t.length):[],this.isLoading=!1,m.redraw()},a.loadMore=function(){var t=this;this.isLoadingMore=!0,M().store.find(this.hasMore.replace(M().forum.attribute("apiUrl"),"")).then((function(e){e.map((function(e){return t.posts.push(e)})),t.hasMore=e.payload.links&&e.payload.links.next?e.payload.links.next:null})).catch((function(){})).then((function(){t.isLoadingMore=!1,m.redraw()}))},a.title=function(){if(!m.route.param("slug"))return m("h2",null,M().translator.trans("v17development-flarum-blog.forum.recent_posts"));var t=M().store.all("tags").filter((function(t){return t.slug()===m.route.param("slug")}));return m("h2",null,t&&t[0]&&t[0].name(),m("small",null," ","-"," ",m(tt(),{href:M().route("blog")},M().translator.trans("v17development-flarum-blog.forum.return_to_overview"))))},a.view=function(){var t=this,e=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null;return[1==M().forum.attribute("blogAddHero")&&s().prototype.hero(),m("div",{className:"FlarumBlogOverview"},m("div",{className:"container"},m("div",{className:"BlogFeatured"},m("div",{className:"BlogOverviewButtons"},M().forum.attribute("canWriteBlogPosts")&&m(F(),{className:"Button",onclick:function(){return t.newArticle()},icon:"fas fa-pencil-alt"},M().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(mt,{selected:this.currentSelectedLanguage,onclick:function(e){t.currentSelectedLanguage=e,m.route.set(document.location.pathname,{lang:e}),t.reloadData()}})),this.title(),m("div",{style:{clear:"both"}}),m("div",{class:"BlogFeatured-list"},this.isLoading&&[].concat(new Array(this.featuredCount).fill(void 0)).map((function(){return m("div",{class:"BlogFeatured-list-item BlogFeatured-list-item-ghost"},m("div",{class:"BlogFeatured-list-item-details"},m("h4",null," "),m("div",{class:"data"},m("span",null,m("i",{class:"far fa-wave"})))))})),!this.isLoading&&this.featuredPosts.length>=0&&this.featuredPosts.map((function(t){return m(wt,{article:t,defaultImage:e})})))),m("div",{className:"BlogScrubber"},m("div",{className:"BlogList"},this.isLoading&&[!1,!1,!0,!1].map((function(t){return m("div",{className:"BlogList-item BlogList-item-"+(!0===t?"sized":"default")+" BlogList-item-ghost"},m("div",{className:"BlogList-item-photo FlarumBlog-default-image"}),m("div",{className:"BlogList-item-content"},m("h4",null," "),m("p",null," "),m("div",{className:"data"},m("span",null,m("i",{className:"far fa-wave"})))))})),!this.isLoading&&this.posts.length>=1&&this.posts.map((function(t){return m(yt,{article:t,defaultImage:e})})),!this.isLoading&&this.featuredPosts.length>0&&null===this.hasMore&&m("p",{className:"FlarumBlog-reached-end"},M().translator.trans("v17development-flarum-blog.forum.no_more_posts")),!this.isLoading&&0===this.featuredPosts.length&&0===this.posts.length&&m("p",{className:"FlarumBlog-reached-end"},M().translator.trans("v17development-flarum-blog.forum.category_empty")),!this.isLoading&&null!==this.hasMore&&m("div",{className:"FlarumBlog-reached-load-more"},m(F(),{className:"Button",onclick:function(){return t.loadMore()},icon:"fas fa-chevron-down",loading:this.isLoadingMore},M().translator.trans("core.forum.discussion_list.load_more_button")))),m("div",{className:"Sidebar"},this.showCategories&&m(ot,null),this.showForumNav&&m(st,null)))))]},a.newArticle=function(){var t=[],e=M().store.getBy("tags","slug",m.route.param("slug"));e&&t.push(e),m.route.set(M().route("blogComposer",{tags:t.map((function(t){return t.id()})).join(),lang:this.languages.length>0?this.currentSelectedLanguage:void 0}))},o}(n());const Nt=flarum.core.compat["common/helpers/fullTime"];var At=o.n(Nt),Ft=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){var t=this.attrs.discussion.subscription(),e=app.session.user.preferences().notify_newPost_email,o=q()(app.translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),a=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),r="far fa-star";return"follow"===t&&(a=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),r="fas fa-star"),m(dt(),{text:o,position:"bottom"},m(F(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:r,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},a))},a.saveSubscription=function(t,e){t.save({subscription:e})},o}(f()),It=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),M().history.push("blogArticle"),this.bodyClass="BlogItemPage",this.near=m.route.param("near")||0,this.loading=!0,this.found=!1,this.article=null,this.loadBlogItem()},a.loadBlogItem=function(){var t=M().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):M().store.find("discussions",m.route.param("id").split("-")[0]).then(this.show.bind(this)).catch((function(){m.redraw()})),m.redraw()},a.show=function(t){var e=this;this.article=t,M().setTitle(t.title()+" - "+M().translator.trans("v17development-flarum-blog.forum.blog")),this.loading=!1;var o=[];if(t.payload&&t.payload.included){var a=t.id();o=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===a})).map((function(t){return M().store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new(p())(t,o),this.near&&this.stream.goToNumber(this.near||0,!0).then((function(){M().current.set("discussion",t),M().current.set("stream",e.stream)})),t.lastReadPostNumber()||t.save({lastReadPostNumber:1}),m.redraw()},a.postItems=function(){var t,e,o,a=null;!this.loading&&this.article&&(a=null==(o=this.article)||null==o.firstPost?void 0:o.firstPost());var r,n,i,s=new(R());return s.add("title",m("h3",{className:bt()("FlarumBlog-Article-Title",{"FlarumBlog-Article-GhostTitle":this.loading})},(null==this||null==(t=this.article)||null==t.title?void 0:t.title())||"Ghost title",(null==(e=this.article)||null==e.isHidden?void 0:e.isHidden())&&"("+M().translator.trans("v17development-flarum-blog.forum.hidden")+")"),100),s.add("publishDate",m("div",{className:bt()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?At()(this.article.createdAt()):m("span",null," ")),80),this.loading&&s.add("skeleton",[0,1,2].map((function(){return m("div",null,m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",null," "))})),60),this.loading||(null!=(r=(n=this.article).blogMeta)&&null!=(i=r.call(n))&&null!=i.isPendingReview&&i.isPendingReview()&&s.add("review",m("div",{className:"Post-body"},m("blockquote",{class:"uncited",style:{fontSize:"16px"}},m("div",null,ft()("far fa-clock",{style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),a&&s.add("post",m(u(),{post:a}),40)),s},a.contentItems=function(){var t,e,o,a,r,n,i,s,l,u,c=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null,d=null!=(t=this.article)&&null!=(e=t.blogMeta())&&null!=e.featuredImage&&e.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":c,g=new(R());return g.add("image",m("div",{className:bt()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:d,opacity:null!=(o=this.article)&&null!=o.isHidden&&o.isHidden()?.4:null}}),100),this.article&&(null!=(a=M().session.user)&&null!=a.canEdit&&a.canEdit()||null!=(r=this.article)&&null!=r.canRename&&r.canRename()||null!=(n=this.article)&&null!=n.posts&&null!=(i=n.posts())&&null!=(s=i[0])&&null!=s.canEdit&&s.canEdit())&&g.add("editArticle",m(V,{article:this.article}),80),g.add("categories",m("div",{className:"FlarumBlog-Article-Categories"},!this.loading&&(null==(l=this.article)||null==l.tags||null==(u=l.tags())?void 0:u.map((function(t){return m(tt(),{href:M().route("blogCategory",{slug:t.slug()})},t.name())}))),this.loading&&[0,1].map((function(){return m("span",{className:"FlarumBlog-Article-GhostCategory"},"Category")}))),60),g.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),g},a.articleItems=function(){var t,e,o,a=new(R());return a.add("content",m("div",{className:"FlarumBlog-Article-Content"},this.contentItems().toArray()),100),null!=this&&null!=(t=this.article)&&null!=t.isLocked&&t.isLocked()&&1===(null==this||null==(e=this.article)||null==e.commentCount?void 0:e.commentCount())||a.add("comments",m("div",{className:"FlarumBlog-Article-Comments"},!this.loading&&M().session.user&&this.article.subscription&&(!this.article.isLocked||this.article.isLocked&&!this.article.isLocked())&&m(Ft,{discussion:this.article}),m("h4",null,M().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," ","(",this.article?this.article.commentCount()-1:0,")"),!this.loading&&(null==(o=this.article)||null==o.isLocked?void 0:o.isLocked())&&m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"far fa-lock",style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.comment_section.locked")))),!this.loading&&this.article&&d().component({discussion:this.article,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),75),a},a.view=function(){return[1==M().forum.attribute("blogAddHero")&&s().prototype.hero(),m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},m("div",{className:"FlarumBlog-ToolButtons"},m(tt(),{href:M().route("blog"),className:"Button",onclick:function(t){M().previous.matches(Bt)&&(t.preventDefault(),history.back())}},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},M().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),m("div",{className:"FlarumBlog-Article"},m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),m(lt,{article:this.article,loading:this.loading}))))]},a.positionChanged=function(t,e){var o=this.article;M().session.user&&e>(o.lastReadPostNumber()||0)&&(o.save({lastReadPostNumber:e}),m.redraw())},o}(n());const _t=flarum.core.compat["common/Model"];var Lt=o.n(_t);const kt=flarum.core.compat["tags/models/Tag"];var Ct=o.n(kt);const xt=flarum.core.compat["common/models/Discussion"];var Pt=o.n(xt);const Mt=flarum.core.compat["forum/components/DiscussionPage"];var St=o.n(Mt);const Tt=flarum.core.compat["common/extend"],Et=flarum.core.compat["common/utils/mixin"];var Rt=function(t){function o(){return t.apply(this,arguments)||this}return e(o,t),o}(o.n(Et)()(Lt(),{discussion:Lt().hasOne("discussion"),featuredImage:Lt().attribute("featuredImage"),summary:Lt().attribute("summary"),isFeatured:Lt().attribute("isFeatured"),isSized:Lt().attribute("isSized"),isPendingReview:Lt().attribute("isPendingReview")}));const Dt=flarum.core.compat["tags/components/TagsPage"];var Ot=o.n(Dt);function jt(){(0,Tt.extend)(Ot().prototype,"view",(function(t){var e=this;if(this.loading)return t;if(!1===app.forum.attribute("blogHideTags"))return t;var o=app.forum.attribute("blogTags")||[],a=t.children[1].children[1].children[0].children;return t.children[1].children[1].children[0].children=a.map((function(t,a){return o.indexOf(e.tags[a].id())>=0?null:t})),t})),(0,Tt.extend)(rt().prototype,"navItems",(function(t){return!1===app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function Gt(){var t=app.route.discussion;app.route.discussion=function(e,o){var a=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var r=app.forum.attribute("blogTags");e.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0&&(a=!0)}return a?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const Ht=flarum.core.compat["forum/components/ComposerBody"];var zt=o.n(Ht);const Wt=flarum.core.compat["common/components/TextEditor"];var Ut=o.n(Wt),$t=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",null)},a.oncreate=function(e){t.prototype.oncreate.call(this,e),s9e.TextFormatter.preview(e.attrs.content||"",e.dom)},o}(f()),qt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},a.view=function(){var t=this,e=this.composer.fields.content()&&""!==this.composer.fields.content(),o=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(o?"Flarum-Blog-Composer-Loading":"")},m("div",{className:"Flarum-Blog-Composer-tabs"},m(F(),{className:!this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!1}},M().translator.trans("v17development-flarum-blog.forum.composer.write")),m(F(),{className:this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!0}},M().translator.trans("v17development-flarum-blog.forum.composer.view"))),m("div",{className:"Composer Flarum-Blog-Composer-body "+(this.previewContent?"Flarum-Blog-Composer-HideEditor":"")},this.previewContent&&m("div",{className:"Flarum-Blog-Composer-preview"},!e&&M().translator.trans("v17development-flarum-blog.forum.composer.nothing_to_preview"),m($t,{content:this.composer.fields.content()})),Ut().component({submitLabel:this.attrs.submitLabel||M().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:o,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()})))},a.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(zt()),Yt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){var o=this;if(t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),M().forum.attribute("canWriteBlogPosts")){if(M().history.push("blogComposer"),this.languages=M().store.all("discussion-languages")||[],this.bodyClass="BlogItemPage BlogItemPage--composer",this.articleLanguage=m.route.param("lang")?m.route.param("lang"):M().translator.locale,this.article=M().store.createRecord("discussions"),this.blogMeta=null,this.tags=[],m.route.param().tags){var a=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&a.forEach((function(t){var e=M().store.getById("tags",t);e&&o.tags.push(e)}))}this.isSaving=!1}else m.route.set(M().route("blog"))},a.openTagsModal=function(t){var e=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||M().modal.show(b(),{selectedTags:this.tags,onsubmit:function(t){e.tags=t}})},a.openNameArticleModal=function(t){var e=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||M().modal.show(Y,{article:this.article,onChange:function(t){e.article.pushData({attributes:{title:t}})}})},a.openBlogSettings=function(t){var e=this;t.preventDefault(),this.isSaving||M().modal.show(H,{meta:this.blogMeta,onsubmit:function(t){return e.blogMeta=t}})},a.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},a.pageItems=function(){var t=new(R());return t.add("toolButtons",m("div",{className:"FlarumBlog-ToolButtons"},m(tt(),{href:M().route("blog"),className:"Button",loading:this.isSaving,icon:"fas fa-angle-left"},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},M().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),100),t.add("article",m("div",{className:"FlarumBlog-Article"},this.articleWrapperItems().toArray()),90),t},a.articleWrapperItems=function(){var t=new(R());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(et,{user:M().session.user})),90),t},a.articleItems=function(){var t=this,e=new(R()),o=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null,a=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":o;return e.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:a,cursor:"pointer"},onclick:function(e){return t.openBlogSettings(e)}}),m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:0===this.languages.length?"FlarumBlog-Article-Content-Edit-Dropdown":"FlarumBlog-Article-Content-EditButtons"},null!==this.languages&&this.languages.length>=1&&m(mt,{selected:this.articleLanguage,onclick:function(e){return t.articleLanguage=e}}),m(F(),{className:"Button",onclick:function(e){return t.openBlogSettings(e)},icon:"fas fa-pencil-alt",loading:this.isSaving},M().translator.trans("v17development-flarum-blog.forum.composer.update_settings")))),m("div",{className:"FlarumBlog-Article-Categories"},this.tags.map((function(e){return m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},e.name())})),m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},0===this.tags.length?M().translator.trans("v17development-flarum-blog.forum.composer.select_category"):M().translator.trans("v17development-flarum-blog.forum.composer.edit_categories")," ",m("i",{className:"fas fa-edit"}))),m("div",{className:"FlarumBlog-Article-Post"},m("h3",{onclick:function(){return t.openNameArticleModal()},className:"FlarumBlog-Article-Title",style:{cursor:"pointer"}},this.article&&this.article.title()&&""!==this.article.title()?this.article.title():M().translator.trans("v17development-flarum-blog.forum.composer.no_title"),m("button",{class:"Button Button--text",onclick:function(t){return t.preventDefault()}},m("i",{className:"fas fa-edit"}))),m("div",{className:"Post-body"},m(qt,{composer:M().composer,originalContent:"",submitLabel:M().translator.trans("v17development-flarum-blog.forum.composer.post_article"),placeholder:M().translator.trans("v17development-flarum-blog.forum.composer.enter_message_here"),onsubmit:function(){return t.create()},disabled:this.isSaving})))),100),e.add("commentsPlaceholder",m("div",{className:"FlarumBlog-Article-Comments"},m("h4",null,M().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," ","(0)"),m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"fas fa-ban",style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.composer.comment_section"))))),90),e},a.create=function(){var t=this,e=M().forum.attribute("blogTags")||[];if(0!==this.tags.length)if(this.article.title()&&""!==this.article.title())if(0!==this.tags.filter((function(t){return e.indexOf(t.id())>=0})).length){if(null!==this.blogMeta&&(this.blogMeta.featuredImage()||M().forum.attribute("blogDefaultImage"))&&this.blogMeta.summary()||confirm(M().translator.trans("v17development-flarum-blog.forum.composer.post_without_blog_info"))){var o={tags:this.tags};this.languages.length>0&&(o.language=M().store.getBy("discussion-languages","code",this.articleLanguage));var a={title:this.article.title(),content:M().composer.fields.content(),relationships:o,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(a).then((function(t){setTimeout((function(){m.route.set(M().route("blogArticle",{id:""+t.slug()}))}),500)})).catch((function(){t.isSaving=!1,m.redraw()}))}}else alert(M().translator.trans("v17development-flarum-blog.forum.composer.no_blog_tags_selected"));else this.openNameArticleModal();else this.openTagsModal()},o}(n());const Vt=flarum.core,Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,Tt.extend)(rt().prototype,"navItems",(function(t){return app.forum.attribute("blogAddSidebarNav")&&"0"!==app.forum.attribute("blogAddSidebarNav")&&t.add("blog",m(Kt(),{icon:"fas fa-comment",href:app.route("blog")},app.translator.trans("v17development-flarum-blog.forum.blog")),15),t}))}var Xt=function(){function t(){this.modal=null,this.modalList=[],this.key=0,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e,o){if(void 0===e&&(e={}),void 0===o&&(o=!1),!(t.prototype instanceof T())){var a="The ModalManager can only show Modals.";throw console.error(a),new Error(a)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e,key:this.key++},o?this.modalList.push(this.modal):this.modalList=[this.modal],m.redraw.sync()},e.close=function(){var t=this;if(this.modal){var e;if(this.modalList.length>=2)return $(".modal[modal-key="+(null==(e=this.modal)?void 0:e.key)+"]").one("hide.bs.modal",(function(){var e=t.modalList.indexOf(t.modal);t.modalList.splice(e,1),t.modal=t.modalList[t.modalList.length-1],setTimeout((function(){$(document.body).addClass("modal-open")}),1e3),m.redraw()})).modal("hide"),void m.redraw();this.closeTimeout=setTimeout((function(){var e;$(".modal[modal-key="+(null==(e=t.modal)?void 0:e.key)+"]").modal("hide").one("hide.bs.modal",(function(){t.modal=null,m.redraw()}))}))}},e.isModalOpen=function(){return!!this.modal},t}();const Zt=flarum.core.compat["forum/components/ModalManager"];var te=o.n(Zt);M().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:Bt},t.routes.blogCategory={path:"/blog/category/:slug",component:Bt},t.routes.blogComposer={path:"/blog/compose",component:Yt},t.routes.blogArticle={path:"/blog/:id",component:It},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:It},t.store.models.blogMeta=Rt,Pt().prototype.blogMeta=Lt().hasOne("blogMeta"),Ct().prototype.isBlog=Lt().attribute("isBlog"),(0,Tt.extend)(rt().prototype,"oncreate",(function(){var t=this.currentTag(),e="both"===M().forum.attribute("blogRedirectsEnabled")||"tags_only"===M().forum.attribute("blogRedirectsEnabled");if(t&&e){var o=M().forum.attribute("blogTags");(o.indexOf(t.id())>=0||t.parent()&&o.indexOf(t.parent().id())>=0)&&m.route.set(M().route("blog"))}})),(0,Tt.override)(St().prototype,"show",(function(t,e){if(("both"===M().forum.attribute("blogRedirectsEnabled")||"discussions_only"===M().forum.attribute("blogRedirectsEnabled"))&&e&&e&&e.tags().length>0){var o=M().forum.attribute("blogTags");if(e.tags().filter((function(t){return o.indexOf(t.id())>=0||t.parent()&&o.indexOf(t.parent().id())>=0})).length>0){var a=M().route("blogArticle",{id:e.slug()});return m.route.set(a,null,{replace:!0}),null}}return t(e)})),jt(),Gt(),Qt(),(0,Tt.override)(te().prototype,"view",(function(){var t=this;return this.attrs.state.modalList.map((function(e){var o=null==e?void 0:e.componentClass;return m("div",{className:"ModalManager modal fade","modal-key":e.key},!!o&&m(o,Object.assign({key:null==e?void 0:e.key},e.attrs,{animateShow:t.animateShow.bind(t),animateHide:t.animateHide.bind(t),state:t.attrs.state})))}))})),(0,Tt.override)(te().prototype,"animateHide",(function(){1===this.attrs.state.modalList.length&&(this.modalShown=!1)})),(0,Tt.override)(te().prototype,"animateShow",(function(t){var e=this;if(void 0===t&&(t=function(){}),this.attrs.state.modal){var o=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,$(".modal[modal-key="+this.attrs.state.modal.key+"]").hasClass("in")?t():setTimeout((function(){$(".modal[modal-key="+e.attrs.state.modal.key+"]").one("shown.bs.modal",t).modal({backdrop:o||"static",keyboard:o,show:!0})}),1)}})),t.modal=new Xt}),-1e5),Object.assign(Vt.compat,{"v17development/blog/components/BlogItemSidebar":lt,"v17development/blog/components/BlogAuthor":et,"v17development/blog/components/ForumNav":st,"v17development/blog/components/BlogPostController":V,"v17development/blog/components/BlogOverviewItem":yt,"v17development/blog/components/FeaturedBlogItem":wt,"v17development/blog/pages/BlogItem":It,"v17development/blog/pages/BlogOverview":Bt})})(),module.exports=a})(); +(()=>{var t={195:(t,e,o)=>{t.exports=o(236)},236:t=>{var e=function(t){"use strict";var e,o=Object.prototype,a=o.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,o){return t[e]=o}}function u(t,e,o,a){var r=e&&e.prototype instanceof f?e:f,n=Object.create(r.prototype),i=new k(a||[]);return n._invoke=function(t,e,o){var a=c;return function(r,n){if(a===g)throw new Error("Generator is already running");if(a===p){if("throw"===r)throw n;return x()}for(o.method=r,o.arg=n;;){var i=o.delegate;if(i){var s=I(i,o);if(s){if(s===h)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===c)throw a=p,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=g;var l=m(t,e,o);if("normal"===l.type){if(a=o.done?p:d,l.arg===h)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(a=p,o.method="throw",o.arg=l.arg)}}}(t,o,i),n}function m(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",d="suspendedYield",g="executing",p="completed",h={};function f(){}function v(){}function b(){}var y={};y[n]=function(){return this};var w=Object.getPrototypeOf,B=w&&w(w(C([])));B&&B!==o&&a.call(B,n)&&(y=B);var N=b.prototype=f.prototype=Object.create(y);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function o(r,n,i,s){var l=m(t[r],t,n);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&a.call(c,"__await")?e.resolve(c.__await).then((function(t){o("next",t,i,s)}),(function(t){o("throw",t,i,s)})):e.resolve(c).then((function(t){u.value=t,i(u)}),(function(t){return o("throw",t,i,s)}))}s(l.arg)}var r;this._invoke=function(t,a){function n(){return new e((function(e,r){o(t,a,e,r)}))}return r=r?r.then(n,n):n()}}function I(t,o){var a=t.iterator[o.method];if(a===e){if(o.delegate=null,"throw"===o.method){if(t.iterator.return&&(o.method="return",o.arg=e,I(t,o),"throw"===o.method))return h;o.method="throw",o.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=m(a,t.iterator,o.arg);if("throw"===r.type)return o.method="throw",o.arg=r.arg,o.delegate=null,h;var n=r.arg;return n?n.done?(o[t.resultName]=n.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=e),o.delegate=null,h):n:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t){var o=t[n];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function o(){for(;++r=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),L(o),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var a=o.completion;if("throw"===a.type){var r=a.arg;L(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,o,a){return this.delegate={iterator:C(t),resultName:o,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},482:t=>{"use strict";t.exports=flarum.extensions["fof-upload"]}},e={};function o(a){var r=e[a];if(void 0!==r)return r.exports;var n=e[a]={exports:{}};return t[a](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};(()=>{"use strict";function t(e,o){return t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t(e,o)}function e(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,t(e,o)}o.r(a);const r=flarum.core.compat["common/components/Page"];var n=o.n(r);const i=flarum.core.compat["components/IndexPage"];var s=o.n(i);const l=flarum.core.compat["forum/components/CommentPost"];var u=o.n(l);const c=flarum.core.compat["forum/components/PostStream"];var d=o.n(c);const g=flarum.core.compat["forum/states/PostStreamState"];var p=o.n(g);const h=flarum.core.compat["common/Component"];var f=o.n(h);const v=flarum.core.compat["tags/components/TagDiscussionModal"];var b=o.n(v);const y=flarum.core.compat["forum/utils/DiscussionControls"];var w=o.n(y);const B=flarum.core.compat["common/components/Alert"];var N=o.n(B);const A=flarum.core.compat["common/components/Button"];var F=o.n(A);const I=flarum.core.compat["common/components/Dropdown"];var _=o.n(I);function L(t,e,o,a,r,n,i){try{var s=t[n](i),l=s.value}catch(t){return void o(t)}s.done?e(l):Promise.resolve(l).then(a,r)}function k(t){return function(){var e=this,o=arguments;return new Promise((function(a,r){var n=t.apply(e,o);function i(t){L(n,a,r,i,s,"next",t)}function s(t){L(n,a,r,i,s,"throw",t)}i(void 0)}))}}var C=o(195),x=o.n(C);const P=flarum.core.compat["forum/app"];var M=o.n(P);const S=flarum.core.compat["common/components/Modal"];var T=o.n(S);const E=flarum.core.compat["common/utils/ItemList"];var R=o.n(E);const D=flarum.core.compat["common/utils/Stream"];var O=o.n(D);const j=flarum.core.compat["common/components/Switch"];var G=o.n(j),H=function(t){function a(){return t.apply(this,arguments)||this}e(a,t);var r=a.prototype;return r.oninit=function(e){t.prototype.oninit.call(this,e),this.attrs.article?this.meta=this.attrs.article&&this.attrs.article.blogMeta()?this.attrs.article.blogMeta():M().store.createRecord("blogMeta"):this.meta=this.attrs.meta?this.attrs.meta:M().store.createRecord("blogMeta"),this.isNew=!this.meta.exists,this.summary=O()(this.meta.summary()||""),this.featuredImage=O()(this.meta.featuredImage()||""),this.isFeatured=O()(this.meta.isFeatured()||!1),this.isSized=O()(this.meta.isSized()||!1),this.isPendingReview=O()(this.meta.isPendingReview()||!1)},r.className=function(){return"Modal--small Support-Modal"},r.title=function(){return"Blog post settings"},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},r.fields=function(){var t=this,e=new(R());e.add("summary",m("div",{className:"Form-group"},m("label",null,"Article summary:"),m("textarea",{className:"FormControl",style:{maxWidth:"100%",minWidth:"100%",width:"100%",minHeight:"120px"},bidi:this.summary,placeholder:"Please enter a summary"}),m("small",null,"This summary will be visible on the blog overview page and will be used for SEO purposes.")),30);var a=null;if("fof-upload"in flarum.extensions&&M().forum.attribute("fof-upload.canUpload")){var r=o(482).components,n=r.Uploader,i=r.FileManagerModal,s=new n;a=m(F(),{class:"Button Button--icon",onclick:k(x().mark((function e(){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M().modal.show(i,{uploader:s,onSelect:function(e){var o=M().store.getById("files",e[0]);t.featuredImage(o.url())}},!0);case 1:case"end":return e.stop()}}),e)}))),icon:"fas fa-cloud-upload-alt"})}return e.add("image",m("div",{className:"Form-group V17Blog-ArticleImage"},m("label",null,"Article image URL:"),m("div",{"data-upload-enabled":!!a},m("input",{type:"text",className:"FormControl",bidi:this.featuredImage,placeholder:"https://"}),a),m("small",null,"Best image resolution for social media: 1200x630"),""!==this.featuredImage()&&m("img",{src:this.featuredImage(),alt:"Article image",title:"Blog post image",style:{width:"100%",marginTop:"15px"}})),30),e.add("sized",m("div",{className:"Form-group"},G().component({state:1==this.isSized(),onchange:function(e){t.isSized(e)}},[m("b",null,"Highlighted post"),m("div",{className:"helpText",style:{fontWeight:500}},"Give this post a big image on the blog overview page.")])),-10),e.add("submit",m("div",{className:"Form-group"},F().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},"Update")),-10),e},r.submitData=function(){return{summary:this.summary(),featuredImage:this.featuredImage(),isFeatured:this.isFeatured(),isSized:this.isSized(),isPendingReview:this.isPendingReview(),relationships:this.isNew&&!this.attrs.isComposer?{discussion:this.attrs.article}:null}},r.onsubmit=function(t){var e=this;if(t.preventDefault(),this.attrs.onsubmit)return this.meta.pushData({attributes:this.submitData()}),this.attrs.onsubmit(this.meta),void this.hide();this.loading=!0,this.meta.save(this.submitData()).then((function(){e.attrs.article&&e.attrs.article.pushData({relationships:{blogMeta:e.meta}}),e.hide(),m.redraw()}),(function(t){e.loading=!1,e.handleErrors(t)}))},a}(T());const z=flarum.core.compat["forum/components/EditPostComposer"];var W=o.n(z);const U=flarum.core.compat["common/utils/extractText"];var q=o.n(U),Y=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.article=this.attrs.article,this.name=O()(this.article.title()||""),this.redirect=this.attrs.redirect},a.className=function(){return"Modal--small Support-Modal"},a.title=function(){return app.translator.trans("v17development-flarum-blog.forum.tools.rename_article")},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},a.fields=function(){var t=new(R());return t.add("name",m("div",{className:"Form-group"},m("label",null,app.translator.trans("v17development-flarum-blog.forum.article.title"),":"),m("input",{className:"FormControl",placeholder:app.translator.trans("v17development-flarum-blog.forum.article.title"),bidi:this.name})),50),t.add("submit",m("div",{className:"Form-group"},F().component({type:"submit",className:"Button Button--primary SupportModal-save",loading:this.loading},"Update")),-10),t},a.submitData=function(){return{title:this.name()}},a.onsubmit=function(t){var e=this;if(t.preventDefault(),this.loading=!0,this.attrs.onChange)return this.attrs.onChange(this.name()),void this.hide();this.article.save({title:this.name()}).then((function(){if(e.hide(),e.redirect){var t="/blog/"+e.article.slug();m.route.set(t,!0),window.history.replaceState(null,document.title,t)}}),(function(t){e.loading=!1,e.handleErrors(t)}))},o}(T()),V=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.init=function(){this.loadedPost=!1},a.manageArticleButtons=function(){var t=this,e=this.attrs.article,o=new(R()),a=flarum.extensions["fof-discussion-language"]&&void 0!==flarum.extensions["fof-discussion-language"].components?flarum.extensions["fof-discussion-language"].components.LanguageDiscussionModal:null;e.canRename()&&o.add("rename",F().component({className:"Button",onclick:function(){return M().modal.show(Y,{article:e})},icon:"fas fa-pencil-alt"},M().translator.trans("v17development-flarum-blog.forum.tools.rename_article")),100);var r=e.firstPost();return o.add("edit",F().component({className:"Button",disabled:!r||!r.canEdit(),onclick:function(){M().composer.load(W(),{post:r}),M().composer.show()},icon:"fas fa-edit"},M().translator.trans("v17development-flarum-blog.forum.tools.edit_article")),90),o.add("articleSettings",F().component({className:"Button",onclick:function(){return M().modal.show(H,{article:e})},icon:"fas fa-cogs"},M().translator.trans("v17development-flarum-blog.forum.tools.article_settings")),80),e.canTag()&&o.add("tag",F().component({className:"Button",onclick:function(){return M().modal.show(b(),{discussion:e})},icon:"fas fa-tag"},M().translator.trans("v17development-flarum-blog.forum.tools.update_category")),70),e.blogMeta()&&e.blogMeta().isPendingReview()&&(o.add("separator1",m("li",{className:"Dropdown-separator"}),65),o.add("approve",F().component({className:"Button",disabled:!M().forum.attribute("canApproveBlogPosts"),onclick:function(){e.blogMeta().save({isPendingReview:!1}).then((function(){M().alerts.show(N(),{type:"success"},M().translator.trans("v17development-flarum-blog.forum.review_article.approve_article_approved"))}),(function(e){t.loading=!1,t.handleErrors(e)}))},icon:"fas fa-thumbs-up"},M().translator.trans("v17development-flarum-blog.forum.review_article.approve_article")),60)),e.canChangeLanguage&&e.canChangeLanguage()&&a&&o.add("lang",F().component({icon:"fas fa-globe",onclick:function(){return M().modal.show(a,{discussion:e})}},M().translator.trans("fof-discussion-language.forum.discussion_controls.change_language_button")),50),o.add("separator2",m("li",{className:"Dropdown-separator"}),40),e.canLock()&&o.add("lock",F().component({className:"Button",onclick:w().lockAction.bind(e),icon:"fas "+(e.isLocked()?"fa-comments":"fa-comment-slash")},e.isLocked()?M().translator.trans("v17development-flarum-blog.forum.tools.enable_comments"):M().translator.trans("v17development-flarum-blog.forum.tools.disable_comments")),30),e.canHide()&&(e.isHidden()?(o.add("recover",F().component({className:"Button",onclick:w().restoreAction.bind(e),icon:"fas fa-eye"},M().translator.trans("v17development-flarum-blog.forum.tools.recover_article")),20),e.canDelete()&&buttons.add("delete",F().component({className:"Button",onclick:function(){if(confirm(q()(M().translator.trans("core.forum.discussion_controls.delete_confirmation"))))return"blogArticle"===M().history.getCurrent().name&&(M().previous?M().history.back():m.route.set(M().route("blog"))),e.delete().then((function(){m.redraw()}))},icon:"far fa-trash-alt"},M().translator.trans("v17development-flarum-blog.forum.tools.delete_forever")),10)):o.add("hide",F().component({className:"Button",onclick:w().hideAction.bind(e),icon:"fas fa-eye-slash"},M().translator.trans("v17development-flarum-blog.forum.tools.hide_article")),0)),o},a.view=function(){var t=this,e=this.attrs.article.firstPost();return m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:"FlarumBlog-Article-Content-Edit-Dropdown"},_().component({icon:"fas fa-cog",label:"Manage",buttonClassName:"Button",menuClassName:"Dropdown-menu--right",onshow:function(){!e||e.canEdit()||t.loadedPost||(t.loadedPost=!0,m.redraw())}},this.manageArticleButtons().toArray())))},o}(f());const J=flarum.core.compat["common/helpers/listItems"];var K=o.n(J);const Q=flarum.core.compat["common/helpers/avatar"];var X=o.n(Q);const Z=flarum.core.compat["common/components/Link"];var tt=o.n(Z),et=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){var t=this.attrs.loading?null:this.attrs.article?this.attrs.article.user():this.attrs.user;return m("div",{className:"FlarumBlog-Article-Author"},m("div",{className:"FlarumBlog-Article-Author-background "+(this.attrs.loading?"FlarumBlog-Author-Ghost":""),style:{backgroundColor:t&&t.color()?t.color():null}}),m("div",{className:"FlarumBlog-Article-Author-Avatar"},t?m(tt(),{href:app.route("user",{username:t.username()})},X()(t)):m("span",{className:"Avatar FlarumBlog-Author-Ghost"})),t&&m("div",{className:"FlarumBlog-Article-Author-Info"},m(tt(),{href:app.route("user",{username:t.username()}),className:"FlarumBlog-Article-Author-Name"},t.displayName()),m("p",{className:"FlarumBlog-Article-Author-Bio"},t.bio&&t.bio()),m("ul",{className:"FlarumBlog-Article-Author-Extended"},K()(this.items().toArray()))),this.attrs.loading&&m("div",null,m("span",{className:"FlarumBlog-Article-Author-Name FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," "),m("p",{className:"FlarumBlog-Article-Author-Bio FlarumBlog-Author-Ghost"}," ")))},a.items=function(){return new(R())},o}(f()),ot=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.blogCategories=app.forum.attribute("blogTags")},a.view=function(){var t=this;return m("div",{className:"BlogCategories BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.categories")),this.blogCategories&&this.blogCategories.map((function(e){var o=app.store.getById("tags",e);if(!o)return null;var a=[],r=1===t.blogCategories.length||o.slug()===m.route.param("slug");return app.store.all("tags").forEach((function(e){e.isChild()&&e.parent()===o&&(e.slug()===m.route.param("slug")&&(r=!0),a.push(t.categoryItem(e)))})),r?[t.categoryItem(o)].concat(a):t.categoryItem(o)})))},a.categoryItem=function(t){return m(tt(),{href:app.route("blogCategory",{slug:t.slug()}),className:"BlogSideWidget-item BlogSideWidget-item-"+t.id()+" "+(t.isChild()&&1==app.forum.attribute("blogCategoryHierarchy")?"BlogSideWidget-item-child":"")},m("span",{className:""===t.icon()?"BlogSideWidget-item-colored":"",style:{backgroundColor:""===t.icon()?t.color():null}},m("i",{className:t.icon()})),t.name())},o}(f());const at=flarum.core.compat["forum/components/IndexPage"];var rt=o.n(at);const nt=flarum.core.compat["common/components/SelectDropdown"];var it=o.n(nt),st=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",{className:"BlogForumNav BlogSideWidget"},m("h3",null,app.translator.trans("v17development-flarum-blog.forum.forum_nav")),m("nav",{className:"IndexPage-nav sideNav"},m(it(),{buttonClassName:"Button",className:"App-titleControl"},this.navItems().toArray())))},a.navItems=function(){return rt().prototype.navItems()},o}(f()),lt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",{className:"FlarumBlog-Article-Sidebar"},m("ul",null,K()(this.items().toArray())))},a.items=function(){var t=new(R());return t.add("author",et.component(this.attrs),0),t.add("categories",ot.component(this.attrs),0),t.add("nav",st.component(this.attrs),0),t},o}(f()),ut=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m("span",null,m("i",{className:"fas fa-globe"})," ",e.name()),t}),this.attrs.extra||{})},a.view=function(){var t=this.attrs,e=t.language,o=t.uppercase,a=e.name()||"";return m("span",null,m("i",{className:"fas fa-globe"})," ",o?a.toUpperCase():a)},o}(f()),mt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.languages=app.store.all("discussion-languages"),this.options=this.languages.reduce((function(t,e){return t[e.code()]=m(ut,{language:e}),t}),this.attrs.extra||{})},a.view=function(){var t=this,e=this.attrs.selected;return _().component({buttonClassName:"Button",label:this.options[e]||this.options[this.attrs.default]},Object.keys(this.options).map((function(o){var a;a=app.forum.attribute("fof-discussion-language.composerLocaleDefault")?"any":app.translator.formatter.locale;var r=o===(e||a);return F().component({active:r,icon:!r||"fas fa-check",onclick:function(){return t.attrs.onclick(o)}},t.options[o])})))},o}(f());const ct=flarum.core.compat["common/components/Tooltip"];var dt=o.n(ct);const gt=flarum.core.compat["common/helpers/humanTime"];var pt=o.n(gt);const ht=flarum.core.compat["common/helpers/icon"];var ft=o.n(ht);const vt=flarum.core.compat["common/utils/classList"];var bt=o.n(vt),yt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.titleItems=function(){var t,e,o=this.attrs.article,a=new(R());return a.add("title",m("[",null,o.title()),100),(null!=(t=o.blogMeta())&&null!=t.isPendingReview&&t.isPendingReview()||o.isHidden())&&a.add("hidden",ft()("fas fa-eye-slash",{class:"BlogList-item-hidden"}),80),null!=(e=o.blogMeta())&&null!=e.isPendingReview&&e.isPendingReview()&&a.add("pendingReview",m(dt(),{text:M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")},ft()("far fa-clock",{class:"BlogList-item-pendingReview"})),40),a},a.dataItems=function(){var t,e=this.attrs.article,o=new(R());return o.add("createdAt",m("span",{class:"BlogList-item-details-createdAt"},ft()("far fa-clock")," ",pt()(e.createdAt())),100),o.add("author",m("span",{class:"BlogList-item-details-author"},ft()("far fa-user")," ",(null==(t=e.user())||null==t.displayName?void 0:t.displayName())||M().translator.trans("core.lib.username.deleted_text")),80),o.add("replies",m("span",{class:"BlogList-item-details-replies"},ft()("far fa-comment")," ",(e.commentCount()||1)-1),60),o},a.contentItems=function(){var t,e=(null==(t=this.attrs.article.blogMeta())||null==t.summary?void 0:t.summary())||"",o=new(R());return o.add("title",m("h4",null,this.titleItems().toArray()),100),e&&o.add("summary",m("p",null,e),80),o.add("data",m("div",{class:"data"},this.dataItems().toArray()),60),o},a.getImage=function(){var t,e=this.attrs,o=e.article,a=e.defaultImage;return null!=(t=o.blogMeta())&&null!=t.featuredImage&&t.featuredImage()?"url("+o.blogMeta().featuredImage()+")":a},a.view=function(t){var e,o=this.attrs,a=o.article,r=o.defaultImage,n=this.getImage(),i=null==(e=a.blogMeta())||null==e.isSized?void 0:e.isSized();return m(tt(),{href:M().route("blogArticle",{id:""+a.slug()}),className:bt()("BlogList-item",{"BlogList-item-sized":i,"BlogList-item-default":!i},a.tags().map((function(t){return"BlogList-item-category-"+t.id()})))},m("div",{class:bt()("BlogList-item-photo",{"FlarumBlog-default-image":n===r}),style:{backgroundImage:n}}),m("div",{class:"BlogList-item-content"},this.contentItems().toArray()))},o}(f()),wt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.topItems=function(){var t,e,o,a=this.attrs.article,r=new(R());return r.add("tags",m("span",{class:"BlogFeatured-list-item-tags"},null==(t=a.tags())?void 0:t.map((function(t){return m("span",{class:"dataItem"},t.name())}))),100),a.isSticky()&&r.add("sticky",m("span",{class:"BlogFeatured-list-item-isSticky dataItem"},ft()("fas fa-thumbtack")),80),(null!=(e=a.blogMeta())&&null!=e.isPendingReview&&e.isPendingReview()||a.isHidden())&&r.add("hidden",m("span",{class:"BlogFeatured-list-item-isHidden dataItem"},ft()("fas fa-eye-slash")),60),null!=(o=a.blogMeta())&&null!=o.isPendingReview&&o.isPendingReview()&&r.add("pendingReview",m(dt(),{text:M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review"),position:"bottom"},m("span",{class:"BlogFeatured-list-item-pendingReview dataItem"},ft()("far fa-clock")," ",M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review_title"))),40),r},a.dataItems=function(){var t,e=this.attrs.article,o=new(R());return o.add("createdAt",m("span",{class:"BlogFeatured-list-item-details-createdAt"},ft()("far fa-clock")," ",pt()(e.createdAt())),100),o.add("author",m("span",{class:"BlogFeatured-list-item-details-author"},ft()("far fa-user")," ",(null==(t=e.user())?void 0:t.displayName())||M().translator.trans("core.lib.username.deleted_text")),80),o.add("replies",m("span",{class:"BlogFeatured-list-item-details-replies"},ft()("far fa-comment")," ",e.commentCount()-1),60),o},a.view=function(t){var e,o=this.attrs,a=o.article,r=o.defaultImage,n=null!=(e=a.blogMeta())&&null!=e.featuredImage&&e.featuredImage()?"url("+a.blogMeta().featuredImage()+")":r;return m(tt(),{href:M().route("blogArticle",{id:""+a.slug()}),className:bt()("BlogFeatured-list-item",a.tags().map((function(t){return"BlogFeatured-list-item-category-"+t.id()})),"FlarumBlog-default-image"),style:{backgroundImage:n}},m("div",{class:"BlogFeatured-list-item-top"},this.topItems().toArray()),m("div",{className:"BlogFeatured-list-item-details"},m("h4",null,a.title()),m("div",{className:"data"},this.dataItems().toArray())))},o}(f()),Bt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),this.bodyClass="BlogOverviewPage",this.isLoading=!0,this.featuredPosts=[],this.posts=[],this.hasMore=null,this.isLoadingMore=!1,this.languages=M().store.all("discussion-languages"),this.currentSelectedLanguage=m.route.param("lang")?m.route.param("lang"):M().translator.formatter.locale,M().history.push("blog"),this.loadBlogOverview(),this.featuredCount=parseInt(M().forum.attribute("blogFeaturedCount")),this.showCategories=!0,this.showForumNav=!0},a.loadBlogOverview=function(){var t=M().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):this.reloadData(),m.redraw()},a.reloadData=function(){var t="is:blog"+(m.route.param("slug")?" tag:"+m.route.param("slug"):"");null!==this.languages&&this.languages.length>=1&&(t+=" language:"+this.currentSelectedLanguage),M().store.find("discussions",{filter:{q:t},sort:"-createdAt"}).then(this.show.bind(this)).catch((function(){m.redraw()}))},a.show=function(t){if(0===t.length)return this.isLoading=!1,void m.redraw();this.hasMore=t.payload.links&&t.payload.links.next?t.payload.links.next:null,this.featuredPosts=t.slice(0,this.featuredCount),this.posts=t.length>this.featuredCount?t.slice(this.featuredCount,t.length):[],this.isLoading=!1,m.redraw()},a.loadMore=function(){var t=this;this.isLoadingMore=!0,M().store.find(this.hasMore.replace(M().forum.attribute("apiUrl"),"")).then((function(e){e.map((function(e){return t.posts.push(e)})),t.hasMore=e.payload.links&&e.payload.links.next?e.payload.links.next:null})).catch((function(){})).then((function(){t.isLoadingMore=!1,m.redraw()}))},a.title=function(){if(!m.route.param("slug"))return m("h2",null,M().translator.trans("v17development-flarum-blog.forum.recent_posts"));var t=M().store.all("tags").filter((function(t){return t.slug()===m.route.param("slug")}));return m("h2",null,t&&t[0]&&t[0].name(),m("small",null," ","-"," ",m(tt(),{href:M().route("blog")},M().translator.trans("v17development-flarum-blog.forum.return_to_overview"))))},a.view=function(){var t=this,e=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null;return[1==M().forum.attribute("blogAddHero")&&s().prototype.hero(),m("div",{className:"FlarumBlogOverview"},m("div",{className:"container"},m("div",{className:"BlogFeatured"},m("div",{className:"BlogOverviewButtons"},M().forum.attribute("canWriteBlogPosts")&&m(F(),{className:"Button",onclick:function(){return t.newArticle()},icon:"fas fa-pencil-alt"},M().translator.trans("v17development-flarum-blog.forum.compose.write_article")),null!==this.languages&&this.languages.length>=1&&m(mt,{selected:this.currentSelectedLanguage,onclick:function(e){t.currentSelectedLanguage=e,m.route.set(document.location.pathname,{lang:e}),t.reloadData()}})),this.title(),m("div",{style:{clear:"both"}}),m("div",{class:"BlogFeatured-list"},this.isLoading&&[].concat(new Array(this.featuredCount).fill(void 0)).map((function(){return m("div",{class:"BlogFeatured-list-item BlogFeatured-list-item-ghost"},m("div",{class:"BlogFeatured-list-item-details"},m("h4",null," "),m("div",{class:"data"},m("span",null,m("i",{class:"far fa-wave"})))))})),!this.isLoading&&this.featuredPosts.length>=0&&this.featuredPosts.map((function(t){return m(wt,{article:t,defaultImage:e})})))),m("div",{className:"BlogScrubber"},m("div",{className:"BlogList"},this.isLoading&&[!1,!1,!0,!1].map((function(t){return m("div",{className:"BlogList-item BlogList-item-"+(!0===t?"sized":"default")+" BlogList-item-ghost"},m("div",{className:"BlogList-item-photo FlarumBlog-default-image"}),m("div",{className:"BlogList-item-content"},m("h4",null," "),m("p",null," "),m("div",{className:"data"},m("span",null,m("i",{className:"far fa-wave"})))))})),!this.isLoading&&this.posts.length>=1&&this.posts.map((function(t){return m(yt,{article:t,defaultImage:e})})),!this.isLoading&&this.featuredPosts.length>0&&null===this.hasMore&&m("p",{className:"FlarumBlog-reached-end"},M().translator.trans("v17development-flarum-blog.forum.no_more_posts")),!this.isLoading&&0===this.featuredPosts.length&&0===this.posts.length&&m("p",{className:"FlarumBlog-reached-end"},M().translator.trans("v17development-flarum-blog.forum.category_empty")),!this.isLoading&&null!==this.hasMore&&m("div",{className:"FlarumBlog-reached-load-more"},m(F(),{className:"Button",onclick:function(){return t.loadMore()},icon:"fas fa-chevron-down",loading:this.isLoadingMore},M().translator.trans("core.forum.discussion_list.load_more_button")))),m("div",{className:"Sidebar"},this.showCategories&&m(ot,null),this.showForumNav&&m(st,null)))))]},a.newArticle=function(){var t=[],e=M().store.getBy("tags","slug",m.route.param("slug"));e&&t.push(e),m.route.set(M().route("blogComposer",{tags:t.map((function(t){return t.id()})).join(),lang:this.languages.length>0?this.currentSelectedLanguage:void 0}))},o}(n());const Nt=flarum.core.compat["common/helpers/fullTime"];var At=o.n(Nt),Ft=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){var t=this.attrs.discussion.subscription(),e=app.session.user.preferences().notify_newPost_email,o=q()(app.translator.trans(e?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),a=app.translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),r="far fa-star";return"follow"===t&&(a=app.translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),r="fas fa-star"),m(dt(),{text:o,position:"bottom"},m(F(),{className:"Button BlogArticleSubscription SubscriptionMenu-button--"+t,icon:r,onclick:this.saveSubscription.bind(this,this.attrs.discussion,-1!==["follow","ignore"].indexOf(t)?null:"follow")},a))},a.saveSubscription=function(t,e){t.save({subscription:e})},o}(f()),It=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),M().history.push("blogArticle"),this.bodyClass="BlogItemPage",this.near=m.route.param("near")||0,this.loading=!0,this.found=!1,this.article=null,this.loadBlogItem()},a.loadBlogItem=function(){var t=M().preloadedApiDocument();t?setTimeout(this.show.bind(this,t),0):M().store.find("discussions",m.route.param("id").split("-")[0]).then(this.show.bind(this)).catch((function(){m.redraw()})),m.redraw()},a.show=function(t){var e=this;this.article=t,M().setTitle(t.title()+" - "+M().translator.trans("v17development-flarum-blog.forum.blog")),this.loading=!1;var o=[];if(t.payload&&t.payload.included){var a=t.id();o=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===a})).map((function(t){return M().store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new(p())(t,o),this.near&&this.stream.goToNumber(this.near||0,!0).then((function(){M().current.set("discussion",t),M().current.set("stream",e.stream)})),M().session.user&&!t.lastReadPostNumber()&&t.save({lastReadPostNumber:1}),m.redraw()},a.postItems=function(){var t,e,o,a=null;!this.loading&&this.article&&(a=null==(o=this.article)||null==o.firstPost?void 0:o.firstPost());var r,n,i,s=new(R());return s.add("title",m("h3",{className:bt()("FlarumBlog-Article-Title",{"FlarumBlog-Article-GhostTitle":this.loading})},(null==this||null==(t=this.article)||null==t.title?void 0:t.title())||"Ghost title",(null==(e=this.article)||null==e.isHidden?void 0:e.isHidden())&&"("+M().translator.trans("v17development-flarum-blog.forum.hidden")+")"),100),s.add("publishDate",m("div",{className:bt()("FlarumBlog-Article-PublishDate",{"FlarumBlog-Article-GhostPublishDate":this.loading})},this.article?At()(this.article.createdAt()):m("span",null," ")),80),this.loading&&s.add("skeleton",[0,1,2].map((function(){return m("div",null,m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",{className:"FlarumBlog-Article-GhostParagraph"}," "),m("p",null," "))})),60),this.loading||(null!=(r=(n=this.article).blogMeta)&&null!=(i=r.call(n))&&null!=i.isPendingReview&&i.isPendingReview()&&s.add("review",m("div",{className:"Post-body"},m("blockquote",{class:"uncited",style:{fontSize:"16px"}},m("div",null,ft()("far fa-clock",{style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.review_article.pending_review")))),60),a&&s.add("post",m(u(),{post:a}),40)),s},a.contentItems=function(){var t,e,o,a,r,n,i,s,l,u,c=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null,d=null!=(t=this.article)&&null!=(e=t.blogMeta())&&null!=e.featuredImage&&e.featuredImage()?"url("+this.article.blogMeta().featuredImage()+")":c,g=new(R());return g.add("image",m("div",{className:bt()("FlarumBlog-Article-Image FlarumBlog-default-image",{"FlarumBlog-Article-GhostImage":this.loading}),style:{backgroundImage:d,opacity:null!=(o=this.article)&&null!=o.isHidden&&o.isHidden()?.4:null}}),100),this.article&&(null!=(a=M().session.user)&&null!=a.canEdit&&a.canEdit()||null!=(r=this.article)&&null!=r.canRename&&r.canRename()||null!=(n=this.article)&&null!=n.posts&&null!=(i=n.posts())&&null!=(s=i[0])&&null!=s.canEdit&&s.canEdit())&&g.add("editArticle",m(V,{article:this.article}),80),g.add("categories",m("div",{className:"FlarumBlog-Article-Categories"},!this.loading&&(null==(l=this.article)||null==l.tags||null==(u=l.tags())?void 0:u.map((function(t){return m(tt(),{href:M().route("blogCategory",{slug:t.slug()})},t.name())}))),this.loading&&[0,1].map((function(){return m("span",{className:"FlarumBlog-Article-GhostCategory"},"Category")}))),60),g.add("post",m("div",{className:"FlarumBlog-Article-Post"},this.postItems().toArray()),40),g},a.articleItems=function(){var t,e,o,a=new(R());return a.add("content",m("div",{className:"FlarumBlog-Article-Content"},this.contentItems().toArray()),100),null!=this&&null!=(t=this.article)&&null!=t.isLocked&&t.isLocked()&&1===(null==this||null==(e=this.article)||null==e.commentCount?void 0:e.commentCount())||a.add("comments",m("div",{className:"FlarumBlog-Article-Comments"},!this.loading&&M().session.user&&this.article.subscription&&(!this.article.isLocked||this.article.isLocked&&!this.article.isLocked())&&m(Ft,{discussion:this.article}),m("h4",null,M().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," ","(",this.article?this.article.commentCount()-1:0,")"),!this.loading&&(null==(o=this.article)||null==o.isLocked?void 0:o.isLocked())&&m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"far fa-lock",style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.comment_section.locked")))),!this.loading&&this.article&&d().component({discussion:this.article,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),75),a},a.view=function(){return[1==M().forum.attribute("blogAddHero")&&s().prototype.hero(),m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},m("div",{className:"FlarumBlog-ToolButtons"},m(tt(),{href:M().route("blog"),className:"Button",onclick:function(t){M().previous.matches(Bt)&&(t.preventDefault(),history.back())}},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},M().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),m("div",{className:"FlarumBlog-Article"},m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),m(lt,{article:this.article,loading:this.loading}))))]},a.positionChanged=function(t,e){var o=this.article;M().session.user&&e>(o.lastReadPostNumber()||0)&&(o.save({lastReadPostNumber:e}),m.redraw())},o}(n());const _t=flarum.core.compat["common/Model"];var Lt=o.n(_t);const kt=flarum.core.compat["tags/models/Tag"];var Ct=o.n(kt);const xt=flarum.core.compat["common/models/Discussion"];var Pt=o.n(xt);const Mt=flarum.core.compat["forum/components/DiscussionPage"];var St=o.n(Mt);const Tt=flarum.core.compat["common/extend"],Et=flarum.core.compat["common/utils/mixin"];var Rt=function(t){function o(){return t.apply(this,arguments)||this}return e(o,t),o}(o.n(Et)()(Lt(),{discussion:Lt().hasOne("discussion"),featuredImage:Lt().attribute("featuredImage"),summary:Lt().attribute("summary"),isFeatured:Lt().attribute("isFeatured"),isSized:Lt().attribute("isSized"),isPendingReview:Lt().attribute("isPendingReview")}));const Dt=flarum.core.compat["tags/components/TagsPage"];var Ot=o.n(Dt);function jt(){(0,Tt.extend)(Ot().prototype,"view",(function(t){var e=this;if(this.loading)return t;if(!1===app.forum.attribute("blogHideTags"))return t;var o=app.forum.attribute("blogTags")||[],a=t.children[1].children[1].children[0].children;return t.children[1].children[1].children[0].children=a.map((function(t,a){return o.indexOf(e.tags[a].id())>=0?null:t})),t})),(0,Tt.extend)(rt().prototype,"navItems",(function(t){return!1===app.forum.attribute("blogHideTags")||(app.forum.attribute("blogTags")||[]).forEach((function(e){t.remove("tag"+e)})),t}))}function Gt(){var t=app.route.discussion;app.route.discussion=function(e,o){var a=!1;if(("both"===app.forum.attribute("blogRedirectsEnabled")||"discussions_only"===app.forum.attribute("blogRedirectsEnabled"))&&e.tags().length>0){var r=app.forum.attribute("blogTags");e.tags().filter((function(t){return r.indexOf(t.id())>=0||t.parent()&&r.indexOf(t.parent().id())>=0})).length>0&&(a=!0)}return a?e.lastReadPostNumber()>1?app.route("blogArticle.near",{id:e.slug(),near:e.lastReadPostNumber()}):app.route("blogArticle",{id:e.slug()}):t(e,o)}}const Ht=flarum.core.compat["forum/components/ComposerBody"];var zt=o.n(Ht);const Wt=flarum.core.compat["common/components/TextEditor"];var Ut=o.n(Wt),$t=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.view=function(){return m("div",null)},a.oncreate=function(e){t.prototype.oncreate.call(this,e),s9e.TextFormatter.preview(e.attrs.content||"",e.dom)},o}(f()),qt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e),this.previewContent=!1},a.view=function(){var t=this,e=this.composer.fields.content()&&""!==this.composer.fields.content(),o=this.loading||this.attrs.disabled;return m("div",{className:"Flarum-Blog-Composer "+(o?"Flarum-Blog-Composer-Loading":"")},m("div",{className:"Flarum-Blog-Composer-tabs"},m(F(),{className:!this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!1}},M().translator.trans("v17development-flarum-blog.forum.composer.write")),m(F(),{className:this.previewContent&&"AricleComposerButtonSelected",onclick:function(){return t.previewContent=!0}},M().translator.trans("v17development-flarum-blog.forum.composer.view"))),m("div",{className:"Composer Flarum-Blog-Composer-body "+(this.previewContent?"Flarum-Blog-Composer-HideEditor":"")},this.previewContent&&m("div",{className:"Flarum-Blog-Composer-preview"},!e&&M().translator.trans("v17development-flarum-blog.forum.composer.nothing_to_preview"),m($t,{content:this.composer.fields.content()})),Ut().component({submitLabel:this.attrs.submitLabel||M().translator.trans("core.forum.composer_edit.submit_button"),placeholder:this.attrs.placeholder,disabled:o,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()})))},a.onsubmit=function(){this.attrs.onsubmit&&this.attrs.onsubmit()},o}(zt()),Yt=function(t){function o(){return t.apply(this,arguments)||this}e(o,t);var a=o.prototype;return a.oninit=function(e){var o=this;if(t.prototype.oninit.call(this,e),M().setTitle(M().translator.trans("v17development-flarum-blog.forum.blog")),M().forum.attribute("canWriteBlogPosts")){if(M().history.push("blogComposer"),this.languages=M().store.all("discussion-languages")||[],this.bodyClass="BlogItemPage BlogItemPage--composer",this.articleLanguage=m.route.param("lang")?m.route.param("lang"):M().translator.locale,this.article=M().store.createRecord("discussions"),this.blogMeta=null,this.tags=[],m.route.param().tags){var a=Array.isArray(m.route.param().tags)?m.route.param().tags:m.route.param().tags.split(",");m.route.param().tags.length>0&&a.forEach((function(t){var e=M().store.getById("tags",t);e&&o.tags.push(e)}))}this.isSaving=!1}else m.route.set(M().route("blog"))},a.openTagsModal=function(t){var e=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||M().modal.show(b(),{selectedTags:this.tags,onsubmit:function(t){e.tags=t}})},a.openNameArticleModal=function(t){var e=this;void 0===t&&(t=null),t&&t.preventDefault(),this.isSaving||M().modal.show(Y,{article:this.article,onChange:function(t){e.article.pushData({attributes:{title:t}})}})},a.openBlogSettings=function(t){var e=this;t.preventDefault(),this.isSaving||M().modal.show(H,{meta:this.blogMeta,onsubmit:function(t){return e.blogMeta=t}})},a.view=function(){return m("div",{className:"FlarumBlogItem"},m("div",{className:"container"},this.pageItems().toArray()))},a.pageItems=function(){var t=new(R());return t.add("toolButtons",m("div",{className:"FlarumBlog-ToolButtons"},m(tt(),{href:M().route("blog"),className:"Button",loading:this.isSaving,icon:"fas fa-angle-left"},m("i",{class:"icon fas fa-angle-left Button-icon"}),m("span",{class:"Button-label"},M().translator.trans("v17development-flarum-blog.forum.return_to_overview")))),100),t.add("article",m("div",{className:"FlarumBlog-Article"},this.articleWrapperItems().toArray()),90),t},a.articleWrapperItems=function(){var t=new(R());return t.add("container",m("div",{className:"FlarumBlog-Article-Container"},this.articleItems().toArray()),100),t.add("sidebar",m("div",{className:"FlarumBlog-Article-Sidebar"},m(et,{user:M().session.user})),90),t},a.articleItems=function(){var t=this,e=new(R()),o=M().forum.attribute("blogDefaultImage")?"url("+M().forum.attribute("baseUrl")+"/assets/"+M().forum.attribute("blogDefaultImage")+")":null,a=this.blogMeta&&this.blogMeta.featuredImage()?"url("+this.blogMeta.featuredImage()+")":o;return e.add("content",m("div",{className:"FlarumBlog-Article-Content"},m("div",{className:"FlarumBlog-Article-Image FlarumBlog-default-image",style:{backgroundImage:a,cursor:"pointer"},onclick:function(e){return t.openBlogSettings(e)}}),m("div",{className:"FlarumBlog-Article-Content-Edit-Button"},m("div",{className:0===this.languages.length?"FlarumBlog-Article-Content-Edit-Dropdown":"FlarumBlog-Article-Content-EditButtons"},null!==this.languages&&this.languages.length>=1&&m(mt,{selected:this.articleLanguage,onclick:function(e){return t.articleLanguage=e}}),m(F(),{className:"Button",onclick:function(e){return t.openBlogSettings(e)},icon:"fas fa-pencil-alt",loading:this.isSaving},M().translator.trans("v17development-flarum-blog.forum.composer.update_settings")))),m("div",{className:"FlarumBlog-Article-Categories"},this.tags.map((function(e){return m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},e.name())})),m("button",{class:"Button Button--text",onclick:function(e){return t.openTagsModal(e)}},0===this.tags.length?M().translator.trans("v17development-flarum-blog.forum.composer.select_category"):M().translator.trans("v17development-flarum-blog.forum.composer.edit_categories")," ",m("i",{className:"fas fa-edit"}))),m("div",{className:"FlarumBlog-Article-Post"},m("h3",{onclick:function(){return t.openNameArticleModal()},className:"FlarumBlog-Article-Title",style:{cursor:"pointer"}},this.article&&this.article.title()&&""!==this.article.title()?this.article.title():M().translator.trans("v17development-flarum-blog.forum.composer.no_title"),m("button",{class:"Button Button--text",onclick:function(t){return t.preventDefault()}},m("i",{className:"fas fa-edit"}))),m("div",{className:"Post-body"},m(qt,{composer:M().composer,originalContent:"",submitLabel:M().translator.trans("v17development-flarum-blog.forum.composer.post_article"),placeholder:M().translator.trans("v17development-flarum-blog.forum.composer.enter_message_here"),onsubmit:function(){return t.create()},disabled:this.isSaving})))),100),e.add("commentsPlaceholder",m("div",{className:"FlarumBlog-Article-Comments"},m("h4",null,M().translator.trans("v17development-flarum-blog.forum.comment_section.comments")," ","(0)"),m("div",{className:"Post-body"},m("blockquote",{class:"uncited"},m("div",null,m("span",{className:"fas fa-ban",style:{marginRight:"5px"}})," ",M().translator.trans("v17development-flarum-blog.forum.composer.comment_section"))))),90),e},a.create=function(){var t=this,e=M().forum.attribute("blogTags")||[];if(0!==this.tags.length)if(this.article.title()&&""!==this.article.title())if(0!==this.tags.filter((function(t){return e.indexOf(t.id())>=0})).length){if(null!==this.blogMeta&&(this.blogMeta.featuredImage()||M().forum.attribute("blogDefaultImage"))&&this.blogMeta.summary()||confirm(M().translator.trans("v17development-flarum-blog.forum.composer.post_without_blog_info"))){var o={tags:this.tags};this.languages.length>0&&(o.language=M().store.getBy("discussion-languages","code",this.articleLanguage));var a={title:this.article.title(),content:M().composer.fields.content(),relationships:o,blogMeta:null!==this.blogMeta?{featuredImage:this.blogMeta.featuredImage(),summary:this.blogMeta.summary(),isSized:this.blogMeta.isSized()}:null};this.isSaving=!0,this.article.save(a).then((function(t){setTimeout((function(){m.route.set(M().route("blogArticle",{id:""+t.slug()}))}),500)})).catch((function(){t.isSaving=!1,m.redraw()}))}}else alert(M().translator.trans("v17development-flarum-blog.forum.composer.no_blog_tags_selected"));else this.openNameArticleModal();else this.openTagsModal()},o}(n());const Vt=flarum.core,Jt=flarum.core.compat["common/components/LinkButton"];var Kt=o.n(Jt);function Qt(){(0,Tt.extend)(rt().prototype,"navItems",(function(t){return app.forum.attribute("blogAddSidebarNav")&&"0"!==app.forum.attribute("blogAddSidebarNav")&&t.add("blog",m(Kt(),{icon:"fas fa-comment",href:app.route("blog")},app.translator.trans("v17development-flarum-blog.forum.blog")),15),t}))}var Xt=function(){function t(){this.modal=null,this.modalList=[],this.key=0,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e,o){if(void 0===e&&(e={}),void 0===o&&(o=!1),!(t.prototype instanceof T())){var a="The ModalManager can only show Modals.";throw console.error(a),new Error(a)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e,key:this.key++},o?this.modalList.push(this.modal):this.modalList=[this.modal],m.redraw.sync()},e.close=function(){var t=this;if(this.modal){var e;if(this.modalList.length>=2)return $(".modal[modal-key="+(null==(e=this.modal)?void 0:e.key)+"]").one("hide.bs.modal",(function(){var e=t.modalList.indexOf(t.modal);t.modalList.splice(e,1),t.modal=t.modalList[t.modalList.length-1],setTimeout((function(){$(document.body).addClass("modal-open")}),1e3),m.redraw()})).modal("hide"),void m.redraw();this.closeTimeout=setTimeout((function(){var e;$(".modal[modal-key="+(null==(e=t.modal)?void 0:e.key)+"]").modal("hide").one("hide.bs.modal",(function(){t.modal=null,m.redraw()}))}))}},e.isModalOpen=function(){return!!this.modal},t}();const Zt=flarum.core.compat["forum/components/ModalManager"];var te=o.n(Zt);M().initializers.add("v17development-flarum-blog",(function(t){t.routes.blog={path:"/blog",component:Bt},t.routes.blogCategory={path:"/blog/category/:slug",component:Bt},t.routes.blogComposer={path:"/blog/compose",component:Yt},t.routes.blogArticle={path:"/blog/:id",component:It},t.routes["blogArticle.near"]={path:"/blog/:id/:near",component:It},t.store.models.blogMeta=Rt,Pt().prototype.blogMeta=Lt().hasOne("blogMeta"),Ct().prototype.isBlog=Lt().attribute("isBlog"),(0,Tt.extend)(rt().prototype,"oncreate",(function(){var t=this.currentTag(),e="both"===M().forum.attribute("blogRedirectsEnabled")||"tags_only"===M().forum.attribute("blogRedirectsEnabled");if(t&&e){var o=M().forum.attribute("blogTags");(o.indexOf(t.id())>=0||t.parent()&&o.indexOf(t.parent().id())>=0)&&m.route.set(M().route("blog"))}})),(0,Tt.override)(St().prototype,"show",(function(t,e){if(("both"===M().forum.attribute("blogRedirectsEnabled")||"discussions_only"===M().forum.attribute("blogRedirectsEnabled"))&&e&&e&&e.tags().length>0){var o=M().forum.attribute("blogTags");if(e.tags().filter((function(t){return o.indexOf(t.id())>=0||t.parent()&&o.indexOf(t.parent().id())>=0})).length>0){var a=M().route("blogArticle",{id:e.slug()});return m.route.set(a,null,{replace:!0}),null}}return t(e)})),jt(),Gt(),Qt(),(0,Tt.override)(te().prototype,"view",(function(){var t=this;return this.attrs.state.modalList.map((function(e){var o=null==e?void 0:e.componentClass;return m("div",{className:"ModalManager modal fade","modal-key":e.key},!!o&&m(o,Object.assign({key:null==e?void 0:e.key},e.attrs,{animateShow:t.animateShow.bind(t),animateHide:t.animateHide.bind(t),state:t.attrs.state})))}))})),(0,Tt.override)(te().prototype,"animateHide",(function(){1===this.attrs.state.modalList.length&&(this.modalShown=!1)})),(0,Tt.override)(te().prototype,"animateShow",(function(t){var e=this;if(void 0===t&&(t=function(){}),this.attrs.state.modal){var o=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,$(".modal[modal-key="+this.attrs.state.modal.key+"]").hasClass("in")?t():setTimeout((function(){$(".modal[modal-key="+e.attrs.state.modal.key+"]").one("shown.bs.modal",t).modal({backdrop:o||"static",keyboard:o,show:!0})}),1)}})),t.modal=new Xt}),-1e5),Object.assign(Vt.compat,{"v17development/blog/components/BlogItemSidebar":lt,"v17development/blog/components/BlogAuthor":et,"v17development/blog/components/ForumNav":st,"v17development/blog/components/BlogPostController":V,"v17development/blog/components/BlogOverviewItem":yt,"v17development/blog/components/FeaturedBlogItem":wt,"v17development/blog/pages/BlogItem":It,"v17development/blog/pages/BlogOverview":Bt})})(),module.exports=a})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index d373b1c..41af1be 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"2BAAAA,EAAOC,QAAU,EAAjBD,M,QCOA,IAAIE,EAAW,SAAUD,GACvB,aAEA,IAEIE,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,GAEb,IAEEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAASC,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IAMzC,OAFAG,EAAUI,QAsMZ,SAA0BV,EAASE,EAAMM,GACvC,IAAIG,EAAQC,EAEZ,OAAO,SAAgBC,EAAQC,GAC7B,GAAIH,IAAUI,EACZ,MAAM,IAAIC,MAAM,gCAGl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7C,0CAA2C4B,GAC3C,oDAAqD5D,EACrD,kDAAmDkF,GACnD,kDAAmDa,GACnD,qCAAsCiD,GACtC,yCAA0C7C,M","sources":["webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/regenerator/index.js","webpack://@v17development/flarum-blog/./node_modules/regenerator-runtime/runtime.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-upload']\"","webpack://@v17development/flarum-blog/webpack/bootstrap","webpack://@v17development/flarum-blog/webpack/runtime/compat get default export","webpack://@v17development/flarum-blog/webpack/runtime/define property getters","webpack://@v17development/flarum-blog/webpack/runtime/hasOwnProperty shorthand","webpack://@v17development/flarum-blog/webpack/runtime/make namespace object","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Page']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/PostStream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/states/PostStreamState']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Component']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagDiscussionModal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Button']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/app']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/BlogPostSettingsModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/EditPostComposer']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/RenameArticleModal.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogPostController.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Link']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogAuthor.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogCategories.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/ForumNav.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogItemSidebar.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/Language.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/LanguageDropdown.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogOverviewItem.tsx","webpack://@v17development/flarum-blog/./src/forum/components/FeaturedBlogItem.tsx","webpack://@v17development/flarum-blog/./src/forum/pages/BlogOverview.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@v17development/flarum-blog/./src/forum/components/ArticleSubscription.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogItem.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Model']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/models/Tag']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/extend']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/mixin']\"","webpack://@v17development/flarum-blog/./src/common/Models/BlogMeta.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagsPage']\"","webpack://@v17development/flarum-blog/./src/forum/utils/extendTagOverview.js","webpack://@v17development/flarum-blog/./src/forum/utils/discussionRouting.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ComposerBody']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@v17development/flarum-blog/./src/forum/components/Composer/ComposerPreview.js","webpack://@v17development/flarum-blog/./src/forum/components/Composer/Composer.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogComposer.js","webpack://@v17development/flarum-blog/external assign \"flarum.core\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@v17development/flarum-blog/./src/forum/utils/addSidebarNav.js","webpack://@v17development/flarum-blog/./src/forum/states/OverrideModalState.ts","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ModalManager']\"","webpack://@v17development/flarum-blog/./src/forum/index.js","webpack://@v17development/flarum-blog/./src/forum/utils/redirector.js","webpack://@v17development/flarum-blog/./src/forum/utils/overrideModalManager.js","webpack://@v17development/flarum-blog/./src/forum/compat.js"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = flarum.extensions['fof-upload'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostStream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/PostStreamState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from \"flarum/forum/app\";\nimport Modal from \"flarum/common/components/Modal\";\nimport Button from \"flarum/common/components/Button\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport Stream from \"flarum/common/utils/Stream\";\nimport Switch from \"flarum/common/components/Switch\";\nimport selectFiles from \"../../utils/selectFiles\";\n\nexport default class BlogPostSettingsModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.attrs.article) {\n this.meta =\n this.attrs.article && this.attrs.article.blogMeta()\n ? this.attrs.article.blogMeta()\n : app.store.createRecord(\"blogMeta\");\n } else {\n this.meta = this.attrs.meta\n ? this.attrs.meta\n : app.store.createRecord(\"blogMeta\");\n }\n\n this.isNew = !this.meta.exists;\n\n this.summary = Stream(this.meta.summary() || \"\");\n\n this.featuredImage = Stream(this.meta.featuredImage() || \"\");\n\n this.isFeatured = Stream(this.meta.isFeatured() || false);\n this.isSized = Stream(this.meta.isSized() || false);\n this.isPendingReview = Stream(this.meta.isPendingReview() || false);\n }\n\n className() {\n return \"Modal--small Support-Modal\";\n }\n\n title() {\n return \"Blog post settings\";\n }\n\n content() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n \"summary\",\n
\n \n \n\n \n This summary will be visible on the blog overview page and will be\n used for SEO purposes.\n \n
,\n 30\n );\n\n let fofUploadButton = null;\n\n if (\n \"fof-upload\" in flarum.extensions &&\n app.forum.attribute(\"fof-upload.canUpload\")\n ) {\n const {\n components: { Uploader, FileManagerModal },\n } = require(\"@fof-upload\");\n\n const uploader = new Uploader();\n\n fofUploadButton = (\n {\n app.modal.show(\n FileManagerModal,\n {\n uploader: uploader,\n onSelect: (files) => {\n const file = app.store.getById(\"files\", files[0]);\n\n this.featuredImage(file.url());\n },\n },\n true\n );\n }}\n icon=\"fas fa-cloud-upload-alt\"\n />\n );\n }\n\n items.add(\n \"image\",\n
\n \n
\n \n {fofUploadButton}\n
\n\n Best image resolution for social media: 1200x630\n\n {this.featuredImage() !== \"\" && (\n \n )}\n
,\n 30\n );\n\n items.add(\n \"sized\",\n
\n {Switch.component(\n {\n state: this.isSized() == true,\n onchange: (val) => {\n this.isSized(val);\n },\n },\n [\n Highlighted post,\n
\n Give this post a big image on the blog overview page.\n
,\n ]\n )}\n
,\n -10\n );\n\n items.add(\n \"submit\",\n
\n {Button.component(\n {\n type: \"submit\",\n className: \"Button Button--primary SupportModal-save\",\n loading: this.loading,\n },\n \"Update\"\n )}\n
,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n summary: this.summary(),\n featuredImage: this.featuredImage(),\n isFeatured: this.isFeatured(),\n isSized: this.isSized(),\n isPendingReview: this.isPendingReview(),\n relationships:\n this.isNew && !this.attrs.isComposer\n ? {\n discussion: this.attrs.article,\n }\n : null,\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n // Submit data\n if (this.attrs.onsubmit) {\n // Update attributes\n this.meta.pushData({\n attributes: this.submitData(),\n });\n\n // Push\n this.attrs.onsubmit(this.meta);\n\n this.hide();\n return;\n }\n\n this.loading = true;\n\n this.meta.save(this.submitData()).then(\n () => {\n if (this.attrs.article) {\n this.attrs.article.pushData({\n relationships: {\n blogMeta: this.meta,\n },\n });\n }\n\n this.hide();\n m.redraw();\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EditPostComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import Modal from \"flarum/common/components/Modal\";\nimport Button from \"flarum/common/components/Button\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport Stream from \"flarum/common/utils/Stream\";\n\nexport default class RenameArticleModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.article = this.attrs.article;\n\n this.name = Stream(this.article.title() || \"\");\n\n this.redirect = this.attrs.redirect;\n }\n\n className() {\n return \"Modal--small Support-Modal\";\n }\n\n title() {\n return app.translator.trans(\n \"v17development-flarum-blog.forum.tools.rename_article\"\n );\n }\n\n content() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n \"name\",\n
\n \n \n
,\n 50\n );\n\n items.add(\n \"submit\",\n
\n {Button.component(\n {\n type: \"submit\",\n className: \"Button Button--primary SupportModal-save\",\n loading: this.loading,\n },\n \"Update\"\n )}\n
,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n title: this.name(),\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n // Do not save\n if (this.attrs.onChange) {\n this.attrs.onChange(this.name());\n this.hide();\n\n return;\n }\n\n this.article\n .save({\n title: this.name(),\n })\n .then(\n () => {\n this.hide();\n\n // Redirect\n if (this.redirect) {\n const url = `/blog/${this.article.slug()}`;\n\n m.route.set(url, true);\n window.history.replaceState(null, document.title, url);\n }\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport TagDiscussionModal from \"flarum/tags/components/TagDiscussionModal\";\nimport DiscussionControls from \"flarum/forum/utils/DiscussionControls\";\nimport Alert from \"flarum/common/components/Alert\";\nimport Button from \"flarum/common/components/Button\";\nimport Dropdown from \"flarum/common/components/Dropdown\";\nimport BlogPostSettingsModal from \"./Modals/BlogPostSettingsModal\";\nimport EditPostComposer from \"flarum/forum/components/EditPostComposer\";\nimport extractText from \"flarum/common/utils/extractText\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport RenameArticleModal from \"./Modals/RenameArticleModal\";\nimport app from \"flarum/forum/app\";\n\nexport default class BlogPostController extends Component {\n init() {\n this.loadedPost = false;\n }\n\n manageArticleButtons() {\n const article = this.attrs.article;\n const items = new ItemList();\n\n // Working for GlowingBlue version\n const LanguageDiscussionModal =\n flarum.extensions[\"fof-discussion-language\"] &&\n typeof flarum.extensions[\"fof-discussion-language\"].components !==\n \"undefined\"\n ? flarum.extensions[\"fof-discussion-language\"].components\n .LanguageDiscussionModal\n : null;\n\n // Rename article\n if (article.canRename()) {\n items.add(\n \"rename\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => app.modal.show(RenameArticleModal, { article }),\n icon: \"fas fa-pencil-alt\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.rename_article\"\n )\n ),\n 100\n );\n }\n\n const articlePost = article.firstPost();\n\n // Edit article\n items.add(\n \"edit\",\n Button.component(\n {\n className: \"Button\",\n disabled: !articlePost || !articlePost.canEdit(),\n onclick: () => {\n app.composer.load(EditPostComposer, { post: articlePost });\n app.composer.show();\n },\n icon: \"fas fa-edit\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.edit_article\"\n )\n ),\n 90\n );\n\n // Article settings\n items.add(\n \"articleSettings\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => app.modal.show(BlogPostSettingsModal, { article }),\n icon: \"fas fa-cogs\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.article_settings\"\n )\n ),\n 80\n );\n\n // Update categories\n if (article.canTag()) {\n items.add(\n \"tag\",\n Button.component(\n {\n className: \"Button\",\n onclick: () =>\n app.modal.show(TagDiscussionModal, { discussion: article }),\n icon: \"fas fa-tag\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.update_category\"\n )\n ),\n 70\n );\n }\n\n // Approve article\n if (article.blogMeta() && article.blogMeta().isPendingReview()) {\n items.add(\"separator1\",
  • , 65);\n\n items.add(\n \"approve\",\n Button.component(\n {\n className: \"Button\",\n disabled: !app.forum.attribute(\"canApproveBlogPosts\"),\n onclick: () => {\n article\n .blogMeta()\n .save({\n isPendingReview: false,\n })\n .then(\n () => {\n app.alerts.show(\n Alert,\n { type: \"success\" },\n app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.approve_article_approved\"\n )\n );\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n },\n icon: \"fas fa-thumbs-up\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.approve_article\"\n )\n ),\n 60\n );\n }\n\n // Language\n if (\n article.canChangeLanguage &&\n article.canChangeLanguage() &&\n LanguageDiscussionModal\n ) {\n items.add(\n \"lang\",\n Button.component(\n {\n icon: \"fas fa-globe\",\n onclick: () =>\n app.modal.show(LanguageDiscussionModal, { discussion: article }),\n },\n app.translator.trans(\n \"fof-discussion-language.forum.discussion_controls.change_language_button\"\n )\n ),\n 50\n );\n }\n\n items.add(\"separator2\",
  • , 40);\n\n // Lock article\n if (article.canLock()) {\n items.add(\n \"lock\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.lockAction.bind(article),\n icon: `fas ${\n article.isLocked() ? \"fa-comments\" : \"fa-comment-slash\"\n }`,\n },\n article.isLocked()\n ? app.translator.trans(\n \"v17development-flarum-blog.forum.tools.enable_comments\"\n )\n : app.translator.trans(\n \"v17development-flarum-blog.forum.tools.disable_comments\"\n )\n ),\n 30\n );\n }\n\n // Hide/show/delete\n if (article.canHide()) {\n // Article is hidden\n if (article.isHidden()) {\n // Recover article\n items.add(\n \"recover\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.restoreAction.bind(article),\n icon: \"fas fa-eye\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.recover_article\"\n )\n ),\n 20\n );\n\n // Delete article\n if (article.canDelete()) {\n buttons.add(\n \"delete\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => {\n // Confirm deletion\n if (\n confirm(\n extractText(\n app.translator.trans(\n \"core.forum.discussion_controls.delete_confirmation\"\n )\n )\n )\n ) {\n // Redirect if the current page is an blog article\n if (app.history.getCurrent().name === \"blogArticle\") {\n if (app.previous) {\n app.history.back();\n } else {\n m.route.set(app.route(\"blog\"));\n }\n }\n\n return article.delete().then(() => {\n m.redraw();\n });\n }\n },\n icon: \"far fa-trash-alt\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.delete_forever\"\n )\n ),\n 10\n );\n }\n } else {\n // Hide article\n items.add(\n \"hide\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.hideAction.bind(article),\n icon: \"fas fa-eye-slash\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.hide_article\"\n )\n ),\n 0\n );\n }\n }\n\n return items;\n }\n\n view() {\n const article = this.attrs.article;\n\n const articlePost = article.firstPost();\n\n return (\n
    \n
    \n {Dropdown.component(\n {\n icon: \"fas fa-cog\",\n label: \"Manage\",\n buttonClassName: \"Button\",\n menuClassName: \"Dropdown-menu--right\",\n onshow: () => {\n // Get post data to make sure they can edit the post\n if (articlePost && !articlePost.canEdit() && !this.loadedPost) {\n this.loadedPost = true;\n m.redraw();\n }\n },\n },\n this.manageArticleButtons().toArray()\n )}\n
    \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","import Component from \"flarum/common/Component\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport listItems from \"flarum/common/helpers/listItems\";\nimport avatar from \"flarum/common/helpers/avatar\";\nimport Link from \"flarum/common/components/Link\";\n\nexport default class BlogAuthor extends Component {\n view() {\n const author = !this.attrs.loading\n ? this.attrs.article\n ? this.attrs.article.user()\n : this.attrs.user\n : null;\n\n return (\n
    \n \n\n
    \n {author ? (\n \n {avatar(author)}\n \n ) : (\n \n )}\n
    \n\n {author && (\n
    \n \n {author.displayName()}\n \n

    \n {author.bio && author.bio()}\n

    \n\n
      \n {listItems(this.items().toArray())}\n
    \n
    \n )}\n\n {this.attrs.loading && (\n
    \n \n  \n \n \n  \n

    \n \n  \n

    \n \n  \n

    \n
    \n )}\n
    \n );\n }\n\n items() {\n return new ItemList();\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\n\nexport default class BlogCategories extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.blogCategories = app.forum.attribute(\"blogTags\");\n }\n\n view() {\n return (\n
    \n

    \n {app.translator.trans(\"v17development-flarum-blog.forum.categories\")}\n

    \n\n {this.blogCategories &&\n this.blogCategories.map((tagId) => {\n const tag = app.store.getById(\"tags\", tagId);\n\n if (!tag) return null;\n\n const tags = [];\n let showSubTags =\n this.blogCategories.length === 1 ||\n tag.slug() === m.route.param(\"slug\");\n\n // Add tags\n app.store.all(\"tags\").forEach((_tag) => {\n if (_tag.isChild() && _tag.parent() === tag) {\n if (_tag.slug() === m.route.param(\"slug\")) {\n showSubTags = true;\n }\n\n tags.push(this.categoryItem(_tag));\n }\n });\n\n return showSubTags\n ? [this.categoryItem(tag), ...tags]\n : this.categoryItem(tag);\n })}\n
    \n );\n }\n\n // Category item\n categoryItem(tag) {\n return (\n \n \n \n \n {tag.name()}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","import Component from \"flarum/common/Component\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport SelectDropdown from \"flarum/common/components/SelectDropdown\";\n\nexport default class ForumNav extends Component {\n view() {\n return (\n
    \n

    \n {app.translator.trans(\"v17development-flarum-blog.forum.forum_nav\")}\n

    \n \n
    \n );\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","import Component from \"flarum/common/Component\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport listItems from \"flarum/common/helpers/listItems\";\nimport BlogAuthor from \"./BlogAuthor\";\nimport BlogCategories from \"../BlogCategories\";\nimport ForumNav from \"../ForumNav\";\n\nexport default class BlogItemSidebar extends Component {\n view() {\n return (\n
    \n
      {listItems(this.items().toArray())}
    \n
    \n );\n }\n\n items() {\n const itemlist = new ItemList();\n\n itemlist.add(\"author\", BlogAuthor.component(this.attrs), 0);\n\n itemlist.add(\"categories\", BlogCategories.component(this.attrs), 0);\n\n itemlist.add(\"nav\", ForumNav.component(this.attrs), 0);\n\n return itemlist;\n }\n}\n","import Component from \"flarum/common/Component\";\n\nexport default class Language extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all(\"discussion-languages\");\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = (\n \n {lang.name()}\n \n );\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const { language, uppercase } = this.attrs;\n const name = language.name() || \"\";\n\n return (\n \n \n  \n {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Dropdown from \"flarum/common/components/Dropdown\";\nimport Button from \"flarum/common/components/Button\";\nimport Language from \"./Language\";\n\nexport default class LanguageDropdown extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.languages = app.store.all(\"discussion-languages\");\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = ;\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const selected = this.attrs.selected;\n\n return Dropdown.component(\n {\n buttonClassName: \"Button\",\n label: this.options[selected] || this.options[this.attrs.default],\n },\n Object.keys(this.options).map((key) => {\n let defaultSelected;\n if (\n app.forum.attribute(\"fof-discussion-language.composerLocaleDefault\")\n ) {\n defaultSelected = \"any\";\n } else {\n defaultSelected = app.translator.formatter.locale;\n }\n const isSelected = selected || defaultSelected;\n const active = key === isSelected;\n\n return Button.component(\n {\n active,\n icon: active ? \"fas fa-check\" : true,\n onclick: () => this.attrs.onclick(key),\n },\n this.options[key]\n );\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\nimport humanTime from \"flarum/common/helpers/humanTime\";\nimport icon from \"flarum/common/helpers/icon\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport classList from \"flarum/common/utils/classList\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport app from \"flarum/forum/app\";\nimport type Mithril from \"mithril\";\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class BlogOverviewItem extends Component {\n titleItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\"title\", <>{article.title()}, 100);\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add(\n \"hidden\",\n icon(\"fas fa-eye-slash\", { class: \"BlogList-item-hidden\" }),\n 80\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n \"pendingReview\",\n \n {icon(\"far fa-clock\", { class: \"BlogList-item-pendingReview\" })}\n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"createdAt\",\n \n {icon(\"far fa-clock\")} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n \"author\",\n \n {icon(\"far fa-user\")}{\" \"}\n {article.user()?.displayName?.() ||\n app.translator.trans(\"core.lib.username.deleted_text\")}\n ,\n 80\n );\n\n items.add(\n \"replies\",\n \n {icon(\"far fa-comment\")} {(article.commentCount() || 1) - 1}\n ,\n 60\n );\n\n return items;\n }\n\n contentItems(): ItemList {\n const { article } = this.attrs;\n const summary = article.blogMeta()?.summary?.() || \"\";\n\n const items = new ItemList();\n\n items.add(\"title\",

    {this.titleItems().toArray()}

    , 100);\n\n if (summary) items.add(\"summary\",

    {summary}

    , 80);\n\n items.add(\"data\",
    {this.dataItems().toArray()}
    , 60);\n\n return items;\n }\n\n getImage(): string {\n const { article, defaultImage } = this.attrs;\n\n return article.blogMeta()?.featuredImage?.()\n ? `url(${article.blogMeta().featuredImage()})`\n : defaultImage;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = this.getImage();\n\n const isSized = article.blogMeta()?.isSized?.();\n\n return (\n `BlogList-item-category-${tag.id()}`)\n )}\n >\n \n\n
    {this.contentItems().toArray()}
    \n \n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\nimport humanTime from \"flarum/common/helpers/humanTime\";\nimport icon from \"flarum/common/helpers/icon\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport classList from \"flarum/common/utils/classList\";\nimport app from \"flarum/forum/app\";\nimport type Mithril from \"mithril\";\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class FeaturedBlogItem extends Component {\n topItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"tags\",\n \n {article.tags()?.map((tag) => (\n {tag.name()}\n ))}\n ,\n 100\n );\n\n if (article.isSticky()) {\n items.add(\n \"sticky\",\n \n {icon(\"fas fa-thumbtack\")}\n ,\n 80\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add(\n \"hidden\",\n \n {icon(\"fas fa-eye-slash\")}\n ,\n 60\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n \"pendingReview\",\n \n \n {icon(\"far fa-clock\")}{\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.pending_review_title\"\n )}\n \n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"createdAt\",\n \n {icon(\"far fa-clock\")} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n \"author\",\n \n {icon(\"far fa-user\")}{\" \"}\n {article.user()?.displayName() ||\n app.translator.trans(\"core.lib.username.deleted_text\")}\n ,\n 80\n );\n\n items.add(\n \"replies\",\n \n {icon(\"far fa-comment\")} {article.commentCount() - 1}\n ,\n 60\n );\n\n return items;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = article.blogMeta()?.featuredImage?.()\n ? `url(${article.blogMeta().featuredImage()})`\n : defaultImage;\n\n return (\n `BlogFeatured-list-item-category-${tag.id()}`),\n \"FlarumBlog-default-image\"\n )}\n style={{ backgroundImage: blogImage }}\n >\n
    \n {this.topItems().toArray()}\n
    \n\n
    \n

    {article.title()}

    \n\n
    {this.dataItems().toArray()}
    \n
    \n \n );\n }\n}\n","import app from \"flarum/forum/app\";\n\nimport IndexPage from \"flarum/components/IndexPage\";\nimport Page from \"flarum/common/components/Page\";\nimport Button from \"flarum/common/components/Button\";\nimport BlogCategories from \"../components/BlogCategories\";\nimport Link from \"flarum/common/components/Link\";\nimport LanguageDropdown from \"../components/LanguageDropdown/LanguageDropdown\";\nimport ForumNav from \"../components/ForumNav\";\nimport BlogOverviewItem from \"../components/BlogOverviewItem\";\nimport FeaturedBlogItem from \"../components/FeaturedBlogItem\";\n\nexport default class BlogOverview extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n this.bodyClass = \"BlogOverviewPage\";\n\n this.isLoading = true;\n this.featuredPosts = [];\n this.posts = [];\n this.hasMore = null;\n this.isLoadingMore = false;\n\n this.languages = app.store.all(\"discussion-languages\");\n\n this.currentSelectedLanguage = m.route.param(\"lang\")\n ? m.route.param(\"lang\")\n : app.translator.formatter.locale;\n\n // Send history push\n app.history.push(\"blog\");\n\n this.loadBlogOverview();\n\n this.featuredCount = parseInt(app.forum.attribute(\"blogFeaturedCount\"));\n\n this.showCategories = true;\n this.showForumNav = true;\n }\n\n // Load blog overview\n loadBlogOverview() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n this.reloadData();\n }\n\n m.redraw();\n }\n\n reloadData() {\n let q = `is:blog${\n m.route.param(\"slug\") ? ` tag:${m.route.param(\"slug\")}` : \"\"\n }`;\n\n if (this.languages !== null && this.languages.length >= 1) {\n q += ` language:${this.currentSelectedLanguage}`;\n }\n\n app.store\n .find(\"discussions\", {\n filter: {\n q,\n },\n sort: \"-createdAt\",\n })\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n // Show blog posts\n show(articles) {\n if (articles.length === 0) {\n this.isLoading = false;\n m.redraw();\n\n return;\n }\n\n // Set pagination\n this.hasMore =\n articles.payload.links && articles.payload.links.next\n ? articles.payload.links.next\n : null;\n\n this.featuredPosts = articles.slice(0, this.featuredCount);\n this.posts =\n articles.length > this.featuredCount\n ? articles.slice(this.featuredCount, articles.length)\n : [];\n\n this.isLoading = false;\n\n m.redraw();\n }\n\n // Load more blog posts\n loadMore() {\n this.isLoadingMore = true;\n\n app.store\n .find(this.hasMore.replace(app.forum.attribute(\"apiUrl\"), \"\"))\n .then((data) => {\n data.map((article) => this.posts.push(article));\n\n // Update hasmore button\n this.hasMore =\n data.payload.links && data.payload.links.next\n ? data.payload.links.next\n : null;\n })\n .catch(() => {})\n .then(() => {\n this.isLoadingMore = false;\n m.redraw();\n });\n }\n\n title() {\n if (!m.route.param(\"slug\")) {\n return (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.recent_posts\"\n )}\n

    \n );\n }\n\n const tag = app.store\n .all(\"tags\")\n .filter((tag) => tag.slug() === m.route.param(\"slug\"));\n\n return (\n

    \n {tag && tag[0] && tag[0].name()}\n \n {\" \"}\n -{\" \"}\n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n

    \n );\n }\n\n view() {\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${\n app.forum.attribute(\"baseUrl\") +\n \"/assets/\" +\n app.forum.attribute(\"blogDefaultImage\")\n })`\n : null;\n\n return [\n app.forum.attribute(\"blogAddHero\") == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n
    \n {app.forum.attribute(\"canWriteBlogPosts\") && (\n this.newArticle()}\n icon={\"fas fa-pencil-alt\"}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.compose.write_article\"\n )}\n \n )}\n\n {this.languages !== null && this.languages.length >= 1 && (\n {\n this.currentSelectedLanguage = language;\n\n m.route.set(document.location.pathname, {\n lang: language,\n });\n\n this.reloadData();\n }}\n />\n )}\n
    \n\n {this.title()}\n\n
    \n\n
    \n {/* Ghost data */}\n {this.isLoading &&\n [...new Array(this.featuredCount).fill(undefined)].map(() => (\n
    \n
    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length >= 0 &&\n this.featuredPosts.map((article) => (\n \n ))}\n
    \n
    \n\n
    \n
    \n {this.isLoading &&\n [false, false, true, false].map((state) => {\n return (\n \n
    \n
    \n

     

    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n );\n })}\n\n {!this.isLoading &&\n this.posts.length >= 1 &&\n this.posts.map((article) => (\n \n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length > 0 &&\n this.hasMore === null && (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.no_more_posts\"\n )}\n

    \n )}\n\n {!this.isLoading &&\n this.featuredPosts.length === 0 &&\n this.posts.length === 0 && (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.category_empty\"\n )}\n

    \n )}\n\n {!this.isLoading && this.hasMore !== null && (\n
    \n this.loadMore()}\n icon={\"fas fa-chevron-down\"}\n loading={this.isLoadingMore}\n >\n {app.translator.trans(\n \"core.forum.discussion_list.load_more_button\"\n )}\n \n
    \n )}\n
    \n\n
    \n {this.showCategories && }\n {this.showForumNav && }\n
    \n
    \n
    \n ,\n ];\n }\n\n newArticle() {\n let tags = [];\n\n // Get current category\n const currentCategory = app.store.getBy(\n \"tags\",\n \"slug\",\n m.route.param(\"slug\")\n );\n\n if (currentCategory) {\n tags.push(currentCategory);\n }\n\n // Redirect to the composer\n m.route.set(\n app.route(\"blogComposer\", {\n tags: tags.map((tag) => tag.id()).join(),\n lang:\n this.languages.length > 0 ? this.currentSelectedLanguage : undefined,\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import Component from \"flarum/common/Component\";\nimport Button from \"flarum/common/components/Button\";\nimport extractText from \"flarum/common/utils/extractText\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\n\nexport default class ArticleSubscription extends Component {\n view() {\n const currentSubscriptionState = this.attrs.discussion.subscription();\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences[\"notify_newPost_email\"];\n const notifyTooltip = extractText(\n app.translator.trans(\n notifyEmail\n ? \"flarum-subscriptions.forum.sub_controls.notify_email_tooltip\"\n : \"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip\"\n )\n );\n\n let title = app.translator.trans(\n \"flarum-subscriptions.forum.sub_controls.not_following_button\"\n );\n let icon = \"far fa-star\";\n\n // Following\n if (currentSubscriptionState === \"follow\") {\n title = app.translator.trans(\n \"flarum-subscriptions.forum.sub_controls.following_button\"\n );\n icon = \"fas fa-star\";\n }\n\n return (\n \n \n {title}\n \n \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n }\n}\n","import Page from \"flarum/common/components/Page\";\nimport IndexPage from \"flarum/components/IndexPage\";\nimport CommentPost from \"flarum/forum/components/CommentPost\";\nimport PostStream from \"flarum/forum/components/PostStream\";\nimport PostStreamState from \"flarum/forum/states/PostStreamState\";\nimport BlogPostController from \"../components/BlogPostController\";\nimport BlogItemSidebar from \"../components/BlogItemSidebar/BlogItemSidebar\";\nimport Link from \"flarum/common/components/Link\";\nimport BlogOverview from \"./BlogOverview\";\nimport fullTime from \"flarum/common/helpers/fullTime\";\nimport ArticleSubscription from \"../components/ArticleSubscription\";\nimport classList from \"flarum/common/utils/classList\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport icon from \"flarum/common/helpers/icon\";\nimport app from \"flarum/forum/app\";\n\nexport default class BlogItem extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n // Send history push\n app.history.push(\"blogArticle\");\n\n this.bodyClass = \"BlogItemPage\";\n\n this.near = m.route.param(\"near\") || 0;\n\n this.loading = true;\n this.found = false;\n this.article = null;\n\n this.loadBlogItem();\n }\n\n // Load blog overview\n loadBlogItem() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n app.store\n .find(\"discussions\", m.route.param(\"id\").split(\"-\")[0])\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n m.redraw();\n }\n\n // Show blog post\n show(article) {\n // Set article data\n this.article = article;\n\n // Update title\n app.setTitle(\n `${article.title()} - ${app.translator.trans(\n \"v17development-flarum-blog.forum.blog\"\n )}`\n );\n\n this.loading = false;\n\n let includedPosts = [];\n if (article.payload && article.payload.included) {\n const articleId = article.id();\n\n includedPosts = article.payload.included\n .filter(\n (record) =>\n record.type === \"posts\" &&\n record.relationships &&\n record.relationships.discussion &&\n record.relationships.discussion.data.id === articleId\n )\n .map((record) => app.store.getById(\"posts\", record.id))\n .sort((a, b) => a.id() - b.id())\n .slice(0, 20);\n }\n\n this.stream = new PostStreamState(article, includedPosts);\n\n // Scroll to specific post\n if (this.near) {\n this.stream.goToNumber(this.near || 0, true).then(() => {\n app.current.set(\"discussion\", article);\n app.current.set(\"stream\", this.stream);\n });\n }\n\n // Read post on load\n if (!article.lastReadPostNumber()) {\n article.save({ lastReadPostNumber: 1 });\n }\n\n m.redraw();\n }\n\n postItems() {\n let articlePost = null;\n\n if (!this.loading && this.article) {\n articlePost = this.article?.firstPost?.();\n }\n\n const items = new ItemList();\n\n items.add(\n \"title\",\n \n {this?.article?.title?.() || \"Ghost title\"}\n {this.article?.isHidden?.() &&\n `(${app.translator.trans(\n \"v17development-flarum-blog.forum.hidden\"\n )})`}\n ,\n 100\n );\n\n items.add(\n \"publishDate\",\n \n {this.article ? (\n fullTime(this.article.createdAt())\n ) : (\n  \n )}\n ,\n 80\n );\n\n if (this.loading) {\n items.add(\n \"skeleton\",\n [0, 1, 2].map(() => (\n
    \n

     

    \n

     

    \n

     

    \n

     

    \n
    \n )),\n 60\n );\n }\n\n if (!this.loading) {\n if (this.article.blogMeta?.()?.isPendingReview?.()) {\n items.add(\n \"review\",\n
    \n
    \n
    \n {icon(\"far fa-clock\", { style: { marginRight: \"5px\" } })}{\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.pending_review\"\n )}\n
    \n
    \n
    ,\n 60\n );\n }\n\n if (articlePost) {\n items.add(\"post\", , 40);\n }\n }\n\n return items;\n }\n\n contentItems() {\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${app.forum.attribute(\"baseUrl\")}/assets/${app.forum.attribute(\n \"blogDefaultImage\"\n )})`\n : null;\n\n const blogImage = this.article?.blogMeta()?.featuredImage?.()\n ? `url(${this.article.blogMeta().featuredImage()})`\n : defaultImage;\n\n const items = new ItemList();\n\n items.add(\n \"image\",\n ,\n 100\n );\n\n if (\n this.article &&\n (app.session.user?.canEdit?.() ||\n this.article?.canRename?.() ||\n this.article?.posts?.()?.[0]?.canEdit?.())\n ) {\n items.add(\n \"editArticle\",\n ,\n 80\n );\n }\n\n // Article Categories\n items.add(\n \"categories\",\n
    \n {!this.loading &&\n this.article\n ?.tags?.()\n ?.map((tag) => (\n \n {tag.name()}\n \n ))}\n\n {this.loading &&\n [0, 1].map(() => (\n Category\n ))}\n
    ,\n 60\n );\n\n items.add(\n \"post\",\n
    \n {this.postItems().toArray()}\n
    ,\n 40\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n items.add(\n \"content\",\n
    \n {this.contentItems().toArray()}\n
    ,\n 100\n );\n\n if (\n !(this?.article?.isLocked?.() && this?.article?.commentCount?.() === 1)\n ) {\n items.add(\n \"comments\",\n
    \n {/* Show subscription state */}\n {!this.loading &&\n app.session.user &&\n this.article.subscription &&\n (!this.article.isLocked ||\n (this.article.isLocked && !this.article.isLocked())) && (\n \n )}\n\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.comments\"\n )}{\" \"}\n ({this.article ? this.article.commentCount() - 1 : 0})\n

    \n\n {/* Locked */}\n {!this.loading && this.article?.isLocked?.() && (\n
    \n
    \n
    \n {\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.locked\"\n )}\n
    \n
    \n
    \n )}\n\n {!this.loading &&\n this.article &&\n PostStream.component({\n discussion: this.article,\n stream: this.stream,\n onPositionChange: this.positionChanged.bind(this),\n })}\n
    ,\n 75\n );\n }\n\n return items;\n }\n\n view() {\n return [\n app.forum.attribute(\"blogAddHero\") == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n {\n if (app.previous.matches(BlogOverview)) {\n e.preventDefault();\n history.back();\n }\n }}\n >\n \n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n
    \n
    \n
    \n {this.articleItems().toArray()}\n
    \n\n \n
    \n
    \n
    ,\n ];\n }\n\n positionChanged(startNumber, endNumber) {\n const article = this.article;\n\n if (app.session.user && endNumber > (article.lastReadPostNumber() || 0)) {\n article.save({ lastReadPostNumber: endNumber });\n m.redraw();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/mixin'];","import Model from \"flarum/common/Model\";\nimport mixin from \"flarum/common/utils/mixin\";\n\nexport default class BlogMeta extends mixin(Model, {\n discussion: Model.hasOne(\"discussion\"),\n featuredImage: Model.attribute(\"featuredImage\"),\n summary: Model.attribute(\"summary\"),\n isFeatured: Model.attribute(\"isFeatured\"),\n isSized: Model.attribute(\"isSized\"),\n isPendingReview: Model.attribute(\"isPendingReview\"),\n}) {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagsPage'];","import { extend } from \"flarum/common/extend\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport TagsPage from \"flarum/tags/components/TagsPage\";\n\nexport default function extendTagOverview() {\n extend(TagsPage.prototype, \"view\", function (markup) {\n // Pending xhr to load all tags, throw back loading indicator.\n if (this.loading) {\n return markup;\n }\n\n if (app.forum.attribute(\"blogHideTags\") === false) return markup;\n\n // Get knowledge base tag ID's\n const knowledgeBaseTags = app.forum.attribute(\"blogTags\") || [];\n\n // Get tiles\n let tag_tiles = markup.children[1].children[1].children[0].children;\n\n // Map through the tiles and remove tiles that are part of the knowledge base\n markup.children[1].children[1].children[0].children = tag_tiles.map(\n (tile, i) => {\n return knowledgeBaseTags.indexOf(this.tags[i].id()) >= 0 ? null : tile;\n }\n );\n\n return markup;\n });\n\n extend(IndexPage.prototype, \"navItems\", function (items) {\n if (app.forum.attribute(\"blogHideTags\") === false) return items;\n\n const blogTags = app.forum.attribute(\"blogTags\") || [];\n\n blogTags.forEach((id) => {\n items.remove(`tag${id}`);\n });\n\n return items;\n });\n}\n","export default function () {\n // Save the original function before we override it\n const original_discussion_route = app.route.discussion;\n\n /**\n * Generate a URL to a discussion OR a Blog Article.\n *\n * CORE_CODE_OVERRIDE: This overrides the standard function from flarum/core.\n * The code is inspired from js/src/forum/routes.js and now handles different types of discussions.\n * It will try to keep the original function executed if the discussion being\n * processed isn't a blog article.\n *\n * @param {Discussion} discussion\n * @param {Integer} [near]\n * @return {String}\n */\n app.route.discussion = (discussion, near) => {\n const discussionRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"discussions_only\";\n let shouldRedirect = false;\n if (discussionRedirectEnabled && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n const foundTags = discussion.tags().filter((tag) => {\n return (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n );\n });\n\n if (foundTags.length > 0) {\n shouldRedirect = true;\n }\n }\n if (shouldRedirect) {\n return discussion.lastReadPostNumber() > 1\n ? app.route(\"blogArticle.near\", {\n id: discussion.slug(),\n near: discussion.lastReadPostNumber(),\n })\n : app.route(\"blogArticle\", {\n id: discussion.slug(),\n });\n } else {\n return original_discussion_route(discussion, near);\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ComposerBody'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","import Component from \"flarum/common/Component\";\n\nexport default class ComposerPreview extends Component {\n view() {\n return
    ;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n s9e.TextFormatter.preview(vnode.attrs.content || \"\", vnode.dom);\n }\n}\n","import ComposerBody from \"flarum/forum/components/ComposerBody\";\nimport Button from \"flarum/common/components/Button\";\nimport TextEditor from \"flarum/common/components/TextEditor\";\nimport ComposerPreview from \"./ComposerPreview\";\nimport app from \"flarum/forum/app\";\n\nexport default class Composer extends ComposerBody {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.previewContent = false;\n }\n\n // Render\n view() {\n const hasContent =\n this.composer.fields.content() && this.composer.fields.content() !== \"\";\n const loading = this.loading || this.attrs.disabled;\n\n return (\n \n
    \n (this.previewContent = false)}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.write\"\n )}\n \n (this.previewContent = true)}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.view\"\n )}\n \n
    \n\n \n {this.previewContent && (\n
    \n {!hasContent &&\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.nothing_to_preview\"\n )}\n\n \n
    \n )}\n\n {TextEditor.component({\n submitLabel:\n this.attrs.submitLabel ||\n app.translator.trans(\"core.forum.composer_edit.submit_button\"),\n placeholder: this.attrs.placeholder,\n disabled: loading,\n composer: this.composer,\n preview: this.jumpToPreview && this.jumpToPreview.bind(this),\n onchange: this.composer.fields.content,\n onsubmit: this.onsubmit.bind(this),\n value: this.composer.fields.content(),\n })}\n
    \n \n );\n }\n\n // Submit trigger\n onsubmit() {\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit();\n }\n }\n}\n","import app from \"flarum/forum/app\";\nimport Page from \"flarum/common/components/Page\";\nimport Button from \"flarum/common/components/Button\";\nimport Link from \"flarum/common/components/Link\";\nimport BlogAuthor from \"../components/BlogItemSidebar/BlogAuthor\";\nimport RenameArticleModal from \"../components/Modals/RenameArticleModal\";\nimport TagDiscussionModal from \"flarum/tags/components/TagDiscussionModal\";\nimport BlogPostSettingsModal from \"../components/Modals/BlogPostSettingsModal\";\nimport Composer from \"../components/Composer/Composer\";\nimport LanguageDropdown from \"../components/LanguageDropdown/LanguageDropdown\";\nimport ItemList from \"flarum/common/utils/ItemList\";\n\nexport default class BlogComposer extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n // User cannot write blogs\n if (!app.forum.attribute(\"canWriteBlogPosts\")) {\n m.route.set(app.route(\"blog\"));\n return;\n }\n\n // Send history push\n app.history.push(\"blogComposer\");\n\n // Get languages (if enabled)\n this.languages = app.store.all(\"discussion-languages\") || [];\n\n // Set body class\n this.bodyClass = \"BlogItemPage BlogItemPage--composer\";\n\n // Article data\n this.articleLanguage = m.route.param(\"lang\")\n ? m.route.param(\"lang\")\n : app.translator.locale;\n this.article = app.store.createRecord(\"discussions\");\n this.blogMeta = null;\n\n this.tags = [];\n\n // Pre-select tags\n if (m.route.param().tags) {\n const tagList = Array.isArray(m.route.param().tags)\n ? m.route.param().tags\n : m.route.param().tags.split(\",\");\n\n if (m.route.param().tags.length > 0) {\n tagList.forEach((tagId) => {\n const foundTag = app.store.getById(\"tags\", tagId);\n\n if (foundTag) {\n this.tags.push(foundTag);\n }\n });\n }\n }\n\n this.isSaving = false;\n }\n\n openTagsModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: this.tags,\n onsubmit: (tags) => {\n this.tags = tags;\n },\n });\n }\n\n openNameArticleModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(RenameArticleModal, {\n article: this.article,\n onChange: (title) => {\n this.article.pushData({\n attributes: {\n title,\n },\n });\n },\n });\n }\n\n openBlogSettings(e) {\n e.preventDefault();\n\n if (this.isSaving) return;\n\n app.modal.show(BlogPostSettingsModal, {\n meta: this.blogMeta,\n onsubmit: (meta) => (this.blogMeta = meta),\n });\n }\n\n view() {\n return (\n
    \n
    {this.pageItems().toArray()}
    \n
    \n );\n }\n\n pageItems() {\n const items = new ItemList();\n\n items.add(\n \"toolButtons\",\n
    \n \n \n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n
    ,\n 100\n );\n\n items.add(\n \"article\",\n
    \n {this.articleWrapperItems().toArray()}\n
    ,\n 90\n );\n\n return items;\n }\n\n articleWrapperItems() {\n const items = new ItemList();\n\n items.add(\n \"container\",\n
    \n {this.articleItems().toArray()}\n
    ,\n 100\n );\n\n items.add(\n \"sidebar\",\n
    \n \n
    ,\n 90\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${\n app.forum.attribute(\"baseUrl\") +\n \"/assets/\" +\n app.forum.attribute(\"blogDefaultImage\")\n })`\n : null;\n\n const blogImage =\n this.blogMeta && this.blogMeta.featuredImage()\n ? `url(${this.blogMeta.featuredImage()})`\n : defaultImage;\n\n items.add(\n \"content\",\n
    \n this.openBlogSettings(e)}\n />\n\n
    \n \n {this.languages !== null && this.languages.length >= 1 && (\n (this.articleLanguage = language)}\n />\n )}\n\n this.openBlogSettings(e)}\n icon={\"fas fa-pencil-alt\"}\n loading={this.isSaving}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.update_settings\"\n )}\n \n
    \n
    \n\n {/* Article Categories */}\n
    \n {this.tags.map((tag) => (\n this.openTagsModal(e)}\n >\n {tag.name()}\n \n ))}\n\n this.openTagsModal(e)}\n >\n {this.tags.length === 0\n ? app.translator.trans(\n \"v17development-flarum-blog.forum.composer.select_category\"\n )\n : app.translator.trans(\n \"v17development-flarum-blog.forum.composer.edit_categories\"\n )}{\" \"}\n \n \n
    \n\n
    \n {/* Article name */}\n this.openNameArticleModal()}\n className=\"FlarumBlog-Article-Title\"\n style={{ cursor: \"pointer\" }}\n >\n {this.article && this.article.title() && this.article.title() !== \"\"\n ? this.article.title()\n : app.translator.trans(\n \"v17development-flarum-blog.forum.composer.no_title\"\n )}\n\n e.preventDefault()}\n >\n \n \n \n\n
    \n this.create()}\n disabled={this.isSaving}\n />\n
    \n
    \n ,\n 100\n );\n\n items.add(\n \"commentsPlaceholder\",\n
    \n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.comments\"\n )}{\" \"}\n (0)\n

    \n {/* Locked */}\n\n
    \n
    \n
    \n {\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.comment_section\"\n )}\n
    \n
    \n
    \n
    ,\n 90\n );\n\n return items;\n }\n\n create() {\n const blogTags = app.forum.attribute(\"blogTags\") || [];\n\n // Force tags\n if (this.tags.length === 0) {\n this.openTagsModal();\n return;\n }\n\n // Force title\n if (!this.article.title() || this.article.title() === \"\") {\n this.openNameArticleModal();\n return;\n }\n\n // Find knowledge base tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No knowledge base tags selected\n if (findblogTags.length === 0) {\n alert(\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.no_blog_tags_selected\"\n )\n );\n return;\n }\n\n if (\n (this.blogMeta === null ||\n (!this.blogMeta.featuredImage() &&\n !app.forum.attribute(\"blogDefaultImage\")) ||\n !this.blogMeta.summary()) &&\n !confirm(\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.post_without_blog_info\"\n )\n )\n ) {\n return;\n }\n\n let relationships = {\n tags: this.tags,\n };\n\n // Add languages if possible\n if (this.languages.length > 0) {\n relationships.language = app.store.getBy(\n \"discussion-languages\",\n \"code\",\n this.articleLanguage\n );\n }\n\n const data = {\n title: this.article.title(),\n content: app.composer.fields.content(),\n relationships,\n blogMeta:\n this.blogMeta !== null\n ? {\n featuredImage: this.blogMeta.featuredImage(),\n summary: this.blogMeta.summary(),\n isSized: this.blogMeta.isSized(),\n }\n : null,\n };\n\n this.isSaving = true;\n\n this.article\n .save(data)\n .then((article) => {\n setTimeout(() => {\n // Redirect to the article\n m.route.set(app.route(\"blogArticle\", { id: `${article.slug()}` }));\n }, 500);\n })\n .catch(() => {\n this.isSaving = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import { extend } from \"flarum/common/extend\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport LinkButton from \"flarum/common/components/LinkButton\";\n\nexport default function addSidebarNav() {\n extend(IndexPage.prototype, \"navItems\", function (items) {\n if (\n app.forum.attribute(\"blogAddSidebarNav\") &&\n app.forum.attribute(\"blogAddSidebarNav\") !== \"0\"\n ) {\n items.add(\n \"blog\",\n \n {app.translator.trans(\"v17development-flarum-blog.forum.blog\")}\n ,\n 15\n );\n }\n\n return items;\n });\n}\n","import type Component from \"flarum/common/components/Component\";\nimport Modal from \"flarum/common/components/Modal\";\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n * `show(componentClass: C, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass & {\n isDismissible: boolean;\n component: typeof Component.component;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class OverrideModalState {\n /**\n * @internal\n */\n modal: null | {\n componentClass: UnsafeModalClass;\n attrs?: Record;\n key: number;\n } = null;\n\n modalList: Array = [];\n\n /**\n * Used to force re-initialization of modals if a modal\n * is replaced by another of the same type.\n */\n private key = 0;\n\n private closeTimeout?: NodeJS.Timeout;\n\n /**\n * Shows a modal dialog.\n *\n * If a modal is already open, the existing one will close and the new modal will replace it.\n *\n * @example Show a modal\n * app.modal.show(MyCoolModal, { attr: 'value' });\n *\n * @example Show a modal from a lifecycle method (`oncreate`, `view`, etc.)\n * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n */\n show(\n componentClass: UnsafeModalClass,\n attrs: Record = {},\n keepLast: Boolean = false\n ): void {\n if (!(componentClass.prototype instanceof Modal)) {\n // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n const invalidModalWarning = \"The ModalManager can only show Modals.\";\n console.error(invalidModalWarning);\n throw new Error(invalidModalWarning);\n }\n\n if (this.closeTimeout) clearTimeout(this.closeTimeout);\n\n // Open new modal\n this.modal = { componentClass, attrs, key: this.key++ };\n\n // Remember previously opened modal\n if (keepLast) {\n this.modalList.push(this.modal);\n } else {\n // Override last modals\n this.modalList = [this.modal];\n }\n\n m.redraw.sync();\n }\n\n /**\n * Closes the currently open dialog, if one is open.\n */\n close(): void {\n if (!this.modal) return;\n\n // There are more modals currently opened\n // Close current and open last in list\n if (this.modalList.length >= 2) {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .one(\"hide.bs.modal\", () => {\n const currentModalPosition = this.modalList.indexOf(this.modal);\n\n // Remove last modal from list\n this.modalList.splice(currentModalPosition, 1);\n\n // Open last modal from list\n this.modal = this.modalList[this.modalList.length - 1];\n\n setTimeout(() => {\n $(document.body).addClass(\"modal-open\");\n }, 1000);\n\n m.redraw();\n })\n .modal(\"hide\");\n\n m.redraw();\n return;\n }\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause Bootstrap's modal JS to misbehave. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n\n this.closeTimeout = setTimeout(() => {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .modal(\"hide\")\n .one(\"hide.bs.modal\", () => {\n this.modal = null;\n\n m.redraw();\n });\n });\n }\n\n /**\n * Checks if a modal is currently open.\n *\n * @return `true` if a modal dialog is currently open, otherwise `false`.\n */\n isModalOpen(): boolean {\n return !!this.modal;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ModalManager'];","import BlogItem from \"./pages/BlogItem\";\nimport Model from \"flarum/common/Model\";\nimport Tag from \"flarum/tags/models/Tag\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport BlogOverview from \"./pages/BlogOverview\";\nimport redirector from \"./utils/redirector\";\nimport BlogMeta from \"../common/Models/BlogMeta\";\nimport extendTagOverview from \"./utils/extendTagOverview\";\nimport discussionRouting from \"./utils/discussionRouting\";\nimport BlogComposer from \"./pages/BlogComposer\";\nimport compat from \"./compat\";\nimport addSidebarNav from \"./utils/addSidebarNav\";\nimport app from \"flarum/forum/app\";\n\n// Create our own modal manager\nimport OverrideModalState from \"./states/OverrideModalState\";\nimport overrideModalManager from \"./utils/overrideModalManager\";\n\n// Register Flarum Blog\napp.initializers.add(\n \"v17development-flarum-blog\",\n (app) => {\n app.routes.blog = { path: \"/blog\", component: BlogOverview };\n\n app.routes.blogCategory = {\n path: \"/blog/category/:slug\",\n component: BlogOverview,\n };\n\n app.routes.blogComposer = {\n path: \"/blog/compose\",\n component: BlogComposer,\n };\n\n app.routes.blogArticle = { path: \"/blog/:id\", component: BlogItem };\n\n app.routes[\"blogArticle.near\"] = {\n path: \"/blog/:id/:near\",\n component: BlogItem,\n };\n\n app.store.models.blogMeta = BlogMeta;\n\n Discussion.prototype.blogMeta = Model.hasOne(\"blogMeta\");\n Tag.prototype.isBlog = Model.attribute(\"isBlog\");\n\n // Redirect discussions/tags to their blog post/overview\n redirector();\n\n // Extend tag overview.\n // Hide tags which are used as blog category\n extendTagOverview();\n\n // Make that blog articles have a blog route and not a discussion route\n discussionRouting();\n\n // Add a link to the blog to the IndexPage sidebar, if enabled.\n addSidebarNav();\n\n /**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n overrideModalManager();\n app.modal = new OverrideModalState();\n },\n -100000\n);\n\ncompat();\n","import IndexPage from \"flarum/forum/components/IndexPage\";\nimport DiscussionPage from \"flarum/forum/components/DiscussionPage\";\nimport { extend, override } from \"flarum/common/extend\";\nimport app from \"flarum/forum/app\";\n\nexport default function () {\n // Redirect tag to blog category\n extend(IndexPage.prototype, \"oncreate\", function () {\n const tag = this.currentTag();\n const tagRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"tags_only\";\n\n // Only trigger when it's a tag page and the redirects are enabled\n if (tag && tagRedirectEnabled) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n // Tag is inside list\n if (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n ) {\n m.route.set(app.route(\"blog\"));\n }\n }\n });\n\n // Redirect discussion to blog article\n override(DiscussionPage.prototype, \"show\", function (original, discussion) {\n const discussionRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"discussions_only\";\n\n if (\n discussionRedirectEnabled &&\n discussion &&\n discussion &&\n discussion.tags().length > 0\n ) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n const foundTags = discussion.tags().filter((tag) => {\n return (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n );\n });\n\n // Only redirect if the discussion has blog tags\n if (foundTags.length > 0) {\n // Redirect to blog article\n const url = app.route(\"blogArticle\", {\n id: discussion.slug(),\n });\n\n m.route.set(url, null, { replace: true });\n\n return null;\n }\n }\n\n return original(discussion);\n });\n}\n","import ModalManager from \"flarum/forum/components/ModalManager\";\nimport { override } from \"flarum/common/extend\";\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\nexport default function overrideModalManager() {\n override(ModalManager.prototype, \"view\", function () {\n return this.attrs.state.modalList.map((modal) => {\n const Tag = modal?.componentClass;\n\n return (\n
    \n {!!Tag && (\n \n )}\n
    \n );\n });\n });\n\n override(ModalManager.prototype, \"animateHide\", function () {\n if (this.attrs.state.modalList.length === 1) {\n this.modalShown = false;\n }\n });\n\n override(\n ModalManager.prototype,\n \"animateShow\",\n function (readyCallback = () => {}) {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\n\n this.modalShown = true;\n\n // If we are opening this modal while another modal is already open,\n // the shown event will not run, because the modal is already open.\n // So, we need to manually trigger the readyCallback.\n if ($(`.modal[modal-key=${this.attrs.state.modal.key}]`).hasClass(\"in\")) {\n readyCallback();\n return;\n }\n\n setTimeout(() => {\n $(`.modal[modal-key=${this.attrs.state.modal.key}]`)\n .one(\"shown.bs.modal\", readyCallback)\n // @ts-expect-error: No typings available for Bootstrap modals.\n .modal({\n backdrop: dismissible || \"static\",\n keyboard: dismissible,\n show: true,\n });\n }, 1);\n }\n );\n}\n","import { compat } from \"@flarum/core/forum\";\nimport BlogAuthor from \"./components/BlogItemSidebar/BlogAuthor\";\nimport BlogItemSidebar from \"./components/BlogItemSidebar/BlogItemSidebar\";\nimport BlogOverviewItem from \"./components/BlogOverviewItem\";\nimport BlogPostController from \"./components/BlogPostController\";\nimport FeaturedBlogItem from \"./components/FeaturedBlogItem\";\nimport ForumNav from \"./components/ForumNav\";\nimport BlogItem from \"./pages/BlogItem\";\nimport BlogOverview from \"./pages/BlogOverview\";\n\nexport default () => {\n Object.assign(compat, {\n \"v17development/blog/components/BlogItemSidebar\": BlogItemSidebar,\n \"v17development/blog/components/BlogAuthor\": BlogAuthor,\n \"v17development/blog/components/ForumNav\": ForumNav,\n \"v17development/blog/components/BlogPostController\": BlogPostController,\n \"v17development/blog/components/BlogOverviewItem\": BlogOverviewItem,\n \"v17development/blog/components/FeaturedBlogItem\": FeaturedBlogItem,\n \"v17development/blog/pages/BlogItem\": BlogItem,\n \"v17development/blog/pages/BlogOverview\": BlogOverview,\n });\n};\n"],"names":["module","exports","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","flarum","extensions","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","r","_setPrototypeOf","p","_inheritsLoose","subClass","superClass","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","BlogPostSettingsModal","oninit","vnode","attrs","article","meta","blogMeta","app","isNew","exists","summary","Stream","featuredImage","isFeatured","isSized","isPendingReview","className","title","content","fields","toArray","items","ItemList","add","style","maxWidth","minWidth","width","minHeight","bidi","placeholder","fofUploadButton","require","components","Uploader","FileManagerModal","uploader","class","onclick","onSelect","files","file","url","icon","src","alt","marginTop","Switch","onchange","val","fontWeight","Button","loading","submitData","relationships","isComposer","discussion","onsubmit","e","preventDefault","pushData","attributes","hide","save","m","redraw","response","handleErrors","Modal","RenameArticleModal","redirect","translator","trans","onChange","slug","route","set","window","history","replaceState","document","BlogPostController","init","loadedPost","manageArticleButtons","LanguageDiscussionModal","canRename","articlePost","firstPost","disabled","canEdit","EditPostComposer","post","canTag","TagDiscussionModal","Alert","canChangeLanguage","canLock","DiscussionControls","isLocked","canHide","isHidden","canDelete","buttons","confirm","extractText","view","Dropdown","label","buttonClassName","menuClassName","onshow","Component","BlogAuthor","author","user","backgroundColor","color","href","username","avatar","bio","listItems","BlogCategories","blogCategories","forum","attribute","map","tagId","tag","store","getById","tags","showSubTags","param","all","_tag","isChild","parent","categoryItem","id","ForumNav","navItems","IndexPage","BlogItemSidebar","itemlist","component","Language","languages","options","reduce","lang","code","extra","language","uppercase","toUpperCase","LanguageDropdown","selected","defaultSelected","formatter","locale","active","BlogOverviewItem","titleItems","text","dataItems","humanTime","createdAt","commentCount","contentItems","getImage","defaultImage","blogImage","classList","backgroundImage","FeaturedBlogItem","topItems","isSticky","position","BlogOverview","bodyClass","isLoading","featuredPosts","posts","hasMore","isLoadingMore","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","bind","reloadData","q","filter","sort","articles","payload","links","loadMore","replace","data","newArticle","location","pathname","clear","Array","fill","currentCategory","join","Page","ArticleSubscription","currentSubscriptionState","subscription","notifyEmail","session","preferences","notifyTooltip","saveSubscription","indexOf","BlogItem","near","found","loadBlogItem","split","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","lastReadPostNumber","postItems","fullTime","fontSize","marginRight","opacity","articleItems","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","BlogMeta","mixin","Model","extendTagOverview","extend","TagsPage","markup","knowledgeBaseTags","tag_tiles","children","tile","remove","original_discussion_route","shouldRedirect","blogTags","ComposerPreview","oncreate","s9e","TextFormatter","preview","dom","Composer","previewContent","hasContent","composer","TextEditor","submitLabel","jumpToPreview","ComposerBody","BlogComposer","articleLanguage","tagList","isArray","foundTag","isSaving","openTagsModal","selectedTags","openNameArticleModal","openBlogSettings","pageItems","articleWrapperItems","cursor","originalContent","alert","addSidebarNav","OverrideModalState","modal","modalList","closeTimeout","componentClass","keepLast","invalidModalWarning","console","clearTimeout","sync","close","$","one","currentModalPosition","splice","body","addClass","isModalOpen","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","Tag","currentTag","tagRedirectEnabled","override","DiscussionPage","original","discussionRouting","ModalManager","animateShow","animateHide","modalShown","readyCallback","dismissible","isDismissible","hasClass","backdrop","keyboard","assign"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"2BAAAA,EAAOC,QAAU,EAAjBD,M,QCOA,IAAIE,EAAW,SAAUD,GACvB,aAEA,IAEIE,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,GAEb,IAEEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAASC,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IAMzC,OAFAG,EAAUI,QAsMZ,SAA0BV,EAASE,EAAMM,GACvC,IAAIG,EAAQC,EAEZ,OAAO,SAAgBC,EAAQC,GAC7B,GAAIH,IAAUI,EACZ,MAAM,IAAIC,MAAM,gCAGlB,GAAIL,IAAUM,EAAmB,CAC/B,GAAe,UAAXJ,EACF,MAAMC,EAKR,OAAOI,IAMT,IAHAV,EAAQK,OAASA,EACjBL,EAAQM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C,yCAA0C7C,M","sources":["webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/regenerator/index.js","webpack://@v17development/flarum-blog/./node_modules/regenerator-runtime/runtime.js","webpack://@v17development/flarum-blog/external assign \"flarum.extensions['fof-upload']\"","webpack://@v17development/flarum-blog/webpack/bootstrap","webpack://@v17development/flarum-blog/webpack/runtime/compat get default export","webpack://@v17development/flarum-blog/webpack/runtime/define property getters","webpack://@v17development/flarum-blog/webpack/runtime/hasOwnProperty shorthand","webpack://@v17development/flarum-blog/webpack/runtime/make namespace object","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Page']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/PostStream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/states/PostStreamState']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Component']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagDiscussionModal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Button']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@v17development/flarum-blog/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/app']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/BlogPostSettingsModal.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/EditPostComposer']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@v17development/flarum-blog/./src/forum/components/Modals/RenameArticleModal.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogPostController.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Link']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogAuthor.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogCategories.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@v17development/flarum-blog/./src/forum/components/ForumNav.js","webpack://@v17development/flarum-blog/./src/forum/components/BlogItemSidebar/BlogItemSidebar.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/Language.js","webpack://@v17development/flarum-blog/./src/forum/components/LanguageDropdown/LanguageDropdown.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@v17development/flarum-blog/./src/forum/components/BlogOverviewItem.tsx","webpack://@v17development/flarum-blog/./src/forum/components/FeaturedBlogItem.tsx","webpack://@v17development/flarum-blog/./src/forum/pages/BlogOverview.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/helpers/fullTime']\"","webpack://@v17development/flarum-blog/./src/forum/components/ArticleSubscription.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogItem.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/Model']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/models/Tag']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/extend']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/utils/mixin']\"","webpack://@v17development/flarum-blog/./src/common/Models/BlogMeta.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['tags/components/TagsPage']\"","webpack://@v17development/flarum-blog/./src/forum/utils/extendTagOverview.js","webpack://@v17development/flarum-blog/./src/forum/utils/discussionRouting.js","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ComposerBody']\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/TextEditor']\"","webpack://@v17development/flarum-blog/./src/forum/components/Composer/ComposerPreview.js","webpack://@v17development/flarum-blog/./src/forum/components/Composer/Composer.js","webpack://@v17development/flarum-blog/./src/forum/pages/BlogComposer.js","webpack://@v17development/flarum-blog/external assign \"flarum.core\"","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@v17development/flarum-blog/./src/forum/utils/addSidebarNav.js","webpack://@v17development/flarum-blog/./src/forum/states/OverrideModalState.ts","webpack://@v17development/flarum-blog/external root \"flarum.core.compat['forum/components/ModalManager']\"","webpack://@v17development/flarum-blog/./src/forum/index.js","webpack://@v17development/flarum-blog/./src/forum/utils/redirector.js","webpack://@v17development/flarum-blog/./src/forum/utils/overrideModalManager.js","webpack://@v17development/flarum-blog/./src/forum/compat.js"],"sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = flarum.extensions['fof-upload'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/PostStream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/PostStreamState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagDiscussionModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Switch'];","import app from \"flarum/forum/app\";\nimport Modal from \"flarum/common/components/Modal\";\nimport Button from \"flarum/common/components/Button\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport Stream from \"flarum/common/utils/Stream\";\nimport Switch from \"flarum/common/components/Switch\";\nimport selectFiles from \"../../utils/selectFiles\";\n\nexport default class BlogPostSettingsModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.attrs.article) {\n this.meta =\n this.attrs.article && this.attrs.article.blogMeta()\n ? this.attrs.article.blogMeta()\n : app.store.createRecord(\"blogMeta\");\n } else {\n this.meta = this.attrs.meta\n ? this.attrs.meta\n : app.store.createRecord(\"blogMeta\");\n }\n\n this.isNew = !this.meta.exists;\n\n this.summary = Stream(this.meta.summary() || \"\");\n\n this.featuredImage = Stream(this.meta.featuredImage() || \"\");\n\n this.isFeatured = Stream(this.meta.isFeatured() || false);\n this.isSized = Stream(this.meta.isSized() || false);\n this.isPendingReview = Stream(this.meta.isPendingReview() || false);\n }\n\n className() {\n return \"Modal--small Support-Modal\";\n }\n\n title() {\n return \"Blog post settings\";\n }\n\n content() {\n return (\n
    \n
    {this.fields().toArray()}
    \n
    \n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n \"summary\",\n
    \n \n \n\n \n This summary will be visible on the blog overview page and will be\n used for SEO purposes.\n \n
    ,\n 30\n );\n\n let fofUploadButton = null;\n\n if (\n \"fof-upload\" in flarum.extensions &&\n app.forum.attribute(\"fof-upload.canUpload\")\n ) {\n const {\n components: { Uploader, FileManagerModal },\n } = require(\"@fof-upload\");\n\n const uploader = new Uploader();\n\n fofUploadButton = (\n {\n app.modal.show(\n FileManagerModal,\n {\n uploader: uploader,\n onSelect: (files) => {\n const file = app.store.getById(\"files\", files[0]);\n\n this.featuredImage(file.url());\n },\n },\n true\n );\n }}\n icon=\"fas fa-cloud-upload-alt\"\n />\n );\n }\n\n items.add(\n \"image\",\n
    \n \n
    \n \n {fofUploadButton}\n
    \n\n Best image resolution for social media: 1200x630\n\n {this.featuredImage() !== \"\" && (\n \n )}\n
    ,\n 30\n );\n\n items.add(\n \"sized\",\n
    \n {Switch.component(\n {\n state: this.isSized() == true,\n onchange: (val) => {\n this.isSized(val);\n },\n },\n [\n Highlighted post,\n
    \n Give this post a big image on the blog overview page.\n
    ,\n ]\n )}\n
    ,\n -10\n );\n\n items.add(\n \"submit\",\n
    \n {Button.component(\n {\n type: \"submit\",\n className: \"Button Button--primary SupportModal-save\",\n loading: this.loading,\n },\n \"Update\"\n )}\n
    ,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n summary: this.summary(),\n featuredImage: this.featuredImage(),\n isFeatured: this.isFeatured(),\n isSized: this.isSized(),\n isPendingReview: this.isPendingReview(),\n relationships:\n this.isNew && !this.attrs.isComposer\n ? {\n discussion: this.attrs.article,\n }\n : null,\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n // Submit data\n if (this.attrs.onsubmit) {\n // Update attributes\n this.meta.pushData({\n attributes: this.submitData(),\n });\n\n // Push\n this.attrs.onsubmit(this.meta);\n\n this.hide();\n return;\n }\n\n this.loading = true;\n\n this.meta.save(this.submitData()).then(\n () => {\n if (this.attrs.article) {\n this.attrs.article.pushData({\n relationships: {\n blogMeta: this.meta,\n },\n });\n }\n\n this.hide();\n m.redraw();\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EditPostComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import Modal from \"flarum/common/components/Modal\";\nimport Button from \"flarum/common/components/Button\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport Stream from \"flarum/common/utils/Stream\";\n\nexport default class RenameArticleModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.article = this.attrs.article;\n\n this.name = Stream(this.article.title() || \"\");\n\n this.redirect = this.attrs.redirect;\n }\n\n className() {\n return \"Modal--small Support-Modal\";\n }\n\n title() {\n return app.translator.trans(\n \"v17development-flarum-blog.forum.tools.rename_article\"\n );\n }\n\n content() {\n return (\n
    \n
    {this.fields().toArray()}
    \n
    \n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n \"name\",\n
    \n \n \n
    ,\n 50\n );\n\n items.add(\n \"submit\",\n
    \n {Button.component(\n {\n type: \"submit\",\n className: \"Button Button--primary SupportModal-save\",\n loading: this.loading,\n },\n \"Update\"\n )}\n
    ,\n -10\n );\n\n return items;\n }\n\n submitData() {\n return {\n title: this.name(),\n };\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n // Do not save\n if (this.attrs.onChange) {\n this.attrs.onChange(this.name());\n this.hide();\n\n return;\n }\n\n this.article\n .save({\n title: this.name(),\n })\n .then(\n () => {\n this.hide();\n\n // Redirect\n if (this.redirect) {\n const url = `/blog/${this.article.slug()}`;\n\n m.route.set(url, true);\n window.history.replaceState(null, document.title, url);\n }\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport TagDiscussionModal from \"flarum/tags/components/TagDiscussionModal\";\nimport DiscussionControls from \"flarum/forum/utils/DiscussionControls\";\nimport Alert from \"flarum/common/components/Alert\";\nimport Button from \"flarum/common/components/Button\";\nimport Dropdown from \"flarum/common/components/Dropdown\";\nimport BlogPostSettingsModal from \"./Modals/BlogPostSettingsModal\";\nimport EditPostComposer from \"flarum/forum/components/EditPostComposer\";\nimport extractText from \"flarum/common/utils/extractText\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport RenameArticleModal from \"./Modals/RenameArticleModal\";\nimport app from \"flarum/forum/app\";\n\nexport default class BlogPostController extends Component {\n init() {\n this.loadedPost = false;\n }\n\n manageArticleButtons() {\n const article = this.attrs.article;\n const items = new ItemList();\n\n // Working for GlowingBlue version\n const LanguageDiscussionModal =\n flarum.extensions[\"fof-discussion-language\"] &&\n typeof flarum.extensions[\"fof-discussion-language\"].components !==\n \"undefined\"\n ? flarum.extensions[\"fof-discussion-language\"].components\n .LanguageDiscussionModal\n : null;\n\n // Rename article\n if (article.canRename()) {\n items.add(\n \"rename\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => app.modal.show(RenameArticleModal, { article }),\n icon: \"fas fa-pencil-alt\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.rename_article\"\n )\n ),\n 100\n );\n }\n\n const articlePost = article.firstPost();\n\n // Edit article\n items.add(\n \"edit\",\n Button.component(\n {\n className: \"Button\",\n disabled: !articlePost || !articlePost.canEdit(),\n onclick: () => {\n app.composer.load(EditPostComposer, { post: articlePost });\n app.composer.show();\n },\n icon: \"fas fa-edit\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.edit_article\"\n )\n ),\n 90\n );\n\n // Article settings\n items.add(\n \"articleSettings\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => app.modal.show(BlogPostSettingsModal, { article }),\n icon: \"fas fa-cogs\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.article_settings\"\n )\n ),\n 80\n );\n\n // Update categories\n if (article.canTag()) {\n items.add(\n \"tag\",\n Button.component(\n {\n className: \"Button\",\n onclick: () =>\n app.modal.show(TagDiscussionModal, { discussion: article }),\n icon: \"fas fa-tag\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.update_category\"\n )\n ),\n 70\n );\n }\n\n // Approve article\n if (article.blogMeta() && article.blogMeta().isPendingReview()) {\n items.add(\"separator1\",
  • , 65);\n\n items.add(\n \"approve\",\n Button.component(\n {\n className: \"Button\",\n disabled: !app.forum.attribute(\"canApproveBlogPosts\"),\n onclick: () => {\n article\n .blogMeta()\n .save({\n isPendingReview: false,\n })\n .then(\n () => {\n app.alerts.show(\n Alert,\n { type: \"success\" },\n app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.approve_article_approved\"\n )\n );\n },\n (response) => {\n this.loading = false;\n this.handleErrors(response);\n }\n );\n },\n icon: \"fas fa-thumbs-up\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.approve_article\"\n )\n ),\n 60\n );\n }\n\n // Language\n if (\n article.canChangeLanguage &&\n article.canChangeLanguage() &&\n LanguageDiscussionModal\n ) {\n items.add(\n \"lang\",\n Button.component(\n {\n icon: \"fas fa-globe\",\n onclick: () =>\n app.modal.show(LanguageDiscussionModal, { discussion: article }),\n },\n app.translator.trans(\n \"fof-discussion-language.forum.discussion_controls.change_language_button\"\n )\n ),\n 50\n );\n }\n\n items.add(\"separator2\",
  • , 40);\n\n // Lock article\n if (article.canLock()) {\n items.add(\n \"lock\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.lockAction.bind(article),\n icon: `fas ${\n article.isLocked() ? \"fa-comments\" : \"fa-comment-slash\"\n }`,\n },\n article.isLocked()\n ? app.translator.trans(\n \"v17development-flarum-blog.forum.tools.enable_comments\"\n )\n : app.translator.trans(\n \"v17development-flarum-blog.forum.tools.disable_comments\"\n )\n ),\n 30\n );\n }\n\n // Hide/show/delete\n if (article.canHide()) {\n // Article is hidden\n if (article.isHidden()) {\n // Recover article\n items.add(\n \"recover\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.restoreAction.bind(article),\n icon: \"fas fa-eye\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.recover_article\"\n )\n ),\n 20\n );\n\n // Delete article\n if (article.canDelete()) {\n buttons.add(\n \"delete\",\n Button.component(\n {\n className: \"Button\",\n onclick: () => {\n // Confirm deletion\n if (\n confirm(\n extractText(\n app.translator.trans(\n \"core.forum.discussion_controls.delete_confirmation\"\n )\n )\n )\n ) {\n // Redirect if the current page is an blog article\n if (app.history.getCurrent().name === \"blogArticle\") {\n if (app.previous) {\n app.history.back();\n } else {\n m.route.set(app.route(\"blog\"));\n }\n }\n\n return article.delete().then(() => {\n m.redraw();\n });\n }\n },\n icon: \"far fa-trash-alt\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.delete_forever\"\n )\n ),\n 10\n );\n }\n } else {\n // Hide article\n items.add(\n \"hide\",\n Button.component(\n {\n className: \"Button\",\n onclick: DiscussionControls.hideAction.bind(article),\n icon: \"fas fa-eye-slash\",\n },\n app.translator.trans(\n \"v17development-flarum-blog.forum.tools.hide_article\"\n )\n ),\n 0\n );\n }\n }\n\n return items;\n }\n\n view() {\n const article = this.attrs.article;\n\n const articlePost = article.firstPost();\n\n return (\n
    \n
    \n {Dropdown.component(\n {\n icon: \"fas fa-cog\",\n label: \"Manage\",\n buttonClassName: \"Button\",\n menuClassName: \"Dropdown-menu--right\",\n onshow: () => {\n // Get post data to make sure they can edit the post\n if (articlePost && !articlePost.canEdit() && !this.loadedPost) {\n this.loadedPost = true;\n m.redraw();\n }\n },\n },\n this.manageArticleButtons().toArray()\n )}\n
    \n
    \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","import Component from \"flarum/common/Component\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport listItems from \"flarum/common/helpers/listItems\";\nimport avatar from \"flarum/common/helpers/avatar\";\nimport Link from \"flarum/common/components/Link\";\n\nexport default class BlogAuthor extends Component {\n view() {\n const author = !this.attrs.loading\n ? this.attrs.article\n ? this.attrs.article.user()\n : this.attrs.user\n : null;\n\n return (\n
    \n \n\n
    \n {author ? (\n \n {avatar(author)}\n \n ) : (\n \n )}\n
    \n\n {author && (\n
    \n \n {author.displayName()}\n \n

    \n {author.bio && author.bio()}\n

    \n\n
      \n {listItems(this.items().toArray())}\n
    \n
    \n )}\n\n {this.attrs.loading && (\n
    \n \n  \n \n \n  \n

    \n \n  \n

    \n \n  \n

    \n
    \n )}\n
    \n );\n }\n\n items() {\n return new ItemList();\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\n\nexport default class BlogCategories extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.blogCategories = app.forum.attribute(\"blogTags\");\n }\n\n view() {\n return (\n
    \n

    \n {app.translator.trans(\"v17development-flarum-blog.forum.categories\")}\n

    \n\n {this.blogCategories &&\n this.blogCategories.map((tagId) => {\n const tag = app.store.getById(\"tags\", tagId);\n\n if (!tag) return null;\n\n const tags = [];\n let showSubTags =\n this.blogCategories.length === 1 ||\n tag.slug() === m.route.param(\"slug\");\n\n // Add tags\n app.store.all(\"tags\").forEach((_tag) => {\n if (_tag.isChild() && _tag.parent() === tag) {\n if (_tag.slug() === m.route.param(\"slug\")) {\n showSubTags = true;\n }\n\n tags.push(this.categoryItem(_tag));\n }\n });\n\n return showSubTags\n ? [this.categoryItem(tag), ...tags]\n : this.categoryItem(tag);\n })}\n
    \n );\n }\n\n // Category item\n categoryItem(tag) {\n return (\n \n \n \n \n {tag.name()}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/SelectDropdown'];","import Component from \"flarum/common/Component\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport SelectDropdown from \"flarum/common/components/SelectDropdown\";\n\nexport default class ForumNav extends Component {\n view() {\n return (\n
    \n

    \n {app.translator.trans(\"v17development-flarum-blog.forum.forum_nav\")}\n

    \n \n
    \n );\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","import Component from \"flarum/common/Component\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport listItems from \"flarum/common/helpers/listItems\";\nimport BlogAuthor from \"./BlogAuthor\";\nimport BlogCategories from \"../BlogCategories\";\nimport ForumNav from \"../ForumNav\";\n\nexport default class BlogItemSidebar extends Component {\n view() {\n return (\n
    \n
      {listItems(this.items().toArray())}
    \n
    \n );\n }\n\n items() {\n const itemlist = new ItemList();\n\n itemlist.add(\"author\", BlogAuthor.component(this.attrs), 0);\n\n itemlist.add(\"categories\", BlogCategories.component(this.attrs), 0);\n\n itemlist.add(\"nav\", ForumNav.component(this.attrs), 0);\n\n return itemlist;\n }\n}\n","import Component from \"flarum/common/Component\";\n\nexport default class Language extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.languages = app.store.all(\"discussion-languages\");\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = (\n \n {lang.name()}\n \n );\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const { language, uppercase } = this.attrs;\n const name = language.name() || \"\";\n\n return (\n \n \n  \n {uppercase ? name.toUpperCase() : name}\n \n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Dropdown from \"flarum/common/components/Dropdown\";\nimport Button from \"flarum/common/components/Button\";\nimport Language from \"./Language\";\n\nexport default class LanguageDropdown extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.languages = app.store.all(\"discussion-languages\");\n this.options = this.languages.reduce((o, lang) => {\n o[lang.code()] = ;\n\n return o;\n }, this.attrs.extra || {});\n }\n\n view() {\n const selected = this.attrs.selected;\n\n return Dropdown.component(\n {\n buttonClassName: \"Button\",\n label: this.options[selected] || this.options[this.attrs.default],\n },\n Object.keys(this.options).map((key) => {\n let defaultSelected;\n if (\n app.forum.attribute(\"fof-discussion-language.composerLocaleDefault\")\n ) {\n defaultSelected = \"any\";\n } else {\n defaultSelected = app.translator.formatter.locale;\n }\n const isSelected = selected || defaultSelected;\n const active = key === isSelected;\n\n return Button.component(\n {\n active,\n icon: active ? \"fas fa-check\" : true,\n onclick: () => this.attrs.onclick(key),\n },\n this.options[key]\n );\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\nimport humanTime from \"flarum/common/helpers/humanTime\";\nimport icon from \"flarum/common/helpers/icon\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport classList from \"flarum/common/utils/classList\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport app from \"flarum/forum/app\";\nimport type Mithril from \"mithril\";\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class BlogOverviewItem extends Component {\n titleItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\"title\", <>{article.title()}, 100);\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add(\n \"hidden\",\n icon(\"fas fa-eye-slash\", { class: \"BlogList-item-hidden\" }),\n 80\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n \"pendingReview\",\n \n {icon(\"far fa-clock\", { class: \"BlogList-item-pendingReview\" })}\n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"createdAt\",\n \n {icon(\"far fa-clock\")} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n \"author\",\n \n {icon(\"far fa-user\")}{\" \"}\n {article.user()?.displayName?.() ||\n app.translator.trans(\"core.lib.username.deleted_text\")}\n ,\n 80\n );\n\n items.add(\n \"replies\",\n \n {icon(\"far fa-comment\")} {(article.commentCount() || 1) - 1}\n ,\n 60\n );\n\n return items;\n }\n\n contentItems(): ItemList {\n const { article } = this.attrs;\n const summary = article.blogMeta()?.summary?.() || \"\";\n\n const items = new ItemList();\n\n items.add(\"title\",

    {this.titleItems().toArray()}

    , 100);\n\n if (summary) items.add(\"summary\",

    {summary}

    , 80);\n\n items.add(\"data\",
    {this.dataItems().toArray()}
    , 60);\n\n return items;\n }\n\n getImage(): string {\n const { article, defaultImage } = this.attrs;\n\n return article.blogMeta()?.featuredImage?.()\n ? `url(${article.blogMeta().featuredImage()})`\n : defaultImage;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = this.getImage();\n\n const isSized = article.blogMeta()?.isSized?.();\n\n return (\n `BlogList-item-category-${tag.id()}`)\n )}\n >\n \n\n
    {this.contentItems().toArray()}
    \n \n );\n }\n}\n","import Component from \"flarum/common/Component\";\nimport Link from \"flarum/common/components/Link\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\nimport humanTime from \"flarum/common/helpers/humanTime\";\nimport icon from \"flarum/common/helpers/icon\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport classList from \"flarum/common/utils/classList\";\nimport app from \"flarum/forum/app\";\nimport type Mithril from \"mithril\";\n\ninterface Attrs {\n article: Discussion;\n defaultImage: string;\n}\n\nexport default class FeaturedBlogItem extends Component {\n topItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"tags\",\n \n {article.tags()?.map((tag) => (\n {tag.name()}\n ))}\n ,\n 100\n );\n\n if (article.isSticky()) {\n items.add(\n \"sticky\",\n \n {icon(\"fas fa-thumbtack\")}\n ,\n 80\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.() || article.isHidden()) {\n items.add(\n \"hidden\",\n \n {icon(\"fas fa-eye-slash\")}\n ,\n 60\n );\n }\n\n if (article.blogMeta()?.isPendingReview?.()) {\n items.add(\n \"pendingReview\",\n \n \n {icon(\"far fa-clock\")}{\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.pending_review_title\"\n )}\n \n ,\n 40\n );\n }\n\n return items;\n }\n\n dataItems(): ItemList {\n const { article } = this.attrs;\n\n const items = new ItemList();\n\n items.add(\n \"createdAt\",\n \n {icon(\"far fa-clock\")} {humanTime(article.createdAt())}\n ,\n 100\n );\n\n items.add(\n \"author\",\n \n {icon(\"far fa-user\")}{\" \"}\n {article.user()?.displayName() ||\n app.translator.trans(\"core.lib.username.deleted_text\")}\n ,\n 80\n );\n\n items.add(\n \"replies\",\n \n {icon(\"far fa-comment\")} {article.commentCount() - 1}\n ,\n 60\n );\n\n return items;\n }\n\n view(vnode: Mithril.Vnode) {\n const { article, defaultImage } = this.attrs;\n\n const blogImage = article.blogMeta()?.featuredImage?.()\n ? `url(${article.blogMeta().featuredImage()})`\n : defaultImage;\n\n return (\n `BlogFeatured-list-item-category-${tag.id()}`),\n \"FlarumBlog-default-image\"\n )}\n style={{ backgroundImage: blogImage }}\n >\n
    \n {this.topItems().toArray()}\n
    \n\n
    \n

    {article.title()}

    \n\n
    {this.dataItems().toArray()}
    \n
    \n \n );\n }\n}\n","import app from \"flarum/forum/app\";\n\nimport IndexPage from \"flarum/components/IndexPage\";\nimport Page from \"flarum/common/components/Page\";\nimport Button from \"flarum/common/components/Button\";\nimport BlogCategories from \"../components/BlogCategories\";\nimport Link from \"flarum/common/components/Link\";\nimport LanguageDropdown from \"../components/LanguageDropdown/LanguageDropdown\";\nimport ForumNav from \"../components/ForumNav\";\nimport BlogOverviewItem from \"../components/BlogOverviewItem\";\nimport FeaturedBlogItem from \"../components/FeaturedBlogItem\";\n\nexport default class BlogOverview extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n this.bodyClass = \"BlogOverviewPage\";\n\n this.isLoading = true;\n this.featuredPosts = [];\n this.posts = [];\n this.hasMore = null;\n this.isLoadingMore = false;\n\n this.languages = app.store.all(\"discussion-languages\");\n\n this.currentSelectedLanguage = m.route.param(\"lang\")\n ? m.route.param(\"lang\")\n : app.translator.formatter.locale;\n\n // Send history push\n app.history.push(\"blog\");\n\n this.loadBlogOverview();\n\n this.featuredCount = parseInt(app.forum.attribute(\"blogFeaturedCount\"));\n\n this.showCategories = true;\n this.showForumNav = true;\n }\n\n // Load blog overview\n loadBlogOverview() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n this.reloadData();\n }\n\n m.redraw();\n }\n\n reloadData() {\n let q = `is:blog${\n m.route.param(\"slug\") ? ` tag:${m.route.param(\"slug\")}` : \"\"\n }`;\n\n if (this.languages !== null && this.languages.length >= 1) {\n q += ` language:${this.currentSelectedLanguage}`;\n }\n\n app.store\n .find(\"discussions\", {\n filter: {\n q,\n },\n sort: \"-createdAt\",\n })\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n // Show blog posts\n show(articles) {\n if (articles.length === 0) {\n this.isLoading = false;\n m.redraw();\n\n return;\n }\n\n // Set pagination\n this.hasMore =\n articles.payload.links && articles.payload.links.next\n ? articles.payload.links.next\n : null;\n\n this.featuredPosts = articles.slice(0, this.featuredCount);\n this.posts =\n articles.length > this.featuredCount\n ? articles.slice(this.featuredCount, articles.length)\n : [];\n\n this.isLoading = false;\n\n m.redraw();\n }\n\n // Load more blog posts\n loadMore() {\n this.isLoadingMore = true;\n\n app.store\n .find(this.hasMore.replace(app.forum.attribute(\"apiUrl\"), \"\"))\n .then((data) => {\n data.map((article) => this.posts.push(article));\n\n // Update hasmore button\n this.hasMore =\n data.payload.links && data.payload.links.next\n ? data.payload.links.next\n : null;\n })\n .catch(() => {})\n .then(() => {\n this.isLoadingMore = false;\n m.redraw();\n });\n }\n\n title() {\n if (!m.route.param(\"slug\")) {\n return (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.recent_posts\"\n )}\n

    \n );\n }\n\n const tag = app.store\n .all(\"tags\")\n .filter((tag) => tag.slug() === m.route.param(\"slug\"));\n\n return (\n

    \n {tag && tag[0] && tag[0].name()}\n \n {\" \"}\n -{\" \"}\n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n

    \n );\n }\n\n view() {\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${\n app.forum.attribute(\"baseUrl\") +\n \"/assets/\" +\n app.forum.attribute(\"blogDefaultImage\")\n })`\n : null;\n\n return [\n app.forum.attribute(\"blogAddHero\") == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n
    \n {app.forum.attribute(\"canWriteBlogPosts\") && (\n this.newArticle()}\n icon={\"fas fa-pencil-alt\"}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.compose.write_article\"\n )}\n \n )}\n\n {this.languages !== null && this.languages.length >= 1 && (\n {\n this.currentSelectedLanguage = language;\n\n m.route.set(document.location.pathname, {\n lang: language,\n });\n\n this.reloadData();\n }}\n />\n )}\n
    \n\n {this.title()}\n\n
    \n\n
    \n {/* Ghost data */}\n {this.isLoading &&\n [...new Array(this.featuredCount).fill(undefined)].map(() => (\n
    \n
    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length >= 0 &&\n this.featuredPosts.map((article) => (\n \n ))}\n
    \n
    \n\n
    \n
    \n {this.isLoading &&\n [false, false, true, false].map((state) => {\n return (\n \n
    \n
    \n

     

    \n

     

    \n\n
    \n \n \n \n
    \n
    \n
    \n );\n })}\n\n {!this.isLoading &&\n this.posts.length >= 1 &&\n this.posts.map((article) => (\n \n ))}\n\n {!this.isLoading &&\n this.featuredPosts.length > 0 &&\n this.hasMore === null && (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.no_more_posts\"\n )}\n

    \n )}\n\n {!this.isLoading &&\n this.featuredPosts.length === 0 &&\n this.posts.length === 0 && (\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.category_empty\"\n )}\n

    \n )}\n\n {!this.isLoading && this.hasMore !== null && (\n
    \n this.loadMore()}\n icon={\"fas fa-chevron-down\"}\n loading={this.isLoadingMore}\n >\n {app.translator.trans(\n \"core.forum.discussion_list.load_more_button\"\n )}\n \n
    \n )}\n
    \n\n
    \n {this.showCategories && }\n {this.showForumNav && }\n
    \n
    \n
    \n ,\n ];\n }\n\n newArticle() {\n let tags = [];\n\n // Get current category\n const currentCategory = app.store.getBy(\n \"tags\",\n \"slug\",\n m.route.param(\"slug\")\n );\n\n if (currentCategory) {\n tags.push(currentCategory);\n }\n\n // Redirect to the composer\n m.route.set(\n app.route(\"blogComposer\", {\n tags: tags.map((tag) => tag.id()).join(),\n lang:\n this.languages.length > 0 ? this.currentSelectedLanguage : undefined,\n })\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/fullTime'];","import Component from \"flarum/common/Component\";\nimport Button from \"flarum/common/components/Button\";\nimport extractText from \"flarum/common/utils/extractText\";\nimport Tooltip from \"flarum/common/components/Tooltip\";\n\nexport default class ArticleSubscription extends Component {\n view() {\n const currentSubscriptionState = this.attrs.discussion.subscription();\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences[\"notify_newPost_email\"];\n const notifyTooltip = extractText(\n app.translator.trans(\n notifyEmail\n ? \"flarum-subscriptions.forum.sub_controls.notify_email_tooltip\"\n : \"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip\"\n )\n );\n\n let title = app.translator.trans(\n \"flarum-subscriptions.forum.sub_controls.not_following_button\"\n );\n let icon = \"far fa-star\";\n\n // Following\n if (currentSubscriptionState === \"follow\") {\n title = app.translator.trans(\n \"flarum-subscriptions.forum.sub_controls.following_button\"\n );\n icon = \"fas fa-star\";\n }\n\n return (\n \n \n {title}\n \n \n );\n }\n\n saveSubscription(discussion, subscription) {\n discussion.save({ subscription });\n }\n}\n","import Page from \"flarum/common/components/Page\";\nimport IndexPage from \"flarum/components/IndexPage\";\nimport CommentPost from \"flarum/forum/components/CommentPost\";\nimport PostStream from \"flarum/forum/components/PostStream\";\nimport PostStreamState from \"flarum/forum/states/PostStreamState\";\nimport BlogPostController from \"../components/BlogPostController\";\nimport BlogItemSidebar from \"../components/BlogItemSidebar/BlogItemSidebar\";\nimport Link from \"flarum/common/components/Link\";\nimport BlogOverview from \"./BlogOverview\";\nimport fullTime from \"flarum/common/helpers/fullTime\";\nimport ArticleSubscription from \"../components/ArticleSubscription\";\nimport classList from \"flarum/common/utils/classList\";\nimport ItemList from \"flarum/common/utils/ItemList\";\nimport icon from \"flarum/common/helpers/icon\";\nimport app from \"flarum/forum/app\";\n\nexport default class BlogItem extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n // Send history push\n app.history.push(\"blogArticle\");\n\n this.bodyClass = \"BlogItemPage\";\n\n this.near = m.route.param(\"near\") || 0;\n\n this.loading = true;\n this.found = false;\n this.article = null;\n\n this.loadBlogItem();\n }\n\n // Load blog overview\n loadBlogItem() {\n const preloadBlogOverview = app.preloadedApiDocument();\n\n if (preloadBlogOverview) {\n // We must wrap this in a setTimeout because if we are mounting this\n // component for the first time on page load, then any calls to m.redraw\n // will be ineffective and thus any configs (scroll code) will be run\n // before stuff is drawn to the page.\n setTimeout(this.show.bind(this, preloadBlogOverview), 0);\n } else {\n app.store\n .find(\"discussions\", m.route.param(\"id\").split(\"-\")[0])\n .then(this.show.bind(this))\n .catch(() => {\n m.redraw();\n });\n }\n\n m.redraw();\n }\n\n // Show blog post\n show(article) {\n // Set article data\n this.article = article;\n\n // Update title\n app.setTitle(\n `${article.title()} - ${app.translator.trans(\n \"v17development-flarum-blog.forum.blog\"\n )}`\n );\n\n this.loading = false;\n\n let includedPosts = [];\n if (article.payload && article.payload.included) {\n const articleId = article.id();\n\n includedPosts = article.payload.included\n .filter(\n (record) =>\n record.type === \"posts\" &&\n record.relationships &&\n record.relationships.discussion &&\n record.relationships.discussion.data.id === articleId\n )\n .map((record) => app.store.getById(\"posts\", record.id))\n .sort((a, b) => a.id() - b.id())\n .slice(0, 20);\n }\n\n this.stream = new PostStreamState(article, includedPosts);\n\n // Scroll to specific post\n if (this.near) {\n this.stream.goToNumber(this.near || 0, true).then(() => {\n app.current.set(\"discussion\", article);\n app.current.set(\"stream\", this.stream);\n });\n }\n\n // Read post on load\n if (app.session.user && !article.lastReadPostNumber()) {\n article.save({ lastReadPostNumber: 1 });\n }\n\n m.redraw();\n }\n\n postItems() {\n let articlePost = null;\n\n if (!this.loading && this.article) {\n articlePost = this.article?.firstPost?.();\n }\n\n const items = new ItemList();\n\n items.add(\n \"title\",\n \n {this?.article?.title?.() || \"Ghost title\"}\n {this.article?.isHidden?.() &&\n `(${app.translator.trans(\n \"v17development-flarum-blog.forum.hidden\"\n )})`}\n ,\n 100\n );\n\n items.add(\n \"publishDate\",\n \n {this.article ? (\n fullTime(this.article.createdAt())\n ) : (\n  \n )}\n ,\n 80\n );\n\n if (this.loading) {\n items.add(\n \"skeleton\",\n [0, 1, 2].map(() => (\n
    \n

     

    \n

     

    \n

     

    \n

     

    \n
    \n )),\n 60\n );\n }\n\n if (!this.loading) {\n if (this.article.blogMeta?.()?.isPendingReview?.()) {\n items.add(\n \"review\",\n
    \n
    \n
    \n {icon(\"far fa-clock\", { style: { marginRight: \"5px\" } })}{\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.review_article.pending_review\"\n )}\n
    \n
    \n
    ,\n 60\n );\n }\n\n if (articlePost) {\n items.add(\"post\", , 40);\n }\n }\n\n return items;\n }\n\n contentItems() {\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${app.forum.attribute(\"baseUrl\")}/assets/${app.forum.attribute(\n \"blogDefaultImage\"\n )})`\n : null;\n\n const blogImage = this.article?.blogMeta()?.featuredImage?.()\n ? `url(${this.article.blogMeta().featuredImage()})`\n : defaultImage;\n\n const items = new ItemList();\n\n items.add(\n \"image\",\n ,\n 100\n );\n\n if (\n this.article &&\n (app.session.user?.canEdit?.() ||\n this.article?.canRename?.() ||\n this.article?.posts?.()?.[0]?.canEdit?.())\n ) {\n items.add(\n \"editArticle\",\n ,\n 80\n );\n }\n\n // Article Categories\n items.add(\n \"categories\",\n
    \n {!this.loading &&\n this.article\n ?.tags?.()\n ?.map((tag) => (\n \n {tag.name()}\n \n ))}\n\n {this.loading &&\n [0, 1].map(() => (\n Category\n ))}\n
    ,\n 60\n );\n\n items.add(\n \"post\",\n
    \n {this.postItems().toArray()}\n
    ,\n 40\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n items.add(\n \"content\",\n
    \n {this.contentItems().toArray()}\n
    ,\n 100\n );\n\n if (\n !(this?.article?.isLocked?.() && this?.article?.commentCount?.() === 1)\n ) {\n items.add(\n \"comments\",\n
    \n {/* Show subscription state */}\n {!this.loading &&\n app.session.user &&\n this.article.subscription &&\n (!this.article.isLocked ||\n (this.article.isLocked && !this.article.isLocked())) && (\n \n )}\n\n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.comments\"\n )}{\" \"}\n ({this.article ? this.article.commentCount() - 1 : 0})\n

    \n\n {/* Locked */}\n {!this.loading && this.article?.isLocked?.() && (\n
    \n
    \n
    \n {\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.locked\"\n )}\n
    \n
    \n
    \n )}\n\n {!this.loading &&\n this.article &&\n PostStream.component({\n discussion: this.article,\n stream: this.stream,\n onPositionChange: this.positionChanged.bind(this),\n })}\n
    ,\n 75\n );\n }\n\n return items;\n }\n\n view() {\n return [\n app.forum.attribute(\"blogAddHero\") == true && IndexPage.prototype.hero(),\n
    \n
    \n
    \n {\n if (app.previous.matches(BlogOverview)) {\n e.preventDefault();\n history.back();\n }\n }}\n >\n \n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n
    \n
    \n
    \n {this.articleItems().toArray()}\n
    \n\n \n
    \n
    \n
    ,\n ];\n }\n\n positionChanged(startNumber, endNumber) {\n const article = this.article;\n\n if (app.session.user && endNumber > (article.lastReadPostNumber() || 0)) {\n article.save({ lastReadPostNumber: endNumber });\n m.redraw();\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/models/Tag'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/mixin'];","import Model from \"flarum/common/Model\";\nimport mixin from \"flarum/common/utils/mixin\";\n\nexport default class BlogMeta extends mixin(Model, {\n discussion: Model.hasOne(\"discussion\"),\n featuredImage: Model.attribute(\"featuredImage\"),\n summary: Model.attribute(\"summary\"),\n isFeatured: Model.attribute(\"isFeatured\"),\n isSized: Model.attribute(\"isSized\"),\n isPendingReview: Model.attribute(\"isPendingReview\"),\n}) {}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['tags/components/TagsPage'];","import { extend } from \"flarum/common/extend\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport TagsPage from \"flarum/tags/components/TagsPage\";\n\nexport default function extendTagOverview() {\n extend(TagsPage.prototype, \"view\", function (markup) {\n // Pending xhr to load all tags, throw back loading indicator.\n if (this.loading) {\n return markup;\n }\n\n if (app.forum.attribute(\"blogHideTags\") === false) return markup;\n\n // Get knowledge base tag ID's\n const knowledgeBaseTags = app.forum.attribute(\"blogTags\") || [];\n\n // Get tiles\n let tag_tiles = markup.children[1].children[1].children[0].children;\n\n // Map through the tiles and remove tiles that are part of the knowledge base\n markup.children[1].children[1].children[0].children = tag_tiles.map(\n (tile, i) => {\n return knowledgeBaseTags.indexOf(this.tags[i].id()) >= 0 ? null : tile;\n }\n );\n\n return markup;\n });\n\n extend(IndexPage.prototype, \"navItems\", function (items) {\n if (app.forum.attribute(\"blogHideTags\") === false) return items;\n\n const blogTags = app.forum.attribute(\"blogTags\") || [];\n\n blogTags.forEach((id) => {\n items.remove(`tag${id}`);\n });\n\n return items;\n });\n}\n","export default function () {\n // Save the original function before we override it\n const original_discussion_route = app.route.discussion;\n\n /**\n * Generate a URL to a discussion OR a Blog Article.\n *\n * CORE_CODE_OVERRIDE: This overrides the standard function from flarum/core.\n * The code is inspired from js/src/forum/routes.js and now handles different types of discussions.\n * It will try to keep the original function executed if the discussion being\n * processed isn't a blog article.\n *\n * @param {Discussion} discussion\n * @param {Integer} [near]\n * @return {String}\n */\n app.route.discussion = (discussion, near) => {\n const discussionRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"discussions_only\";\n let shouldRedirect = false;\n if (discussionRedirectEnabled && discussion.tags().length > 0) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n const foundTags = discussion.tags().filter((tag) => {\n return (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n );\n });\n\n if (foundTags.length > 0) {\n shouldRedirect = true;\n }\n }\n if (shouldRedirect) {\n return discussion.lastReadPostNumber() > 1\n ? app.route(\"blogArticle.near\", {\n id: discussion.slug(),\n near: discussion.lastReadPostNumber(),\n })\n : app.route(\"blogArticle\", {\n id: discussion.slug(),\n });\n } else {\n return original_discussion_route(discussion, near);\n }\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ComposerBody'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/TextEditor'];","import Component from \"flarum/common/Component\";\n\nexport default class ComposerPreview extends Component {\n view() {\n return
    ;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n s9e.TextFormatter.preview(vnode.attrs.content || \"\", vnode.dom);\n }\n}\n","import ComposerBody from \"flarum/forum/components/ComposerBody\";\nimport Button from \"flarum/common/components/Button\";\nimport TextEditor from \"flarum/common/components/TextEditor\";\nimport ComposerPreview from \"./ComposerPreview\";\nimport app from \"flarum/forum/app\";\n\nexport default class Composer extends ComposerBody {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.previewContent = false;\n }\n\n // Render\n view() {\n const hasContent =\n this.composer.fields.content() && this.composer.fields.content() !== \"\";\n const loading = this.loading || this.attrs.disabled;\n\n return (\n \n
    \n (this.previewContent = false)}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.write\"\n )}\n \n (this.previewContent = true)}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.view\"\n )}\n \n
    \n\n \n {this.previewContent && (\n
    \n {!hasContent &&\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.nothing_to_preview\"\n )}\n\n \n
    \n )}\n\n {TextEditor.component({\n submitLabel:\n this.attrs.submitLabel ||\n app.translator.trans(\"core.forum.composer_edit.submit_button\"),\n placeholder: this.attrs.placeholder,\n disabled: loading,\n composer: this.composer,\n preview: this.jumpToPreview && this.jumpToPreview.bind(this),\n onchange: this.composer.fields.content,\n onsubmit: this.onsubmit.bind(this),\n value: this.composer.fields.content(),\n })}\n
    \n \n );\n }\n\n // Submit trigger\n onsubmit() {\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit();\n }\n }\n}\n","import app from \"flarum/forum/app\";\nimport Page from \"flarum/common/components/Page\";\nimport Button from \"flarum/common/components/Button\";\nimport Link from \"flarum/common/components/Link\";\nimport BlogAuthor from \"../components/BlogItemSidebar/BlogAuthor\";\nimport RenameArticleModal from \"../components/Modals/RenameArticleModal\";\nimport TagDiscussionModal from \"flarum/tags/components/TagDiscussionModal\";\nimport BlogPostSettingsModal from \"../components/Modals/BlogPostSettingsModal\";\nimport Composer from \"../components/Composer/Composer\";\nimport LanguageDropdown from \"../components/LanguageDropdown/LanguageDropdown\";\nimport ItemList from \"flarum/common/utils/ItemList\";\n\nexport default class BlogComposer extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.setTitle(app.translator.trans(\"v17development-flarum-blog.forum.blog\"));\n\n // User cannot write blogs\n if (!app.forum.attribute(\"canWriteBlogPosts\")) {\n m.route.set(app.route(\"blog\"));\n return;\n }\n\n // Send history push\n app.history.push(\"blogComposer\");\n\n // Get languages (if enabled)\n this.languages = app.store.all(\"discussion-languages\") || [];\n\n // Set body class\n this.bodyClass = \"BlogItemPage BlogItemPage--composer\";\n\n // Article data\n this.articleLanguage = m.route.param(\"lang\")\n ? m.route.param(\"lang\")\n : app.translator.locale;\n this.article = app.store.createRecord(\"discussions\");\n this.blogMeta = null;\n\n this.tags = [];\n\n // Pre-select tags\n if (m.route.param().tags) {\n const tagList = Array.isArray(m.route.param().tags)\n ? m.route.param().tags\n : m.route.param().tags.split(\",\");\n\n if (m.route.param().tags.length > 0) {\n tagList.forEach((tagId) => {\n const foundTag = app.store.getById(\"tags\", tagId);\n\n if (foundTag) {\n this.tags.push(foundTag);\n }\n });\n }\n }\n\n this.isSaving = false;\n }\n\n openTagsModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: this.tags,\n onsubmit: (tags) => {\n this.tags = tags;\n },\n });\n }\n\n openNameArticleModal(e = null) {\n if (e) {\n e.preventDefault();\n }\n\n if (this.isSaving) return;\n\n app.modal.show(RenameArticleModal, {\n article: this.article,\n onChange: (title) => {\n this.article.pushData({\n attributes: {\n title,\n },\n });\n },\n });\n }\n\n openBlogSettings(e) {\n e.preventDefault();\n\n if (this.isSaving) return;\n\n app.modal.show(BlogPostSettingsModal, {\n meta: this.blogMeta,\n onsubmit: (meta) => (this.blogMeta = meta),\n });\n }\n\n view() {\n return (\n
    \n
    {this.pageItems().toArray()}
    \n
    \n );\n }\n\n pageItems() {\n const items = new ItemList();\n\n items.add(\n \"toolButtons\",\n
    \n \n \n \n {app.translator.trans(\n \"v17development-flarum-blog.forum.return_to_overview\"\n )}\n \n \n
    ,\n 100\n );\n\n items.add(\n \"article\",\n
    \n {this.articleWrapperItems().toArray()}\n
    ,\n 90\n );\n\n return items;\n }\n\n articleWrapperItems() {\n const items = new ItemList();\n\n items.add(\n \"container\",\n
    \n {this.articleItems().toArray()}\n
    ,\n 100\n );\n\n items.add(\n \"sidebar\",\n
    \n \n
    ,\n 90\n );\n\n return items;\n }\n\n articleItems() {\n const items = new ItemList();\n\n const defaultImage = app.forum.attribute(\"blogDefaultImage\")\n ? `url(${\n app.forum.attribute(\"baseUrl\") +\n \"/assets/\" +\n app.forum.attribute(\"blogDefaultImage\")\n })`\n : null;\n\n const blogImage =\n this.blogMeta && this.blogMeta.featuredImage()\n ? `url(${this.blogMeta.featuredImage()})`\n : defaultImage;\n\n items.add(\n \"content\",\n
    \n this.openBlogSettings(e)}\n />\n\n
    \n \n {this.languages !== null && this.languages.length >= 1 && (\n (this.articleLanguage = language)}\n />\n )}\n\n this.openBlogSettings(e)}\n icon={\"fas fa-pencil-alt\"}\n loading={this.isSaving}\n >\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.update_settings\"\n )}\n \n
    \n
    \n\n {/* Article Categories */}\n
    \n {this.tags.map((tag) => (\n this.openTagsModal(e)}\n >\n {tag.name()}\n \n ))}\n\n this.openTagsModal(e)}\n >\n {this.tags.length === 0\n ? app.translator.trans(\n \"v17development-flarum-blog.forum.composer.select_category\"\n )\n : app.translator.trans(\n \"v17development-flarum-blog.forum.composer.edit_categories\"\n )}{\" \"}\n \n \n
    \n\n
    \n {/* Article name */}\n this.openNameArticleModal()}\n className=\"FlarumBlog-Article-Title\"\n style={{ cursor: \"pointer\" }}\n >\n {this.article && this.article.title() && this.article.title() !== \"\"\n ? this.article.title()\n : app.translator.trans(\n \"v17development-flarum-blog.forum.composer.no_title\"\n )}\n\n e.preventDefault()}\n >\n \n \n \n\n
    \n this.create()}\n disabled={this.isSaving}\n />\n
    \n
    \n ,\n 100\n );\n\n items.add(\n \"commentsPlaceholder\",\n
    \n

    \n {app.translator.trans(\n \"v17development-flarum-blog.forum.comment_section.comments\"\n )}{\" \"}\n (0)\n

    \n {/* Locked */}\n\n
    \n
    \n
    \n {\" \"}\n {app.translator.trans(\n \"v17development-flarum-blog.forum.composer.comment_section\"\n )}\n
    \n
    \n
    \n
    ,\n 90\n );\n\n return items;\n }\n\n create() {\n const blogTags = app.forum.attribute(\"blogTags\") || [];\n\n // Force tags\n if (this.tags.length === 0) {\n this.openTagsModal();\n return;\n }\n\n // Force title\n if (!this.article.title() || this.article.title() === \"\") {\n this.openNameArticleModal();\n return;\n }\n\n // Find knowledge base tags\n const findblogTags = this.tags.filter((tag) => {\n return blogTags.indexOf(tag.id()) >= 0;\n });\n\n // No knowledge base tags selected\n if (findblogTags.length === 0) {\n alert(\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.no_blog_tags_selected\"\n )\n );\n return;\n }\n\n if (\n (this.blogMeta === null ||\n (!this.blogMeta.featuredImage() &&\n !app.forum.attribute(\"blogDefaultImage\")) ||\n !this.blogMeta.summary()) &&\n !confirm(\n app.translator.trans(\n \"v17development-flarum-blog.forum.composer.post_without_blog_info\"\n )\n )\n ) {\n return;\n }\n\n let relationships = {\n tags: this.tags,\n };\n\n // Add languages if possible\n if (this.languages.length > 0) {\n relationships.language = app.store.getBy(\n \"discussion-languages\",\n \"code\",\n this.articleLanguage\n );\n }\n\n const data = {\n title: this.article.title(),\n content: app.composer.fields.content(),\n relationships,\n blogMeta:\n this.blogMeta !== null\n ? {\n featuredImage: this.blogMeta.featuredImage(),\n summary: this.blogMeta.summary(),\n isSized: this.blogMeta.isSized(),\n }\n : null,\n };\n\n this.isSaving = true;\n\n this.article\n .save(data)\n .then((article) => {\n setTimeout(() => {\n // Redirect to the article\n m.route.set(app.route(\"blogArticle\", { id: `${article.slug()}` }));\n }, 500);\n })\n .catch(() => {\n this.isSaving = false;\n m.redraw();\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import { extend } from \"flarum/common/extend\";\nimport IndexPage from \"flarum/forum/components/IndexPage\";\nimport LinkButton from \"flarum/common/components/LinkButton\";\n\nexport default function addSidebarNav() {\n extend(IndexPage.prototype, \"navItems\", function (items) {\n if (\n app.forum.attribute(\"blogAddSidebarNav\") &&\n app.forum.attribute(\"blogAddSidebarNav\") !== \"0\"\n ) {\n items.add(\n \"blog\",\n \n {app.translator.trans(\"v17development-flarum-blog.forum.blog\")}\n ,\n 15\n );\n }\n\n return items;\n });\n}\n","import type Component from \"flarum/common/components/Component\";\nimport Modal from \"flarum/common/components/Modal\";\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n * `show(componentClass: C, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass & {\n isDismissible: boolean;\n component: typeof Component.component;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class OverrideModalState {\n /**\n * @internal\n */\n modal: null | {\n componentClass: UnsafeModalClass;\n attrs?: Record;\n key: number;\n } = null;\n\n modalList: Array = [];\n\n /**\n * Used to force re-initialization of modals if a modal\n * is replaced by another of the same type.\n */\n private key = 0;\n\n private closeTimeout?: NodeJS.Timeout;\n\n /**\n * Shows a modal dialog.\n *\n * If a modal is already open, the existing one will close and the new modal will replace it.\n *\n * @example Show a modal\n * app.modal.show(MyCoolModal, { attr: 'value' });\n *\n * @example Show a modal from a lifecycle method (`oncreate`, `view`, etc.)\n * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n */\n show(\n componentClass: UnsafeModalClass,\n attrs: Record = {},\n keepLast: Boolean = false\n ): void {\n if (!(componentClass.prototype instanceof Modal)) {\n // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n const invalidModalWarning = \"The ModalManager can only show Modals.\";\n console.error(invalidModalWarning);\n throw new Error(invalidModalWarning);\n }\n\n if (this.closeTimeout) clearTimeout(this.closeTimeout);\n\n // Open new modal\n this.modal = { componentClass, attrs, key: this.key++ };\n\n // Remember previously opened modal\n if (keepLast) {\n this.modalList.push(this.modal);\n } else {\n // Override last modals\n this.modalList = [this.modal];\n }\n\n m.redraw.sync();\n }\n\n /**\n * Closes the currently open dialog, if one is open.\n */\n close(): void {\n if (!this.modal) return;\n\n // There are more modals currently opened\n // Close current and open last in list\n if (this.modalList.length >= 2) {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .one(\"hide.bs.modal\", () => {\n const currentModalPosition = this.modalList.indexOf(this.modal);\n\n // Remove last modal from list\n this.modalList.splice(currentModalPosition, 1);\n\n // Open last modal from list\n this.modal = this.modalList[this.modalList.length - 1];\n\n setTimeout(() => {\n $(document.body).addClass(\"modal-open\");\n }, 1000);\n\n m.redraw();\n })\n .modal(\"hide\");\n\n m.redraw();\n return;\n }\n\n // Don't hide the modal immediately, because if the consumer happens to call\n // the `show` method straight after to show another modal dialog, it will\n // cause Bootstrap's modal JS to misbehave. Instead we will wait for a tiny\n // bit to give the `show` method the opportunity to prevent this from going\n // ahead.\n\n this.closeTimeout = setTimeout(() => {\n $(`.modal[modal-key=${this.modal?.key}]`)\n .modal(\"hide\")\n .one(\"hide.bs.modal\", () => {\n this.modal = null;\n\n m.redraw();\n });\n });\n }\n\n /**\n * Checks if a modal is currently open.\n *\n * @return `true` if a modal dialog is currently open, otherwise `false`.\n */\n isModalOpen(): boolean {\n return !!this.modal;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ModalManager'];","import BlogItem from \"./pages/BlogItem\";\nimport Model from \"flarum/common/Model\";\nimport Tag from \"flarum/tags/models/Tag\";\nimport Discussion from \"flarum/common/models/Discussion\";\nimport BlogOverview from \"./pages/BlogOverview\";\nimport redirector from \"./utils/redirector\";\nimport BlogMeta from \"../common/Models/BlogMeta\";\nimport extendTagOverview from \"./utils/extendTagOverview\";\nimport discussionRouting from \"./utils/discussionRouting\";\nimport BlogComposer from \"./pages/BlogComposer\";\nimport compat from \"./compat\";\nimport addSidebarNav from \"./utils/addSidebarNav\";\nimport app from \"flarum/forum/app\";\n\n// Create our own modal manager\nimport OverrideModalState from \"./states/OverrideModalState\";\nimport overrideModalManager from \"./utils/overrideModalManager\";\n\n// Register Flarum Blog\napp.initializers.add(\n \"v17development-flarum-blog\",\n (app) => {\n app.routes.blog = { path: \"/blog\", component: BlogOverview };\n\n app.routes.blogCategory = {\n path: \"/blog/category/:slug\",\n component: BlogOverview,\n };\n\n app.routes.blogComposer = {\n path: \"/blog/compose\",\n component: BlogComposer,\n };\n\n app.routes.blogArticle = { path: \"/blog/:id\", component: BlogItem };\n\n app.routes[\"blogArticle.near\"] = {\n path: \"/blog/:id/:near\",\n component: BlogItem,\n };\n\n app.store.models.blogMeta = BlogMeta;\n\n Discussion.prototype.blogMeta = Model.hasOne(\"blogMeta\");\n Tag.prototype.isBlog = Model.attribute(\"isBlog\");\n\n // Redirect discussions/tags to their blog post/overview\n redirector();\n\n // Extend tag overview.\n // Hide tags which are used as blog category\n extendTagOverview();\n\n // Make that blog articles have a blog route and not a discussion route\n discussionRouting();\n\n // Add a link to the blog to the IndexPage sidebar, if enabled.\n addSidebarNav();\n\n /**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n overrideModalManager();\n app.modal = new OverrideModalState();\n },\n -100000\n);\n\ncompat();\n","import IndexPage from \"flarum/forum/components/IndexPage\";\nimport DiscussionPage from \"flarum/forum/components/DiscussionPage\";\nimport { extend, override } from \"flarum/common/extend\";\nimport app from \"flarum/forum/app\";\n\nexport default function () {\n // Redirect tag to blog category\n extend(IndexPage.prototype, \"oncreate\", function () {\n const tag = this.currentTag();\n const tagRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"tags_only\";\n\n // Only trigger when it's a tag page and the redirects are enabled\n if (tag && tagRedirectEnabled) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n // Tag is inside list\n if (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n ) {\n m.route.set(app.route(\"blog\"));\n }\n }\n });\n\n // Redirect discussion to blog article\n override(DiscussionPage.prototype, \"show\", function (original, discussion) {\n const discussionRedirectEnabled =\n app.forum.attribute(\"blogRedirectsEnabled\") === \"both\" ||\n app.forum.attribute(\"blogRedirectsEnabled\") === \"discussions_only\";\n\n if (\n discussionRedirectEnabled &&\n discussion &&\n discussion &&\n discussion.tags().length > 0\n ) {\n const blogTags = app.forum.attribute(\"blogTags\");\n\n const foundTags = discussion.tags().filter((tag) => {\n return (\n blogTags.indexOf(tag.id()) >= 0 ||\n (tag.parent() && blogTags.indexOf(tag.parent().id()) >= 0)\n );\n });\n\n // Only redirect if the discussion has blog tags\n if (foundTags.length > 0) {\n // Redirect to blog article\n const url = app.route(\"blogArticle\", {\n id: discussion.slug(),\n });\n\n m.route.set(url, null, { replace: true });\n\n return null;\n }\n }\n\n return original(discussion);\n });\n}\n","import ModalManager from \"flarum/forum/components/ModalManager\";\nimport { override } from \"flarum/common/extend\";\n\n/**\n * Notice from V17: Temporary override due to lack of multi-dialogs!\n *\n * We'll open a PR to support multi-dialog to the Flarum main repo\n */\n\nexport default function overrideModalManager() {\n override(ModalManager.prototype, \"view\", function () {\n return this.attrs.state.modalList.map((modal) => {\n const Tag = modal?.componentClass;\n\n return (\n
    \n {!!Tag && (\n \n )}\n
    \n );\n });\n });\n\n override(ModalManager.prototype, \"animateHide\", function () {\n if (this.attrs.state.modalList.length === 1) {\n this.modalShown = false;\n }\n });\n\n override(\n ModalManager.prototype,\n \"animateShow\",\n function (readyCallback = () => {}) {\n if (!this.attrs.state.modal) return;\n\n const dismissible = !!this.attrs.state.modal.componentClass.isDismissible;\n\n this.modalShown = true;\n\n // If we are opening this modal while another modal is already open,\n // the shown event will not run, because the modal is already open.\n // So, we need to manually trigger the readyCallback.\n if ($(`.modal[modal-key=${this.attrs.state.modal.key}]`).hasClass(\"in\")) {\n readyCallback();\n return;\n }\n\n setTimeout(() => {\n $(`.modal[modal-key=${this.attrs.state.modal.key}]`)\n .one(\"shown.bs.modal\", readyCallback)\n // @ts-expect-error: No typings available for Bootstrap modals.\n .modal({\n backdrop: dismissible || \"static\",\n keyboard: dismissible,\n show: true,\n });\n }, 1);\n }\n );\n}\n","import { compat } from \"@flarum/core/forum\";\nimport BlogAuthor from \"./components/BlogItemSidebar/BlogAuthor\";\nimport BlogItemSidebar from \"./components/BlogItemSidebar/BlogItemSidebar\";\nimport BlogOverviewItem from \"./components/BlogOverviewItem\";\nimport BlogPostController from \"./components/BlogPostController\";\nimport FeaturedBlogItem from \"./components/FeaturedBlogItem\";\nimport ForumNav from \"./components/ForumNav\";\nimport BlogItem from \"./pages/BlogItem\";\nimport BlogOverview from \"./pages/BlogOverview\";\n\nexport default () => {\n Object.assign(compat, {\n \"v17development/blog/components/BlogItemSidebar\": BlogItemSidebar,\n \"v17development/blog/components/BlogAuthor\": BlogAuthor,\n \"v17development/blog/components/ForumNav\": ForumNav,\n \"v17development/blog/components/BlogPostController\": BlogPostController,\n \"v17development/blog/components/BlogOverviewItem\": BlogOverviewItem,\n \"v17development/blog/components/FeaturedBlogItem\": FeaturedBlogItem,\n \"v17development/blog/pages/BlogItem\": BlogItem,\n \"v17development/blog/pages/BlogOverview\": BlogOverview,\n });\n};\n"],"names":["module","exports","runtime","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","flarum","extensions","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","r","_setPrototypeOf","p","_inheritsLoose","subClass","superClass","core","compat","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","BlogPostSettingsModal","oninit","vnode","attrs","article","meta","blogMeta","app","isNew","exists","summary","Stream","featuredImage","isFeatured","isSized","isPendingReview","className","title","content","fields","toArray","items","ItemList","add","style","maxWidth","minWidth","width","minHeight","bidi","placeholder","fofUploadButton","require","components","Uploader","FileManagerModal","uploader","class","onclick","onSelect","files","file","url","icon","src","alt","marginTop","Switch","onchange","val","fontWeight","Button","loading","submitData","relationships","isComposer","discussion","onsubmit","e","preventDefault","pushData","attributes","hide","save","m","redraw","response","handleErrors","Modal","RenameArticleModal","redirect","translator","trans","onChange","slug","route","set","window","history","replaceState","document","BlogPostController","init","loadedPost","manageArticleButtons","LanguageDiscussionModal","canRename","articlePost","firstPost","disabled","canEdit","EditPostComposer","post","canTag","TagDiscussionModal","Alert","canChangeLanguage","canLock","DiscussionControls","isLocked","canHide","isHidden","canDelete","buttons","confirm","extractText","view","Dropdown","label","buttonClassName","menuClassName","onshow","Component","BlogAuthor","author","user","backgroundColor","color","href","username","avatar","bio","listItems","BlogCategories","blogCategories","forum","attribute","map","tagId","tag","store","getById","tags","showSubTags","param","all","_tag","isChild","parent","categoryItem","id","ForumNav","navItems","IndexPage","BlogItemSidebar","itemlist","component","Language","languages","options","reduce","lang","code","extra","language","uppercase","toUpperCase","LanguageDropdown","selected","defaultSelected","formatter","locale","active","BlogOverviewItem","titleItems","text","dataItems","humanTime","createdAt","commentCount","contentItems","getImage","defaultImage","blogImage","classList","backgroundImage","FeaturedBlogItem","topItems","isSticky","position","BlogOverview","bodyClass","isLoading","featuredPosts","posts","hasMore","isLoadingMore","currentSelectedLanguage","loadBlogOverview","featuredCount","parseInt","showCategories","showForumNav","preloadBlogOverview","setTimeout","show","bind","reloadData","q","filter","sort","articles","payload","links","loadMore","replace","data","newArticle","location","pathname","clear","Array","fill","currentCategory","join","Page","ArticleSubscription","currentSubscriptionState","subscription","notifyEmail","session","preferences","notifyTooltip","saveSubscription","indexOf","BlogItem","near","found","loadBlogItem","split","includedPosts","included","articleId","b","stream","PostStreamState","goToNumber","lastReadPostNumber","postItems","fullTime","fontSize","marginRight","opacity","articleItems","PostStream","onPositionChange","positionChanged","back","startNumber","endNumber","BlogMeta","mixin","Model","extendTagOverview","extend","TagsPage","markup","knowledgeBaseTags","tag_tiles","children","tile","remove","original_discussion_route","shouldRedirect","blogTags","ComposerPreview","oncreate","s9e","TextFormatter","preview","dom","Composer","previewContent","hasContent","composer","TextEditor","submitLabel","jumpToPreview","ComposerBody","BlogComposer","articleLanguage","tagList","isArray","foundTag","isSaving","openTagsModal","selectedTags","openNameArticleModal","openBlogSettings","pageItems","articleWrapperItems","cursor","originalContent","alert","addSidebarNav","OverrideModalState","modal","modalList","closeTimeout","componentClass","keepLast","invalidModalWarning","console","clearTimeout","sync","close","$","one","currentModalPosition","splice","body","addClass","isModalOpen","routes","blog","path","blogCategory","blogComposer","blogArticle","models","Discussion","Tag","currentTag","tagRedirectEnabled","override","DiscussionPage","original","discussionRouting","ModalManager","animateShow","animateHide","modalShown","readyCallback","dismissible","isDismissible","hasClass","backdrop","keyboard","assign"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/pages/BlogItem.js b/js/src/forum/pages/BlogItem.js index 0b7be8a..5440ca5 100644 --- a/js/src/forum/pages/BlogItem.js +++ b/js/src/forum/pages/BlogItem.js @@ -98,7 +98,7 @@ export default class BlogItem extends Page { } // Read post on load - if (!article.lastReadPostNumber()) { + if (app.session.user && !article.lastReadPostNumber()) { article.save({ lastReadPostNumber: 1 }); } diff --git a/src/Controller/BlogItemController.php b/src/Controller/BlogItemController.php index e1dbf23..eb432d1 100644 --- a/src/Controller/BlogItemController.php +++ b/src/Controller/BlogItemController.php @@ -47,15 +47,15 @@ public function __invoke(Document $document, ServerRequestInterface $request) // Set social media title \V17Development\FlarumSeo\Extend::setTitle($apiDocument->data->attributes->title, false); - + // Article URL - $fullArticleUrl = $this->url->to('forum')->route('blog.post', ['id' => $apiDocument->data->id . '-' . $apiDocument->data->attributes->slug]); + $fullArticleUrl = $this->url->to('forum')->route('blog.post', ['id' => $apiDocument->data->attributes->slug]); \V17Development\FlarumSeo\Extend::setUrl($fullArticleUrl, false); \V17Development\FlarumSeo\Extend::setCanonicalUrl($fullArticleUrl); \V17Development\FlarumSeo\Extend::setSchemaJson('@type', 'BlogPosting'); - + // Article image $articleHasImage = false; @@ -72,7 +72,7 @@ public function __invoke(Document $document, ServerRequestInterface $request) \V17Development\FlarumSeo\Extend::setImage($blogMeta->featured_image); } } - + // Set featured image if(!$articleHasImage && $this->settings->get('blog_default_image_path', null) !== null) { \V17Development\FlarumSeo\Extend::setImage($this->url->to('forum')->base() . "/assets/" . $this->settings->get('blog_default_image_path', null)); @@ -80,7 +80,7 @@ public function __invoke(Document $document, ServerRequestInterface $request) // Add article changed \V17Development\FlarumSeo\Extend::setPublishedOn($apiDocument->data->attributes->createdAt); - + // Add article update time if (isset($apiDocument->data->attributes->metaLastEditedTime)) { \V17Development\FlarumSeo\Extend::setUpdatedOn($apiDocument->data->attributes->metaLastEditedTime); @@ -112,4 +112,4 @@ private function getApiDocument(ServerRequestInterface $request, $id) return json_decode($response->getBody()); } -} \ No newline at end of file +}