PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 1.0.91
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v1.0.91
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
fluent-community / assets / start.js

start.js in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 1.0.91, at assets/start.js

2 lines 15.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{c as V,g as q,R as $t}from"./_commonjsHelpers.js";const B="fcom_pref";class mt{static get(m,a=""){const e=localStorage.getItem(B);if(!e)return a;const i=JSON.parse(e);return!i||!i[m]?a:i[m]}static set(m,a){let e=localStorage.getItem(B);e?(e=JSON.parse(e),typeof e!="object"&&(e={})):e={},e[m]=a,localStorage.setItem(B,JSON.stringify(e))}static remove(m){const a=JSON.parse(localStorage.getItem(B));a&&a[m]&&(delete a[m],localStorage.setItem(B,JSON.stringify(a)))}static clear(){localStorage.removeItem(B)}}function vt(u){return{all:u=u||new Map,on:function(m,a){var e=u.get(m);e?e.push(a):u.set(m,[a])},off:function(m,a){var e=u.get(m);e&&(a?e.splice(e.indexOf(a)>>>0,1):u.set(m,[]))},emit:function(m,a){var e=u.get(m);e&&e.slice().map(function(i){i(a)}),(e=u.get("*"))&&e.slice().map(function(i){i(m,a)})}}}const pt={install:(u,m)=>{u.config.globalProperties.$eventBus=vt()}};function at(u){return typeof u!="string"||u===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(u)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function tt(u){return typeof u!="string"||u===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(u)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(u)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function rt(u,m){return function(e,i,v,$=10){const p=u[m];if(!tt(e)||!at(i))return;if(typeof v!="function"){console.error("The hook callback must be a function.");return}if(typeof $!="number"){console.error("If specified, the hook priority must be a number.");return}const c={callback:v,priority:$,namespace:i};if(p[e]){const l=p[e].handlers;let g;for(g=l.length;g>0&&!($>=l[g-1].priority);g--);g===l.length?l[g]=c:l.splice(g,0,c),p.__current.forEach(D=>{D.name===e&&D.currentIndex>=g&&D.currentIndex++})}else p[e]={handlers:[c],runs:0};e!=="hookAdded"&&u.doAction("hookAdded",e,i,v,$)}}function N(u,m,a=!1){return function(i,v){const $=u[m];if(!tt(i)||!a&&!at(v))return;if(!$[i])return 0;let p=0;if(a)p=$[i].handlers.length,$[i]={runs:$[i].runs,handlers:[]};else{const c=$[i].handlers;for(let l=c.length-1;l>=0;l--)c[l].namespace===v&&(c.splice(l,1),p++,$.__current.forEach(g=>{g.name===i&&g.currentIndex>=l&&g.currentIndex--}))}return i!=="hookRemoved"&&u.doAction("hookRemoved",i,v),p}}function nt(u,m){return function(e,i){const v=u[m];return typeof i<"u"?e in v&&v[e].handlers.some($=>$.namespace===i):e in v}}function it(u,m,a=!1){return function(i,...v){const $=u[m];$[i]||($[i]={handlers:[],runs:0}),$[i].runs++;const p=$[i].handlers;if(!p||!p.length)return a?v[0]:void 0;const c={name:i,currentIndex:0};for($.__current.push(c);c.currentIndex<p.length;){const g=p[c.currentIndex].callback.apply(null,v);a&&(v[0]=g),c.currentIndex++}if($.__current.pop(),a)return v[0]}}function st(u,m){return function(){var v;var e;const i=u[m];return(e=(v=i.__current[i.__current.length-1])==null?void 0:v.name)!==null&&e!==void 0?e:null}}function ot(u,m){return function(e){const i=u[m];return typeof e>"u"?typeof i.__current[0]<"u":i.__current[0]?e===i.__current[0].name:!1}}function ut(u,m){return function(e){const i=u[m];if(tt(e))return i[e]&&i[e].runs?i[e].runs:0}}class gt{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=rt(this,"actions"),this.addFilter=rt(this,"filters"),this.removeAction=N(this,"actions"),this.removeFilter=N(this,"filters"),this.hasAction=nt(this,"actions"),this.hasFilter=nt(this,"filters"),this.removeAllActions=N(this,"actions",!0),this.removeAllFilters=N(this,"filters",!0),this.doAction=it(this,"actions"),this.applyFilters=it(this,"filters",!0),this.currentAction=st(this,"actions"),this.currentFilter=st(this,"filters"),this.doingAction=ot(this,"actions"),this.doingFilter=ot(this,"filters"),this.didAction=ut(this,"actions"),this.didFilter=ut(this,"filters")}}function Mt(){return new gt}const yt=Mt(),{addAction:Dt,addFilter:St,removeAction:kt,removeFilter:It,hasAction:Ut,hasFilter:jt,removeAllActions:Et,removeAllFilters:zt,doAction:_t,applyFilters:xt,currentAction:Wt,currentFilter:Zt,doingAction:Jt,doingFilter:Rt,didAction:Bt,didFilter:Gt,actions:Pt,filters:Vt}=yt;var ct={exports:{}};(function(u,m){(function(a,e){u.exports=e()})(V,function(){var a=1e3,e=6e4,i=36e5,v="millisecond",$="second",p="minute",c="hour",l="day",g="week",D="month",I="quarter",A="year",H="date",o="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|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,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(f){var n=["th","st","nd","rd"],t=f%100;return"["+f+(n[(t-20)%10]||n[t]||n[0])+"]"}},T=function(f,n,t){var s=String(f);return!s||s.length>=n?f:""+Array(n+1-s.length).join(t)+f},U={s:T,z:function(f){var n=-f.utcOffset(),t=Math.abs(n),s=Math.floor(t/60),r=t%60;return(n<=0?"+":"-")+T(s,2,"0")+":"+T(r,2,"0")},m:function f(n,t){if(n.date()<t.date())return-f(t,n);var s=12*(t.year()-n.year())+(t.month()-n.month()),r=n.clone().add(s,D),d=t-r<0,h=n.clone().add(s+(d?-1:1),D);return+(-(s+(t-r)/(d?r-h:h-r))||0)},a:function(f){return f<0?Math.ceil(f)||0:Math.floor(f)},p:function(f){return{M:D,y:A,w:g,d:l,D:H,h:c,m:p,s:$,ms:v,Q:I}[f]||String(f||"").toLowerCase().replace(/s$/,"")},u:function(f){return f===void 0}},x="en",Y={};Y[x]=C;var j="$isDayjsObject",E=function(f){return f instanceof Q||!(!f||!f[j])},z=function f(n,t,s){var r;if(!n)return x;if(typeof n=="string"){var d=n.toLowerCase();Y[d]&&(r=d),t&&(Y[d]=t,r=d);var h=n.split("-");if(!r&&h.length>1)return f(h[0])}else{var y=n.name;Y[y]=n,r=y}return!s&&r&&(x=r),r||!s&&x},O=function(f,n){if(E(f))return f.clone();var t=typeof n=="object"?n:{};return t.date=f,t.args=arguments,new Q(t)},M=U;M.l=z,M.i=E,M.w=function(f,n){return O(f,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var Q=function(){function f(t){this.$L=z(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[j]=!0}var n=f.prototype;return n.parse=function(t){this.$d=function(s){var r=s.date,d=s.utc;if(r===null)return new Date(NaN);if(M.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var h=r.match(_);if(h){var y=h[2]-1||0,S=(h[7]||"0").substring(0,3);return d?new Date(Date.UTC(h[1],y,h[3]||1,h[4]||0,h[5]||0,h[6]||0,S)):new Date(h[1],y,h[3]||1,h[4]||0,h[5]||0,h[6]||0,S)}}return new Date(r)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return M},n.isValid=function(){return this.$d.toString()!==o},n.isSame=function(t,s){var r=O(t);return this.startOf(s)<=r&&r<=this.endOf(s)},n.isAfter=function(t,s){return O(t)<this.startOf(s)},n.isBefore=function(t,s){return this.endOf(s)<O(t)},n.$g=function(t,s,r){return M.u(t)?this[s]:this.set(r,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,s){var r=this,d=!!M.u(s)||s,h=M.p(t),y=function(J,L){var W=M.w(r.$u?Date.UTC(r.$y,L,J):new Date(r.$y,L,J),r);return d?W:W.endOf(l)},S=function(J,L){return M.w(r.toDate()[J].apply(r.toDate("s"),(d?[0,0,0,0]:[23,59,59,999]).slice(L)),r)},w=this.$W,b=this.$M,k=this.$D,R="set"+(this.$u?"UTC":"");switch(h){case A:return d?y(1,0):y(31,11);case D:return d?y(1,b):y(0,b+1);case g:var Z=this.$locale().weekStart||0,G=(w<Z?w+7:w)-Z;return y(d?k-G:k+(6-G),b);case l:case H:return S(R+"Hours",0);case c:return S(R+"Minutes",1);case p:return S(R+"Seconds",2);case $:return S(R+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,s){var r,d=M.p(t),h="set"+(this.$u?"UTC":""),y=(r={},r[l]=h+"Date",r[H]=h+"Date",r[D]=h+"Month",r[A]=h+"FullYear",r[c]=h+"Hours",r[p]=h+"Minutes",r[$]=h+"Seconds",r[v]=h+"Milliseconds",r)[d],S=d===l?this.$D+(s-this.$W):s;if(d===D||d===A){var w=this.clone().set(H,1);w.$d[y](S),w.init(),this.$d=w.set(H,Math.min(this.$D,w.daysInMonth())).$d}else y&&this.$d[y](S);return this.init(),this},n.set=function(t,s){return this.clone().$set(t,s)},n.get=function(t){return this[M.p(t)]()},n.add=function(t,s){var r,d=this;t=Number(t);var h=M.p(s),y=function(b){var k=O(d);return M.w(k.date(k.date()+Math.round(b*t)),d)};if(h===D)return this.set(D,this.$M+t);if(h===A)return this.set(A,this.$y+t);if(h===l)return y(1);if(h===g)return y(7);var S=(r={},r[p]=e,r[c]=i,r[$]=a,r)[h]||1,w=this.$d.getTime()+t*S;return M.w(w,this)},n.subtract=function(t,s){return this.add(-1*t,s)},n.format=function(t){var s=this,r=this.$locale();if(!this.isValid())return r.invalidDate||o;var d=t||"YYYY-MM-DDTHH:mm:ssZ",h=M.z(this),y=this.$H,S=this.$m,w=this.$M,b=r.weekdays,k=r.months,R=r.meridiem,Z=function(L,W,P,X){return L&&(L[W]||L(s,d))||P[W].slice(0,X)},G=function(L){return M.s(y%12||12,L,"0")},J=R||function(L,W,P){var X=L<12?"AM":"PM";return P?X.toLowerCase():X};return d.replace(F,function(L,W){return W||function(P){switch(P){case"YY":return String(s.$y).slice(-2);case"YYYY":return M.s(s.$y,4,"0");case"M":return w+1;case"MM":return M.s(w+1,2,"0");case"MMM":return Z(r.monthsShort,w,k,3);case"MMMM":return Z(k,w);case"D":return s.$D;case"DD":return M.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return Z(r.weekdaysMin,s.$W,b,2);case"ddd":return Z(r.weekdaysShort,s.$W,b,3);case"dddd":return b[s.$W];case"H":return String(y);case"HH":return M.s(y,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return J(y,S,!0);case"A":return J(y,S,!1);case"m":return String(S);case"mm":return M.s(S,2,"0");case"s":return String(s.$s);case"ss":return M.s(s.$s,2,"0");case"SSS":return M.s(s.$ms,3,"0");case"Z":return h}return null}(L)||h.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,s,r){var d,h=this,y=M.p(s),S=O(t),w=(S.utcOffset()-this.utcOffset())*e,b=this-S,k=function(){return M.m(h,S)};switch(y){case A:d=k()/12;break;case D:d=k();break;case I:d=k()/3;break;case g:d=(b-w)/6048e5;break;case l:d=(b-w)/864e5;break;case c:d=b/i;break;case p:d=b/e;break;case $:d=b/a;break;default:d=b}return r?d:M.a(d)},n.daysInMonth=function(){return this.endOf(D).$D},n.$locale=function(){return Y[this.$L]},n.locale=function(t,s){if(!t)return this.$L;var r=this.clone(),d=z(t,s,!0);return d&&(r.$L=d),r},n.clone=function(){return M.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},f}(),et=Q.prototype;return O.prototype=et,[["$ms",v],["$s",$],["$m",p],["$H",c],["$W",l],["$M",D],["$y",A],["$D",H]].forEach(function(f){et[f[1]]=function(n){return this.$g(n,f[0],f[1])}}),O.extend=function(f,n){return f.$i||(f(n,Q,O),f.$i=!0),O},O.locale=z,O.isDayjs=E,O.unix=function(f){return O(1e3*f)},O.en=Y[x],O.Ls=Y,O.p={},O})})(ct);var Ot=ct.exports;const K=q(Ot);var ft={exports:{}};(function(u,m){(function(a,e){u.exports=e()})(V,function(){return function(a,e,i){a=a||{};var v=e.prototype,$={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function p(l,g,D,I){return v.fromToBase(l,g,D,I)}i.en.relativeTime=$,v.fromToBase=function(l,g,D,I,A){for(var H,o,_,F=D.$locale().relativeTime||$,C=a.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=C.length,U=0;U<T;U+=1){var x=C[U];x.d&&(H=I?i(l).diff(D,x.d,!0):D.diff(l,x.d,!0));var Y=(a.rounding||Math.round)(Math.abs(H));if(_=H>0,Y<=x.r||!x.r){Y<=1&&U>0&&(x=C[U-1]);var j=F[x.l];A&&(Y=A(""+Y)),o=typeof j=="string"?j.replace("%d",Y):j(Y,g,x.l,_);break}}if(g)return o;var E=_?F.future:F.past;return typeof E=="function"?E(o):E.replace("%s",o)},v.to=function(l,g){return p(l,g,this,!0)},v.from=function(l,g){return p(l,g,this)};var c=function(l){return l.$u?i.utc():i()};v.toNow=function(l){return this.to(c(this),l)},v.fromNow=function(l){return this.from(c(this),l)}}})})(ft);var wt=ft.exports;const Tt=q(wt);var lt={exports:{}};(function(u,m){(function(a,e){u.exports=e()})(V,function(){var a="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(v,$,p){var c=$.prototype;p.utc=function(o){var _={date:o,utc:!0,args:arguments};return new $(_)},c.utc=function(o){var _=p(this.toDate(),{locale:this.$L,utc:!0});return o?_.add(this.utcOffset(),a):_},c.local=function(){return p(this.toDate(),{locale:this.$L,utc:!1})};var l=c.parse;c.parse=function(o){o.utc&&(this.$u=!0),this.$utils().u(o.$offset)||(this.$offset=o.$offset),l.call(this,o)};var g=c.init;c.init=function(){if(this.$u){var o=this.$d;this.$y=o.getUTCFullYear(),this.$M=o.getUTCMonth(),this.$D=o.getUTCDate(),this.$W=o.getUTCDay(),this.$H=o.getUTCHours(),this.$m=o.getUTCMinutes(),this.$s=o.getUTCSeconds(),this.$ms=o.getUTCMilliseconds()}else g.call(this)};var D=c.utcOffset;c.utcOffset=function(o,_){var F=this.$utils().u;if(F(o))return this.$u?0:F(this.$offset)?D.call(this):this.$offset;if(typeof o=="string"&&(o=function(x){x===void 0&&(x="");var Y=x.match(e);if(!Y)return null;var j=(""+Y[0]).match(i)||["-",0,0],E=j[0],z=60*+j[1]+ +j[2];return z===0?0:E==="+"?z:-z}(o),o===null))return this;var C=Math.abs(o)<=16?60*o:o,T=this;if(_)return T.$offset=C,T.$u=o===0,T;if(o!==0){var U=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(C+U,a)).$offset=C,T.$x.$localOffset=U}else T=this.utc();return T};var I=c.format;c.format=function(o){var _=o||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return I.call(this,_)},c.valueOf=function(){var o=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*o},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var A=c.toDate;c.toDate=function(o){return o==="s"&&this.$offset?p(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():A.call(this)};var H=c.diff;c.diff=function(o,_,F){if(o&&this.$u===o.$u)return H.call(this,o,_,F);var C=this.local(),T=p(o).local();return H.call(C,T,_,F)}}})})(lt);var Yt=lt.exports;const bt=q(Yt);var dt={exports:{}};(function(u,m){(function(a,e){u.exports=e()})(V,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,i,v){var $=i.prototype,p=$.format;v.en.formats=a,$.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var l=this.$locale().formats,g=function(D,I){return D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,H,o){var _=o&&o.toUpperCase();return H||I[o]||a[o]||I[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,C,T){return C||T.slice(1)})})}(c,l===void 0?{}:l);return p.call(this,g)}}})})(dt);var Ht=dt.exports;const At=q(Ht);var ht={exports:{}};(function(u,m){(function(a,e){u.exports=e()})(V,function(){return function(a,e,i){i.updateLocale=function(v,$){var p=i.Ls[v];if(p)return($?Object.keys($):[]).forEach(function(c){p[c]=$[c]}),p}}})})(ht);var Lt=ht.exports;const Ct=q(Lt);K.extend(bt);K.extend(At);K.extend(Tt);K.extend(Ct);window.dayjs=K;window.FluentCommunityUtil={Rest:$t,Storage:mt,eventBus:pt,hooks:{addFilter:St,addAction:Dt,applyFilters:xt,doAction:_t},handleSearchClick(u,m){u.preventDefault(),document.dispatchEvent(new CustomEvent("doCustomGlobalSearch",{detail:{search:u.target.textContent}}))}};document.dispatchEvent(new Event("fluentCommunityUtilReady"));
2