diff --git a/js/dist-typings/compat.d.ts b/js/dist-typings/compat.d.ts new file mode 100644 index 0000000..76990fe --- /dev/null +++ b/js/dist-typings/compat.d.ts @@ -0,0 +1,49 @@ +import AuthMethodModal from './components/AuthMethodModal'; +import ConfigureAuth from './components/ConfigureAuth'; +import ConfigureComposer from './components/ConfigureComposer'; +import ConfigureJson from './components/ConfigureJson'; +import ControlSection from './components/ControlSection'; +import ExtensionItem from './components/ExtensionItem'; +import Installer from './components/Installer'; +import Label from './components/Label'; +import MajorUpdater from './components/MajorUpdater'; +import Pagination from './components/Pagination'; +import QueueSection from './components/QueueSection'; +import RepositoryModal from './components/RepositoryModal'; +import SettingsPage from './components/SettingsPage'; +import TaskOutputModal from './components/TaskOutputModal'; +import Updater from './components/Updater'; +import WhyNotModal from './components/WhyNotModal'; +import Task from './models/Task'; +import ControlSectionState from './states/ControlSectionState'; +import ExtensionManagerState from './states/ExtensionManagerState'; +import QueueState from './states/QueueState'; +import errorHandler from './utils/errorHandler'; +import humanDuration from './utils/humanDuration'; +import jumpToQueue from './utils/jumpToQueue'; +declare const _default: { + 'extension-manager/components/AuthMethodModal': typeof AuthMethodModal; + 'extension-manager/components/ConfigureAuth': typeof ConfigureAuth; + 'extension-manager/components/ConfigureComposer': typeof ConfigureComposer; + 'extension-manager/components/ConfigureJson': typeof ConfigureJson; + 'extension-manager/components/ControlSection': typeof ControlSection; + 'extension-manager/components/ExtensionItem': typeof ExtensionItem; + 'extension-manager/components/Installer': typeof Installer; + 'extension-manager/components/Label': typeof Label; + 'extension-manager/components/MajorUpdater': typeof MajorUpdater; + 'extension-manager/components/Pagination': typeof Pagination; + 'extension-manager/components/QueueSection': typeof QueueSection; + 'extension-manager/components/RepositoryModal': typeof RepositoryModal; + 'extension-manager/components/SettingsPage': typeof SettingsPage; + 'extension-manager/components/TaskOutputModal': typeof TaskOutputModal; + 'extension-manager/components/Updater': typeof Updater; + 'extension-manager/components/WhyNotModal': typeof WhyNotModal; + 'extension-manager/models/Task': typeof Task; + 'extension-manager/states/ControlSectionState': typeof ControlSectionState; + 'extension-manager/states/ExtensionManagerState': typeof ExtensionManagerState; + 'extension-manager/states/QueueState': typeof QueueState; + 'extension-manager/utils/errorHandler': typeof errorHandler; + 'extension-manager/utils/humanDuration': typeof humanDuration; + 'extension-manager/utils/jumpToQueue': typeof jumpToQueue; +}; +export default _default; diff --git a/js/dist/admin.js b/js/dist/admin.js index ed43a5c..6aaa266 100755 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={3:function(t){t.exports=function(){"use strict";var t,n,e=1e3,a=6e4,s=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,l=2592e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:i,months:l,days:r,hours:s,minutes:a,seconds:e,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof b},d=function(t,n,e){return new b(t,e,n.$l)},p=function(t){return n.p(t)+"s"},f=function(t){return t<0},h=function(t){return f(t)?Math.ceil(t):Math.floor(t)},g=function(t){return Math.abs(t)},x=function(t,n){return t?f(t)?{negative:!0,format:""+g(t)+n}:{negative:!1,format:""+t+n}:{negative:!1,format:""}},b=function(){function f(t,n,e){var a=this;if(this.$d={},this.$l=e,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),n)return d(t*m[p(n)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(n){a.$d[p(n)]=t[n]})),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(u);if(s){var r=s.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var g=f.prototype;return g.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(n,e){return n+(t.$d[e]||0)*m[e]}),0)},g.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=h(t/i),t%=i,this.$d.months=h(t/l),t%=l,this.$d.days=h(t/r),t%=r,this.$d.hours=h(t/s),t%=s,this.$d.minutes=h(t/a),t%=a,this.$d.seconds=h(t/e),t%=e,this.$d.milliseconds=t},g.toISOString=function(){var t=x(this.$d.years,"Y"),n=x(this.$d.months,"M"),e=+this.$d.days||0;this.$d.weeks&&(e+=7*this.$d.weeks);var a=x(e,"D"),s=x(this.$d.hours,"H"),r=x(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var i=x(o,"S"),l=t.negative||n.negative||a.negative||s.negative||r.negative||i.negative,u=s.format||r.format||i.format?"T":"",m=(l?"-":"")+"P"+t.format+n.format+a.format+u+s.format+r.format+i.format;return"P"===m||"-P"===m?"P0D":m},g.toJSON=function(){return this.toISOString()},g.format=function(t){var e=t||"YYYY-MM-DDTHH:mm:ss",a={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return e.replace(o,(function(t,n){return n||String(a[t])}))},g.as=function(t){return this.$ms/m[p(t)]},g.get=function(t){var n=this.$ms,e=p(t);return"milliseconds"===e?n%=1e3:n="weeks"===e?h(n/m[e]):this.$d[e],0===n?0:n},g.add=function(t,n,e){var a;return a=n?t*m[p(n)]:c(t)?t.$ms:d(t,this).$ms,d(this.$ms+a*(e?-1:1),this)},g.subtract=function(t,n){return this.add(t,n,!0)},g.locale=function(t){var n=this.clone();return n.$l=t,n},g.clone=function(){return d(this.$ms,this)},g.humanize=function(n){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!n)},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},f}();return function(e,a,s){t=s,n=s().$utils(),s.duration=function(t,n){var e=s.locale();return d(t,{$l:e},n)},s.isDuration=c;var r=a.prototype.add,o=a.prototype.subtract;a.prototype.add=function(t,n){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,n)},a.prototype.subtract=function(t,n){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,n)}}}()}},n={};function e(a){var s=n[a];if(void 0!==s)return s.exports;var r=n[a]={exports:{}};return t[a].call(r.exports,r,r.exports,e),r.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};(()=>{"use strict";e.r(a);const t=flarum.core.compat["common/extend"],n=flarum.core.compat["admin/app"];var s=e.n(n);const r=flarum.core.compat["admin/components/ExtensionPage"];var o=e.n(r);const i=flarum.core.compat["common/components/Button"];var l=e.n(i);const u=flarum.core.compat["admin/components/LoadingModal"];var c=e.n(u);const d=flarum.core.compat["admin/utils/isExtensionEnabled"];var p=e.n(d);function f(t,n){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},f(t,n)}function h(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n)}function g(t,n){if(null==t)return{};var e,a,s={},r=Object.keys(t);for(a=0;a=0||(s[e]=t[e]);return s}const x=flarum.core.compat["common/Component"];var b=e.n(x);const v=flarum.core.compat["common/components/LoadingIndicator"];var y=e.n(v);const _=flarum.core.compat["common/components/Tooltip"];var k=e.n(_);const N=flarum.core.compat["common/helpers/icon"];var M=e.n(N);const w=flarum.core.compat["common/utils/ItemList"];var E=e.n(w);const U=flarum.core.compat["common/utils/extractText"];var B=e.n(U);const S=flarum.core.compat["common/components/Link"];var q=e.n(S);const j=flarum.core.compat["common/utils/classList"];var $=e.n(j),P=["className","type"],T=function(t){function n(){return t.apply(this,arguments)||this}return h(n,t),n.prototype.view=function(t){var n=this.attrs,e=n.className,a=(n.type,g(n,P));return m("span",Object.assign({className:$()(["Label","Label--"+this.attrs.type,e])},a),t.children)},n}(b());const C=flarum.core.compat["common/components/Modal"];var O=e.n(C),F=function(t){function n(){return t.apply(this,arguments)||this}h(n,t);var e=n.prototype;return e.className=function(){return"Modal--large QuickModal"},e.title=function(){return s().translator.trans("flarum-extension-manager.admin.sections.queue.operations."+this.attrs.task.operation())},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},"failure"===this.attrs.task.status()&&m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&s().translator.trans("flarum-extension-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))},n}(O()),A=e(3),L=e.n(A),D=function(t){function n(){return t.apply(this,arguments)||this}return h(n,t),n.prototype.view=function(){var t=this;return m("nav",{className:"Pagination UserListPage-gridPagination"},m(l(),{disabled:!this.attrs.list.hasPrev()||s().extensionManager.control.isLoading(),title:s().translator.trans("core.admin.users.pagination.back_button"),onclick:function(){return t.attrs.list.prev()},icon:"fas fa-chevron-left",className:"Button Button--icon UserListPage-backBtn"}),m("span",{className:"UserListPage-pageNumber"},s().translator.trans("core.admin.users.pagination.page_counter",{current:this.attrs.list.pageNumber()+1,total:this.attrs.list.getTotalPages()})),m(l(),{disabled:!this.attrs.list.hasNext()||s().extensionManager.control.isLoading(),title:s().translator.trans("core.admin.users.pagination.next_button"),onclick:function(){return t.attrs.list.next()},icon:"fas fa-chevron-right",className:"Button Button--icon UserListPage-nextBtn"}))},n}(b()),Y=["label","content"],I=function(t){function n(){return t.apply(this,arguments)||this}h(n,t);var e=n.prototype;return e.oninit=function(n){t.prototype.oninit.call(this,n),s().extensionManager.queue.load()},e.view=function(){return m("section",{id:"ExtensionManager-queueSection",className:"ExtensionPage-permissions ExtensionManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header ExtensionManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},s().translator.trans("flarum-extension-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:function(){return s().extensionManager.queue.load()},"aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.refresh"),disabled:s().extensionManager.control.isLoading()}))),m("div",{className:"container"},this.queueTable()))},e.columns=function(){var t=this,n=new(E());return n.add("operation",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.operation")),content:function(n){return m("div",{className:"ExtensionManager-queueTable-operation"},m("span",{className:"ExtensionManager-queueTable-operation-icon"},t.operationIcon(n.operation())),m("span",{className:"ExtensionManager-queueTable-operation-name"},s().translator.trans("flarum-extension-manager.admin.sections.queue.operations."+n.operation())))}},80),n.add("package",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.package")),content:function(t){var n,e=s().data.extensions[null==(n=t.package())?void 0:n.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return e?m(q(),{className:"ExtensionManager-queueTable-package",href:s().route("extension",{id:e.id})},m("div",{className:"ExtensionManager-queueTable-package-icon ExtensionIcon",style:e.icon},!!e.icon&&M()(e.icon.name)),m("div",{className:"ExtensionManager-queueTable-package-details"},m("span",{className:"ExtensionManager-queueTable-package-title"},e.extra["flarum-extension"].title),m("span",{className:"ExtensionManager-queueTable-package-name"},t.package()))):t.package()}},75),n.add("status",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.status")),content:function(t){return m("[",null,m(T,{className:"ExtensionManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[t.status()]},s().translator.trans("flarum-extension-manager.admin.sections.queue.statuses."+t.status())),["pending","running"].includes(t.status())&&m(y(),{size:"small",display:"inline"}))}},70),n.add("elapsedTime",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.elapsed_time")),content:function(t){return t.startedAt()&&t.finishedAt()?m(k(),{text:dayjs(t.startedAt()).format("LL LTS")+" "+dayjs(t.finishedAt()).format("LL LTS")},m("span",null,function(t,n){dayjs.extend(L());var e=dayjs(n).diff(t);return dayjs.duration(e).humanize()}(t.startedAt(),t.finishedAt()))):s().translator.trans("flarum-extension-manager.admin.sections.queue.task_just_started")}},65),n.add("memoryUsed",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.peak_memory_used")),content:function(t){return m("span",null,t.peakMemoryUsed())}},60),n.add("details",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details")),content:function(t){return m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details"),onclick:function(){return s().modal.show(F,{task:t})},disabled:["pending","running"].includes(t.status())})},className:"Table-controls"},55),n},e.queueTable=function(){var t=s().extensionManager.queue.getItems();if(!t)return m(y(),null);if(t&&!t.length)return m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("flarum-extension-manager.admin.sections.queue.none"));var n=this.columns();return m("[",null,m("table",{className:"Table ExtensionManager-queueTable"},m("thead",null,m("tr",null,n.toArray().map((function(t,n){return m("th",{key:n},t.label)})))),m("tbody",null,t.map((function(t,e){return m("tr",{key:e},n.toArray().map((function(n,e){n.label;var a=n.content,s=g(n,Y);return m("td",Object.assign({key:e},s),a(t))})))})))),m(D,{list:s().extensionManager.queue}))},e.operationIcon=function(t){return M()({update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[t])},n}(b());const R=flarum.core.compat["common/components/Alert"];var G=e.n(R);const H=flarum.core.compat["common/utils/Stream"];var W=e.n(H),V=function(t){function n(){for(var n,e=arguments.length,a=new Array(e),s=0;s"+n.data.phpVersion+"",folder_perms_link:"https://docs.flarum.org/install#folder-ownership"}))),type:"boolean",disabled:n.data["flarum-extension-manager.using_sync_queue"]}).registerSetting({setting:"flarum-extension-manager.task_retention_days",label:n.translator.trans("flarum-extension-manager.admin.settings.task_retention_days"),help:n.translator.trans("flarum-extension-manager.admin.settings.task_retention_days_help"),type:"number"}).registerPage(gt),(0,t.extend)(o().prototype,"topItems",(function(t){var e=this;"flarum-extension-manager"===this.extension.id||p()(this.extension.id)||t.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:function(){n.modal.show(c()),n.request({url:n.forum.attribute("apiUrl")+"/extension-manager/extensions/"+e.extension.id,method:"DELETE"}).then((function(t){null!=t&&t.processing?wt():(n.alerts.show({type:"success"},n.translator.trans("flarum-extension-manager.admin.extensions.successful_remove")),window.location=n.forum.attribute("adminUrl"))})).finally((function(){n.modal.close()}))}},n.translator.trans("flarum-extension-manager.admin.extensions.remove")))}))}))})(),module.exports=a})(); +(()=>{var t={3:function(t){t.exports=function(){"use strict";var t,n,e=1e3,a=6e4,s=36e5,o=864e5,r=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,i=31536e6,l=2592e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:i,months:l,days:o,hours:s,minutes:a,seconds:e,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof b},d=function(t,n,e){return new b(t,e,n.$l)},p=function(t){return n.p(t)+"s"},f=function(t){return t<0},g=function(t){return f(t)?Math.ceil(t):Math.floor(t)},h=function(t){return Math.abs(t)},x=function(t,n){return t?f(t)?{negative:!0,format:""+h(t)+n}:{negative:!1,format:""+t+n}:{negative:!1,format:""}},b=function(){function f(t,n,e){var a=this;if(this.$d={},this.$l=e,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),n)return d(t*m[p(n)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(n){a.$d[p(n)]=t[n]})),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(u);if(s){var o=s.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var h=f.prototype;return h.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(n,e){return n+(t.$d[e]||0)*m[e]}),0)},h.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=g(t/i),t%=i,this.$d.months=g(t/l),t%=l,this.$d.days=g(t/o),t%=o,this.$d.hours=g(t/s),t%=s,this.$d.minutes=g(t/a),t%=a,this.$d.seconds=g(t/e),t%=e,this.$d.milliseconds=t},h.toISOString=function(){var t=x(this.$d.years,"Y"),n=x(this.$d.months,"M"),e=+this.$d.days||0;this.$d.weeks&&(e+=7*this.$d.weeks);var a=x(e,"D"),s=x(this.$d.hours,"H"),o=x(this.$d.minutes,"M"),r=this.$d.seconds||0;this.$d.milliseconds&&(r+=this.$d.milliseconds/1e3);var i=x(r,"S"),l=t.negative||n.negative||a.negative||s.negative||o.negative||i.negative,u=s.format||o.format||i.format?"T":"",m=(l?"-":"")+"P"+t.format+n.format+a.format+u+s.format+o.format+i.format;return"P"===m||"-P"===m?"P0D":m},h.toJSON=function(){return this.toISOString()},h.format=function(t){var e=t||"YYYY-MM-DDTHH:mm:ss",a={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return e.replace(r,(function(t,n){return n||String(a[t])}))},h.as=function(t){return this.$ms/m[p(t)]},h.get=function(t){var n=this.$ms,e=p(t);return"milliseconds"===e?n%=1e3:n="weeks"===e?g(n/m[e]):this.$d[e],0===n?0:n},h.add=function(t,n,e){var a;return a=n?t*m[p(n)]:c(t)?t.$ms:d(t,this).$ms,d(this.$ms+a*(e?-1:1),this)},h.subtract=function(t,n){return this.add(t,n,!0)},h.locale=function(t){var n=this.clone();return n.$l=t,n},h.clone=function(){return d(this.$ms,this)},h.humanize=function(n){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!n)},h.milliseconds=function(){return this.get("milliseconds")},h.asMilliseconds=function(){return this.as("milliseconds")},h.seconds=function(){return this.get("seconds")},h.asSeconds=function(){return this.as("seconds")},h.minutes=function(){return this.get("minutes")},h.asMinutes=function(){return this.as("minutes")},h.hours=function(){return this.get("hours")},h.asHours=function(){return this.as("hours")},h.days=function(){return this.get("days")},h.asDays=function(){return this.as("days")},h.weeks=function(){return this.get("weeks")},h.asWeeks=function(){return this.as("weeks")},h.months=function(){return this.get("months")},h.asMonths=function(){return this.as("months")},h.years=function(){return this.get("years")},h.asYears=function(){return this.as("years")},f}();return function(e,a,s){t=s,n=s().$utils(),s.duration=function(t,n){var e=s.locale();return d(t,{$l:e},n)},s.isDuration=c;var o=a.prototype.add,r=a.prototype.subtract;a.prototype.add=function(t,n){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,n)},a.prototype.subtract=function(t,n){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,n)}}}()}},n={};function e(a){var s=n[a];if(void 0!==s)return s.exports;var o=n[a]={exports:{}};return t[a].call(o.exports,o,o.exports,e),o.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})},e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};(()=>{"use strict";e.r(a);const t=flarum.core.compat["common/extend"],n=flarum.core.compat["admin/app"];var s=e.n(n);const o=flarum.core.compat["admin/components/ExtensionPage"];var r=e.n(o);const i=flarum.core.compat["common/components/Button"];var l=e.n(i);const u=flarum.core.compat["admin/components/LoadingModal"];var c=e.n(u);const d=flarum.core.compat["admin/utils/isExtensionEnabled"];var p=e.n(d);function f(t,n){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},f(t,n)}function g(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n)}function h(t,n){if(null==t)return{};var e,a,s={},o=Object.keys(t);for(a=0;a=0||(s[e]=t[e]);return s}const x=flarum.core.compat["common/Component"];var b=e.n(x);const v=flarum.core.compat["common/components/LoadingIndicator"];var y=e.n(v);const _=flarum.core.compat["common/components/Tooltip"];var k=e.n(_);const N=flarum.core.compat["common/helpers/icon"];var M=e.n(N);const w=flarum.core.compat["common/utils/ItemList"];var E=e.n(w);const U=flarum.core.compat["common/utils/extractText"];var B=e.n(U);const S=flarum.core.compat["common/components/Link"];var j=e.n(S);const q=flarum.core.compat["common/utils/classList"];var $=e.n(q),P=["className","type"],T=function(t){function n(){return t.apply(this,arguments)||this}return g(n,t),n.prototype.view=function(t){var n=this.attrs,e=n.className,a=(n.type,h(n,P));return m("span",Object.assign({className:$()(["Label","Label--"+this.attrs.type,e])},a),t.children)},n}(b());const C=flarum.core.compat["common/components/Modal"];var O=e.n(C),F=function(t){function n(){return t.apply(this,arguments)||this}g(n,t);var e=n.prototype;return e.className=function(){return"Modal--large QuickModal"},e.title=function(){return s().translator.trans("flarum-extension-manager.admin.sections.queue.operations."+this.attrs.task.operation())},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"TaskOutputModal-data"},"failure"===this.attrs.task.status()&&m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.guessed_cause")),m("div",{className:"FormControl TaskOutputModal-data-guessed-cause"},this.attrs.task.guessedCause()&&s().translator.trans("flarum-extension-manager.admin.exceptions.guessed_cause."+this.attrs.task.guessedCause())||s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown"))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.command")),m("div",{className:"FormControl TaskOutputModal-data-command"},m("code",null,"$ composer ",this.attrs.task.command()))),m("div",{className:"Form-group"},m("label",null,s().translator.trans("flarum-extension-manager.admin.sections.queue.output_modal.output")),m("div",{className:"FormControl TaskOutputModal-data-output"},m("code",null,m("pre",null,this.attrs.task.output()))))))},n}(O()),A=e(3),L=e.n(A);function D(t,n){dayjs.extend(L());var e=dayjs(n).diff(t);return dayjs.duration(e).humanize()}var I=function(t){function n(){return t.apply(this,arguments)||this}return g(n,t),n.prototype.view=function(){var t=this;return m("nav",{className:"Pagination UserListPage-gridPagination"},m(l(),{disabled:!this.attrs.list.hasPrev()||s().extensionManager.control.isLoading(),title:s().translator.trans("core.admin.users.pagination.back_button"),onclick:function(){return t.attrs.list.prev()},icon:"fas fa-chevron-left",className:"Button Button--icon UserListPage-backBtn"}),m("span",{className:"UserListPage-pageNumber"},s().translator.trans("core.admin.users.pagination.page_counter",{current:this.attrs.list.pageNumber()+1,total:this.attrs.list.getTotalPages()})),m(l(),{disabled:!this.attrs.list.hasNext()||s().extensionManager.control.isLoading(),title:s().translator.trans("core.admin.users.pagination.next_button"),onclick:function(){return t.attrs.list.next()},icon:"fas fa-chevron-right",className:"Button Button--icon UserListPage-nextBtn"}))},n}(b()),Y=["label","content"],R=function(t){function n(){return t.apply(this,arguments)||this}g(n,t);var e=n.prototype;return e.oninit=function(n){t.prototype.oninit.call(this,n),s().extensionManager.queue.load()},e.view=function(){return m("section",{id:"ExtensionManager-queueSection",className:"ExtensionPage-permissions ExtensionManager-queueSection"},m("div",{className:"ExtensionPage-permissions-header ExtensionManager-queueSection-header"},m("div",{className:"container"},m("h2",{className:"ExtensionTitle"},s().translator.trans("flarum-extension-manager.admin.sections.queue.title")),m(l(),{className:"Button Button--icon",icon:"fas fa-sync-alt",onclick:function(){return s().extensionManager.queue.load()},"aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.refresh"),disabled:s().extensionManager.control.isLoading()}))),m("div",{className:"container"},this.queueTable()))},e.columns=function(){var t=this,n=new(E());return n.add("operation",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.operation")),content:function(n){return m("div",{className:"ExtensionManager-queueTable-operation"},m("span",{className:"ExtensionManager-queueTable-operation-icon"},t.operationIcon(n.operation())),m("span",{className:"ExtensionManager-queueTable-operation-name"},s().translator.trans("flarum-extension-manager.admin.sections.queue.operations."+n.operation())))}},80),n.add("package",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.package")),content:function(t){var n,e=s().data.extensions[null==(n=t.package())?void 0:n.replace(/(\/flarum-|\/flarum-ext-|\/)/g,"-")];return e?m(j(),{className:"ExtensionManager-queueTable-package",href:s().route("extension",{id:e.id})},m("div",{className:"ExtensionManager-queueTable-package-icon ExtensionIcon",style:e.icon},!!e.icon&&M()(e.icon.name)),m("div",{className:"ExtensionManager-queueTable-package-details"},m("span",{className:"ExtensionManager-queueTable-package-title"},e.extra["flarum-extension"].title),m("span",{className:"ExtensionManager-queueTable-package-name"},t.package()))):t.package()}},75),n.add("status",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.status")),content:function(t){return m("[",null,m(T,{className:"ExtensionManager-queueTable-status",type:{running:"neutral",failure:"error",pending:"warning",success:"success"}[t.status()]},s().translator.trans("flarum-extension-manager.admin.sections.queue.statuses."+t.status())),["pending","running"].includes(t.status())&&m(y(),{size:"small",display:"inline"}))}},70),n.add("elapsedTime",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.elapsed_time")),content:function(t){return t.startedAt()&&t.finishedAt()?m(k(),{text:dayjs(t.startedAt()).format("LL LTS")+" "+dayjs(t.finishedAt()).format("LL LTS")},m("span",null,D(t.startedAt(),t.finishedAt()))):s().translator.trans("flarum-extension-manager.admin.sections.queue.task_just_started")}},65),n.add("memoryUsed",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.peak_memory_used")),content:function(t){return m("span",null,t.peakMemoryUsed())}},60),n.add("details",{label:B()(s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details")),content:function(t){return m(l(),{className:"Button Button--icon Table-controls-item",icon:"fas fa-file-alt","aria-label":s().translator.trans("flarum-extension-manager.admin.sections.queue.columns.details"),onclick:function(){return s().modal.show(F,{task:t})},disabled:["pending","running"].includes(t.status())})},className:"Table-controls"},55),n},e.queueTable=function(){var t=s().extensionManager.queue.getItems();if(!t)return m(y(),null);if(t&&!t.length)return m("h3",{className:"ExtensionPage-subHeader"},s().translator.trans("flarum-extension-manager.admin.sections.queue.none"));var n=this.columns();return m("[",null,m("table",{className:"Table ExtensionManager-queueTable"},m("thead",null,m("tr",null,n.toArray().map((function(t,n){return m("th",{key:n},t.label)})))),m("tbody",null,t.map((function(t,e){return m("tr",{key:e},n.toArray().map((function(n,e){n.label;var a=n.content,s=h(n,Y);return m("td",Object.assign({key:e},s),a(t))})))})))),m(I,{list:s().extensionManager.queue}))},e.operationIcon=function(t){return M()({update_check:"fas fa-sync-alt",update_major:"fas fa-play",update_minor:"fas fa-play",update_global:"fas fa-play",extension_install:"fas fa-download",extension_remove:"fas fa-times",extension_update:"fas fa-arrow-alt-circle-up",why_not:"fas fa-exclamation-circle"}[t])},n}(b());const G=flarum.core.compat["common/components/Alert"];var H=e.n(G);const W=flarum.core.compat["common/utils/Stream"];var Q=e.n(W),J=function(t){function n(){for(var n,e=arguments.length,a=new Array(e),s=0;s"+n.data.phpVersion+"",folder_perms_link:"https://docs.flarum.org/install#folder-ownership"}))),type:"boolean",disabled:n.data["flarum-extension-manager.using_sync_queue"]}).registerSetting({setting:"flarum-extension-manager.task_retention_days",label:n.translator.trans("flarum-extension-manager.admin.settings.task_retention_days"),help:n.translator.trans("flarum-extension-manager.admin.settings.task_retention_days_help"),type:"number"}).registerPage(xt),(0,t.extend)(r().prototype,"topItems",(function(t){var e=this;"flarum-extension-manager"===this.extension.id||p()(this.extension.id)||t.add("remove",m(l(),{className:"Button Button--danger",icon:"fas fa-times",onclick:function(){n.modal.show(c()),n.request({url:n.forum.attribute("apiUrl")+"/extension-manager/extensions/"+e.extension.id,method:"DELETE"}).then((function(t){null!=t&&t.processing?Et():(n.alerts.show({type:"success"},n.translator.trans("flarum-extension-manager.admin.extensions.successful_remove")),window.location=n.forum.attribute("adminUrl"))})).finally((function(){n.modal.close()}))}},n.translator.trans("flarum-extension-manager.admin.extensions.remove")))}))})),Object.assign($t.compat,qt)})(),module.exports=a})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index b8041eb..cbe63f0 100755 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"2BAAoEA,EAAOC,QAAmJ,WAAW,aAAa,IAAIC,EAAEC,EAAEC,EAAE,IAAIC,EAAE,IAAIC,EAAE,KAAKC,EAAE,MAAMC,EAAE,sFAAsFC,EAAE,QAAQC,EAAE,OAAOC,EAAE,sKAAsKC,EAAE,CAACC,MAAMJ,EAAEK,OAAOJ,EAAEK,KAAKR,EAAES,MAAMV,EAAEW,QAAQZ,EAAEa,QAAQd,EAAEe,aAAa,EAAEC,MAAM,QAAQC,EAAE,SAASnB,GAAG,OAAOA,aAAaoB,CAAC,EAAEC,EAAE,SAASrB,EAAEC,EAAEC,GAAG,OAAO,IAAIkB,EAAEpB,EAAEE,EAAED,EAAEqB,GAAG,EAAEC,EAAE,SAASvB,GAAG,OAAOC,EAAEmB,EAAEpB,GAAG,GAAG,EAAEwB,EAAE,SA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EAAIoS,WAAWC,MAAM,0DAA2D,CAC9EE,gBAAiB,+FACjBC,cAAe,iEACfC,YAAa,WAAWzS,EAAI8E,KAAK4N,WAAU,YAC3CC,kBAAmB,uDAIzBjT,KAAM,UACNgB,SAAUV,EAAI8E,KAAK,+CAEpBqN,gBAAgB,CACfjJ,QAAS,+CACTrH,MAAO7B,EAAIoS,WAAWC,MAAM,+DAC5BhI,KAAMrK,EAAIoS,WAAWC,MAAM,oEAC3B3S,KAAM,WAEPkT,aAAa/G,KAEhB3I,EAAAA,EAAAA,QAAOkJ,IAAAA,UAAyB,YAAY,SAAUzK,GAAO,WACjC,6BAAtB7H,KAAKkI,UAAUR,IAAqCqR,IAAmB/Y,KAAKkI,UAAUR,KAI1FG,EAAM7F,IACJ,SACA,EAAC,IAAM,CACL2D,UAAU,wBACVsB,KAAK,eACLF,QAAS,WACPb,EAAI8S,MAAMC,KAAKrC,KAEf1Q,EACGgT,QAAqC,CACpCvN,IAAQzF,EAAIiT,MAAMC,UAAU,UAAS,iCAAiC,EAAKlR,UAAUR,GACrFgE,OAAQ,WAETG,MAAK,SAACV,GACO,MAARA,GAAAA,EAAU0L,WACZ3C,MAEAhO,EAAImT,OAAOJ,KAAK,CAAErT,KAAM,WAAaM,EAAIoS,WAAWC,MAAM,gEAC1D7D,OAAOa,SAAWrP,EAAIiT,MAAMC,UAAU,YAE1C,IAAE,SACO,WACPlT,EAAI8S,MAAMM,OACZ,GACJ,GAECpT,EAAIoS,WAAWC,MAAM,qDAG5B,GACF,G","sources":["webpack://@flarum/extension-manager/../../../node_modules/dayjs/plugin/duration.js","webpack://@flarum/extension-manager/webpack/bootstrap","webpack://@flarum/extension-manager/webpack/runtime/compat get default export","webpack://@flarum/extension-manager/webpack/runtime/define property getters","webpack://@flarum/extension-manager/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/extension-manager/webpack/runtime/make namespace object","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['admin/components/LoadingModal']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['admin/utils/isExtensionEnabled']\"","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/extension-manager/./src/admin/components/Label.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/extension-manager/./src/admin/components/TaskOutputModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/Pagination.tsx","webpack://@flarum/extension-manager/./src/admin/components/QueueSection.tsx","webpack://@flarum/extension-manager/./src/admin/utils/humanDuration.ts","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/extension-manager/./src/admin/components/Installer.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/extension-manager/./src/admin/utils/errorHandler.ts","webpack://@flarum/extension-manager/./src/admin/components/WhyNotModal.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@flarum/extension-manager/./src/admin/components/ExtensionItem.tsx","webpack://@flarum/extension-manager/./src/admin/components/MajorUpdater.tsx","webpack://@flarum/extension-manager/./src/admin/components/Updater.tsx","webpack://@flarum/extension-manager/./src/admin/components/ControlSection.tsx","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/extension-manager/external root \"flarum.core.compat['admin/components/AdminPage']\"","webpack://@flarum/extension-manager/./src/admin/components/ConfigureJson.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/components/Select']\"","webpack://@flarum/extension-manager/./src/admin/components/RepositoryModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureComposer.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@flarum/extension-manager/./src/admin/components/AuthMethodModal.tsx","webpack://@flarum/extension-manager/./src/admin/components/ConfigureAuth.tsx","webpack://@flarum/extension-manager/./src/admin/components/SettingsPage.tsx","webpack://@flarum/extension-manager/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/extension-manager/../../../node_modules/pretty-bytes/index.js","webpack://@flarum/extension-manager/./src/admin/models/Task.ts","webpack://@flarum/extension-manager/./src/admin/utils/jumpToQueue.ts","webpack://@flarum/extension-manager/./src/admin/states/QueueState.ts","webpack://@flarum/extension-manager/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/extension-manager/./src/admin/states/ControlSectionState.ts","webpack://@flarum/extension-manager/./src/admin/states/ExtensionManagerState.ts","webpack://@flarum/extension-manager/./src/admin/index.tsx"],"sourcesContent":["!function(t,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s():\"function\"==typeof define&&define.amd?define(s):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,h=2592e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:u,months:h,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof p},f=function(t,s,n){return new p(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},g=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},p=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*d[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*d[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/h),t%=h,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=g(this.$d.years,\"Y\"),s=g(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,\"D\"),e=g(this.$d.hours,\"H\"),r=g(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,\"S\"),h=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",d=(h?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===d||\"-P\"===d?\"P0D\":d},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/d[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/d[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*d[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}();return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,s)}}}));","// 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].call(module.exports, 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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/LoadingModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/utils/isExtensionEnabled'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\n\ninterface LabelAttrs extends ComponentAttrs {\n type: 'success' | 'error' | 'neutral' | 'warning';\n}\n\nexport default class Label extends Component {\n view(vnode: Mithril.Vnode) {\n const { className, type, ...attrs } = this.attrs;\n\n return (\n \n {vnode.children}\n \n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","import app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Task from '../models/Task';\n\ninterface TaskOutputModalAttrs extends IInternalModalAttrs {\n task: Task;\n}\n\nexport default class TaskOutputModal extends Modal {\n className() {\n return 'Modal--large QuickModal';\n }\n\n title() {\n return app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${this.attrs.task.operation()}`);\n }\n\n content() {\n return (\n
\n
\n {this.attrs.task.status() === 'failure' && (\n
\n \n
\n {(this.attrs.task.guessedCause() &&\n app.translator.trans('flarum-extension-manager.admin.exceptions.guessed_cause.' + this.attrs.task.guessedCause())) ||\n app.translator.trans('flarum-extension-manager.admin.sections.queue.output_modal.cause_unknown')}\n
\n
\n )}\n\n
\n \n
\n $ composer {this.attrs.task.command()}\n
\n
\n\n
\n \n
\n \n
{this.attrs.task.output()}
\n
\n
\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport QueueState from '../states/QueueState';\n\ninterface PaginationAttrs extends ComponentAttrs {\n list: QueueState;\n}\n\n/**\n * @todo make it abstract in core for reusability.\n */\nexport default class Pagination extends Component {\n view() {\n return (\n \n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport icon from 'flarum/common/helpers/icon';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport extractText from 'flarum/common/utils/extractText';\nimport Link from 'flarum/common/components/Link';\n\nimport Label from './Label';\nimport TaskOutputModal from './TaskOutputModal';\nimport humanDuration from '../utils/humanDuration';\nimport Task, { TaskOperations } from '../models/Task';\nimport Pagination from './Pagination';\n\ninterface QueueTableColumn extends ComponentAttrs {\n label: string;\n content: (task: Task) => Mithril.Children;\n}\n\nexport default class QueueSection extends Component<{}> {\n oninit(vnode: Mithril.Vnode<{}, this>) {\n super.oninit(vnode);\n\n app.extensionManager.queue.load();\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-extension-manager.admin.sections.queue.title')}

\n app.extensionManager.queue.load()}\n aria-label={app.translator.trans('flarum-extension-manager.admin.sections.queue.refresh')}\n disabled={app.extensionManager.control.isLoading()}\n />\n
\n
\n
{this.queueTable()}
\n
\n );\n }\n\n columns() {\n const items = new ItemList();\n\n items.add(\n 'operation',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.operation')),\n content: (task) => (\n
\n {this.operationIcon(task.operation())}\n \n {app.translator.trans(`flarum-extension-manager.admin.sections.queue.operations.${task.operation()}`)}\n \n
\n ),\n },\n 80\n );\n\n items.add(\n 'package',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.package')),\n content: (task) => {\n const extension: Extension | null = app.data.extensions[task.package()?.replace(/(\\/flarum-|\\/flarum-ext-|\\/)/g, '-')];\n\n return extension ? (\n \n
\n {!!extension.icon && icon(extension.icon.name)}\n
\n
\n {extension.extra['flarum-extension'].title}\n {task.package()}\n
\n \n ) : (\n task.package()\n );\n },\n },\n 75\n );\n\n items.add(\n 'status',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.status')),\n content: (task) => (\n <>\n \n {app.translator.trans(`flarum-extension-manager.admin.sections.queue.statuses.${task.status()}`)}\n \n {['pending', 'running'].includes(task.status()) && }\n \n ),\n },\n 70\n );\n\n items.add(\n 'elapsedTime',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.elapsed_time')),\n content: (task) =>\n !task.startedAt() || !task.finishedAt() ? (\n app.translator.trans('flarum-extension-manager.admin.sections.queue.task_just_started')\n ) : (\n \n {humanDuration(task.startedAt(), task.finishedAt())}\n \n ),\n },\n 65\n );\n\n items.add(\n 'memoryUsed',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.peak_memory_used')),\n content: (task) => {task.peakMemoryUsed()},\n },\n 60\n );\n\n items.add(\n 'details',\n {\n label: extractText(app.translator.trans('flarum-extension-manager.admin.sections.queue.columns.details')),\n content: (task) => (\n app.modal.show(TaskOutputModal, { task })}\n disabled={['pending', 'running'].includes(task.status())}\n />\n ),\n className: 'Table-controls',\n },\n 55\n );\n\n return items;\n }\n\n queueTable() {\n const tasks = app.extensionManager.queue.getItems();\n\n if (!tasks) {\n return ;\n }\n\n if (tasks && !tasks.length) {\n return

{app.translator.trans('flarum-extension-manager.admin.sections.queue.none')}

;\n }\n\n const columns = this.columns();\n\n return (\n <>\n \n \n \n {columns.toArray().map((item, index) => (\n \n ))}\n \n \n \n {tasks.map((task, index) => (\n \n {columns.toArray().map((item, index) => {\n const { label, content, ...attrs } = item;\n\n return (\n \n );\n })}\n \n ))}\n \n
{item.label}
\n {content(task)}\n
\n\n \n \n );\n }\n\n operationIcon(operation: TaskOperations): Mithril.Children {\n return icon(\n {\n update_check: 'fas fa-sync-alt',\n update_major: 'fas fa-play',\n update_minor: 'fas fa-play',\n update_global: 'fas fa-play',\n extension_install: 'fas fa-download',\n extension_remove: 'fas fa-times',\n extension_update: 'fas fa-arrow-alt-circle-up',\n why_not: 'fas fa-exclamation-circle',\n }[operation]\n );\n }\n}\n","import duration from 'dayjs/plugin/duration';\n\nexport default function humanDuration(start: Date, end: Date) {\n dayjs.extend(duration);\n\n const durationTime = dayjs(end).diff(start);\n\n return dayjs.duration(durationTime).humanize();\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport interface InstallerAttrs extends ComponentAttrs {}\n\nexport type InstallerLoadingTypes = 'extension-install' | null;\n\nexport default class Installer extends Component {\n packageName!: Stream;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.packageName = Stream('');\n }\n\n view(): Mithril.Children {\n return (\n
\n \n

\n {app.translator.trans('flarum-extension-manager.admin.extensions.install_help', {\n extiverse: extiverse.com,\n semantic_link: ,\n code: ,\n })}\n

\n
\n \n \n {app.translator.trans('flarum-extension-manager.admin.extensions.proceed')}\n \n
\n
\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.extensionManager.control.requirePackage(this.data());\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\n app.extensionManager.control.setLoading(null);\n\n const error = e.response.errors[0];\n\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n\n app.alerts.clear();\n\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({ type: 'error' }, app.translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n\n case 'extension_already_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n\n case 'extension_not_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport errorHandler from '../utils/errorHandler';\n\ntype WhyNotResponse = {\n data: {\n reason: string;\n };\n};\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal extends Modal {\n loading: boolean = true;\n whyNot: string | null = null;\n\n className() {\n return 'Modal--large WhyNotModal';\n }\n\n title() {\n return app.translator.trans('flarum-extension-manager.admin.why_not_modal.title');\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return
{this.loading ? :
{this.whyNot}
}
;\n }\n\n requestWhyNot(): void {\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package,\n },\n },\n })\n .then((response) => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n })\n .catch(errorHandler);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport { Extension } from 'flarum/admin/AdminApplication';\n\nimport { UpdatedPackage } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport Label from './Label';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate:\n | CallableFunction\n | {\n soft: CallableFunction;\n hard: CallableFunction;\n };\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem extends Component {\n view(vnode: Mithril.Vnode): Mithril.Children {\n const { extension, updates, onClickUpdate, whyNotWarning, isCore, isDanger } = this.attrs;\n const latestVersion = updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null);\n\n return (\n \n
\n {extension.icon ? icon(extension.icon.name) : ''}\n
\n
\n
{extension.extra['flarum-extension'].title}
\n
\n {this.version(updates['version'])}\n {latestVersion ? (\n \n ) : null}\n
\n
\n
\n {onClickUpdate && typeof onClickUpdate === 'function' ? (\n \n \n \n ) : onClickUpdate ? (\n \n \n \n \n ) : null}\n {whyNotWarning ? (\n \n app.modal.show(WhyNotModal, { package: extension.name })}\n aria-label={app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')}\n />\n \n ) : null}\n
\n \n );\n }\n\n version(v: string): string {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater extends Component {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n \n \"flarum\n \n

{app.translator.trans('flarum-extension-manager.admin.major_updater.description')}

\n
\n \n \n {app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run')}\n \n \n \n {app.translator.trans('flarum-extension-manager.admin.major_updater.update')}\n \n
\n {this.updateState.incompatibleExtensions.length ? (\n
\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n \n ))}\n
\n ) : null}\n {this.updateState.status === 'failure' ? (\n app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-extension-manager.admin.major_updater.failure.why')}\n ,\n ]}\n >\n

\n {app.translator.trans('flarum-extension-manager.admin.major_updater.failure.desc')}\n

\n \n ) : null}\n \n );\n }\n\n update(dryRun: boolean) {\n app.extensionManager.control.majorUpdate({ dryRun });\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component {\n view() {\n const core = app.extensionManager.control.coreUpdate;\n\n return [\n
\n \n

{app.translator.trans('flarum-extension-manager.admin.updater.updater_help')}

\n {this.lastUpdateCheckView()}\n
{this.controlItems().toArray()}
\n {this.availableUpdatesView()}\n
,\n core && core.package['latest-major'] ? (\n \n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.extensionManager.control.lastUpdateCheck?.checkedAt && (\n

\n \n {app.translator.trans('flarum-extension-manager.admin.updater.last_update_checked_at')}\n \n {humanTime(app.extensionManager.control.lastUpdateCheck.checkedAt)}\n

\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.extensionManager.control;\n\n if (app.extensionManager.control.isLoading('check') || app.extensionManager.control.isLoading('global-update')) {\n return (\n
\n \n
\n );\n }\n\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return (\n
\n {app.translator.trans('flarum-extension-manager.admin.updater.up_to_date')}\n
\n );\n }\n\n return (\n
\n
\n {hasMinorCoreUpdate ? (\n state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard'),\n }}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n
\n
\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n app.extensionManager.control.checkForUpdates()}\n loading={app.extensionManager.control.isLoading('check')}\n disabled={app.extensionManager.control.hasOperationRunning()}\n >\n {app.translator.trans('flarum-extension-manager.admin.updater.check_for_updates')}\n ,\n 100\n );\n\n items.add(\n 'globalUpdate',\n app.extensionManager.control.updateGlobally()}\n loading={app.extensionManager.control.isLoading('global-update')}\n disabled={app.extensionManager.control.hasOperationRunning()}\n >\n {app.translator.trans('flarum-extension-manager.admin.updater.run_global_update')}\n \n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-extension-manager.admin.sections.control.title')}

\n
\n
\n
\n {app.data['flarum-extension-manager.writable_dirs'] ? (\n <>\n \n \n \n ) : (\n
\n \n {app.translator.trans('flarum-extension-manager.admin.file_permissions')}\n \n
\n )}\n
\n
\n );\n }\n}\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport Component, { type ComponentAttrs } from 'flarum/common/Component';\nimport { CommonSettingsItemOptions, type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface IConfigureJson extends ComponentAttrs {\n buildSettingComponent: (entry: ((this: this) => Mithril.Children) | SettingsComponentOptions) => Mithril.Children;\n}\n\nexport default abstract class ConfigureJson extends Component {\n protected settings: Record> = {};\n protected initialSettings: Record | null = null;\n protected loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.submit(true);\n }\n\n protected abstract type: string;\n abstract title(): Mithril.Children;\n abstract content(): Mithril.Children;\n\n className(): string {\n return '';\n }\n\n view(): Mithril.Children {\n return (\n
\n \n {this.content()}\n
{this.submitButton()}
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n return [\n ,\n ];\n }\n\n customSettingComponents(): ItemList<(attributes: CommonSettingsItemOptions) => Mithril.Children> {\n return AdminPage.prototype.customSettingComponents();\n }\n\n setting(key: string) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n\n submit(readOnly: boolean) {\n this.loading = true;\n\n const configuration: any = {};\n\n Object.keys(this.settings).forEach((key) => {\n configuration[key] = this.settings[key]();\n });\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/extension-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration,\n },\n })\n .then(({ data }: any) => {\n Object.keys(data).forEach((key) => {\n this.settings[key] = Stream(data[key]);\n });\n\n this.initialSettings = Array.isArray(data) ? {} : data;\n })\n .finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport { type Repository } from './ConfigureComposer';\n\nexport interface IRepositoryModalAttrs extends IInternalModalAttrs {\n onsubmit: (repository: Repository, key: string) => void;\n name?: string;\n repository?: Repository;\n}\n\nexport default class RepositoryModal extends Modal {\n protected name!: Stream;\n protected repository!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || { type: 'composer', url: '' });\n }\n\n className(): string {\n return 'RepositoryModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.composer.${context}_repository_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n composer: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.path'),\n };\n\n return (\n
\n
\n \n \n
\n
\n \n this.repository({ ...this.repository(), type: value })}\n />\n
\n
\n \n this.repository({ ...this.repository(), url: (e.target as HTMLInputElement).value })}\n value={this.repository().url}\n />\n
\n
\n \n
\n
\n );\n }\n\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport ConfigureJson, { type IConfigureJson } from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\n\nexport type Repository = {\n type: 'composer' | 'vcs' | 'path';\n url: string;\n};\n\nexport default class ConfigureComposer extends ConfigureJson {\n protected type = 'composer';\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-extension-manager.admin.composer.title');\n }\n\n className(): string {\n return 'ConfigureComposer';\n }\n\n content(): Mithril.Children {\n return (\n
\n {this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.dev'),\n },\n })}\n
\n \n
{app.translator.trans('flarum-extension-manager.admin.composer.repositories.help')}
\n
\n {Object.keys(this.setting('repositories')() || {}).map((name) => {\n const repository = this.setting('repositories')()[name] as Repository;\n\n return (\n
\n \n app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: (repository: Repository, newName: string) => {\n const repositories = this.setting('repositories')();\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n\n this.onchange(repository, newName);\n },\n })\n }\n >\n {name} ({repository.type})\n \n {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = { ...this.setting('repositories')() };\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n }\n }}\n />\n
\n );\n })}\n
\n
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n const items = super.submitButton();\n\n items.push(\n \n );\n\n return items;\n }\n\n onchange(repository: Repository, name: string) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository,\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface IAuthMethodModalAttrs extends IInternalModalAttrs {\n onsubmit: (type: string, host: string, token: string) => void;\n type?: string;\n host?: string;\n token?: string;\n}\n\nexport default class AuthMethodModal extends Modal {\n protected type!: Stream;\n protected host!: Stream;\n protected token!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n\n className(): string {\n return 'AuthMethodModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.auth_config.${context}_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n 'github-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-extension-manager.admin.auth_config.types.bearer'),\n };\n\n return (\n
\n
\n \n \n \n {app.translator.trans('flarum-extension-manager.admin.extensions.proceed')}\n \n
\n
\n );\n }\n\n data(): any {\n return {\n package: this.packageName(),\n };\n }\n\n onsubmit(): void {\n app.extensionManager.control.requirePackage(this.data());\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","import app from 'flarum/admin/app';\n\nexport default function (e: any) {\n app.extensionManager.control.setLoading(null);\n\n const error = e.response.errors[0];\n\n if (!['composer_command_failure', 'extension_already_installed', 'extension_not_installed'].includes(error.code)) {\n throw e;\n }\n\n app.alerts.clear();\n\n switch (error.code) {\n case 'composer_command_failure':\n if (error.guessed_cause) {\n app.alerts.show({ type: 'error' }, app.translator.trans(`flarum-extension-manager.admin.exceptions.guessed_cause.${error.guessed_cause}`));\n app.modal.close();\n } else {\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.composer_command_failure'));\n }\n break;\n\n case 'extension_already_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_already_installed'));\n app.modal.close();\n break;\n\n case 'extension_not_installed':\n app.alerts.show({ type: 'error' }, app.translator.trans('flarum-extension-manager.admin.exceptions.extension_not_installed'));\n app.modal.close();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport errorHandler from '../utils/errorHandler';\n\ntype WhyNotResponse = {\n data: {\n reason: string;\n };\n};\n\nexport interface WhyNotModalAttrs extends IInternalModalAttrs {\n package: string;\n}\n\nexport default class WhyNotModal extends Modal {\n loading: boolean = true;\n whyNot: string | null = null;\n\n className() {\n return 'Modal--large WhyNotModal';\n }\n\n title() {\n return app.translator.trans('flarum-extension-manager.admin.why_not_modal.title');\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n this.requestWhyNot();\n }\n\n content() {\n return
{this.loading ? :
{this.whyNot}
}
;\n }\n\n requestWhyNot(): void {\n app\n .request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/extension-manager/why-not`,\n body: {\n data: {\n package: this.attrs.package,\n },\n },\n })\n .then((response) => {\n this.loading = false;\n this.whyNot = response.data.reason;\n m.redraw();\n })\n .catch(errorHandler);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nimport icon from 'flarum/common/helpers/icon';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport { Extension } from 'flarum/admin/AdminApplication';\n\nimport { UpdatedPackage } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport Label from './Label';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nexport interface ExtensionItemAttrs extends ComponentAttrs {\n extension: Extension;\n updates: UpdatedPackage;\n onClickUpdate:\n | CallableFunction\n | {\n soft: CallableFunction;\n hard: CallableFunction;\n };\n whyNotWarning?: boolean;\n isCore?: boolean;\n updatable?: boolean;\n isDanger?: boolean;\n}\n\nexport default class ExtensionItem extends Component {\n view(vnode: Mithril.Vnode): Mithril.Children {\n const { extension, updates, onClickUpdate, whyNotWarning, isCore, isDanger } = this.attrs;\n const latestVersion = updates['latest-minor'] ?? (updates['latest-major'] && !isCore ? updates['latest-major'] : null);\n\n return (\n \n
\n {extension.icon ? icon(extension.icon.name) : ''}\n
\n
\n
{extension.extra['flarum-extension'].title}
\n
\n {this.version(updates['version'])}\n {latestVersion ? (\n \n ) : null}\n
\n
\n
\n {onClickUpdate && typeof onClickUpdate === 'function' ? (\n \n \n \n ) : onClickUpdate ? (\n \n \n \n \n ) : null}\n {whyNotWarning ? (\n \n app.modal.show(WhyNotModal, { package: extension.name })}\n aria-label={app.translator.trans('flarum-extension-manager.admin.extensions.check_why_it_failed_updating')}\n />\n \n ) : null}\n
\n \n );\n }\n\n version(v: string): string {\n return v.charAt(0) === 'v' ? v.substring(1) : v;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Alert from 'flarum/common/components/Alert';\n\nimport { UpdatedPackage, UpdateState } from '../states/ControlSectionState';\nimport WhyNotModal from './WhyNotModal';\nimport ExtensionItem from './ExtensionItem';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface MajorUpdaterAttrs extends ComponentAttrs {\n coreUpdate: UpdatedPackage;\n updateState: UpdateState;\n}\n\nexport type MajorUpdaterLoadingTypes = 'major-update' | 'major-update-dry-run';\n\nexport default class MajorUpdater extends Component {\n updateState!: UpdateState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.updateState = this.attrs.updateState;\n }\n\n view(): Mithril.Children {\n // @todo move Form-group--danger class to core for reuse\n return (\n \n \"flarum\n \n

{app.translator.trans('flarum-extension-manager.admin.major_updater.description')}

\n
\n \n \n {app.translator.trans('flarum-extension-manager.admin.major_updater.dry_run')}\n \n \n \n {app.translator.trans('flarum-extension-manager.admin.major_updater.update')}\n \n
\n {this.updateState.incompatibleExtensions.length ? (\n
\n {this.updateState.incompatibleExtensions.map((extension: string) => (\n \n ))}\n
\n ) : null}\n {this.updateState.status === 'failure' ? (\n app.modal.show(WhyNotModal, { package: 'flarum/core' })}\n >\n {app.translator.trans('flarum-extension-manager.admin.major_updater.failure.why')}\n ,\n ]}\n >\n

\n {app.translator.trans('flarum-extension-manager.admin.major_updater.failure.desc')}\n

\n \n ) : null}\n \n );\n }\n\n update(dryRun: boolean) {\n app.extensionManager.control.majorUpdate({ dryRun });\n }\n}\n","import app from 'flarum/admin/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport MajorUpdater from './MajorUpdater';\nimport ExtensionItem from './ExtensionItem';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface IUpdaterAttrs extends ComponentAttrs {}\n\nexport type UpdaterLoadingTypes = 'check' | 'minor-update' | 'global-update' | 'extension-update' | null;\n\nexport default class Updater extends Component {\n view() {\n const core = app.extensionManager.control.coreUpdate;\n\n return [\n
\n \n

{app.translator.trans('flarum-extension-manager.admin.updater.updater_help')}

\n {this.lastUpdateCheckView()}\n
{this.controlItems().toArray()}
\n {this.availableUpdatesView()}\n
,\n core && core.package['latest-major'] ? (\n \n ) : null,\n ];\n }\n\n lastUpdateCheckView() {\n return (\n (app.extensionManager.control.lastUpdateCheck?.checkedAt && (\n

\n \n {app.translator.trans('flarum-extension-manager.admin.updater.last_update_checked_at')}\n \n {humanTime(app.extensionManager.control.lastUpdateCheck.checkedAt)}\n

\n )) ||\n null\n );\n }\n\n availableUpdatesView() {\n const state = app.extensionManager.control;\n\n if (app.extensionManager.control.isLoading('check') || app.extensionManager.control.isLoading('global-update')) {\n return (\n
\n \n
\n );\n }\n\n const hasMinorCoreUpdate = state.coreUpdate && state.coreUpdate.package['latest-minor'];\n\n if (!(state.extensionUpdates.length || hasMinorCoreUpdate)) {\n return (\n
\n {app.translator.trans('flarum-extension-manager.admin.updater.up_to_date')}\n
\n );\n }\n\n return (\n
\n
\n {hasMinorCoreUpdate ? (\n state.updateCoreMinor()}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes('flarum/core')}\n />\n ) : null}\n {state.extensionUpdates.map((extension: Extension) => (\n state.updateExtension(extension, 'soft'),\n hard: () => state.updateExtension(extension, 'hard'),\n }}\n whyNotWarning={state.lastUpdateRun.limitedPackages().includes(extension.name)}\n />\n ))}\n
\n
\n );\n }\n\n controlItems() {\n const items = new ItemList();\n\n items.add(\n 'updateCheck',\n app.extensionManager.control.checkForUpdates()}\n loading={app.extensionManager.control.isLoading('check')}\n disabled={app.extensionManager.control.hasOperationRunning()}\n >\n {app.translator.trans('flarum-extension-manager.admin.updater.check_for_updates')}\n ,\n 100\n );\n\n items.add(\n 'globalUpdate',\n app.extensionManager.control.updateGlobally()}\n loading={app.extensionManager.control.isLoading('global-update')}\n disabled={app.extensionManager.control.hasOperationRunning()}\n >\n {app.translator.trans('flarum-extension-manager.admin.updater.run_global_update')}\n \n );\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Alert from 'flarum/common/components/Alert';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nimport Installer from './Installer';\nimport Updater from './Updater';\nimport Mithril from 'mithril';\n\nexport default class ControlSection extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n

{app.translator.trans('flarum-extension-manager.admin.sections.control.title')}

\n
\n
\n
\n {app.data['flarum-extension-manager.writable_dirs'] ? (\n <>\n \n \n \n ) : (\n
\n \n {app.translator.trans('flarum-extension-manager.admin.file_permissions')}\n \n
\n )}\n
\n
\n );\n }\n}\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport Component, { type ComponentAttrs } from 'flarum/common/Component';\nimport { CommonSettingsItemOptions, type SettingsComponentOptions } from '@flarum/core/src/admin/components/AdminPage';\nimport AdminPage from 'flarum/admin/components/AdminPage';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\nexport interface IConfigureJson extends ComponentAttrs {\n buildSettingComponent: (entry: ((this: this) => Mithril.Children) | SettingsComponentOptions) => Mithril.Children;\n}\n\nexport default abstract class ConfigureJson extends Component {\n protected settings: Record> = {};\n protected initialSettings: Record | null = null;\n protected loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.submit(true);\n }\n\n protected abstract type: string;\n abstract title(): Mithril.Children;\n abstract content(): Mithril.Children;\n\n className(): string {\n return '';\n }\n\n view(): Mithril.Children {\n return (\n
\n \n {this.content()}\n
{this.submitButton()}
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n return [\n ,\n ];\n }\n\n customSettingComponents(): ItemList<(attributes: CommonSettingsItemOptions) => Mithril.Children> {\n return AdminPage.prototype.customSettingComponents();\n }\n\n setting(key: string) {\n return this.settings[key] ?? (this.settings[key] = Stream());\n }\n\n submit(readOnly: boolean) {\n this.loading = true;\n\n const configuration: any = {};\n\n Object.keys(this.settings).forEach((key) => {\n configuration[key] = this.settings[key]();\n });\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/extension-manager/composer',\n body: {\n type: this.type,\n data: readOnly ? null : configuration,\n },\n })\n .then(({ data }: any) => {\n Object.keys(data).forEach((key) => {\n this.settings[key] = Stream(data[key]);\n });\n\n this.initialSettings = Array.isArray(data) ? {} : data;\n })\n .finally(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n isDirty() {\n return JSON.stringify(this.initialSettings) !== JSON.stringify(this.settings);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport { type Repository } from './ConfigureComposer';\n\nexport interface IRepositoryModalAttrs extends IInternalModalAttrs {\n onsubmit: (repository: Repository, key: string) => void;\n name?: string;\n repository?: Repository;\n}\n\nexport default class RepositoryModal extends Modal {\n protected name!: Stream;\n protected repository!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.name = Stream(this.attrs.name || '');\n this.repository = Stream(this.attrs.repository || { type: 'composer', url: '' });\n }\n\n className(): string {\n return 'RepositoryModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.repository ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.composer.${context}_repository_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n composer: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.composer'),\n vcs: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.vcs'),\n path: app.translator.trans('flarum-extension-manager.admin.composer.repositories.types.path'),\n };\n\n return (\n
\n
\n \n \n
\n
\n \n this.repository({ ...this.repository(), type: value })}\n />\n
\n
\n \n this.repository({ ...this.repository(), url: (e.target as HTMLInputElement).value })}\n value={this.repository().url}\n />\n
\n
\n \n
\n
\n );\n }\n\n submit() {\n this.attrs.onsubmit(this.repository(), this.name());\n this.hide();\n }\n}\n","import app from 'flarum/admin/app';\nimport type Mithril from 'mithril';\nimport ConfigureJson, { type IConfigureJson } from './ConfigureJson';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport RepositoryModal from './RepositoryModal';\n\nexport type Repository = {\n type: 'composer' | 'vcs' | 'path';\n url: string;\n};\n\nexport default class ConfigureComposer extends ConfigureJson {\n protected type = 'composer';\n\n title(): Mithril.Children {\n return app.translator.trans('flarum-extension-manager.admin.composer.title');\n }\n\n className(): string {\n return 'ConfigureComposer';\n }\n\n content(): Mithril.Children {\n return (\n
\n {this.attrs.buildSettingComponent.call(this, {\n setting: 'minimum-stability',\n label: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.label'),\n help: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.help'),\n type: 'select',\n options: {\n stable: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.stable'),\n RC: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.rc'),\n beta: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.beta'),\n alpha: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.alpha'),\n dev: app.translator.trans('flarum-extension-manager.admin.composer.minimum_stability.options.dev'),\n },\n })}\n
\n \n
{app.translator.trans('flarum-extension-manager.admin.composer.repositories.help')}
\n
\n {Object.keys(this.setting('repositories')() || {}).map((name) => {\n const repository = this.setting('repositories')()[name] as Repository;\n\n return (\n
\n \n app.modal.show(RepositoryModal, {\n name,\n repository,\n onsubmit: (repository: Repository, newName: string) => {\n const repositories = this.setting('repositories')();\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n\n this.onchange(repository, newName);\n },\n })\n }\n >\n {name} ({repository.type})\n \n {\n if (confirm(extractText(app.translator.trans('flarum-extension-manager.admin.composer.delete_repository_confirmation')))) {\n const repositories = { ...this.setting('repositories')() };\n delete repositories[name];\n\n this.setting('repositories')(repositories);\n }\n }}\n />\n
\n );\n })}\n
\n
\n
\n );\n }\n\n submitButton(): Mithril.Children[] {\n const items = super.submitButton();\n\n items.push(\n \n );\n\n return items;\n }\n\n onchange(repository: Repository, name: string) {\n this.setting('repositories')({\n ...this.setting('repositories')(),\n [name]: repository,\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Mithril from 'mithril';\nimport app from 'flarum/admin/app';\nimport Select from 'flarum/common/components/Select';\nimport Stream from 'flarum/common/utils/Stream';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface IAuthMethodModalAttrs extends IInternalModalAttrs {\n onsubmit: (type: string, host: string, token: string) => void;\n type?: string;\n host?: string;\n token?: string;\n}\n\nexport default class AuthMethodModal extends Modal {\n protected type!: Stream;\n protected host!: Stream;\n protected token!: Stream;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.type = Stream(this.attrs.type || 'bearer');\n this.host = Stream(this.attrs.host || '');\n this.token = Stream(this.attrs.token || '');\n }\n\n className(): string {\n return 'AuthMethodModal Modal--small';\n }\n\n title(): Mithril.Children {\n const context = this.attrs.host ? 'edit' : 'add';\n return app.translator.trans(`flarum-extension-manager.admin.auth_config.${context}_label`);\n }\n\n content(): Mithril.Children {\n const types = {\n 'github-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.github-oauth'),\n 'gitlab-oauth': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-oauth'),\n 'gitlab-token': app.translator.trans('flarum-extension-manager.admin.auth_config.types.gitlab-token'),\n bearer: app.translator.trans('flarum-extension-manager.admin.auth_config.types.bearer'),\n };\n\n return (\n
\n
\n \n