545 lines
No EOL
872 KiB
JavaScript
545 lines
No EOL
872 KiB
JavaScript
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={328:(t,e,n)=>{var r=n(8336),i=n(345);void 0===i.punycode&&(i.punycode=r),t.exports=r},345:(t,e,n)=>{"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},408:(t,e,n)=>{var r=n(679);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},454:()=>{!function(t){"use strict";var e=function(n,r){this.options=t.extend({},e.DEFAULTS,r);var i=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=t(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new e(this,o)),"string"==typeof n&&i[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=o.top)&&"bottom":!(i+s<=t-r)&&"bottom";var a=null==this.affixed,u=a?i:o.top;return null!=n&&i<=n?"top":null!=r&&u+(a?s:e)>=t-r&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),l=t.Event(u+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),r=e.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(e,r)}))}))}(jQuery)},509:(t,e,n)=>{"use strict";var r=n(5385);t.exports=function(t){var e=r(t),n=Object.keys(e.params),i=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(i.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var r=0;r<n.length;r++)if(e.params[n[r]]!==t.params[n[r]])return!1;if(!i.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(r=0;r<i.length;r++)t.params[i[r].k]=i[r].r?s[r+1]:decodeURIComponent(s[r+1]);return!0}}},679:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},1189:(t,e,n)=>{var r=n(8176),i=n(2283),o=n(6681),s=n(5045);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},1216:(t,e,n)=>{"use strict";var r=n(5720);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1384:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},1670:(t,e,n)=>{var r=n(5800),i=n(345);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},1816:function(t){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var r=e.prototype,i={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 o(t,e,n,i){return r.fromToBase(t,e,n,i)}n.en.relativeTime=i,r.fromToBase=function(e,r,o,s,a){for(var u,l,c,d=o.$locale().relativeTime||i,h=t.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"}],f=h.length,p=0;p<f;p+=1){var m=h[p];m.d&&(u=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(u));if(c=u>0,v<=m.r||!m.r){v<=1&&p>0&&(m=h[p-1]);var g=d[m.l];a&&(v=a(""+v)),l="string"==typeof g?g.replace("%d",v):g(v,r,m.l,c);break}}if(r)return l;var y=c?d.future:d.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}()},1821:(t,e,n)=>{"use strict";var r=n(5720);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return r("",e.key,e,t)}},2021:(t,e,n)=>{"use strict";t.exports=n(5872)(window)},2216:(t,e,n)=>{var r=n(2433).default;t.exports=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},2283:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,s,a=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return a}},t.exports.__esModule=!0,t.exports.default=t.exports},2433:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2737:()=>{!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;return t(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||t(r).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},2787:t=>{"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)r(t+"["+i+"]",n[i]);else if("[object Object]"===Object.prototype.toString.call(n))for(var i in n)r(t+"["+i+"]",n[i]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},3010:(t,e,n)=>{"use strict";var r=n(9568);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=r:window.Promise.prototype.finally||(window.Promise.prototype.finally=r.prototype.finally),t.exports=window.Promise):void 0!==n.g?(void 0===n.g.Promise?n.g.Promise=r:n.g.Promise.prototype.finally||(n.g.Promise.prototype.finally=r.prototype.finally),t.exports=n.g.Promise):t.exports=r},3184:t=>{!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0];return i(Array.prototype.slice.call(arguments,1)).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,r){var i=r.map((function(r){var i=t(e,r);return i!==n.SKIP&&(e=i),i}));return i(e),i},n.merge=i,n.combine=r,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),i=r((function(){var r=arguments[arguments.length-1];return n.forEach((function(n,i){r.indexOf(n)>-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",i.forEach((function(e,n){e(s[n](t))})))),t}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),i.forEach((function(t){t._changing()}))},a._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(a),i.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=i.length=s.length=0),t})),e)}}),a}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=i.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},3297:(t,e,n)=>{var r=n(3570)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},3406:(t,e,n)=>{"use strict";var r=n(6650);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function s(t){return function(i,s){"string"!=typeof i?(s=i,i=i.url):null==s&&(s={});var a=new e((function(e,n){t(r(i,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var u=0;function l(){0==--u&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){u++;var r=n.apply(e,arguments);return r.then(l,(function(t){if(l(),0===u)throw t})),t(r)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,r,i){var o,s=null!=n.method?n.method.toUpperCase():"GET",u=n.body,l=!(null!=n.serialize&&n.serialize!==JSON.serialize||u instanceof t.FormData),c=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,h=!1,f=d,p=d.abort;for(var m in d.abort=function(){h=!0,p.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),l&&null!=u&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=c,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!h&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===c?t.target.responseType||"function"==typeof n.extract||(a=JSON.parse(t.target.responseText)):c&&"text"!==c||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)r(a);else{try{o=t.target.responseText}catch(t){o=a}var u=new Error(o);u.code=t.target.status,u.response=a,i(u)}}catch(t){i(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==f&&(o=d.abort,d.abort=function(){h=!0,o.call(this)}),null==u?d.send():"function"==typeof n.serialize?d.send(n.serialize(u)):u instanceof t.FormData?d.send(u):d.send(JSON.stringify(u))})),jsonp:s((function(e,n,r,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),r(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},3415:(t,e,n)=>{var r=n(8661),i=n(345);void 0===i.m&&(i.m=r),t.exports=r},3570:(t,e,n)=>{var r=n(2433).default;function i(){"use strict";t.exports=i=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,o=Object.create(i.prototype),s=new B(r||[]);return a(o,"_invoke",{value:S(t,n,s)}),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=f;var m="suspendedStart",v="suspendedYield",g="executing",y="completed",b={};function w(){}function D(){}function x(){}var C={};h(C,l,(function(){return this}));var A=Object.getPrototypeOf,E=A&&A(A(I([])));E&&E!==o&&s.call(E,l)&&(C=E);var N=x.prototype=w.prototype=Object.create(C);function F(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(i,o,a,u){var l=p(t[i],t,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==r(d)&&s.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;a(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function S(t,n,r){var i=m;return function(o,s){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===o)throw s;return{value:e,done:!0}}for(r.method=o,r.arg=s;;){var a=r.delegate;if(a){var u=T(a,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=p(t,n,r);if("normal"===l.type){if(i=r.done?y:v,l.arg===b)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=y,r.method="throw",r.arg=l.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,b;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(s.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(r(t)+" is not iterable")}return D.prototype=x,a(N,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:D,configurable:!0}),D.displayName=h(x,d,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===D||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,d,"GeneratorFunction")),t.prototype=Object.create(N),t},n.awrap=function(t){return{__await:t}},F(k.prototype),h(k.prototype,c,(function(){return this})),n.AsyncIterator=k,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var s=new k(f(t,e,r,i),o);return n.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},F(N),h(N,d,"Generator"),h(N,l,(function(){return this})),h(N,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=I,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&s.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=s.call(o,"catchLoc"),l=s.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},n}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},3800:(t,e,n)=>{var r=n(6449),i=n(345);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},4098:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,m={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(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w="$isDayjsObject",D=function(t){return t instanceof E||!(!t||!t[w])},x=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},C=function(t,e){if(D(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},A=g;A.l=x,A.i=D,A.w=function(t,e){return C(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function m(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},v.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()},v.$utils=function(){return A},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=C(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return C(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<C(t)},v.$g=function(t,e,n){return A.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,l=!!A.u(e)||e,h=A.p(t),f=function(t,e){var r=A.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return l?r:r.endOf(s)},p=function(t,e){return A.w(n.toDate()[t].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,v=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case c:return l?f(1,0):f(31,11);case u:return l?f(1,v):f(0,v+1);case a:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(l?g-w:g+(6-w),v);case s:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var a,l=A.p(t),h="set"+(this.$u?"UTC":""),f=(a={},a[s]=h+"Date",a[d]=h+"Date",a[u]=h+"Month",a[c]=h+"FullYear",a[o]=h+"Hours",a[i]=h+"Minutes",a[r]=h+"Seconds",a[n]=h+"Milliseconds",a)[l],p=l===s?this.$D+(e-this.$W):e;if(l===u||l===c){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[A.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=A.p(l),p=function(t){var e=C(h);return A.w(e.date(e.date()+Math.round(t*n)),h)};if(f===u)return this.set(u,this.$M+n);if(f===c)return this.set(c,this.$y+n);if(f===s)return p(1);if(f===a)return p(7);var m=(d={},d[i]=t,d[o]=e,d[r]=1e3,d)[f]||1,v=this.$d.getTime()+n*m;return A.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=A.z(this),o=this.$H,s=this.$m,a=this.$M,u=n.weekdays,l=n.months,c=n.meridiem,d=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].slice(0,o)},f=function(t){return A.s(o%12||12,t,"0")},m=c||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return A.s(e.$y,4,"0");case"M":return a+1;case"MM":return A.s(a+1,2,"0");case"MMM":return d(n.monthsShort,a,l,3);case"MMMM":return d(l,a);case"D":return e.$D;case"DD":return A.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(n.weekdaysMin,e.$W,u,2);case"ddd":return d(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(o);case"HH":return A.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,s,!0);case"A":return m(o,s,!1);case"m":return String(s);case"mm":return A.s(s,2,"0");case"s":return String(e.$s);case"ss":return A.s(e.$s,2,"0");case"SSS":return A.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,h){var f,p=this,m=A.p(d),v=C(n),g=(v.utcOffset()-this.utcOffset())*t,y=this-v,b=function(){return A.m(p,v)};switch(m){case c:f=b()/12;break;case u:f=b();break;case l:f=b()/3;break;case a:f=(y-g)/6048e5;break;case s:f=(y-g)/864e5;break;case o:f=y/e;break;case i:f=y/t;break;case r:f=y/1e3;break;default:f=y}return h?f:A.a(f)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return A.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),N=E.prototype;return C.prototype=N,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){N[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),C.extend=function(t,e){return t.$i||(t(e,E,C),t.$i=!0),C},C.locale=x,C.isDayjs=D,C.unix=function(t){return C(1e3*t)},C.en=b[y],C.Ls=b,C.p={},C}()},4187:()=>{!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,i=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function o(e,o){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,o))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(i));for(var a=t(o).filter((function(t,e){return e instanceof RegExp})),u=0,l=a.length;u<l;u++)if(s.match(a[u]))return!0;return!1}function s(e,n,r){if(0===e.length)return e;if(r&&"function"==typeof r)return r(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var i=document.implementation.createHTMLDocument("sanitization");i.body.innerHTML=e;for(var s=t.map(n,(function(t,e){return e})),a=t(i.body).find("*"),u=0,l=a.length;u<l;u++){var c=a[u],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,s))for(var h=t.map(c.attributes,(function(t){return t})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)o(h[p],f)||c.removeAttribute(h[p].nodeName);else c.parentNode.removeChild(c)}return i.body.innerHTML}var a=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},a.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==t.inArray(i,e)&&delete r[i];return(n=t.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=s(n.template,n.whiteList,n.sanitizeFn)),n},a.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,r){n[t]!=r&&(e[t]=r)})),e},a.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},a.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},a.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},a.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,l=u.test(s);l&&(s=s.replace(u,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(t(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=i[0].offsetWidth,h=i[0].offsetHeight;if(l){var f=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-h<p.top?"bottom":"right"==s&&c.right+d>p.width?"left":"left"==s&&c.left-d<p.left?"right":s,i.removeClass(f).addClass(s)}var m=this.getCalculatedOffset(s,c,d,h);this.applyPlacement(m,s);var v=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",v).emulateTransitionEnd(a.TRANSITION_DURATION):v()}},a.prototype.applyPlacement=function(e,n){var r=this.tip(),i=r[0].offsetWidth,o=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),a=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(r[0],t.extend({using:function(t){r.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),r.addClass("in");var u=r[0].offsetWidth,l=r[0].offsetHeight;"top"==n&&l!=o&&(e.top=e.top+o-l);var c=this.getViewportAdjustedDelta(n,e,u,l);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),h=d?2*c.left-i+u:2*c.top-o+l,f=d?"offsetWidth":"offsetHeight";r.offset(e),this.replaceArrow(h,r[0][f],d)},a.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},a.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=s(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},a.prototype.hide=function(e){var n=this,r=t(this.$tip),i=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&r.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(i),!i.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",o).emulateTransitionEnd(a.TRANSITION_DURATION):o(),this.hoverState=null,this},a.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},a.prototype.hasContent=function(){return this.getTitle()},a.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],r="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=t.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=r?{top:0,left:0}:o?null:e.offset(),a={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},u=r?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},i,a,u,s)},a.prototype.getCalculatedOffset=function(t,e,n,r){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-r,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-r/2,left:e.left-n}:{top:e.top+e.height/2-r/2,left:e.left+e.width}},a.prototype.getViewportAdjustedDelta=function(t,e,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,u=e.top+o-s.scroll+r;a<s.top?i.top=s.top-a:u>s.top+s.height&&(i.top=s.top+s.height-u)}else{var l=e.left-o,c=e.left+o+n;l<s.left?i.left=s.left-l:c>s.right&&(i.left=s.left+s.width-c)}return i},a.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},a.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},a.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},a.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},a.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new a(this,i)),"string"==typeof e&&r[e]())}))},t.fn.tooltip.Constructor=a,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},4385:(t,e,n)=>{"use strict";t.exports=n(3184)},4435:()=>{!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),i=r(e),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=r(n),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),i.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var u=a.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<a.length-1&&u++,~u||(u=0),a.eq(u).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var r=t(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof e&&i[e].call(r)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},4848:(t,e,n)=>{"use strict";var r=n(9587);r.trust=n(1216),r.fragment=n(8692),t.exports=r},5034:(t,e,n)=>{"use strict";var r=n(2021);t.exports=n(6367)(r,requestAnimationFrame,console)},5045:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},5109:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},5385:(t,e,n)=>{"use strict";var r=n(6240);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:r(t.slice(e+1,i))}}},5420:(t,e,n)=>{"use strict";var r=n(5034);t.exports=n(7453)(window,r)},5605:()=>{},5618:(t,e,n)=>{var r=n(4098),i=n(345);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},5720:t=>{"use strict";function e(t,e,n,r,i,o){return{tag:t,key:e,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}e.normalize=function(t){return Array.isArray(t)?e("[",void 0,void 0,e.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:e("#",void 0,void 0,String(t),void 0,void 0)},e.normalizeChildren=function(t){var n=[];if(t.length){for(var r=null!=t[0]&&null!=t[0].key,i=1;i<t.length;i++)if((null!=t[i]&&null!=t[i].key)!==r)throw new TypeError("Vnodes must either always have keys or never have keys!");for(i=0;i<t.length;i++)n[i]=e.normalize(t[i])}return n},t.exports=e},5800:t=>{var e=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.update=function(t){this.context.putImageData(t,0,0)},e.prototype.getPixelCount=function(){return this.width*this.height},e.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},e.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var n=function(){};if(n.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},n.prototype.getPalette=function(t,n,r){void 0===n&&(n=10),(void 0===r||1>r)&&(r=10);for(var o,s,a,u,l=new e(t),c=l.getImageData().data,d=l.getPixelCount(),h=[],f=0;d>f;f+=r)s=c[0+(o=4*f)],a=c[o+1],u=c[o+2],c[o+3]>=125&&(s>250&&a>250&&u>250||h.push([s,a,u]));var p=i.quantize(h,n),m=p?p.palette():null;return l.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,r,i){return n.index=i,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var i=function(){function t(t,e,n){return(t<<2*u)+(e<<u)+n}function e(t){function e(){n.sort(t),r=!0}var n=[],r=!1;return{push:function(t){n.push(t),r=!1},peek:function(t){return r||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return r||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return r||e(),n}}}function n(t,e,n,r,i,o,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=r,a.b1=i,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,r,i,o,s=new Array(1<<3*u);return e.forEach((function(e){r=e[0]>>l,i=e[1]>>l,o=e[2]>>l,n=t(r,i,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var r,i,o,s=1e6,a=0,u=1e6,c=0,d=1e6,h=0;return t.forEach((function(t){r=t[0]>>l,i=t[1]>>l,o=t[2]>>l,s>r?s=r:r>a&&(a=r),u>i?u=i:i>c&&(c=i),d>o?d=o:o>h&&(h=o)})),new n(s,a,u,c,d,h,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var u,l,c,d,h=0,f=[],p=[];if(a==i)for(u=n.r1;u<=n.r2;u++){for(d=0,l=n.g1;l<=n.g2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(u,l,c)]||0;h+=d,f[u]=h}else if(a==o)for(u=n.g1;u<=n.g2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(l,u,c)]||0;h+=d,f[u]=h}else for(u=n.b1;u<=n.b2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.g1;c<=n.g2;c++)d+=e[t(l,c,u)]||0;h+=d,f[u]=h}return f.forEach((function(t,e){p[e]=h-t})),function(t){var e,r,i,o,s,a=t+"1",l=t+"2",c=0;for(u=n[a];u<=n[l];u++)if(f[u]>h/2){for(i=n.copy(),o=n.copy(),e=u-n[a],s=(r=n[l]-u)>=e?Math.min(n[l]-1,~~(u+r/2)):Math.max(n[a],~~(u-1-e/2));!f[s];)s++;for(c=p[s];!c&&f[s-1];)c=p[--s];return i[l]=s,o[a]=i[l]+1,[i,o]}}(a==i?"r":a==o?"g":"b")}}var u=5,l=8-u;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,r=n.histo;if(!n._count_set||e){var i,o,s,a=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(i,o,s),a+=r[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var i,o,s,a,l=0,c=1<<8-u,d=0,h=0,f=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)l+=i=r[t(o,s,a)]||0,d+=i*(o+.5)*c,h+=i*(s+.5)*c,f+=i*(a+.5)*c;n._avg=l?[~~(d/l),~~(h/l),~~(f/l)]:[~~(c*(n.r1+n.r2+1)/2),~~(c*(n.g1+n.g2+1)/2),~~(c*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>l;return gval=t[1]>>l,bval=t[2]>>l,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,r,i=this.vboxes,o=0;o<i.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-i.peek(o).color[0],2)+Math.pow(t[1]-i.peek(o).color[1],2)+Math.pow(t[2]-i.peek(o).color[2],2)))||void 0===e)&&(e=n,r=i.peek(o).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function u(t,e){for(var n,r=1,i=0;1e3>i;)if((n=t.pop()).count()){var o=a(l,n),s=o[0],u=o[1];if(!s)return;if(t.push(s),u&&(t.push(u),r++),r>=e)return;if(i++>1e3)return}else t.push(n),i++}if(!t.length||2>n||n>256)return!1;var l=o(t);l.forEach((function(){}));var c=s(t,l),d=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));d.push(c),u(d,.75*n);for(var h=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));d.size();)h.push(d.pop());u(h,n-h.size());for(var f=new i;h.size();)f.push(h.pop());return f}}}();t.exports=n},5812:t=>{!function(){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,r=n&&null!=window.mozInnerScreenX;function i(t,i,o){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=o&&o.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var u=document.createElement("div");u.id="input-textarea-caret-position-mirror-div",document.body.appendChild(u);var l=u.style,c=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;l.whiteSpace="pre-wrap",d||(l.wordWrap="break-word"),l.position="absolute",s||(l.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?l.lineHeight=c.height:l[t]=c[t]})),r?t.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",u.textContent=t.value.substring(0,i),d&&(u.textContent=u.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(i)||".",u.appendChild(h);var f={top:h.offsetTop+parseInt(c.borderTopWidth),left:h.offsetLeft+parseInt(c.borderLeftWidth),height:parseInt(c.lineHeight)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(u),f}void 0!==t.exports?t.exports=i:n&&(window.getCaretCoordinates=i)}()},5872:(t,e,n)=>{"use strict";var r=n(5720);t.exports=function(t){var e,n=t&&t.document,i={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||i[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function u(){try{return n.activeElement}catch(t){return null}}function l(t,e,n,r,i,o,s){for(var a=n;a<r;a++){var u=e[a];null!=u&&c(t,u,i,s,o)}}function c(t,e,i,s,u){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,i),d){case"#":!function(t,e,r){e.dom=n.createTextNode(e.children),w(t,e.dom,r)}(t,e,u);break;case"<":h(t,e,s,u);break;case"[":!function(t,e,r,i,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;l(s,a,0,a.length,r,null,i)}e.dom=s.firstChild,e.domSize=s.childNodes.length,w(t,s,o)}(t,e,i,s,u);break;default:!function(t,e,i,s,a){var u=e.tag,c=e.attrs,d=c&&c.is,h=(s=o(e)||s)?d?n.createElementNS(s,u,{is:d}):n.createElementNS(s,u):d?n.createElement(u,{is:d}):n.createElement(u);if(e.dom=h,null!=c&&function(t,e,n){for(var r in e)F(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&F(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,F,k=i,S=E-u+1,T=new Array(S),_=0,P=0,B=2147483647,I=0;for(P=0;P<S;P++)T[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,T[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=k,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)for(F=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i<o;i++)v[i]=t[i];for(i=0;i<o;++i)if(-1!==t[i]){var s=e[e.length-1];if(t[s]<t[i])v[i]=s,e.push(i);else{for(n=0,r=e.length-1;n<r;){var a=(n>>>1)+(r>>>1)+(n&r&1);t[e[a]]<t[i]?n=a+1:r=a}t[i]<t[e[n]]&&(n>0&&(v[i]=e[n-1]),e[n]=i)}}for(r=e[(n=e.length)-1];n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(T),_=F.length-1,P=E;P>=u;P--)f=n[P],-1===T[P-u]?c(t,f,r,o,i):F[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===T[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)F(t,i,e&&e[i],n[i],r);var o;if(null!=e)for(var i in e)null==(o=e[i])||null!=n&&null!=n[i]||k(t,i,o,r)}(e,t.attrs,e.attrs,i),D(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)A(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&N(r)}}}function F(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!S(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)I(t.dom,r,i);else if(T(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+i&&t.dom===u())return;if("select"===t.tag&&null!==r&&t.dom.value===""+i)return;if("option"===t.tag&&null!==r&&t.dom.value===""+i)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,i):t.dom[e]=i}else"boolean"==typeof i?i?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,i)}}function k(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!S(e))if("o"!==e[0]||"n"!==e[1]||S(e))if("style"===e)I(t.dom,n,null);else if(!T(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function S(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function T(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},6240:t=>{"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},r={},i=0;i<e.length;i++){var o=e[i].split("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var u=s.split(/\]\[?|\[/),l=r;s.indexOf("[")>-1&&u.pop();for(var c=0;c<u.length;c++){var d=u[c],h=u[c+1],f=""==h||!isNaN(parseInt(h,10));if(""===d)null==n[s=u.slice(0,c).join()]&&(n[s]=Array.isArray(l)?l.length:0),d=n[s]++;else if("__proto__"===d)break;if(c===u.length-1)l[d]=a;else{var p=Object.getOwnPropertyDescriptor(l,d);null!=p&&(p=p.value),null==p&&(l[d]=p=f?[]:{}),l=p}}}return r}},6367:(t,e,n)=>{"use strict";var r=n(5720);t.exports=function(t,e,n){var i=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<i.length;e+=2)try{t(i[e],r(i[e+1]),u)}catch(t){n.error(t)}o=!1}function u(){s||(s=!0,e((function(){s=!1,a()})))}return u.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=i.indexOf(e);o>=0&&(i.splice(o,2),t(e,[],u)),null!=n&&(i.push(e,n),t(e,r(n),u))},redraw:u}}},6402:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},6449:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.7.1",A=/HTML$/i,E=function(t,e){return new E.fn.init(t,e)};function N(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}E.fn=E.prototype={jquery:C,constructor:E,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=E.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return E.each(this,t)},map:function(t){return this.pushStack(E.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},E.extend=E.fn.extend=function(){var t,e,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,s[e]=E.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},E.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(N(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=E.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(N(Object(t))?E.merge(n,"string"==typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:c.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!A.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,s=!n;i<o;i++)!e(t[i],i)!==s&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,s=[];if(N(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&s.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&s.push(i);return u(s)},guid:1,support:v}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=o[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var k=o.pop,S=o.sort,T=o.splice,_="[\\x20\\t\\r\\n\\f]",P=new RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g");E.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var B=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}E.escapeSelector=function(t){return(t+"").replace(B,I)};var O=b,L=l;!function(){var t,e,n,i,s,u,l,d,h,p,m=L,g=E.expando,y=0,b=0,w=tt(),D=tt(),x=tt(),C=tt(),A=function(t,e){return t===e&&(s=!0),0},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B="(?:\\\\[\\da-fA-F]{1,6}"+_+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I="\\["+_+"*("+B+")(?:"+_+"*([*^$|!~]?=)"+_+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+B+"))|)"+_+"*\\]",M=":("+B+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(_+"+","g"),j=new RegExp("^"+_+"*,"+_+"*"),R=new RegExp("^"+_+"*([>+~]|"+_+")"+_+"*"),H=new RegExp(_+"|>"),U=new RegExp(M),q=new RegExp("^"+B+"$"),z={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,G=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+_+"?|\\\\([^\\r\\n\\f])","g"),X=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ut()},Q=ht((function(t){return!0===t.disabled&&F(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=a.call(O.childNodes),O.childNodes),o[O.childNodes.length].nodeType}catch(t){m={apply:function(t,e){L.apply(t,a.call(e))},call:function(t){L.apply(t,a.call(arguments,1))}}}function Z(t,e,n,r){var i,o,s,a,l,c,f,p=e&&e.ownerDocument,y=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==y&&9!==y&&11!==y)return n;if(!r&&(ut(e),e=e||u,d)){if(11!==y&&(l=G.exec(t)))if(i=l[1]){if(9===y){if(!(s=e.getElementById(i)))return n;if(s.id===i)return m.call(n,s),n}else if(p&&(s=p.getElementById(i))&&Z.contains(e,s)&&s.id===i)return m.call(n,s),n}else{if(l[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=l[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(C[t+" "]||h&&h.test(t))){if(f=t,p=e,1===y&&(H.test(t)||R.test(t))){for((p=Y.test(t)&&at(e.parentNode)||e)==e&&v.scope||((a=e.getAttribute("id"))?a=E.escapeSelector(a):e.setAttribute("id",a=g)),o=(c=ct(t)).length;o--;)c[o]=(a?"#"+a:":scope")+" "+dt(c[o]);f=c.join(",")}try{return m.apply(n,p.querySelectorAll(f)),n}catch(e){C(t,!0)}finally{a===g&&e.removeAttribute("id")}}}return yt(t.replace(P,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[g]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return F(e,"input")&&e.type===t}}function it(t){return function(e){return(F(e,"input")||F(e,"button"))&&e.type===t}}function ot(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Q(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function st(t){return et((function(e){return e=+e,et((function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,r=t?t.ownerDocument||t:O;return r!=u&&9===r.nodeType&&r.documentElement?(l=(u=r).documentElement,d=!E.isXMLDoc(u),p=l.matches||l.webkitMatchesSelector||l.msMatchesSelector,l.msMatchesSelector&&O!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",J),v.getById=nt((function(t){return l.appendChild(t).id=E.expando,!u.getElementsByName||!u.getElementsByName(E.expando).length})),v.disconnectedMatch=nt((function(t){return p.call(t,"*")})),v.scope=nt((function(){return u.querySelectorAll(":scope")})),v.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),v.getById?(e.filter.ID=function(t){var e=t.replace(K,X);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace(K,X);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(t)},h=[],nt((function(t){var e;l.appendChild(t).innerHTML="<a id='"+g+"' href='' disabled='disabled'></a><select id='"+g+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+g+"-]").length||h.push("~="),t.querySelectorAll("a#"+g+"+*").length||h.push(".#.+[+~]"),t.querySelectorAll(":checked").length||h.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),l.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||h.push("\\["+_+"*name"+_+"*="+_+"*(?:''|\"\")")})),v.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),A=function(t,e){if(t===e)return s=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!v.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==O&&Z.contains(O,t)?-1:e===u||e.ownerDocument==O&&Z.contains(O,e)?1:i?c.call(i,t)-c.call(i,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),d&&!C[e+" "]&&(!h||!h.test(e)))try{var n=p.call(t,e);if(n||v.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){C(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),E.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var r=e.attrHandle[n.toLowerCase()],i=r&&f.call(e.attrHandle,n.toLowerCase())?r(t,n,!d):void 0;return void 0!==i?i:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},E.uniqueSort=function(t){var e,n=[],r=0,o=0;if(s=!v.sortStable,i=!v.sortStable&&a.call(t,0),S.call(t,A),s){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)T.call(t,n[r],1)}return i=null,t},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(a.apply(this)))},e=E.expr={cacheLength:50,createPseudo:et,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,X),t[3]=(t[3]||t[4]||t[5]||"").replace(K,X),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,X).toLowerCase();return"*"===t?function(){return!0}:function(t){return F(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+_+")"+t+"("+_+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Z.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,h,f,p=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!u&&!a,w=!1;if(m){if(o){for(;p;){for(d=e;d=d[p];)if(a?F(d,v):1===d.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&b){for(w=(h=(l=(c=m[g]||(m[g]={}))[t]||[])[0]===y&&l[1])&&l[2],d=h&&m.childNodes[h];d=++h&&d&&d[p]||(w=h=0)||f.pop();)if(1===d.nodeType&&++w&&d===e){c[t]=[y,h,w];break}}else if(b&&(w=h=(l=(c=e[g]||(e[g]={}))[t]||[])[0]===y&&l[1]),!1===w)for(;(d=++h&&d&&d[p]||(w=h=0)||f.pop())&&(!(a?F(d,v):1===d.nodeType)||!++w||(b&&((c=d[g]||(d[g]={}))[t]=[y,w]),d!==e)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return i[g]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,o=i(t,n),s=o.length;s--;)t[r=c.call(t,o[s])]=!(e[r]=o[s])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=gt(t.replace(P,"$1"));return r[g]?et((function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace(K,X),function(e){return(e.textContent||E.text(e)).indexOf(t)>-1}})),lang:et((function(t){return q.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(K,X).toLowerCase(),function(e){var n;do{if(n=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===l},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:ot(!1),disabled:ot(!0),checked:function(t){return F(t,"input")&&!!t.checked||F(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return W.test(t.nodeName)},input:function(t){return V.test(t.nodeName)},button:function(t){return F(t,"input")&&"button"===t.type||F(t,"button")},text:function(t){var e;return F(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:st((function(){return[0]})),last:st((function(t,e){return[e-1]})),eq:st((function(t,e,n){return[n<0?n+e:n]})),even:st((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:st((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:st((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:st((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},e.pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function lt(){}function ct(t,n){var r,i,o,s,a,u,l,c=D[t+" "];if(c)return n?0:c.slice(0);for(a=t,u=[],l=e.preFilter;a;){for(s in r&&!(i=j.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=R.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(P," ")}),a=a.slice(r.length)),e.filter)!(i=z[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Z.error(t):D(t,u).slice(0)}function dt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function ht(t,e,n){var r=e.dir,i=e.next,o=i||r,s=n&&"parentNode"===o,a=b++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,u){var l,c,d=[y,a];if(u){for(;e=e[r];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||s)if(c=e[g]||(e[g]={}),i&&F(e,i))e=e[r]||e;else{if((l=c[o])&&l[0]===y&&l[1]===a)return d[2]=l[2];if(c[o]=d,d[2]=t(e,n,u))return!0}return!1}}function ft(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function pt(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(o=t[a])&&(n&&!n(o,r,i)||(s.push(o),l&&e.push(a)));return s}function mt(t,e,n,r,i,o){return r&&!r[g]&&(r=mt(r)),i&&!i[g]&&(i=mt(i,o)),et((function(o,s,a,u){var l,d,h,f,p=[],v=[],g=s.length,y=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Z(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),b=!t||!o&&e?y:pt(y,p,t,a,u);if(n?n(b,f=i||(o?t:g||r)?[]:s,a,u):f=b,r)for(l=pt(f,v),r(l,[],a,u),d=l.length;d--;)(h=l[d])&&(f[v[d]]=!(b[v[d]]=h));if(o){if(i||t){if(i){for(l=[],d=f.length;d--;)(h=f[d])&&l.push(b[d]=h);i(null,f=[],l,u)}for(d=f.length;d--;)(h=f[d])&&(l=i?c.call(o,h):p[d])>-1&&(o[l]=!(s[l]=h))}}else f=pt(f===s?f.splice(g,f.length):f),i?i(null,s,f,u):m.apply(s,f)}))}function vt(t){for(var r,i,o,s=t.length,a=e.relative[t[0].type],u=a||e.relative[" "],l=a?1:0,d=ht((function(t){return t===r}),u,!0),h=ht((function(t){return c.call(r,t)>-1}),u,!0),f=[function(t,e,i){var o=!a&&(i||e!=n)||((r=e).nodeType?d(t,e,i):h(t,e,i));return r=null,o}];l<s;l++)if(i=e.relative[t[l].type])f=[ht(ft(f),i)];else{if((i=e.filter[t[l].type].apply(null,t[l].matches))[g]){for(o=++l;o<s&&!e.relative[t[o].type];o++);return mt(l>1&&ft(f),l>1&&dt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(P,"$1"),i,l<o&&vt(t.slice(l,o)),o<s&&vt(t=t.slice(o)),o<s&&dt(t))}f.push(i)}return ft(f)}function gt(t,r){var i,o=[],s=[],a=x[t+" "];if(!a){for(r||(r=ct(t)),i=r.length;i--;)(a=vt(r[i]))[g]?o.push(a):s.push(a);a=x(t,function(t,r){var i=r.length>0,o=t.length>0,s=function(s,a,l,c,h){var f,p,v,g=0,b="0",w=s&&[],D=[],x=n,C=s||o&&e.find.TAG("*",h),A=y+=null==x?1:Math.random()||.1,N=C.length;for(h&&(n=a==u||a||h);b!==N&&null!=(f=C[b]);b++){if(o&&f){for(p=0,a||f.ownerDocument==u||(ut(f),l=!d);v=t[p++];)if(v(f,a||u,l)){m.call(c,f);break}h&&(y=A)}i&&((f=!v&&f)&&g--,s&&w.push(f))}if(g+=b,i&&b!==g){for(p=0;v=r[p++];)v(w,D,a,l);if(s){if(g>0)for(;b--;)w[b]||D[b]||(D[b]=k.call(c));D=pt(D)}m.apply(c,D),h&&!s&&D.length>0&&g+r.length>1&&E.uniqueSort(c)}return h&&(y=A,n=x),w};return i?et(s):s}(s,o)),a.selector=t}return a}function yt(t,n,r,i){var o,s,a,u,l,c="function"==typeof t&&t,h=!i&&ct(t=c.selector||t);if(r=r||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&d&&e.relative[s[1].type]){if(!(n=(e.find.ID(a.matches[0].replace(K,X),n)||[])[0]))return r;c&&(n=n.parentNode),t=t.slice(s.shift().value.length)}for(o=z.needsContext.test(t)?0:s.length;o--&&(a=s[o],!e.relative[u=a.type]);)if((l=e.find[u])&&(i=l(a.matches[0].replace(K,X),Y.test(s[0].type)&&at(n.parentNode)||n))){if(s.splice(o,1),!(t=i.length&&dt(s)))return m.apply(r,i),r;break}}return(c||gt(t,h))(i,n,!d,r,!n||Y.test(t)&&at(n.parentNode)||n),r}lt.prototype=e.filters=e.pseudos,e.setFilters=new lt,v.sortStable=g.split("").sort(A).join("")===g,ut(),v.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),E.find=Z,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,Z.compile=gt,Z.select=yt,Z.setDocument=ut,Z.tokenize=ct,Z.escape=E.escapeSelector,Z.getText=E.text,Z.isXML=E.isXMLDoc,Z.selectors=E.expr,Z.support=E.support,Z.uniqueSort=E.uniqueSort}();var M=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&E(t).is(n))break;r.push(t)}return r},$=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},j=E.expr.match.needsContext,R=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function H(t,e,n){return g(e)?E.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?E.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?E.grep(t,(function(t){return c.call(e,t)>-1!==n})):E.filter(e,t,n)}E.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?E.find.matchesSelector(r,t)?[r]:[]:E.find.matches(t,E.grep(e,(function(t){return 1===t.nodeType})))},E.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(E(t).filter((function(){for(e=0;e<r;e++)if(E.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)E.find(t,i[e],n);return r>1?E.uniqueSort(n):n},filter:function(t){return this.pushStack(H(this,t||[],!1))},not:function(t){return this.pushStack(H(this,t||[],!0))},is:function(t){return!!H(this,"string"==typeof t&&j.test(t)?E(t):t||[],!1).length}});var U,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||U,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:q.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof E?e[0]:e,E.merge(this,E.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),R.test(r[1])&&E.isPlainObject(e))for(r in e)g(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(E):E.makeArray(t,this)}).prototype=E.fn,U=E(b);var z=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function W(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}E.fn.extend({has:function(t){var e=E(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(E.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&E(t);if(!j.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&E.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(E(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),E.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return M(t,"parentNode")},parentsUntil:function(t,e,n){return M(t,"parentNode",n)},next:function(t){return W(t,"nextSibling")},prev:function(t){return W(t,"previousSibling")},nextAll:function(t){return M(t,"nextSibling")},prevAll:function(t){return M(t,"previousSibling")},nextUntil:function(t,e,n){return M(t,"nextSibling",n)},prevUntil:function(t,e,n){return M(t,"previousSibling",n)},siblings:function(t){return $((t.parentNode||{}).firstChild,t)},children:function(t){return $(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),E.merge([],t.childNodes))}},(function(t,e){E.fn[t]=function(n,r){var i=E.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(V[t]||E.uniqueSort(i),z.test(t)&&i.reverse()),this.pushStack(i)}}));var G=/[^\x20\t\r\n\f]+/g;function Y(t){return t}function K(t){throw t}function X(t,e,n,r){var i;try{t&&g(i=t.promise)?i.call(t).done(e).fail(n):t&&g(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}E.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return E.each(t.match(G)||[],(function(t,n){e[n]=!0})),e}(t):E.extend({},t);var e,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){E.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return E.each(arguments,(function(t,e){for(var n;(n=E.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?E.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},E.extend({Deferred:function(t){var e=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return E.Deferred((function(n){E.each(e,(function(e,r){var i=g(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var o=0;function s(t,e,n,i){return function(){var a=this,u=arguments,l=function(){var r,l;if(!(t<o)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(l)?i?l.call(r,s(o,e,Y,i),s(o,e,K,i)):(o++,l.call(r,s(o,e,Y,i),s(o,e,K,i),s(o,e,Y,e.notifyWith))):(n!==Y&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(r,c.error),t+1>=o&&(n!==K&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(E.Deferred.getErrorHook?c.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(c.error=E.Deferred.getStackHook()),r.setTimeout(c))}}return E.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:Y,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:Y)),e[2][3].add(s(0,r,g(n)?n:K))})).promise()},promise:function(t){return null!=t?E.extend(t,i):i}},o={};return E.each(e,(function(t,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),o=E.Deferred(),s=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(X(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)X(i[n],s(n),o.reject);return o.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&J.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},E.readyException=function(t){r.setTimeout((function(){throw t}))};var Q=E.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),E.ready()}E.fn.ready=function(t){return Q.then(t).catch((function(t){E.readyException(t)})),this},E.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==t&&--E.readyWait>0||Q.resolveWith(b,[E]))}}),E.ready.then=Q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(E.ready):(b.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var tt=function(t,e,n,r,i,o,s){var a=0,u=t.length,l=null==n;if("object"===x(n))for(a in i=!0,n)tt(t,e,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,g(r)||(s=!0),l&&(s?(e.call(t,r),e=null):(l=e,e=function(t,e,n){return l.call(E(t),n)})),e))for(;a<u;a++)e(t[a],n,s?r:r.call(t[a],a,e(t[a],n)));return i?t:l?e.call(t):u?e(t[0],n):o},et=/^-ms-/,nt=/-([a-z])/g;function rt(t,e){return e.toUpperCase()}function it(t){return t.replace(et,"ms-").replace(nt,rt)}var ot=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function st(){this.expando=E.expando+st.uid++}st.uid=1,st.prototype={cache:function(t){var e=t[this.expando];return e||(e={},ot(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[it(e)]=n;else for(r in e)i[it(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][it(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(it):(e=it(e))in r?[e]:e.match(G)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||E.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!E.isEmptyObject(e)}};var at=new st,ut=new st,lt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ct=/[A-Z]/g;function dt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(ct,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:lt.test(t)?JSON.parse(t):t)}(n)}catch(t){}ut.set(t,e,n)}else n=void 0;return n}E.extend({hasData:function(t){return ut.hasData(t)||at.hasData(t)},data:function(t,e,n){return ut.access(t,e,n)},removeData:function(t,e){ut.remove(t,e)},_data:function(t,e,n){return at.access(t,e,n)},_removeData:function(t,e){at.remove(t,e)}}),E.fn.extend({data:function(t,e){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(i=ut.get(o),1===o.nodeType&&!at.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=it(r.slice(5)),dt(o,r,i[r]));at.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){ut.set(this,t)})):tt(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=ut.get(o,t))||void 0!==(n=dt(o,t))?n:void 0;this.each((function(){ut.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),E.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=at.get(t,e),n&&(!r||Array.isArray(n)?r=at.access(t,e,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=E.queue(t,e),r=n.length,i=n.shift(),o=E._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){E.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:E.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),E.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?E.queue(this[0],t):void 0===e?this:this.each((function(){var n=E.queue(this,t,e);E._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&E.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){E.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=E.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=at.get(o[s],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var ht=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+ht+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],mt=b.documentElement,vt=function(t){return E.contains(t.ownerDocument,t)},gt={composed:!0};mt.getRootNode&&(vt=function(t){return E.contains(t.ownerDocument,t)||t.getRootNode(gt)===t.ownerDocument});var yt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&vt(t)&&"none"===E.css(t,"display")};function bt(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return E.css(t,e,"")},u=a(),l=n&&n[3]||(E.cssNumber[e]?"":"px"),c=t.nodeType&&(E.cssNumber[e]||"px"!==l&&+u)&&ft.exec(E.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)E.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,E.style(t,e,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var wt={};function Dt(t){var e,n=t.ownerDocument,r=t.nodeName,i=wt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=E.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),wt[r]=i,i)}function xt(t,e){for(var n,r,i=[],o=0,s=t.length;o<s;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=at.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&yt(r)&&(i[o]=Dt(r))):"none"!==n&&(i[o]="none",at.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}E.fn.extend({show:function(){return xt(this,!0)},hide:function(){return xt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){yt(this)?E(this).show():E(this).hide()}))}});var Ct,At,Et=/^(?:checkbox|radio)$/i,Nt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ft=/^$|^module$|\/(?:java|ecma)script/i;Ct=b.createDocumentFragment().appendChild(b.createElement("div")),(At=b.createElement("input")).setAttribute("type","radio"),At.setAttribute("checked","checked"),At.setAttribute("name","t"),Ct.appendChild(At),v.checkClone=Ct.cloneNode(!0).cloneNode(!0).lastChild.checked,Ct.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!Ct.cloneNode(!0).lastChild.defaultValue,Ct.innerHTML="<option></option>",v.option=!!Ct.lastChild;var kt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function St(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&F(t,e)?E.merge([t],n):n}function Tt(t,e){for(var n=0,r=t.length;n<r;n++)at.set(t[n],"globalEval",!e||at.get(e[n],"globalEval"))}kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,v.option||(kt.optgroup=kt.option=[1,"<select multiple='multiple'>","</select>"]);var _t=/<|&#?\w+;/;function Pt(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))E.merge(h,o.nodeType?[o]:o);else if(_t.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(Nt.exec(o)||["",""])[1].toLowerCase(),u=kt[a]||kt._default,s.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;E.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&E.inArray(o,r)>-1)i&&i.push(o);else if(l=vt(o),s=St(d.appendChild(o),"script"),l&&Tt(s),n)for(c=0;o=s[c++];)Ft.test(o.type||"")&&n.push(o);return d}var Bt=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function Ot(){return!1}function Lt(t,e,n,r,i,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Lt(t,a,n,r,e[a],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ot;else if(!i)return t;return 1===o&&(s=i,i=function(t){return E().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=E.guid++)),t.each((function(){E.event.add(this,e,i,r,n)}))}function Mt(t,e,n){n?(at.set(t,e,!1),E.event.add(t,e,{namespace:!1,handler:function(t){var n,r=at.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(E.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),at.set(this,e,r),this[e](),n=at.get(this,e),at.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(at.set(this,e,E.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===at.get(t,e)&&E.event.add(t,e,It)}E.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=at.get(t);if(ot(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(mt,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return void 0!==E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(G)||[""]).length;l--;)f=m=(a=Bt.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=E.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=E.event.special[f]||{},c=E.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),E.event.global[f]=!0)},remove:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=at.hasData(t)&&at.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match(G)||[""]).length;l--;)if(f=m=(a=Bt.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=E.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,v.handle)||E.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)E.event.remove(t,f+e[l],n,r,!0);E.isEmptyObject(u)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=E.event.fix(t),l=(at.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=E.event.handlers.call(this,u,l),e=0;(i=s[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=e[n]).selector+" "]&&(s[i]=r.needsContext?E(i,this).index(l)>-1:E.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[E.expando]?t:new E.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Et.test(e.type)&&e.click&&F(e,"input")&&Mt(e,"click",!0),!1},trigger:function(t){var e=this||t;return Et.test(e.type)&&e.click&&F(e,"input")&&Mt(e,"click"),!0},_default:function(t){var e=t.target;return Et.test(e.type)&&e.click&&F(e,"input")&&at.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},E.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},E.Event=function(t,e){if(!(this instanceof E.Event))return new E.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:Ot,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&E.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Ot,isPropagationStopped:Ot,isImmediatePropagationStopped:Ot,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(b.documentMode){var n=at.get(this,"handle"),r=E.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else E.event.simulate(e,t.target,E.event.fix(t))}E.event.special[t]={setup:function(){var r;if(Mt(this,t,!0),!b.documentMode)return!1;(r=at.get(this,e))||this.addEventListener(e,n),at.set(this,e,(r||0)+1)},trigger:function(){return Mt(this,t),!0},teardown:function(){var t;if(!b.documentMode)return!1;(t=at.get(this,e)-1)?at.set(this,e,t):(this.removeEventListener(e,n),at.remove(this,e))},_default:function(e){return at.get(e.target,t)},delegateType:e},E.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=at.get(i,e);o||(b.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),at.set(i,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=at.get(i,e)-1;o?at.set(i,e,o):(b.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),at.remove(i,e))}}})),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){E.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||E.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),E.fn.extend({on:function(t,e,n,r){return Lt(this,t,e,n,r)},one:function(t,e,n,r){return Lt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,E(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ot),this.each((function(){E.event.remove(this,t,n,e)}))}});var $t=/<script|<style|<link/i,jt=/checked\s*(?:[^=]|=\s*.checked.)/i,Rt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ht(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&E(t).children("tbody")[0]||t}function Ut(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function qt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function zt(t,e){var n,r,i,o,s,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(i in at.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)E.event.add(e,i,a[i][n]);ut.hasData(t)&&(o=ut.access(t),s=E.extend({},o),ut.set(e,s))}}function Vt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Et.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Wt(t,e,n,r){e=u(e);var i,o,s,a,l,c,d=0,h=t.length,f=h-1,p=e[0],m=g(p);if(m||h>1&&"string"==typeof p&&!v.checkClone&&jt.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),Wt(o,e,n,r)}));if(h&&(o=(i=Pt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=E.map(St(i,"script"),Ut)).length;d<h;d++)l=i,d!==f&&(l=E.clone(l,!0,!0),a&&E.merge(s,St(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,E.map(s,qt),d=0;d<a;d++)l=s[d],Ft.test(l.type||"")&&!at.access(l,"globalEval")&&E.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?E._evalUrl&&!l.noModule&&E._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Rt,""),l,c))}return t}function Gt(t,e,n){for(var r,i=e?E.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(St(r)),r.parentNode&&(n&&vt(r)&&Tt(St(r,"script")),r.parentNode.removeChild(r));return t}E.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=vt(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||E.isXMLDoc(t)))for(s=St(a),r=0,i=(o=St(t)).length;r<i;r++)Vt(o[r],s[r]);if(e)if(n)for(o=o||St(t),s=s||St(a),r=0,i=o.length;r<i;r++)zt(o[r],s[r]);else zt(t,a);return(s=St(a,"script")).length>0&&Tt(s,!u&&St(t,"script")),a},cleanData:function(t){for(var e,n,r,i=E.event.special,o=0;void 0!==(n=t[o]);o++)if(ot(n)){if(e=n[at.expando]){if(e.events)for(r in e.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,e.handle);n[at.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),E.fn.extend({detach:function(t){return Gt(this,t,!0)},remove:function(t){return Gt(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Wt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ht(this,t).appendChild(t)}))},prepend:function(){return Wt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ht(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(E.cleanData(St(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return E.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!$t.test(t)&&!kt[(Nt.exec(t)||["",""])[1].toLowerCase()]){t=E.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(E.cleanData(St(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Wt(this,arguments,(function(e){var n=this.parentNode;E.inArray(this,t)<0&&(E.cleanData(St(this)),n&&n.replaceChild(e,this))}),t)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){E.fn[t]=function(t){for(var n,r=[],i=E(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),E(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Yt=new RegExp("^("+ht+")(?!px)[a-z%]+$","i"),Kt=/^--/,Xt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Jt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Qt=new RegExp(pt.join("|"),"i");function Zt(t,e,n){var r,i,o,s,a=Kt.test(e),u=t.style;return(n=n||Xt(t))&&(s=n.getPropertyValue(e)||n[e],a&&s&&(s=s.replace(P,"$1")||void 0),""!==s||vt(t)||(s=E.style(t,e)),!v.pixelBoxStyles()&&Yt.test(s)&&Qt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function te(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mt.appendChild(l).appendChild(c);var t=r.getComputedStyle(c);n="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",s=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),mt.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,s,a,u,l=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,E.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=b.createElement("table"),e=b.createElement("tr"),n=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",mt.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,mt.removeChild(t)),a}}))}();var ee=["Webkit","Moz","ms"],ne=b.createElement("div").style,re={};function ie(t){return E.cssProps[t]||re[t]||(t in ne?t:re[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}(t)||t)}var oe=/^(none|table(?!-c[ea]).+)/,se={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function ue(t,e,n){var r=ft.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function le(t,e,n,r,i,o){var s="width"===e?1:0,a=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=E.css(t,n+pt[s],!0,i)),r?("content"===n&&(u-=E.css(t,"padding"+pt[s],!0,i)),"margin"!==n&&(u-=E.css(t,"border"+pt[s]+"Width",!0,i))):(u+=E.css(t,"padding"+pt[s],!0,i),"padding"!==n?u+=E.css(t,"border"+pt[s]+"Width",!0,i):a+=E.css(t,"border"+pt[s]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-a-.5))||0),u+l}function ce(t,e,n){var r=Xt(t),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(t,"boxSizing",!1,r),o=i,s=Zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Yt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===E.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===E.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+le(t,e,n||(i?"border":"content"),o,r,s)+"px"}function de(t,e,n,r,i){return new de.prototype.init(t,e,n,r,i)}E.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,s,a=it(e),u=Kt.test(e),l=t.style;if(u||(e=ie(a)),s=E.cssHooks[e]||E.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,r))?i:l[e];"string"==(o=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=bt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,s,a=it(e);return Kt.test(e)||(e=ie(a)),(s=E.cssHooks[e]||E.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in ae&&(i=ae[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(t,e){E.cssHooks[e]={get:function(t,n,r){if(n)return!oe.test(E.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ce(t,e,r):Jt(t,se,(function(){return ce(t,e,r)}))},set:function(t,n,r){var i,o=Xt(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===E.css(t,"boxSizing",!1,o),u=r?le(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-le(t,e,"border",!1,o)-.5)),u&&(i=ft.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=E.css(t,e)),ue(0,n,u)}}})),E.cssHooks.marginLeft=te(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Jt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(t,e){E.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(E.cssHooks[t+e].set=ue)})),E.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Xt(t),i=e.length;s<i;s++)o[e[s]]=E.css(t,e[s],!1,r);return o}return void 0!==n?E.style(t,e,n):E.css(t,e)}),t,e,arguments.length>1)}}),E.Tween=de,de.prototype={constructor:de,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||E.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var t=de.propHooks[this.prop];return t&&t.get?t.get(this):de.propHooks._default.get(this)},run:function(t){var e,n=de.propHooks[this.prop];return this.options.duration?this.pos=e=E.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):de.propHooks._default.set(this),this}},de.prototype.init.prototype=de.prototype,de.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=E.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){E.fx.step[t.prop]?E.fx.step[t.prop](t):1!==t.elem.nodeType||!E.cssHooks[t.prop]&&null==t.elem.style[ie(t.prop)]?t.elem[t.prop]=t.now:E.style(t.elem,t.prop,t.now+t.unit)}}},de.propHooks.scrollTop=de.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},E.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},E.fx=de.prototype.init,E.fx.step={};var he,fe,pe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ve(){fe&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ve):r.setTimeout(ve,E.fx.interval),E.fx.tick())}function ge(){return r.setTimeout((function(){he=void 0})),he=Date.now()}function ye(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function be(t,e,n){for(var r,i=(we.tweeners[e]||[]).concat(we.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function we(t,e,n){var r,i,o=0,s=we.prefilters.length,a=E.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=he||ge(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(r);return a.notifyWith(t,[l,r,n]),r<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},n),originalProperties:e,originalOptions:n,startTime:he||ge(),duration:n.duration,tweens:[],createTween:function(e,n){var r=E.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(function(t,e){var n,r,i,o,s;for(n in t)if(i=e[r=it(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(s=E.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<s;o++)if(r=we.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return E.map(c,be,l),g(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(we,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return bt(n.elem,t,ft.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(G);for(var n,r=0,i=t.length;r<i;r++)n=t[r],we.tweeners[n]=we.tweeners[n]||[],we.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,s,a,u,l,c,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&&yt(t),v=at.get(t,"fxshow");for(r in n.queue||(null==(s=E._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always((function(){h.always((function(){s.unqueued--,E.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;m=!0}f[r]=v&&v[r]||E.style(t,r)}if((u=!E.isEmptyObject(e))||!E.isEmptyObject(f))for(r in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=at.get(t,"display")),"none"===(c=E.css(t,"display"))&&(l?c=l:(xt([t],!0),l=t.style.display||l,c=E.css(t,"display"),xt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(t,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(v?"hidden"in v&&(m=v.hidden):v=at.access(t,"fxshow",{display:l}),o&&(v.hidden=!m),m&&xt([t],!0),h.done((function(){for(r in m||xt([t]),at.remove(t,"fxshow"),f)E.style(t,r,f[r])}))),u=be(m?v[r]:0,r,h),r in v||(v[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?we.prefilters.unshift(t):we.prefilters.push(t)}}),E.speed=function(t,e,n){var r=t&&"object"==typeof t?E.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(t,e,n,r){return this.filter(yt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),s=function(){var e=we(this,E.extend({},t),o);(i||at.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=E.timers,s=at.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&me.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||E.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=at.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=E.timers,s=r?r.length:0;for(n.finish=!0,E.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),E.each(["toggle","show","hide"],(function(t,e){var n=E.fn[e];E.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ye(e,!0),t,r,i)}})),E.each({slideDown:ye("show"),slideUp:ye("hide"),slideToggle:ye("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){E.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),E.timers=[],E.fx.tick=function(){var t,e=0,n=E.timers;for(he=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||E.fx.stop(),he=void 0},E.fx.timer=function(t){E.timers.push(t),E.fx.start()},E.fx.interval=13,E.fx.start=function(){fe||(fe=!0,ve())},E.fx.stop=function(){fe=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(t,e){return t=E.fx&&E.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var De,xe=E.expr.attrHandle;E.fn.extend({attr:function(t,e){return tt(this,E.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){E.removeAttr(this,t)}))}}),E.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?E.prop(t,e,n):(1===o&&E.isXMLDoc(t)||(i=E.attrHooks[e.toLowerCase()]||(E.expr.match.bool.test(e)?De:void 0)),void 0!==n?null===n?void E.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=E.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(G);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),De={set:function(t,e,n){return!1===e?E.removeAttr(t,n):t.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=xe[e]||E.find.attr;xe[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=xe[s],xe[s]=i,i=null!=n(t,e,r)?s:null,xe[s]=o),i}}));var Ce=/^(?:input|select|textarea|button)$/i,Ae=/^(?:a|area)$/i;function Ee(t){return(t.match(G)||[]).join(" ")}function Ne(t){return t.getAttribute&&t.getAttribute("class")||""}function Fe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(G)||[]}E.fn.extend({prop:function(t,e){return tt(this,E.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[E.propFix[t]||t]}))}}),E.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(t)||(e=E.propFix[e]||e,i=E.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=E.find.attr(t,"tabindex");return e?parseInt(e,10):Ce.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){E(this).addClass(t.call(this,e,Ne(this)))})):(e=Fe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Ee(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=Ee(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){E(this).removeClass(t.call(this,e,Ne(this)))})):arguments.length?(e=Fe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Ee(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=Ee(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){E(this).toggleClass(t.call(this,n,Ne(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Fe(t),this.each((function(){if(a)for(o=E(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=Ne(this))&&at.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":at.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Ee(Ne(n))+" ").indexOf(e)>-1)return!0;return!1}});var ke=/\r/g;E.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,E(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(t){return null==t?"":t+""}))),(e=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(ke,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(t){var e=E.find.attr(t,"value");return null!=e?e:Ee(E.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=E(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=E.makeArray(e),s=i.length;s--;)((r=i[s]).selected=E.inArray(E.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=E.inArray(E(t).val(),e)>-1}},v.checkOn||(E.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Se=r.location,Te={guid:Date.now()},_e=/\?/;E.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Pe=/^(?:focusinfocus|focusoutblur)$/,Be=function(t){t.stopPropagation()};E.extend(E.event,{trigger:function(t,e,n,i){var o,s,a,u,l,c,d,h,p=[n||b],m=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Pe.test(m+E.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[E.expando]?t:new E.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:E.makeArray(e,[t]),d=E.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,Pe.test(u+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||b)&&p.push(a.defaultView||a.parentWindow||r)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)h=s,t.type=o>1?u:d.bindType||m,(c=(at.get(s,"events")||Object.create(null))[t.type]&&at.get(s,"handle"))&&c.apply(s,e),(c=l&&s[l])&&c.apply&&ot(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!ot(n)||l&&g(n[m])&&!y(n)&&((a=n[l])&&(n[l]=null),E.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Be),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Be),E.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=E.extend(new E.Event,n,{type:t,isSimulated:!0});E.event.trigger(r,null,e)}}),E.fn.extend({trigger:function(t,e){return this.each((function(){E.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return E.event.trigger(t,e,n,!0)}});var Ie=/\[\]$/,Oe=/\r?\n/g,Le=/^(?:submit|button|image|reset|file)$/i,Me=/^(?:input|select|textarea|keygen)/i;function $e(t,e,n,r){var i;if(Array.isArray(e))E.each(e,(function(e,i){n||Ie.test(t)?r(t,i):$e(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==x(e))r(t,e);else for(i in e)$e(t+"["+i+"]",e[i],n,r)}E.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!E.isPlainObject(t))E.each(t,(function(){i(this.name,this.value)}));else for(n in t)$e(n,t[n],e,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=E.prop(this,"elements");return t?E.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!E(this).is(":disabled")&&Me.test(this.nodeName)&&!Le.test(t)&&(this.checked||!Et.test(t))})).map((function(t,e){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(t){return{name:e.name,value:t.replace(Oe,"\r\n")}})):{name:e.name,value:n.replace(Oe,"\r\n")}})).get()}});var je=/%20/g,Re=/#.*$/,He=/([?&])_=[^&]*/,Ue=/^(.*?):[ \t]*([^\r\n]*)$/gm,qe=/^(?:GET|HEAD)$/,ze=/^\/\//,Ve={},We={},Ge="*/".concat("*"),Ye=b.createElement("a");function Ke(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(G)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Xe(t,e,n,r){var i={},o=t===We;function s(a){var u;return i[a]=!0,E.each(t[a]||[],(function(t,a){var l=a(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),s(l),!1)})),u}return s(e.dataTypes[0])||!i["*"]&&s("*")}function Je(t,e){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&E.extend(!0,t,r),t}Ye.href=Se.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ge,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Je(Je(t,E.ajaxSettings),e):Je(E.ajaxSettings,t)},ajaxPrefilter:Ke(Ve),ajaxTransport:Ke(We),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,s,a,u,l,c,d,h,f=E.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?E(p):E.event,v=E.Deferred(),g=E.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Ue.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),A(0,e),this}};if(v.promise(C),f.url=((t||f.url||Se.href)+"").replace(ze,Se.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(G)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ye.protocol+"//"+Ye.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=E.param(f.data,f.traditional)),Xe(Ve,f,e,C),l)return C;for(d in(c=E.event&&f.global)&&0==E.active++&&E.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!qe.test(f.type),i=f.url.replace(Re,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(je,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(_e.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(He,"$1"),h=(_e.test(i)?"&":"?")+"_="+Te.guid+++h),f.url=i+h),f.ifModified&&(E.lastModified[i]&&C.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&C.setRequestHeader("If-None-Match",E.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ge+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=Xe(We,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,A)}catch(t){if(l)throw t;A(-1,t)}}else A(-1,"No Transport");function A(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&E.inArray("script",f.dataTypes)>-1&&E.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(E.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--E.active||E.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return E.get(t,e,n,"json")},getScript:function(t,e){return E.get(t,void 0,e,"script")}}),E.each(["get","post"],(function(t,e){E[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:t,type:e,dataType:i,data:n,success:r},E.isPlainObject(t)&&t))}})),E.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),E._evalUrl=function(t,e,n){return E.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){E.globalEval(t,e,n)}})},E.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return g(t)?this.each((function(e){E(this).wrapInner(t.call(this,e))})):this.each((function(){var e=E(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){E(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(t){return!E.expr.pseudos.visible(t)},E.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Qe={0:200,1223:204},Ze=E.ajaxSettings.xhr();v.cors=!!Ze&&"withCredentials"in Ze,v.ajax=Ze=!!Ze,E.ajaxTransport((function(t){var e,n;if(v.cors||Ze&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Qe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),E.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return E.globalEval(t),t}}}),E.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),E.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=E("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var tn,en=[],nn=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||E.expando+"_"+Te.guid++;return this[t]=!0,t}}),E.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(_e.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||E.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){s=arguments},n.always((function(){void 0===o?E(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((tn=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===tn.childNodes.length),E.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=R.exec(t))?[e.createElement(i[1])]:(i=Pt([t],e,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=Ee(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&E.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?E("<div>").append(E.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,(function(e){return t===e.elem})).length},E.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=E.css(t,"position"),c=E(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=E.css(t,"top"),u=E.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),g(e)&&(e=e.call(t,n,E.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+i),"using"in e?e.using.call(t,d):c.css(d)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){E.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===E.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=E(t).offset()).top+=E.css(t,"borderTopWidth",!0),i.left+=E.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-E.css(r,"marginTop",!0),left:e.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===E.css(t,"position");)t=t.offsetParent;return t||mt}))}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;E.fn[t]=function(r){return tt(this,(function(t,r,i){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),E.each(["top","left"],(function(t,e){E.cssHooks[e]=te(v.pixelPosition,(function(t,n){if(n)return n=Zt(t,e),Yt.test(n)?E(t).position()[e]+"px":n}))})),E.each({Height:"height",Width:"width"},(function(t,e){E.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){E.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return tt(this,(function(e,n,i){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?E.css(e,n,a):E.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){E.fn[e]=function(t){return this.on(e,t)}})),E.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){E.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||E.guid++,i},E.holdReady=function(t){t?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=F,E.isFunction=g,E.isWindow=y,E.camelCase=it,E.type=x,E.now=Date.now,E.isNumeric=function(t){var e=E.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},E.trim=function(t){return null==t?"":(t+"").replace(rn,"$1")},void 0===(n=function(){return E}.apply(e,[]))||(t.exports=n);var on=r.jQuery,sn=r.$;return E.noConflict=function(t){return r.$===E&&(r.$=sn),t&&r.jQuery===E&&(r.jQuery=on),E},void 0===i&&(r.jQuery=r.$=E),E}))},6650:(t,e,n)=>{"use strict";var r=n(2787),i=n(5109);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,u=t.slice(0,a),l={};i(l,e);var c=u.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete l[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),d=c.indexOf("?"),h=c.indexOf("#"),f=h<0?c.length:h,p=d<0?f:d,m=c.slice(0,p);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,f));var v=r(l);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),h>=0&&(m+=(o<0?"":"&")+c.slice(h)),m}},6681:(t,e,n)=>{var r=n(7812);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},6832:function(){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,r=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var i="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&i!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==i&&(s+="meta+"),e.metaKey&&"meta"!==i&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),i?a[s+i]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var u=0,l=r.length;u<l;u++)if(a[r[u]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},7158:(t,e,n)=>{var r=n(9669);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},7453:(t,e,n)=>{"use strict";var r=n(5720),i=n(9587),o=n(3010),s=n(6650),a=n(5385),u=n(509),l=n(5109),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function F(){E=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(F))},"function"==typeof t.history.pushState?(w=function(){t.removeEventListener("popstate",n,!1)},t.addEventListener("popstate",n,!1)):"#"===y.prefix[0]&&(n=null,w=function(){t.removeEventListener("hashchange",F,!1)},t.addEventListener("hashchange",F,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(D=D?2:1)||c===v)},oncreate:F,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},7493:(t,e,n)=>{var r=n(2433).default,i=n(6402);t.exports=function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},7714:(t,e,n)=>{var r=n(9669);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},7812:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},8176:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},8336:(t,e,n)=>{"use strict";function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}n.r(e),n.d(e,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});var o=2147483647,s=36,a=/^xn--/,u=/[^\0-\x7F]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function f(t){throw new RangeError(c[t])}function p(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var i=function(t,e){for(var n=[],r=t.length;r--;)n[r]=e(t[r]);return n}((t=t.replace(l,".")).split("."),e).join(".");return r+i}function m(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}var v=function(t){return String.fromCodePoint.apply(String,t)},g=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},y=function(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=s)t=d(t/35);return d(r+36*t/(t+38))},b=function(t){var e,n=[],r=t.length,i=0,a=128,u=72,l=t.lastIndexOf("-");l<0&&(l=0);for(var c=0;c<l;++c)t.charCodeAt(c)>=128&&f("not-basic"),n.push(t.charCodeAt(c));for(var h=l>0?l+1:0;h<r;){for(var p=i,m=1,v=s;;v+=s){h>=r&&f("invalid-input");var g=(e=t.charCodeAt(h++))>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:s;g>=s&&f("invalid-input"),g>d((o-i)/m)&&f("overflow"),i+=g*m;var b=v<=u?1:v>=u+26?26:v-u;if(g<b)break;var w=s-b;m>d(o/w)&&f("overflow"),m*=w}var D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var F=E.value;if(F<a&&++u>o&&f("overflow"),F===a){for(var k=u,S=s;;S+=s){var T=S<=l?1:S>=l+26?26:S-l;if(k<T)break;var _=k-T,P=s-T;n.push(h(g(T+_%P,0))),k=d(_/P)}n.push(h(g(k,0))),l=y(u,A,b===v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.3.1",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},8464:(t,e,n)=>{"use strict";var r=n(3010),i=n(5034);t.exports=n(3406)(window,r,i.redraw)},8661:(t,e,n)=>{"use strict";var r=n(4848),i=n(8464),o=n(5034),s=function(){return r.apply(this,arguments)};s.m=r,s.trust=r.trust,s.fragment=r.fragment,s.mount=o.mount,s.route=n(5420),s.render=n(2021),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(6240),s.buildQueryString=n(2787),s.parsePathname=n(5385),s.buildPathname=n(6650),s.vnode=n(5720),s.PromisePolyfill=n(9568),t.exports=s},8692:(t,e,n)=>{"use strict";var r=n(5720),i=n(1821);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},9511:function(t){t.exports=function(){"use strict";var t={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,n,r){var i=n.prototype,o=i.format;r.en.formats=t,i.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,i){var o=i&&i.toUpperCase();return r||n[i]||t[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return o.call(this,r)}}}()},9566:()=>{Array.prototype.flat||(Array.prototype.flat=function t(e){return(null!=e?e:1)>0?Array.prototype.reduce.call(this,(function(n,r){return n.concat(Array.isArray(r)?t.call(r,e-1):r)}),[]):[].concat(this)})},9568:t=>{"use strict";var e=function(t){if(!(this instanceof e))throw new Error("Promise must be called with `new`");if("function"!=typeof t)throw new TypeError("executor must be a function");var n=this,r=[],i=[],o=l(r,!0),s=l(i,!1),a=n._instance={resolvers:r,rejectors:i},u="function"==typeof setImmediate?setImmediate:setTimeout;function l(t,e){return function o(l){var d;try{if(!e||null==l||"object"!=typeof l&&"function"!=typeof l||"function"!=typeof(d=l.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",l);for(var n=0;n<t.length;n++)t[n](l);r.length=0,i.length=0,a.state=e,a.retry=function(){o(l)}}));else{if(l===n)throw new TypeError("Promise can't be resolved w/ itself");c(d.bind(l))}}catch(t){s(t)}}}function c(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(s);try{t(n(o),r)}catch(t){r(t)}}c(t)};e.prototype.then=function(t,n){var r,i,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new e((function(t,e){r=t,i=e}));return s(t,o.resolvers,r,!0),s(n,o.rejectors,i,!1),a},e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(t){return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},e.resolve=function(t){return t instanceof e?t:new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(e,n){var r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){i++,o[s]=t,i===r&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},e.race=function(t){return new e((function(e,n){for(var r=0;r<t.length;r++)t[r].then(e,n)}))},t.exports=e},9587:(t,e,n)=>{"use strict";var r=n(5720),i=n(1821),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function u(t){for(var e in t)if(a.call(t,e))return!1;return!0}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var l={};for(var c in n)a.call(n,c)&&(l[c]=n[c]);n=l}for(var c in t.attrs)a.call(t.attrs,c)&&"className"!==c&&!a.call(n,c)&&(n[c]=t.attrs[c]);for(var c in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,c)&&"key"!==c){e.attrs=n;break}return Array.isArray(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,e}(s[t]||function(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var a=e[1],u=e[2];if(""===a&&""!==u)n=u;else if("#"===a)i.id=u;else if("."===a)r.push(u);else if("["===e[3][0]){var l=e[6];l&&(l=l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(l):i[e[4]]=""===l?l:l||!0}}return r.length>0&&(i.className=r.join(" ")),s[t]={tag:n,attrs:i}}(t),e):(e.tag=t,e)}},9669:(t,e,n)=>{var r=n(2433).default,i=n(2216);t.exports=function(t){var e=i(t,"string");return"symbol"==r(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},9683:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{app:()=>v,compat:()=>Do});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>tt,generateRandomString:()=>et,getPlainContent:()=>Q,slug:()=>X,truncate:()=>K,ucfirst:()=>Z});var e={};n.r(e),n.d(e,{default:()=>vt,fireDeprecationWarning:()=>gt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>hr});var o={};n.r(o),n.d(o,{extend:()=>wi,override:()=>Di});var s={};n.r(s),n.d(s,{debounce:()=>oe,throttle:()=>ie}),n(3800),n(3415),n(5618),n(454),n(4435),n(4187),n(2737),n(6832);var a=n(1816),u=n.n(a),l=n(9511),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=window;const v=new Proxy({},{get:function(t,e){return Reflect.get(p.app,e,p.app)},set:function(t,e,n){return Reflect.set(p.app,e,n,p.app)}});n(9566),dayjs.extend(u()),dayjs.extend(c()),f(window);var g=$.fn.tooltip;function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function b(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,y(t,e)}function w(){return w=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},w.apply(null,arguments)}function D(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=w({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),g.bind(this)(t)},n(328),n(1670);var x=function(){function t(){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var i=this.getCurrent();i&&i.name===t?Object.assign(i,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),D("/")},t}(),C=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),A=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){var e=$(this.element);return t?e.find(t):e},t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=w({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}();function E(t,e){return t&&(t===e||t.prototype instanceof e)}var N=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!E(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}(),F=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).bodyClass="",e.scrollTopOnCreate=!0,e.useBrowserScrollRestoration=!0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),v.previous=v.current,v.current=new N(this.constructor,{routeName:this.attrs.routeName}),v.drawer.hide(),v.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(A);function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function S(t){var e=function(t){if("object"!=k(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==k(e)?e:e+""}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,S(r.key),r)}}function _(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function P(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var B=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},I=function(){function t(){this._items={}}var e=t.prototype;return e.isEmpty=function(){return 0===Object.keys(this._items).length},e.has=function(t){return Object.keys(this._items).includes(t)},e.get=function(t){return this._items[t].content},e.getPriority=function(t){return this._items[t].priority},e.add=function(t,e,n){return void 0===n&&(n=0),this._items[t]=new B(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.has(t)?(null!==e&&(this._items[t].content=e),null!==n&&(this._items[t].priority=n),this):this},e.setContent=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set content of Item. Key `"+t+"` is not present.");return this.replace(t,e)},e.setPriority=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set priority of Item. Key `"+t+"` is not present.");return this._items[t].priority=e,this},e.remove=function(t){return delete this._items[t],this},e.merge=function(t){var e=this;return Object.keys(t._items).forEach((function(n){var r=t._items[n];r instanceof B&&(e._items[n]=r)})),this},e.toArray=function(t){var e=this;return void 0===t&&(t=!1),Object.keys(this._items).map((function(n,r){var i=e._items[n];return!t||P(i.content)?w({},i,{content:e.createItemContentProxy(P(i.content)?i.content:Object(i.content),n)}):w({},i)})).sort((function(t,e){return e.priority-t.priority})).map((function(t){return t.content}))},e.toObject=function(){var t=this;return Object.keys(this._items).reduce((function(e,n){var r={content:t.get(n),itemName:n,priority:t.getPriority(n)};return e[n]=r,e}),{})},e.createItemContentProxy=function(t,e){return new Proxy(t,{get:function(t,n,r){return"itemName"===n?e:Reflect.get(t,n,r)},set:function(t,n,r,i){if(null!==e&&"itemName"===n)throw new Error("`itemName` property is read-only");return Reflect.set(t,n,r,i)}})},_(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}])}(),O=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(A);O.isListItem=!0;const L=O;function M(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=M(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const j=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=M(t))&&(r&&(r+=" "),r+=e);return r};function R(t){return"object"==typeof t&&null!==t&&"tag"in t}function H(t){return R(t)&&t.tag===L}function U(t,e,n){void 0===e&&(e="li"),void 0===n&&(n={});var r,i,o,s=e;return(r=t instanceof Array?t:[t],o=[],r.filter(Boolean).forEach((function(t,e){(!H(t)||i&&!H(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(R(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;R(t)&&(i.push((null==(r=t.attrs)?void 0:r.itemClassName)||t.itemClassName),null!=t.tag.isActive&&t.tag.isActive(t.attrs)&&i.push("active"));var o=R(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:j(i),key:o},n),t)}))}var q=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},U(this.items().toArray()))))},n.items=function(){var t=new I,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},U(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(A);function z(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}function V(t,e){var n=t[e];return delete t[e],n}var W=["options"],G=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=z(e,W);i.href||(i.href="");var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),V(i,"force")&&("state"in r||(r.state={}),"key"in r.state||(r.state.key=Date.now())),i.options=r,m(m.route.Link,i,o))},e}(A);function Y(t,e){var n;void 0===e&&(e={}),e.className=j("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function K(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function X(t,e){switch(void 0===e&&(e=J.ALPHANUMERIC),e){case J.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0897-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uDFFF\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])[^]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD06\uDD34-\uDD3F\uDD79-\uDD89\uDD8C-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC57\uDC77\uDC78\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE5F\uDE7F\uDEA0-\uDEBF\uDEC8\uDEE7-\uDEEA\uDEF0-\uDEFF\uDF36-\uDF3F\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDD3F\uDD66-\uDD68\uDD6E\uDD86-\uDE5F\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEC1\uDEC5-\uDEFB\uDF28-\uDF2F\uDF55-\uDF6F\uDF86-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC51\uDC76-\uDC7E\uDCBB-\uDCC1\uDCC3-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDE0\uDDF5-\uDDFF\uDE12\uDE38-\uDE3D\uDE42-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFC1\uDFC3\uDFC4\uDFC6\uDFCB\uDFD4-\uDFE0\uDFE3-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDECF\uDEE4-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3C-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFEF\uDFFA-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC6D-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDEFF\uDF11\uDF3B-\uDF3D\uDF43-\uDF4F\uDF5B-\uDFAF\uDFB1-\uDFBF\uDFD5-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83D\uD83F\uD87C\uD87D\uD87F\uD889-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC3F\uDC56-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD3A-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6F\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDD6F\uDD7A-\uDE3F\uDE97-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDCEF\uDCFA-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDEBF\uDED4-\uDEDF\uDEF4-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC2F\uDC6E-\uDC8E\uDC90-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCFA-\uDDCF\uDDFB-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCAC\uDCB0\uDCB5-\uDD00\uDD2E\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case J.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}var J=function(t){return t.ALPHANUMERIC="alphanum",t.UTF8="utf8",t}(J||{});function Q(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return Q.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Z(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function tt(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function et(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function nt(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=K(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function rt(t,e){return void 0===e&&(e={}),e.className=j("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}Q.removeSelectors=["blockquote","script"];var it=n(4098),ot=n.n(it);function st(t){return t instanceof Array?t.map((function(t){return st(t)})).join(""):"object"==typeof t&&null!==t?t.children?st(t.children):String(t.text):String(t)}function at(t){var e=ot()(t),n=ot()();return e.isAfter(n)&&(e=n),e.diff(ot()())<-2592e6?e.year()===ot()().year()?e.format(st(v.translator.trans("core.lib.datetime_formats.humanTimeShort"))):e.format(st(v.translator.trans("core.lib.datetime_formats.humanTimeLong"))):e.fromNow()}function ut(t){return t>=1e6?Math.floor(t/1e6)+st(v.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+st(v.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}b(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=st(v.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return n.view=function(t){var e=t.children?U(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?rt(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?rt(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(A);function ct(t){var e=ot()(t),n=e.format(),r=e.format("LLLL"),i=at(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},i)}var dt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),r=t[e?"lastPostedAt":"createdAt"]();return m("span",null,!!e&&rt("fas fa-reply")," ",zi.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:ct(r)}))},e}(A),ht=function(){function t(){this.callbacks=void 0,this.data=void 0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,r){var i=n();i!==t.data[r]&&(t.data[r]=i,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}(),ft=["display","size","containerClassName","className"],pt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs,e=t.display,n=void 0===e?"block":e,r=t.size,i=void 0===r?"medium":r,o=t.containerClassName,s=t.className,a=z(t,ft),u=j("LoadingIndicator",s),l=j("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":v.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(A),mt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(A);function vt(){var t;v.forum.attribute("debug")&&(t=console).warn.apply(t,arguments)}function gt(t,e,n,r){void 0===n&&(n="2.0"),void 0===r&&(r="flarum/core"),vt("[Flarum "+n+" Deprecation] "+t+"\n\nSee: https://github.com/"+r+"/pull/"+e)}var yt=["type","title","aria-label","icon","disabled","loading","className","class"],bt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs,n=e.type,r=e.title,i=e["aria-label"],o=e.icon,s=e.disabled,a=e.loading,u=e.className,l=e.class,c=z(e,yt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=st(i)),(s||a)&&delete c.onclick;var d=w({disabled:s,className:u=j(l,u,{hasIcon:o,disabled:s||a,loading:a}),type:n,"aria-label":i},c);return m("button",d,this.getButtonContent(t.children))},n.oncreate=function(n){var r;t.prototype.oncreate.call(this,n);var i=this.attrs["aria-label"];this.view!==e.prototype.view||i||st(n.children)||null!=(r=this.element)&&null!=r.getAttribute&&r.getAttribute("aria-label")||vt('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&rt(e,{className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(pt,{size:"small",display:"inline"})]},e}(A),wt=n(5812),Dt=n.n(wt),xt=null;function Ct(t,e){var n=e.text,r=e.selectionStart,i=e.selectionEnd,o=t.selectionStart,s=t.value.slice(0,o),a=t.value.slice(t.selectionEnd);if(null===xt||!0===xt){t.contentEditable="true";try{xt=document.execCommand("insertText",!1,n)}catch(t){xt=!1}t.contentEditable="false"}xt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(xt=!1),xt||(t.value=s+n+a,t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))),null!=r&&null!=i?t.setSelectionRange(r,i):t.setSelectionRange(o,t.selectionEnd)}var At=function(){function t(t,e){this.el=void 0,this.el=document.createElement("textarea"),this.build(t,e)}var e=t.prototype;return e.build=function(t,e){var n=this;this.el.className=e.classNames.join(" "),this.el.disabled=e.disabled,this.el.placeholder=e.placeholder,this.el.value=e.value;var r=function(t){e.inputListeners.forEach((function(t){t()})),t.redraw=!1};this.el.oninput=function(t){e.oninput(n.el.value),r(t)},this.el.onclick=r,this.el.onkeyup=r,this.el.addEventListener("keydown",(function(t){n.keyHandlers(e).toArray().forEach((function(e){return e(t)}))})),t.append(this.el)},e.keyHandlers=function(t){var e=new I;return e.add("submit",(function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&t.onsubmit()})),e},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.getLastNChars=function(t){return this.el.value.slice(Math.max(0,this.el.selectionStart-t),this.el.selectionStart)},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t)},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){this.setSelectionRange(t,e);var r=t+n.length;Ct(this.el,{text:n,selectionStart:r,selectionEnd:r})},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.focus()},e.getCaretCoordinates=function(t){var e=Dt()(this.el,t);return{top:e.top-this.el.scrollTop,left:e.left}},e.disabled=function(t){this.el.disabled=t},e.focus=function(){this.el.focus()},e.destroy=function(){this.el.remove()},t}(),Et=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Nt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).firstChild=null,e.childDomNode=null,e.oldText="",e.oldVisibility=void 0,e.shouldRecreateTooltip=!1,e.shouldChangeTooltipVisibility=!1,e}b(e,t);var n=e.prototype;return n.view=function(t){var e=t.children,n=this.attrs,r=(n.text,n.tooltipVisible),i=(n.showOnFocus,n.position,n.ignoreTitleWarning),o=void 0!==i&&i;n.html,n.delay,z(n,Et),this.attrs.title&&!o&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");var s=this.getRealText();if(s!==this.oldText&&(this.oldText=s,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a <div> or <span>.");var a=e[0];if("object"!=typeof a||Array.isArray(a)||null===a)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof a.tag&&["#","[","<"].includes(a.tag))throw new Error('Tooltip component with provided with a vnode with tag "'+a.tag+'". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a <div> or <span>.');return this.firstChild=a,e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.recreateTooltip=function(){this.shouldRecreateTooltip&&null!==this.childDomNode&&($(this.childDomNode).tooltip("destroy","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"),this.createTooltip(),this.shouldRecreateTooltip=!1),this.shouldChangeTooltipVisibility&&(this.shouldChangeTooltipVisibility=!1,this.updateVisibility())},n.updateVisibility=function(){null!==this.childDomNode&&(!0===this.attrs.tooltipVisible?$(this.childDomNode).tooltip("show","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"):!1===this.attrs.tooltipVisible&&$(this.childDomNode).tooltip("hide","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"))},n.createTooltip=function(){if(null!==this.childDomNode){var t=this.attrs,e=t.showOnFocus,n=void 0===e||e,r=t.position,i=void 0===r?"top":r,o=t.delay,s=t.html,a=void 0!==s&&s,u=t.tooltipVisible,l=(t.text,"boolean"==typeof u?"manual":j("hover",[n&&"focus"])),c=this.getRealText();this.childDomNode.setAttribute("title",c),this.childDomNode.setAttribute("aria-label",c),$(this.childDomNode).tooltip({html:a,delay:o,placement:i,trigger:l},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}},n.getRealText=function(){var t=this.attrs.text;return Array.isArray(t)?st(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(A),Ft=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||"",this.disabled=!!this.attrs.disabled},n.view=function(){return m("div",{className:"TextEditor"},m("div",{className:"TextEditor-editorContainer"}),m("ul",{className:"TextEditor-controls Composer-footer"},U(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.composer.editor=this.buildEditor(this.$(".TextEditor-editorContainer")[0])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=!!this.attrs.disabled;this.disabled!==n&&(this.disabled=n,this.attrs.composer.editor.disabled(n))},n.buildEditorParams=function(){var t=this;return{classNames:["FormControl","Composer-flexible","TextEditor-editor"],disabled:this.disabled,placeholder:this.attrs.placeholder||"",value:this.value,oninput:this.oninput.bind(this),inputListeners:[],onsubmit:function(){t.onsubmit(),m.redraw()}}},n.buildEditor=function(t){return new At(t,this.buildEditorParams())},n.controlItems=function(){var t=new I;return t.add("submit",m(bt,{icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",m(Nt,{text:v.translator.trans("core.forum.composer.preview_tooltip")},m(bt,{icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview}))),t},n.toolbarItems=function(){return new I},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(A),kt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(mt,{when:this.hasChanges.bind(this)},m("div",{className:j("ComposerBody",this.attrs.className)},Y(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},U(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Ft,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(pt,{display:"unset",containerClassName:j("ComposerBody-loading",this.loading&&"active"),size:"large"})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new I},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(A);function St(t){zi.composer.isFullScreen()&&(zi.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||st(zi.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||zi.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||st(zi.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,rt("fas fa-reply")," ",m(G,{href:zi.route.discussion(n),onclick:St},n.title()))),e},n.jumpToPreview=function(t){St(t),m.route.set(zi.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();zi.store.createRecord("posts").save(n).then((function(n){if(zi.viewingDiscussion(e)){var r=zi.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(bt,{className:"Button Button--link",onclick:function(){m.route.set(zi.route.post(n)),zi.alerts.dismiss(i)}},zi.translator.trans("core.forum.composer_reply.view_button"));i=zi.alerts.show({type:"success",controls:[o]},zi.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(kt),_t=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=V(e,"type");e.className=j("Alert","Alert--"+n,e.className);var r=V(e,"title"),i=V(e,"icon"),o=V(e,"content")||t.children,s=V(e,"controls")||[],a=V(e,"dismissible"),u=V(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(bt,{"aria-label":v.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},rt(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},U(s.concat(l))))},e}(A),Pt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.alertAttrs=null,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=[];["className","title","content","onsubmit"].forEach((function(t){n[t]||(n[t]=function(){},r.push(t))})),r.length>0&&vt("Modal `"+this.constructor.name+"` does not implement all abstract methods of the Modal super class. Missing methods: "+r.join(", ")+".")},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(e){if(t.prototype.onbeforeremove.call(this,e),!this.attrs.state.modal)return new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:j("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(bt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":v.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(_t,this.alertAttrs)),this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.animateHide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},_(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}])}(A);Pt.isDismissible=!0,Pt.isDismissibleViaCloseButton=!0,Pt.isDismissibleViaEscKey=!0,Pt.isDismissibleViaBackdropClick=!0;var Bt=n(4385);const It=n.n(Bt)();var Ot=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.success=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=It(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return zi.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},zi.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},zi.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},zi.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new I,e=st(zi.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,zi.request({method:"POST",url:zi.forum.attribute("apiUrl")+"/forgot",body:this.requestParams(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=zi.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(Pt),Lt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new I},e}(A),Mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=It(this.attrs.username||""),this.email=It(this.attrs.email||""),this.password=It(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return zi.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){var e,n;return null!=(e=null==(n=this.attrs.provided)?void 0:n.includes(t))&&e},n.body=function(){return[!this.attrs.token&&m(Lt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new I,e=st(zi.translator.trans("core.forum.sign_up.username_placeholder")),n=st(zi.translator.trans("core.forum.sign_up.email_placeholder")),r=st(zi.translator.trans("core.forum.sign_up.password_placeholder"));return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:e,"aria-label":e,bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:n,"aria-label":n,bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:r,"aria-label":r,bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},zi.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username()};zi.modal.show($t,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();zi.request({url:zi.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t=this.attrs.token?{token:this.attrs.token}:{password:this.password()};return w({username:this.username(),email:this.email()},t)},e}(Pt),$t=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).identification=void 0,e.password=void 0,e.remember=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=It(this.attrs.identification||""),this.password=It(this.attrs.password||""),this.remember=It(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return zi.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(Lt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new I,e=st(zi.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=st(zi.translator.trans("core.forum.log_in.password_placeholder"));return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:e,"aria-label":e,bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"current-password",placeholder:n,"aria-label":n,bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),zi.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},zi.translator.trans("core.forum.log_in.forgot_password_link"))),zi.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},zi.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})))},n.forgotPassword=function(){var t=this.identification(),e=t.includes("@")?{email:t}:void 0;zi.modal.show(Ot,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);zi.modal.show(Mt,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,zi.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=zi.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(Pt),jt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=It(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return zi.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle(),r=this.currentTitle;if(n&&n!==r)return this.discussion.save({title:n}).then((function(){zi.viewingDiscussion(e.discussion)&&zi.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(Pt);const Rt={controls:function(t,e){var n=this,r=new I;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(L,null)))})),r},userControls:function(t,e){var n=this,r=new I;return e instanceof ue&&r.add("reply",!zi.session.user||t.canReply()?m(bt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},zi.translator.trans(zi.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(bt,{icon:"fas fa-reply",className:"disabled",title:st(zi.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},zi.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new I;return t.canRename()&&e.add("rename",m(bt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},zi.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new I;return t.isHidden()?(t.canHide()&&e.add("restore",m(bt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},zi.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(bt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},zi.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(bt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},zi.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return zi.session.user?n.canReply()?(zi.composer.composingReplyTo(n)&&!e||zi.composer.load(Tt,{user:zi.session.user,discussion:n}),zi.composer.show(),t&&zi.viewingDiscussion(n)&&!zi.composer.isFullScreen()&&zi.current.get("stream").goToNumber("reply"),r(zi.composer)):i():(zi.modal.show($t),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:zi.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(st(zi.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return zi.viewingDiscussion(this)&&zi.history.back(),this.delete().then((function(){return zi.discussions.removeDiscussion(t)}))},renameAction:function(){return zi.modal.show(jt,{currentTitle:this.title(),discussion:this})}};function Ht(t){var e,n,r,i,o=$(t),s=!1,a=!1,u=0,l=function(t,e){var n;void 0===e&&(e={}),(n=e).duration||(n.duration="fast"),e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},c=function(){l(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),r=t.originalEvent.targetTouches[0].clientX,i=t.originalEvent.targetTouches[0].clientY,s=!0,u=0})).on("touchmove",(function(t){var l=t.originalEvent.targetTouches[0].clientX,c=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(l-r)>Math.abs(c-i)&&(a=!0),s=!1,a){u=l-r;var d=function(t,e){if(t.length){var n="left"===e?u>0:u<0;n&&t.hasClass("Slidable-underneath--elastic")&&(u-=.5*u),t.toggle(n);var r=Math.max(0,Math.min(1,(Math.abs(u)-25)/50));t.find(".icon").css("transform","scale("+r+")")}else u=Math["left"===e?"min":"max"](0,u)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+u+"px, 0)"),$(this).css("background-position-x",u+"px"),o.toggleClass("sliding",!!u),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?c():l((u>0?1:-1)*o.width())};n.length&&u<-50?t(n):e.length&&u>50?t(e):c(),s=!1,a=!1})),{reset:c}}var Ut=/[.*+?^${}()|[\]\\]/g;function qt(t){return t.replace(Ut,"\\$&")}var zt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new ht((function(){return n.attrs.discussion.freshness}),(function(){var t=zi.session.user&&zi.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:j("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.elementAttrs();return m("div",t,this.viewItems().toArray())},n.viewItems=function(){var t=new I,e=this.attrs.discussion,n=Rt.controls(e,this).toArray();return t.add("controls",this.controlsView(n),100),t.add("slidableUnderneath",this.slidableUnderneathView(),90),t.add("content",this.contentView(),80),t},n.controlsView=function(t){return m("[",null,!!t.length&&m(lt,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:zi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t))},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:j("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},rt("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:j("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.contentItems().toArray())},n.contentItems=function(){var t=new I;return t.add("authorAvatar",this.authorAvatarView(),100),t.add("badges",this.badgesView(),90),t.add("main",this.mainView(),80),t.add("replyCount",this.replyCountItem(),70),t},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(Nt,{text:zi.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:at(t.createdAt())}),position:"right"},m(G,{className:"DiscussionListItem-author",href:e?zi.route.user(e):"#"},Y(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},U(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(G,{href:zi.route.discussion(t,e),className:"DiscussionListItem-main"},this.mainItems().toArray())},n.mainItems=function(){var t=new I,e=this.attrs.discussion;return t.add("title",m("h2",{className:"DiscussionListItem-title"},nt(e.title(),this.highlightRegExp)),100),t.add("info",m("ul",{className:"DiscussionListItem-info"},U(this.infoItems().toArray())),90),t},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=qt(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Ht(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return zi.current.matches(ue,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new I;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=nt(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(dt,{discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},n.replyCountItem=function(){var t=this.attrs.discussion;return!this.showRepliesCount()&&t.isUnread()?m("button",{className:"Button--ua-reset DiscussionListItem-count",onclick:this.markAsRead.bind(this)},m("span",{"aria-hidden":"true"},ut(t.unreadCount())),m("span",{className:"visually-hidden"},zi.translator.trans("core.forum.discussion_list.unread_replies_a11y_label",{count:t.replyCount()}))):m("span",{className:"DiscussionListItem-count"},m("span",{"aria-hidden":"true"},ut(t.replyCount())),m("span",{className:"visually-hidden"},zi.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(A),Vt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(A),Wt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(pt,null):e.hasNext()&&(t=m(bt,{className:"Button",onclick:e.loadNext.bind(e)},zi.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=zi.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(Vt,{text:i}))}var o=e.pageSize;return m("div",{className:j("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r+1},m(zt,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(A),Gt=function(t){t.pageX<10&&zi.pane.show()},Yt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Wt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=zi.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Gt),zi.previous.matches(ue)){var i=zi.cache.discussionListPaneScrollTop||0;n.scrollTop(i)}else{var o=n.find(".DiscussionListItem.active");if(o.length){var s=n.offset().top,a=s+n.outerHeight(),u=o.offset().top,l=u+o.outerHeight();(u<s||l>a)&&n.scrollTop(n.scrollTop()-s+u)}}},n.onremove=function(t){zi.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Gt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(A),Kt=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(requestAnimationFrame((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}(),Xt=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Y(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(A);function Jt(t){var e=t&&t.displayName()||v.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var Qt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e);var i=function(){if(r.attrs.composer.isVisible()){var t=r.attrs.composer.fields.content();n!==t&&(n=t,r.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)})))}};i(),this.updateInterval=setInterval(i,50)},n.onremove=function(e){t.prototype.onremove.call(this,e),clearInterval(this.updateInterval)},e}(A),Zt=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this;return zi.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(zi.session.user,{className:"PostUser-avatar"}),Jt(zi.session.user)),m("ul",{className:"PostUser-badges badges"},U(zi.session.user.badges().toArray())))),m(Qt,{className:"Post-body",composer:zi.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){Rt.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},Y(zi.session.user,{className:"PostUser-avatar"})," ",zi.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(A),te=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new Kt(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),r=this.stream.posts(),i=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=r.map((function(n,r){var s,a={"data-index":e.stream.visibleStart+r};if(n){var u=n.createdAt(),l=zi.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,zi.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Xt,null);var d=m("div",Object.assign({className:"PostStream-item"},a),s);return 0===r&&e.afterFirstPostItems().toArray().length>0?m.fragment(w({},a),[d,m("div",{className:"PostStream-item PostStream-afterFirstPost",key:"afterFirstPost"},e.afterFirstPostItems().toArray())]):d}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(bt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},zi.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||zi.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Zt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.afterFirstPostItems=function(){return new I},n.endItems=function(){return new I},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){void 0===t&&(t=window.pageYOffset),this.stream.paused||this.stream.pagesLoading||(this.updateScrubber(t),this.loadPostsIfNeeded(t),clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100))},n.loadPostsIfNeeded=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e;if(this.stream.visibleStart>0){var i=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");i.length&&i.offset().top>r-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<r+n+300&&this.stream.loadNext()}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e,i=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;i.each((function(){var t=$(this),e=t.offset().top,i=t.outerHeight(!0);if(e+i<r)return!0;if(e>r+n)return!1;var u=Math.max(0,r-e),l=Math.min(i,r+n-e)-u;null===a&&(a=parseFloat(t.data("index"))+u/i),l>0&&(o+=l/i);var c=t.data("time");c&&(s=c)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format(st(zi.translator.trans("core.lib.datetime_formats.scrubber"))))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===zi.screen()?"#app-navigation":"#header";return this.$()&&$(t).outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var r=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(r,e,!0,n),n&&this.flashItem(r)},n.scrollToItem=function(t,e,n,r){var i=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),u=t.offset().top+t.height(),l=$(document).scrollTop(),c=l+$(window).height();if(n||a<l||u>c){var d=r?u-$(window).height()+zi.composer.computedHeight():t.is(":first-child")?0:a;e?d!==l&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var h=function(){i.updateScrubber(),void 0!==s&&(i.stream.index=s+1)};return h(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),r){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+zi.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-i.getMarginTop());h(),i.calculatePosition(),i.stream.paused=!1,i.loadPostsIfNeeded()}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(A);function ee(t,e){return void 0===e&&(e=v.data.locale),new Intl.NumberFormat(e).format(t)}var ne=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new Kt(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=zi.translator.trans("core.forum.post_scrubber.viewing_text",{count:t,index:m("span",{className:"Scrubber-index"}),formattedCount:m("span",{className:"Scrubber-count"},ee(t))}),n=this.stream.discussion.unreadCount(),r=t?Math.min(t-this.stream.index,n)/t:0;function i(t){var e=$(t.dom),n={top:100-100*r+"%",height:100*r+"%",opacity:r>0?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",rt("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},rt("fas fa-angle-double-up")," ",this.firstPostLabel()),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},this.unreadLabel(n))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},rt("fas fa-angle-double-down")," ",this.lastPostLabel()))))},n.firstPostLabel=function(){return zi.translator.trans("core.forum.post_scrubber.original_post_link")},n.unreadLabel=function(t){return zi.translator.trans("core.forum.post_scrubber.unread_text",{count:t})},n.lastPostLabel=function(){return zi.translator.trans("core.forum.post_scrubber.now_link")},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!0,forceHeightChange:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,r=this.stream.count(),i=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(ee(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,r-i)),a.handle=Math.min(100-a.before,o.visible*i),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var u=t.animate?"animate":"css";this.adjustingHeight=!0;var l=[];for(var c in a){var d=s.find(".Scrubber-"+c);l.push(d.stop(!0,!0)[u]({height:a[c]+"%"},"fast").promise()),"animate"===u&&d.css("overflow","visible")}Promise.all(l).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,r=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;r=Math.max(0,Math.min(this.stream.count()-1,r)),this.stream.goToIndex(Math.floor(r)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,r=Math.max(100/t,n/e);return{index:t===e?0:(100-r*e)/(t-e),visible:r}},e}(A),re=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=j(e.className,"Dropdown--split"),e.menuClassName=j(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=j(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(bt,n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},this.attrs.icon?rt(this.attrs.icon,{className:"Button-icon"}):null,rt("fas fa-caret-down",{className:"Button-caret"})))},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(lt);function ie(t,e,n,r){var i,o=!1,s=0;function a(){i&&clearTimeout(i)}function u(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var d=this,h=Date.now()-s;function f(){s=Date.now(),n.apply(d,l)}o||(r&&!i&&f(),a(),void 0===r&&h>t?f():!0!==e&&(i=setTimeout(r?function(){i=void 0}:f,void 0===r?t-h:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),u.cancel=function(){a(),o=!0},u}function oe(t,e,n){return void 0===n?ie(t,e,!1):ie(t,n,!1!==e)}function se(t,e){var n=$(window),r=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-r)}var ae=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=ie(300,this._loadNext),this.loadPrevious=ie(300,this._loadPrevious),this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost=w({},this.targetPost,{reply:!0}),n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),zi.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||se('.PostStream-item[data-index="'+(n?r.visibleEnd-1:r.visibleStart)+'"]',m.redraw.sync)};i(),this.loadPageTimeouts[t]=setTimeout((function(){r.loadRange(t,e).then((function(){i(),r.pagesLoading--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=zi.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?zi.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=zi.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();ae.loadCount=20;var ue=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=null,e.stream=null,e.near=0,e.useBrowserScrollRestoration=!0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(zi.discussions.hasItems()||zi.discussions.isLoading())&&(null==(n=zi.pane)||n.enable(),null==(r=zi.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r;t.prototype.onremove.call(this,e),null==(n=zi.pane)||n.disable(),!this.discussion||!zi.composer.composingReplyTo(this.discussion)||null!=(r=zi.composer)&&null!=(r=r.fields)&&r.content()?zi.composer.minimize():zi.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},this.viewItems().toArray())},n.viewItems=function(){var t=new I;return t.add("pane",m(Yt,{state:zi.discussions}),100),t.add("discussions",m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()),90),t},n.loadingItems=function(){var t=new I;return t.add("spinner",m(pt,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,U(this.sidebarItems().toArray())))},n.hero=function(){return m(q,{discussion:this.discussion})},n.pageContent=function(){var t=new I;return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new I;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(te,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=zi.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();zi.store.find("discussions",m.route.param("id"),e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{bySlug:!0,page:{near:this.near}}},n.show=function(t){var e,n,r=this;zi.history.push("discussion",t.title()),zi.setTitle(t.title()),zi.setTitleCount(0);var i=[];if(t.payload&&t.payload.included){var o=t.id();i=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&!Array.isArray(t.relationships.discussion.data)&&t.relationships.discussion.data.id===o})).map((function(t){return zi.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new ae(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,zi.current.set("discussion",t),zi.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new I;return this.discussion&&t.add("controls",m(re,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:zi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},Rt.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(ne,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=zi.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),zi.history.push("discussion",n.title()),zi.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(F),le=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},U(this.items().toArray()))},n.items=function(){return new I},e}(A),ce=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=G,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(bt),de=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right",e.accessibleToggleLabel=st(zi.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,w({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=zi.session.user;return[Y(t)," ",m("span",{className:"Button-label"},Jt(t))]},n.items=function(){var t=new I,e=zi.session.user;return t.add("profile",m(ce,{icon:"fas fa-user",href:zi.route.user(e)},zi.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(ce,{icon:"fas fa-cog",href:zi.route("settings")},zi.translator.trans("core.forum.header.settings_button")),50),zi.forum.attribute("adminUrl")&&t.add("administration",m(ce,{icon:"fas fa-wrench",href:zi.forum.attribute("adminUrl"),target:"_blank"},zi.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(L,null),-90),t.add("logOut",m(bt,{icon:"fas fa-sign-out-alt",onclick:zi.session.logout.bind(zi.session)},zi.translator.trans("core.forum.header.log_out_button")),-100),t},e}(lt);function he(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var fe=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=j(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(he),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?rt(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(lt),pe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=v.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){var e;return null==(e=this.data)||null==(e=e.attributes)?void 0:e[t]},e.pushData=function(e){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(gt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return v.request(w({method:this.exists?"PATCH":"POST",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?v.request(w({method:"DELETE",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e;return null==(e=this.data.relationships)||null==(e=e[t])?void 0:e.data},t.attribute=function(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}},t.hasOne=function(t){return function(){var e,n=null==(e=this.data.relationships)||null==(e=e[t])?void 0:e.data;if(n&&n instanceof Array)throw new Error("Relationship "+t+" on model "+this.data.type+" is plural, so the hasOne method cannot be used to access it.");return!!n&&this.store.getById(n.type,n.id)}},t.hasMany=function(t){return function(){var e,n=this,r=null==(e=this.data.relationships)||null==(e=e[t])?void 0:e.data;if(r&&!(r instanceof Array))throw new Error("Relationship "+t+" on model "+this.data.type+" is singular, so the hasMany method cannot be used to access it.");return!!r&&r.map((function(t){return n.store.getById(t.type,t.id)}))}},t.transformDate=function(t){return null!=t?new Date(t):t},t.getIdentifier=function(t){return t&&"id"in t.data?{type:t.data.type,id:t.data.id}:null},t}();function me(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function ve(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function ge(t){return t?ve(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ye=["type","icon","label","color","style"],be=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs,e=t.type,n=t.icon,r=t.label,i=t.color,o=t.style,s=void 0===o?{}:o,a=z(t,ye),u=j("Badge",[e&&"Badge--"+e],a.className,ge(i)),l=n?rt(n,{className:"Badge-icon"}):m.trust(" "),c=w({},s,{"--badge-bg":i}),d=w({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Nt,{text:r},h):h},e}(A),we=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.title=function(){return pe.attribute("title").call(this)},n.slug=function(){return pe.attribute("slug").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.firstPost=function(){return pe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return pe.attribute("lastPostedAt",pe.transformDate).call(this)},n.lastPostedUser=function(){return pe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return pe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return pe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return pe.attribute("commentCount").call(this)},n.replyCount=function(){return me("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return pe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return pe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return pe.attribute("lastReadAt",pe.transformDate).call(this)},n.lastReadPostNumber=function(){return pe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return me("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return me("unreadCount",(function(t){return!(!v.session.user||t)})).call(this)},n.hiddenAt=function(){return pe.attribute("hiddenAt",pe.transformDate).call(this)},n.hiddenUser=function(){return pe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return me("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return pe.attribute("canReply").call(this)},n.canRename=function(){return pe.attribute("canRename").call(this)},n.canHide=function(){return pe.attribute("canHide").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=v.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new I;return this.isHidden()&&t.add("hidden",m(be,{type:"hidden",icon:"fas fa-trash",label:v.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(pe),De=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state;return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},zi.translator.trans("core.forum.notifications.title")),m("div",{className:"App-primaryControl"},this.controlItems().toArray())),m("div",{className:"NotificationList-content"},this.content(t)))},n.controlItems=function(){var t=new I,e=this.attrs.state;return t.add("mark_all_as_read",m(Nt,{text:zi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(bt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:zi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(Nt,{text:zi.translator.trans("core.forum.notifications.delete_all_tooltip")},m(bt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-trash-alt",title:zi.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(zi.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),t},n.content=function(t){return t.isLoading()?m(pt,{className:"LoadingIndicator--block"}):t.hasItems()?t.getPages().map((function(t){var e=[],n={};return t.items.forEach((function(t){var r=t.subject();if(void 0!==r){var i=null;r instanceof we?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(G,{className:"NotificationGroup-header",href:zi.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},U(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},zi.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=zi.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},zi.translator.trans("core.forum.notifications.empty_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent=this.inPanel()?this.$notifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.inPanel()?this.$scrollParent[0]:document.documentElement,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1;t.hasNext()&&!t.isLoadingNext()&&n&&t.loadNext()},n.inPanel=function(){return"auto"===this.$notifications.css("overflow")},e}(A),xe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){e.className||(e.className="NotificationsDropdown"),e.buttonClassName||(e.buttonClassName="Button Button--flat"),e.menuClassName||(e.menuClassName="Dropdown-menu--right"),e.label||(e.label=st(zi.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=st(zi.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=j(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?rt(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:j("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(De,{state:this.attrs.state}))},n.onclick=function(){zi.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(zi.route("notifications"))},n.getUnreadCount=function(){return zi.session.user.unreadNotificationCount()},n.getNewCount=function(){return zi.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&t.stopPropagation()},e}(lt),Ce=function(t){return t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowRight=39]="ArrowRight",t[t.Tab=9]="Tab",t[t.Backspace=8]="Backspace",t}(Ce||{}),Ae=function(){function t(){this.callbacks=new Map,this.whenCallback=function(t){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks.set(Ce.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(Ce.ArrowDown,(function(e){e.preventDefault(),t(e)})),this},e.onSelect=function(t,e){void 0===e&&(e=!1);var n=function(e){e.preventDefault(),t(e)};return e||this.callbacks.set(Ce.Tab,n),this.callbacks.set(Ce.Enter,n),this},e.onTab=function(t){return this.callbacks.set(9,(function(e){e.preventDefault(),t(e)})),this},e.onCancel=function(t){return this.callbacks.set(Ce.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(Ce.Backspace,(function(e){e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&0===e.target.selectionStart&&0===e.target.selectionEnd&&(t(e),e.preventDefault())})),this},e.when=function(t){return this.whenCallback=t,this},e.bindTo=function(t){t[0].addEventListener("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks.get(t.which);e&&e(t)}},t}();function Ee(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function Ne(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ee(o,r,i,s,a,"next",t)}function a(t){Ee(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Fe=n(3297),ke=n.n(Fe),Se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).query=void 0,e.discussion=void 0,e.mostRelevantPost=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.mostRelevantPost=this.attrs.mostRelevantPost},n.view=function(){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(G,{href:zi.route.discussion(this.discussion,this.mostRelevantPost&&this.mostRelevantPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.mostRelevantPostContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,e=new I;return e.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},nt(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&e.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},nt(null!=(t=this.mostRelevantPostContent())?t:"",this.query,100)),80),e},e}(A),Te=function(){function t(){this.results=new Map,this.queryString=null}var e=t.prototype;return e.search=function(){var t=Ne(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),this.setQueryString(e),n={filter:{q:this.queryString||e},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",zi.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase(),this.setQueryString(t);var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m(Se,{query:t,discussion:e,mostRelevantPost:n})}));return[m("li",{className:"Dropdown-header"},zi.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(ce,{icon:"fas fa-search",href:zi.route("index",{q:this.queryString})},zi.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},e.includes=function(){return["mostRelevantPost"]},e.limit=function(){return 3},e.queryMutators=function(){return[]},e.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}(),_e=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ne(ke().mark((function t(e){var n=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",zi.store.find("users",{filter:{q:e},page:{limit:5}}).then((function(t){n.results.set(e,t),m.redraw()})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).concat(zi.store.all("users").filter((function(e){return[e.username(),e.displayName()].some((function(e){return e.toLowerCase().substr(0,t.length)===t}))}))).filter((function(t,e,n){return n.lastIndexOf(t)===e})).sort((function(t,e){return t.displayName().localeCompare(e.displayName())}));return e.length?[m("li",{className:"Dropdown-header"},zi.translator.trans("core.forum.search.users_heading"))].concat(e.map((function(e){var n=Jt(e),r=[nt(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(G,{href:zi.route.user(e)},Y(e),w({},n,{text:void 0,children:r})))}))):[]},t}(),Pe=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).searchState=void 0,e.hasFocus=!1,e.sources=void 0,e.loadingSources=0,e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e.updateMaxHeightHandler=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.searchState=this.attrs.state},n.view=function(){var t=this,e=this.searchState.getInitialSearch();if(this.sources||(this.sources=this.sourceItems().toArray()),!this.sources.length)return m("div",null);var n=st(zi.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":zi.translator.trans("core.forum.header.search_role_label"),className:j("Search",{open:this.searchState.getValue()&&this.hasFocus,focused:this.hasFocus,active:r,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{"aria-label":n,className:"FormControl",type:"search",placeholder:n,value:this.searchState.getValue(),oninput:function(e){var n;return t.searchState.setValue(null==e||null==(n=e.target)?void 0:n.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),!!this.loadingSources&&m(pt,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),o&&m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":zi.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},rt("fas fa-times-circle"))),m("ul",{className:"Dropdown-menu Search-results","aria-hidden":!i||void 0,"aria-live":i?"polite":void 0},i&&this.sources.map((function(e){return e.view(t.searchState.getValue())}))))},n.updateMaxHeight=function(){var t,e=window.innerHeight-this.element.querySelector(".Search-input>.FormControl").getBoundingClientRect().bottom-14;null==(t=this.element.querySelector(".Search-results"))||null==(t=t.style)||t.setProperty("max-height",e+"px")},n.onupdate=function(e){var n;t.prototype.onupdate.call(this,e),this.setIndex(this.getCurrentNumericIndex()),null!=(n=this.sources)&&n.length&&this.updateMaxHeight()},n.oncreate=function(e){var n,r=this;if(t.prototype.oncreate.call(this,e),null!=(n=this.sources)&&n.length){var i=this,o=this.searchState;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return r.$("input").trigger("blur")})).on("mouseenter","> li:not(.Dropdown-header)",(function(){i.setIndex(i.selectableItems().index(this))}));var s=this.$("input");this.navigator=new Ae,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),i.constructor.SEARCH_DEBOUNCE_TIME_MS))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).trigger("select")})),this.updateMaxHeightHandler=this.updateMaxHeight.bind(this),window.addEventListener("resize",this.updateMaxHeightHandler)}},n.onremove=function(e){t.prototype.onremove.call(this,e),this.updateMaxHeightHandler&&window.removeEventListener("resize",this.updateMaxHeightHandler)},n.selectResult=function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.loadingSources=0;var t=this.getItem(this.index).find("a").attr("href");this.searchState.getValue()&&t?m.route.set(t):this.clear(),this.$("input").blur()},n.clear=function(){this.searchState.clear()},n.sourceItems=function(){var t=new I;return zi.forum.attribute("canViewForum")&&t.add("discussions",new Te),zi.forum.attribute("canSearchUsers")&&t.add("users",new _e),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},_(e,[{key:"state",get:function(){return gt("`state` property of the Search component is deprecated","3212"),this.searchState},set:function(t){void 0!==t&>("`state` property of the Search component is deprecated","3212"),this.searchState=t}}])}(A);Pe.MIN_SEARCH_LEN=3,Pe.SEARCH_DEBOUNCE_TIME_MS=250;var Be=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},U(this.items().toArray()))},n.items=function(){var t=new I;if(t.add("search",m(Pe,{state:zi.search}),30),zi.forum.attribute("showLanguageSelector")&&Object.keys(zi.data.locales).length>1){var e=[],n=function(t){e.push(m(bt,{active:zi.data.locale===t,icon:zi.data.locale!==t||"fas fa-check",onclick:function(){zi.session.user?zi.session.user.savePreferences({locale:t}).then((function(){return window.location.reload()})):(document.cookie="locale="+t+"; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT",window.location.reload())}},zi.data.locales[t]))};for(var r in zi.data.locales)n(r);t.add("locale",m(fe,{buttonClassName:"Button Button--link",accessibleToggleLabel:zi.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return zi.session.user?(t.add("notifications",m(xe,{state:zi.notifications}),10),t.add("session",m(de,null),0)):(zi.forum.attribute("allowSignUp")&&t.add("signUp",m(bt,{className:"Button Button--link",onclick:function(){return zi.modal.show(Mt)}},zi.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(bt,{className:"Button Button--link",onclick:function(){return zi.modal.show($t)}},zi.translator.trans("core.forum.header.log_in_link")),0)),t},e}(A),Ie=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(bt),Oe=function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear()}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw.sync()),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.onExit=null,this.fields={content:It("")},this.editor&&this.editor.destroy(),this.editor=null},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw.sync())},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!E(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===zi.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Tt,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Oe.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Le=Oe;var Me=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Le.Position.NORMAL,minimized:this.state.position===Le.Position.MINIMIZED,fullScreen:this.state.position===Le.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Le.Position.MINIMIZED?this.state.show.bind(this.state):void 0,r=t.componentClass;return m("div",{className:"Composer "+j(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},U(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Le.Position.HIDDEN&&this.state.position!==Le.Position.MINIMIZED&&"phone"!==zi.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Le.Position.FULLSCREEN||this.state.position!==Le.Position.NORMAL)switch(this.state.position){case Le.Position.HIDDEN:return this.hide();case Le.Position.MINIMIZED:return this.minimize();case Le.Position.FULLSCREEN:return this.focus();case Le.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var r=t.outerHeight();this.prevPosition===Le.Position.HIDDEN?t.css({bottom:-r,height:r}):t.css({height:e});var i=t.animate({bottom:0,height:r},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),i},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;if(this.animateHeightChange().then((function(){return t.focus()})),"phone"===zi.screen()){var e=document.documentElement,n=Math.min(e.scrollTop,e.scrollHeight-e.clientHeight);this.$().css("top",$(".App").is(".mobile-safari")?n:0),this.showBackdrop()}},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new I;return this.state.position===Le.Position.FULLSCREEN?t.add("exitFullScreen",m(Ie,{icon:"fas fa-compress",title:zi.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Le.Position.MINIMIZED&&(t.add("minimize",m(Ie,{icon:"fas fa-minus minimize",title:zi.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(Ie,{icon:"fas fa-expand",title:zi.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(Ie,{icon:"fas fa-times",title:zi.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(A),$e=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(G,{className:j("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},Y(l||null),rt(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),ct(a.createdAt())),!a.isRead()&&m(bt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:zi.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=zi.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=zi.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(A),je=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();return e?zi.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return zi.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}($e);function Re(t){zi.composer.isFullScreen()&&(zi.composer.minimize(),t.stopPropagation())}var He=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||zi.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||zi.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,rt("fas fa-pencil-alt")," ",m(G,{href:zi.route.discussion(n.discussion(),n.number()),onclick:Re},zi.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){Re(t),m.route.set(zi.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(zi.viewingDiscussion(e))zi.current.get("stream").goToNumber(n.number());else var r=zi.alerts.show({type:"success",controls:[m(bt,{className:"Button Button--link",onclick:function(){m.route.set(zi.route.post(n)),zi.alerts.dismiss(r)}},zi.translator.trans("core.forum.composer_edit.view_button"))]},zi.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(kt);const Ue={controls:function(t,e){var n=this,r=new I;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(L,null)))})),r},userControls:function(t,e){return new I},moderationControls:function(t,e){var n=new I;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(bt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},zi.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new I;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(bt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},zi.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(bt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},zi.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(bt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},zi.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return zi.composer.load(He,{post:t}),zi.composer.show(),e()}))},hideAction:function(){if(confirm(st(zi.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:zi.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(st(zi.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(zi.discussions.removeDiscussion(t),zi.viewingDiscussion(t)&&zi.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};var qe=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.subtree=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new ht((function(){return n.loading}),(function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}))},n.view=function(t){var e=this.elementAttrs();e.className=this.classes(e.className).join(" ");var n=Ue.controls(this.attrs.post,this).toArray(),r=this.footerItems().toArray();return m("article",e,m("div",null,this.viewItems(n,r).toArray()))},n.viewItems=function(t,e){var n=this,r=new I;return r.add("content",this.loading?m(pt,null):this.content(),100),r.add("actions",m("aside",{className:"Post-actions"},m("ul",null,U(this.actionItems().toArray()),!!t.length&&m("li",null,m(lt,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return n.$(".Post-controls").addClass("open")},onhide:function(){return n.$(".Post-controls").removeClass("open")},accessibleToggleLabel:zi.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},t)))),90),r.add("footer",m("footer",{className:"Post-footer"},e.length>0?m("ul",null,U(e)):null),80),r},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===zi.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new I},n.footerItems=function(){return new I},e}(A),ze=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon()||"",e.color=e.group.color()||"",e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(be),Ve=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.nameSingular=function(){return pe.attribute("nameSingular").call(this)},n.namePlural=function(){return pe.attribute("namePlural").call(this)},n.color=function(){return pe.attribute("color").call(this)},n.icon=function(){return pe.attribute("icon").call(this)},n.isHidden=function(){return pe.attribute("isHidden").call(this)},e}(pe);Ve.ADMINISTRATOR_ID="1",Ve.GUEST_ID="2",Ve.MEMBER_ID="3";var We=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.isEmailConfirmed=void 0,e.setPassword=void 0,e.password=void 0,e.groups={},e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=this.attrs.user;this.username=It(r.username()||""),this.email=It(r.email()||""),this.isEmailConfirmed=It(r.isEmailConfirmed()||!1),this.setPassword=It(!1),this.password=It(r.password()||"");var i=r.groups()||[];v.store.all("groups").filter((function(t){return![Ve.GUEST_ID,Ve.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=It(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return v.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):v.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new I;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:st(v.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),v.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:st(v.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(v.session.user)&&m("div",null,m(bt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},v.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),v.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:st(v.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,v.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return v.store.getById("groups",t)})).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===Ve.ADMINISTRATOR_ID&&(t.attrs.user===v.session.user||!t.userIsAdmin(v.session.user))}),m(ze,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary",type:"submit",loading:this.loading},v.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),v.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return v.store.getById("groups",t)})).filter((function(t){return t instanceof Ve}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(v.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===Ve.ADMINISTRATOR_ID}))},e}(Pt),Ge=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),r=$("#footer"),i=e.find("> ul");$(window).off(".affix"),i.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||i.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=r.outerHeight(!0)}}})},e}(A),Ye=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Je,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===zi.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(Ge,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,U(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(pt,{display:"block"})])},n.content=function(){},n.show=function(t){this.user=t,zi.current.set("user",t),zi.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();zi.preloadedApiDocument(),zi.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||zi.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new I;return t.add("nav",m(fe,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new I,e=this.user,n=zi.session.user===e;return t.add("posts",m(ce,{href:zi.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},zi.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(ce,{href:zi.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},zi.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(L,null),-90),t.add("settings",m(ce,{href:zi.route("settings"),icon:"fas fa-cog"},zi.translator.trans("core.forum.user.settings_link")),-100)),(n||zi.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(L,null),-90),t.add("security",m(ce,{href:zi.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},zi.translator.trans("core.forum.user.security_link")),-100)),t},e}(F);const Ke={controls:function(t,e){var n=this,r=new I;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(L,null)))})),r},userControls:function(){return new I},moderationControls:function(t){var e=new I;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(bt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},zi.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new I;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(bt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},zi.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(zi.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),zi.current.matches(Ye,{user:t})?zi.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];zi.alerts.show({type:e},zi.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){zi.modal.show(We,{user:t})}};var Xe=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:j(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Y(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:zi.translator.trans("core.forum.user.avatar_upload_tooltip"),"data-toggle":"dropdown",onclick:this.quickUpload.bind(this),ondragover:this.enableDragover.bind(this),ondragenter:this.enableDragover.bind(this),ondragleave:this.disableDragover.bind(this),ondragend:this.disableDragover.bind(this),ondrop:this.dropUpload.bind(this)},this.loading?m(pt,{display:"unset",size:"large"}):t.avatarUrl()?rt("fas fa-pencil-alt"):rt("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},U(this.controlItems().toArray())))},n.controlItems=function(){var t=new I;return t.add("upload",m(bt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},zi.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(bt,{icon:"fas fa-times",onclick:this.remove.bind(this)},zi.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file" accept=".jpg, .jpeg, .png, .bmp, .gif">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),zi.request({method:"POST",url:zi.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.attrs.user;this.loading=!0,m.redraw(),zi.request({method:"DELETE",url:zi.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){zi.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(A),Je=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ke.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:j("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(lt,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:zi.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:zi.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Xe,{user:t,className:"UserCard-avatar"})," ",Jt(t)):m(G,{href:zi.route.user(t)},m("div",{className:"UserCard-avatar"},Y(t,{loading:"eager"})),Jt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},U(r)),m("ul",{className:"UserCard-info"},U(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new I,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:j("UserCard-lastSeen",{online:r})},r?[rt("fas fa-circle")," ",zi.translator.trans("core.forum.user.online_text")]:[rt("far fa-clock")," ",at(n)]),100)}return t.add("joined",zi.translator.trans("core.forum.user.joined_date_text",{ago:at(e.joinTime())}),90),t},e}(A);function Qe(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},rt("fas fa-circle")):null}var Ze=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(G,{href:zi.route.user(e)},Y(e,{className:"PostUser-avatar"}),Qe(e),Jt(e))),m("ul",{className:"PostUser-badges badges"},U(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Je,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(e,{className:"PostUser-avatar"})," ",Jt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(A);function tn(t){var e=ot()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var en=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).ip=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.ip=this.attrs.ip||""},n.view=function(){return m("span",{className:"IPAddress"},this.viewItems().toArray())},n.viewItems=function(){var t=new I;return t.add("ip",m("span",null,this.ip),100),t},e}(A),nn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"Dropdown PostMeta"},this.viewItems().toArray())},n.getPermalink=function(t){return zi.forum.attribute("baseOrigin")+zi.route.post(t)},n.selectPermalink=function(t){var e=this;setTimeout((function(){return $(e.element).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},n.viewItems=function(){var t=this,e=new I,n=this.attrs.post.createdAt();return e.add("time",m("a",{className:"Dropdown-toggle",onclick:function(e){return t.selectPermalink(e)},"data-toggle":"dropdown"},ct(n)),100),e.add("meta-dropdown",m("div",{className:"Dropdown-menu dropdown-menu"},this.metaItems().toArray()),90),e},n.metaItems=function(){var t=new I,e=this.attrs.post,n="ontouchstart"in document.documentElement,r=this.getPermalink(e),i=e.createdAt();return t.add("post-number",m("span",{className:"PostMeta-number"},zi.translator.trans("core.forum.post.number_tooltip",{number:e.number()})," "),100),t.add("post-time",m("span",{className:"PostMeta-time"},tn(i)),90),t.add("post-ip",m("span",{className:"PostMeta-ip"},m(en,{ip:e.data.attributes.ipAddress})),80),t.add("permalink",n?m("a",{className:"Button PostMeta-permalink",href:r},r):m("input",{className:"FormControl PostMeta-permalink",value:r,onclick:function(t){return t.stopPropagation()}}),0),t},e}(A),rn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=zi.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:at(t.editedAt())});return m(Nt,{text:n},m("span",{className:"PostEdited"},zi.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(A),on=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat(this.contentItems().toArray())},n.contentItems=function(){var t=new I;return t.add("header",m("header",{className:"Post-header"},m("ul",null,U(this.headerItems().toArray()))),100),t.add("body",m("div",{className:"Post-body"},this.bodyItems().toArray()),90),t},n.bodyItems=function(){var t=new I;return t.add("content",this.isEditing()?m(Qt,{className:"Post-preview",composer:zi.composer}):m.trust(this.attrs.post.contentHtml()),100),t},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return zi.composer.bodyMatches(He,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=j(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new I,n=this.attrs.post;return e.add("user",m(Ze,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(nn,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(rn,{post:n})),n.isHidden()&&e.add("toggle",m(bt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(qe),sn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=j(e.className,"EventPost",Z(this.attrs.post.contentType())+"Post"),e},n.content=function(){var e=this.attrs.post.user(),n=Jt(e),r=Object.assign(this.descriptionData(),{user:e,username:e?m(G,{className:"EventPost-user",href:zi.route.user(e)},n):n,time:ct(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([rt(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return zi.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(qe),an=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=zi.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(Nt,{text:st(zi.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(sn),un="welcomeHidden",ln=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).hidden=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},this.viewItems().toArray()))},n.hide=function(){localStorage.setItem(un,"true")},n.isHidden=function(){var t;return null==(t=zi.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(un)||!!this.hidden},n.viewItems=function(){var t=this,e=new I;return e.add("dismiss-button",m(bt,{icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link","aria-label":zi.translator.trans("core.forum.welcome_hero.hide")}),100),e.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),e},n.contentItems=function(){var t=new I;return t.add("title",m("h1",{className:"Hero-title"},zi.forum.attribute("welcomeTitle")),100),t.add("subtitle",m("div",{className:"Hero-subtitle"},m.trust(zi.forum.attribute("welcomeMessage")))),t},e}(A),cn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||st(zi.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||zi.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||st(zi.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||st(zi.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||It(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,zi.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();zi.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),zi.discussions.refresh(),m.route.set(zi.route.discussion(e))}),this.loaded.bind(this))},e}(kt),dn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).lastDiscussion=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),zi.previous.matches(ue)&&(this.lastDiscussion=zi.previous.get("discussion")),zi.previous.matches(e)&&zi.discussions.clear(),zi.discussions.refreshParams(zi.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),zi.history.push("index",st(zi.translator.trans("core.forum.header.back_to_index_tooltip"))),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,U(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},this.contentItems().toArray()))))},n.contentItems=function(){var t=new I;return t.add("toolbar",m("div",{className:"IndexPage-toolbar"},this.toolbarItems().toArray()),100),t.add("discussionList",m(Wt,{state:zi.discussions}),90),t},n.toolbarItems=function(){var t=new I;return t.add("view",m("ul",{className:"IndexPage-toolbar-view"},U(this.viewItems().toArray())),100),t.add("action",m("ul",{className:"IndexPage-toolbar-action"},U(this.actionItems().toArray())),90),t},n.setTitle=function(){zi.setTitle(st(zi.translator.trans("core.forum.index.meta_title_text"))),zi.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=zi.cache.heroHeight,r=zi.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=zi.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=zi.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),zi.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(ln,null)},n.sidebarItems=function(){var t=this,e=new I,n=zi.forum.attribute("canStartDiscussion")||!zi.session.user;return e.add("newDiscussion",m(bt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},zi.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(fe,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:zi.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new I,e=zi.search.stickyParams();return t.add("allDiscussions",m(ce,{href:zi.route("index",e),icon:"far fa-comments"},zi.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new I,e=zi.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=zi.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",m(lt,{buttonClassName:"Button",label:n[zi.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:zi.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(zi.search.params().sort||Object.keys(e)[0])===t;return m(bt,{icon:!i||"fas fa-check",onclick:zi.search.changeSort.bind(zi.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new I;return t.add("refresh",m(bt,{title:zi.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){zi.discussions.refresh(),zi.session.user&&(zi.store.find("users",zi.session.user.id()),m.redraw())}})),zi.session.user&&t.add("markAllAsRead",m(bt,{title:zi.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return zi.session.user?(zi.composer.load(cn,{user:zi.session.user}),zi.composer.show(),t(zi.composer)):(zi.modal.show($t),e())}))},n.markAllAsRead=function(){var t;confirm(st(zi.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=zi.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(F);dn.providesInitialSearch=!0;var hn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){var t,e=this;return 0!==this.posts.length||this.loading?(this.loading?t=m(pt,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(bt,{className:"Button",onclick:this.loadMore.bind(this)},zi.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},zi.translator.trans("core.forum.user.in_discussion_text",{discussion:m(G,{href:zi.route.post(t)},e.discussionTitle(t))})),m(on,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(Vt,{text:zi.translator.trans("core.forum.user.posts_empty_text")}))},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),zi.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},n.discussionTitle=function(t){return t.discussion().title()},e}(Ye),fn=function(){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e=1),void 0===n&&(n=20),this.location=void 0,this.pageSize=void 0,this.pages=[],this.params={},this.initialLoading=!1,this.loadingPrev=!1,this.loadingNext=!1,this.params=t,this.location={page:e},this.pageSize=n}var e=t.prototype;return e.clear=function(){this.pages=[],m.redraw()},e.loadPrev=function(){var t=this;if(this.loadingPrev||1===this.getLocation().page)return Promise.resolve();this.loadingPrev=!0;var e=this.getPrevPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingPrev=!1}))},e.loadNext=function(){var t=this;if(this.loadingNext)return Promise.resolve();this.loadingNext=!0;var e=this.getNextPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingNext=!1}))},e.parseResults=function(t,e){var n,r=Number(t),i=null==(n=e.payload)?void 0:n.links,o={number:r,items:e,hasNext:!(null==i||!i.next),hasPrev:!(null==i||!i.prev)};this.isEmpty()||r>this.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:r},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=w({},e,{page:w({},e.page,{offset:this.pageSize*(t-1)}),include:n});return v.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}(),pn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function mn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var vn=new pn,gn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=vn.on("discussion.deleted",r.deleteDiscussion.bind(r)),r}b(e,t);var n=e.prototype;return n.requestParams=function(){var t,e={include:["user","lastPostedUser"],filter:this.params.filter||{},sort:this.sortMap()[null!=(t=this.params.sort)?t:""]};return this.params.q&&(e.filter.q=this.params.q,e.include.push("mostRelevantPost","mostRelevantPost.user")),e},n.loadPage=function(e){void 0===e&&(e=1);var n=zi.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return mn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.pages);!(e=n()).done;){var r=e.value,i=r.items.indexOf(t);if(-1!==i){r.items.splice(i,1);break}}var o=this.extraDiscussions.indexOf(t);-1!==o&&this.extraDiscussions.splice(o),m.redraw()},n.addDiscussion=function(t){this.removeDiscussion(t),this.extraDiscussions.unshift(t),m.redraw()},n.getAllItems=function(){return this.extraDiscussions.concat(t.prototype.getAllItems.call(this))},n.getPages=function(){var e=t.prototype.getPages.call(this);return this.extraDiscussions.length?[{number:-1,items:this.extraDiscussions}].concat(e):e},_(e,[{key:"type",get:function(){return"discussions"}}])}(fn),yn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new gn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(Wt,{state:this.state}))},e}(Ye);const bn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var wn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(t){var e=j(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:bn("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display","aria-hidden":"true"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(pt,{display:"unset",size:"small"}):rt(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(A),Dn=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=j(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(wn),xn=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,U(t.children)))},e}(A),Cn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},rt(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},rt(n.icon)," ",n.label),t.methods.map((function(r){var i=t.preferenceKey(n.name,r.name);return m("td",{className:"NotificationGrid-checkbox"},m(wn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},zi.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new I;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:zi.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:zi.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new I;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:zi.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(A),An=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return zi.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new I;return t.add("help",m("p",{className:"helpText"},zi.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,zi.request({method:"POST",url:zi.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:zi.session.user.email()}},e}(Pt),En=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.password=void 0,e.success=!1,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=It(zi.session.user.email()||""),this.password=It("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return zi.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new I;return this.success?(t.add("help",m("p",{className:"helpText"},zi.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},zi.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:zi.session.user.email(),bidi:this.email,disabled:this.loading}))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:zi.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==zi.session.user.email()?(this.loading=!0,this.alertAttrs=null,zi.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=zi.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(Pt),Nn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discloseOnlineLoading=void 0,e}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(zi.session.user),zi.setTitle(st(zi.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,U(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new I;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(xn,{className:"Settings-"+n,label:zi.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new I;return t.add("changePassword",m(bt,{className:"Button",onclick:function(){return zi.modal.show(An)}},zi.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(bt,{className:"Button",onclick:function(){return zi.modal.show(En)}},zi.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new I;return t.add("notificationGrid",m(Cn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new I;return n.add("discloseOnline",m(Dn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},zi.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ye),Fn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),zi.history.push("notifications",st(zi.translator.trans("core.forum.notifications.title"))),zi.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(De,{state:zi.notifications}))},e}(F),kn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return w({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[w({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=w({},m.route.param());return"near"in t&&delete t.near,t.id=this.canonicalizeDiscussionSlug(t.id),this.routeName.replace(".near","")+JSON.stringify(t)},n.onmatch=function(n,r,i){return zi.current.matches(ue)&&this.canonicalizeDiscussionSlug(n.id)===this.canonicalizeDiscussionSlug(m.route.param("id"))&&(e.scrollToPostNumber=n.near||1),t.prototype.onmatch.call(this,n,r,i)},n.render=function(n){if(null!==e.scrollToPostNumber){var r=e.scrollToPostNumber;setTimeout((function(){return zi.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(kn);Sn.scrollToPostNumber=null;var Tn=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},v.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(A),_n=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading={},e.showingTokens={},e}b(e,t);var n=e.prototype;return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},zi.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:j("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new I;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},rt(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new I;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},zi.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Tn,{label:zi.translator.trans("core.forum.security.created"),value:ct(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Tn,{label:zi.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,ct(t.lastActivityAt()),t.lastIpAddress()&&m("span",null," ","— ",m(en,{ip:t.lastIpAddress()})),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):zi.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new I,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(bt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},zi.translator.trans("core.forum.security."+o)))}var s=m(bt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},zi.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(Nt,{text:zi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ne(ke().mark((function t(e){var n,r,i;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(st(zi.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",zi.alerts.show({type:"success"},zi.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||zi.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return zi.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(A),Pn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).titleInput=It(""),e}b(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return zi.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=zi.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(bt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},zi.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,zi.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),zi.modal.close()})).finally(this.loaded.bind(this))},e}(Pt),Bn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),In=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state=new Bn,e}b(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=zi.session.user)?void 0:n.slug())||zi.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),zi.setTitle(st(zi.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,U(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new I;return zi.forum.attribute("canCreateAccessToken")||zi.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(xn,{className:"UserSecurityPage-developerTokens",label:zi.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(pt,null)),e.add("sessions",m(xn,{className:"UserSecurityPage-sessions",label:zi.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===zi.session.user.id()&&e.add("globalLogout",m(xn,{className:"UserSecurityPage-globalLogout",label:zi.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},zi.translator.trans("core.forum.security.global_logout.help_text")),m(bt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},zi.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new I;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(_n,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(pt,null)),this.user.id()===zi.session.user.id()&&e.add("newAccessToken",m(bt,{className:"Button",disabled:!zi.forum.attribute("canCreateAccessToken"),onclick:function(){return zi.modal.show(Pn,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},zi.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new I;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(_n,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(pt,null)),this.user.id()===zi.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(bt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},zi.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(Nt,{text:zi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return zi.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(st(zi.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,zi.request({method:"DELETE",url:zi.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),zi.alerts.show({type:"success"},zi.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){zi.alerts.show({type:"error"},zi.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,zi.request({method:"POST",url:zi.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ye);function On(t){t.routes={index:{path:"/all",component:dn},discussion:{path:"/d/:id",component:ue,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ue,resolverClass:Sn},user:{path:"/u/:username",component:hn},"user.posts":{path:"/u/:username",component:hn},"user.discussions":{path:"/u/:username/discussions",component:yn},settings:{path:"/settings",component:Nn},"user.security":{path:"/u/:username/security",component:In},notifications:{path:"/notifications",component:Fn}}}function Ln(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}b(r,n);var i=r.prototype;return i.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},i.view=function(){return m(bt,{className:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[rt("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},i.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},r}(A),r=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return w({},n,{children:[m("div",{className:"container"},n.children)]})},e}(_t);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Mn=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],$n=Mn.join(","),jn="undefined"==typeof Element,Rn=jn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Hn=!jn&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Un=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll($n));return e&&Rn.call(t,$n)&&r.unshift(t),r.filter(n)},qn=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{Rn.call(s,$n)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},zn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},Vn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Wn=function(t){return"INPUT"===t.tagName},Gn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Yn=function(t,e){return!(e.disabled||function(t){return Wn(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=Rn.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Rn.call(i,"details:not([open]) *"))return!0;var o=Hn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return Gn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Hn(t);if(u&&!u.shadowRoot&&!0===r(u))return Gn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!Rn.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Kn=function(t,e){return!(function(t){return function(t){return Wn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Hn(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||zn(e)<0||!Yn(t,e))},Xn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Jn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=zn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(Vn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Qn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?qn([t],e.includeContainer,{filter:Kn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Xn}):Un(t,e.includeContainer,Kn.bind(null,e)),Jn(n)},Zn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Rn.call(t,$n)&&Kn(e,t)},tr=Mn.concat("iframe").join(","),er=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Rn.call(t,tr)&&Yn(e,t)};function nr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nr(Object(n),!0).forEach((function(e){ir(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ir(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var or,sr=(or=[],{activateTrap:function(t){if(or.length>0){var e=or[or.length-1];e!==t&&e.pause()}var n=or.indexOf(t);-1===n||or.splice(n,1),or.push(t)},deactivateTrap:function(t){var e=or.indexOf(t);-1!==e&&or.splice(e,1),or.length>0&&or[or.length-1].unpause()}}),ar=function(t){return setTimeout(t,0)},ur=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},lr=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},cr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},dr=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=rr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Qn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?qn([e],n.includeContainer,{filter:Yn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Un(e,n.includeContainer,Yn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Zn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Zn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=cr(t);a(e)>=0||(lr(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!er(e,i.tabbableOptions)}):lr(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=cr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==lr(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=cr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=ur(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||er(e,i.tabbableOptions)&&!Zn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ur(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||er(e,i.tabbableOptions)&&!Zn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=cr(t);a(e)>=0||lr(i.clickOutsideDeactivates,t)||lr(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return sr.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?ar((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=rr({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,sr.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){ar((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function hr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=w({escapeDeactivates:!1},e[1]),dr.apply(void 0,e)}var fr=!1;if("undefined"!=typeof window){var pr={get passive(){fr=!0}};window.addEventListener("testPassive",null,pr),window.removeEventListener("testPassive",null,pr)}var mr,vr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),gr=[],yr=!1,br=-1,wr=void 0,Dr=void 0,xr=void 0,Cr=function(t){return gr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Ar=function(t){var e=t||window.event;return!!Cr(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Er=function(){vr&&(gr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),yr&&(document.removeEventListener("touchmove",Ar,fr?{passive:!1}:void 0),yr=!1),br=-1),vr?function(){if(void 0!==Dr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=Dr.position,document.body.style.top=Dr.top,document.body.style.left=Dr.left,window.scrollTo(e,t),Dr=void 0}}():(void 0!==xr&&(document.body.style.paddingRight=xr,xr=void 0),void 0!==wr&&(document.body.style.overflow=wr,wr=void 0)),gr=[]},Nr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}b(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])})),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Er();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Er()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=hr(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!gr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};gr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(gr),[n]),vr?window.requestAnimationFrame((function(){if(void 0===Dr){Dr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===xr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);xr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===wr&&(wr=document.body.style.overflow,document.body.style.overflow="hidden")}(e),vr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(br=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-br;!Cr(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Ar(t):t.stopPropagation())}(e,t)},yr||(document.addEventListener("touchmove",Ar,fr?{passive:!1}:void 0),yr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())},_(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}])}(A),Fr=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(A),kr=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return!!this.attrs.error.xhr&&this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(Pt),Sr=n(1189),Tr=n.n(Sr),_r=n(1384),Pr=n.n(_r),Br=n(7158),Ir=n.n(Br),Or=n(408),Lr=n.n(Or),Mr=n(7493),$r=n.n(Mr),jr=n(9683),Rr=n.n(jr),Hr=n(7714),Ur=n.n(Hr);function qr(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?qr(e):e)}),[])}function zr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Vr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Vr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function Wr(t){return Gr(t.slice(1,-1),",",3)}function Gr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),Gr(s,e,n-1,r)}function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach((function(e){Ur()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xr=0,Jr="other";function Qr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Xr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Zr(t){var e=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=zr(arguments.length>1&&void 0!==arguments[1]?arguments[1]:""),o=i.args,s=i.cases,a=parseInt(t);o.forEach((function(t){t.startsWith("offset:")&&(a-=parseInt(t.slice(7)))}));var u=[];if("PluralRules"in Intl){void 0!==mr&&mr.resolvedOptions().locale===e||(mr=new Intl.PluralRules(e));var l=mr.select(a);l!==Jr&&u.push(l)}1===a&&u.push("one"),u.push("=".concat(a),Jr);for(var c=0;c<u.length;c++){var d=u[c];if(d in s){var h=Qr(s[d],a),f=h.caseBody,p=h.numberValues;return r(f,Kr(Kr({},n),p))}}return t}var ti="other";function ei(t){var e=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,r=zr(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").cases;return t in r?n(r[t],e):ti in r?n(r[ti],e):t}function ni(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[];return ri(t,0,0,i,(function(r,o,s,a,u,l){if(o)return{break:!0};var c=function(t,e,n,r){var i,o=1;return ri(t,n,r,[],(function(t,n,r,s,a,u){return r===e&&(n?o--:o++,0===o)?(i={segmentIndex:s,segmentStart:u,segmentEnd:a},{exit:!0}):{exit:!1}})),i}(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,ni(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}})),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:ii(t)}))}function ri(t,e,n,r,i){for(var o,s=e;s<t.length;s++){var a=t[s];if("string"==typeof a){for(var u=!1,l=null,c=!1,d=!1,h=s===e?n:0;h<a.length;h++)if(c||"<"!==a[h])if(c&&">"===a[h]){var f=a.slice(l+1+u,h),p=i(a,u,f,s,h,l);if(p.exit)return;if(p.newSegmentIndex&&(s=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;u=!1,l=null,c=!1}else c&&(o=a[h],!/[a-zA-Z-_]/.test(o))&&(u=!1,l=null,c=!1);else l=h,c=!0,"/"===a[h+1]&&(u=!0,h++);d||r.push(a)}else r.push(a)}}function ii(t){return"string"!=typeof t?t:t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function oi(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):Array.isArray(t)?t.map(oi):t}function si(t,e,n){return"<".concat(t,">").concat(ii(n),"</").concat(t,">")}var ai=function(t){Lr()(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Rr()(e);if(n){var i=Rr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return $r()(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Pr()(this,i),(e=r.call(this,t,n)).richHandler=o||si,e}return Ir()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){return Object.keys(t).reduce((function(e,n){return e[n]=oi(t[n]),e}),{})}(e),r=qr(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Tr()(t,2),n=e[0];return e[1],[n,i]}))),s=ni(qr(this.process(t,o)),o,(function(){return i})).map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return ni(r,n,this.richHandler,s)}}]),i}(function(){function t(e){var n,r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pr()(this,t),Ur()(this,"format",(n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return qr(i.process(t,e)).join("")},r={},function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=e.length?e.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(r,o))return r[o];var s=n.apply(void 0,e);return r[o]=s,s})),this.locale=e,this.typeHandlers=o}return Ir()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=Vr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=Wr(i),u=Tr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ui(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function li(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ui(Object(n),!0).forEach((function(e){Ur()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ui(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ci(t,e,n){var r=e[t]||m(t),i=ii(m.fragment(n).children);return li(li({},r),{},{children:i})}var di=function(){function t(){this.translations={},this.formatter=new ai(null,this.formatterTypeHandlers(),ci)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Zr,select:ei}},e.preprocessParameters=function(t){if("user"in t){var e=V(t,"user");t.username||(t.username=Jt(e))}return t},e.trans=function(t,e){void 0===e&&(e={});var n=this.translations[t];return n?(e=this.preprocessParameters(e),this.formatter.rich(n,e)):t},t}();function hi(t){return Array.isArray(t.data)}var fi=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){var e=this;t.included&&t.included.map(this.pushObject.bind(this));var n=t.data instanceof Array?t.data.map((function(t){return e.pushObject(t,!1)})):this.pushObject(t.data,!1);return n.payload=t,n},e.pushObject=function(t,e){if(void 0===e&&(e=!0),!this.models[t.type])return e||setTimeout((function(){return gt("Pushing object of type `"+t.type+"` not allowed, as type not yet registered in the store.","3206")})),null;var n=this.data[t.type]=this.data[t.type]||{},r=n[t.id],i=r?r.pushData(t):this.createRecord(t.type,t);return n[t.id]=i,i.exists=!0,i},e.find=function(){var t=Ne(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=v.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",v.request(w({method:"GET",url:s,params:o},i)).then((function(t){return hi(t),a.pushPayload(t)})));case 6:case"end":return t.stop()}}),t)})));return function(e,n,r,i){return t.apply(this,arguments)}}(),e.getById=function(t,e){var n;return null==(n=this.data)||null==(n=n[t])?void 0:n[e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.values(e):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}(),pi=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),v.request(w({method:"POST",url:v.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=v.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),mi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=hr("#drawer",{allowOutsideClick:!0,clickOutsideDeactivates:!0}),this.drawerAvailableMediaQuery=window.matchMedia("(max-width: "+getComputedStyle(document.documentElement).getPropertyValue("--screen-phone-max")+")")}var e=t.prototype;return e.isOpen=function(){return this.appElement.classList.contains("drawerOpen")},e.hide=function(){var t;if(this.focusTrap.deactivate(),this.drawerAvailableMediaQuery.removeListener(this.resizeHandler),this.isOpen()){var e=$("#drawer");e.css("visibility","visible").one("transitionend",(function(){return e.css("visibility","")})),this.appElement.classList.remove("drawerOpen"),null==(t=this.$backdrop)||null==t.remove||t.remove()}},e.show=function(){var t=this;this.appElement.classList.add("drawerOpen"),this.drawerAvailableMediaQuery.addListener(this.resizeHandler),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").on("click",this.hide.bind(this)),requestAnimationFrame((function(){t.$backdrop.addClass("in"),t.focusTrap.activate()}))},t}();function vi(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:kn;n[e+i.path]=new o(i.component,r)}}return n}var gi=function(t,e,n,r){this.status=void 0,this.options=void 0,this.xhr=void 0,this.responseText=void 0,this.response=void 0,this.alert=void 0,this.status=t,this.responseText=e,this.options=n,this.xhr=r;try{this.response=JSON.parse(null!=e?e:"null")}catch(t){this.response=null}this.alert=null};function yi(){$("[data-humantime]").each((function(){var t=$(this),e=at(t.attr("datetime"));t.html(e)}))}function bi(){setInterval(yi,1e4)}function wi(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=r?r.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object.assign(t[e],r)}))}function Di(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[r.bind(this)].concat(e))},Object.assign(t[e],r)}))}var xi=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(pe),Ci=n(5800),Ai=n.n(Ci);function Ei(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,i,o,s=Math.floor(6*t),a=6*t-s,u=.63,l=n*(1-.3*a),c=n*(1-.3*(1-a));switch(s%6){case 0:r=n,i=c,o=u;break;case 1:r=l,i=n,o=u;break;case 2:r=u,i=n,o=c;break;case 3:r=u,i=l,o=n;break;case 4:r=c,i=u,o=n;break;case 5:r=n,i=u,o=l}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*o)}}(e%360/360,0,.9);return""+r.r.toString(16)+r.g.toString(16)+r.b.toString(16)}var Ni=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).avatarColor=null,e}b(e,t);var n=e.prototype;return n.username=function(){return pe.attribute("username").call(this)},n.slug=function(){return pe.attribute("slug").call(this)},n.displayName=function(){return pe.attribute("displayName").call(this)},n.email=function(){return pe.attribute("email").call(this)},n.isEmailConfirmed=function(){return pe.attribute("isEmailConfirmed").call(this)},n.password=function(){return pe.attribute("password").call(this)},n.avatarUrl=function(){return pe.attribute("avatarUrl").call(this)},n.preferences=function(){return pe.attribute("preferences").call(this)},n.groups=function(){return pe.hasMany("groups").call(this)},n.isAdmin=function(){return pe.attribute("isAdmin").call(this)},n.joinTime=function(){return pe.attribute("joinTime",pe.transformDate).call(this)},n.lastSeenAt=function(){return pe.attribute("lastSeenAt",pe.transformDate).call(this)},n.markedAllAsReadAt=function(){return pe.attribute("markedAllAsReadAt",pe.transformDate).call(this)},n.unreadNotificationCount=function(){return pe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return pe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return pe.attribute("discussionCount").call(this)},n.commentCount=function(){return pe.attribute("commentCount").call(this)},n.canEdit=function(){return pe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return pe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return pe.attribute("canEditGroups").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},n.color=function(){var t=this;return me("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+Ei(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new I,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(ze,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ai());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(null!=e?e:{},t),this.save({preferences:e})},e}(pe),Fi=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.number=function(){return pe.attribute("number").call(this)},n.discussion=function(){return pe.hasOne("discussion").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.contentType=function(){return pe.attribute("contentType").call(this)},n.content=function(){return pe.attribute("content").call(this)},n.contentHtml=function(){return pe.attribute("contentHtml").call(this)},n.renderFailed=function(){return pe.attribute("renderFailed").call(this)},n.contentPlain=function(){return me("contentHtml",(function(t){return"string"==typeof t?Q(t):t})).call(this)},n.editedAt=function(){return pe.attribute("editedAt",pe.transformDate).call(this)},n.editedUser=function(){return pe.hasOne("editedUser").call(this)},n.isEdited=function(){return me("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return pe.attribute("hiddenAt",pe.transformDate).call(this)},n.hiddenUser=function(){return pe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return me("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return pe.attribute("canEdit").call(this)},n.canHide=function(){return pe.attribute("canHide").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},e}(pe),ki=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.contentType=function(){return pe.attribute("contentType").call(this)},n.content=function(){return pe.attribute("content").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.isRead=function(){return pe.attribute("isRead").call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.fromUser=function(){return pe.hasOne("fromUser").call(this)},n.subject=function(){return pe.hasOne("subject").call(this)},e}(pe),Si=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof Pt)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Ti=function(){function t(){this.activeAlerts={},this.alertId=0}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var r,i=_t,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function _i(t,e,n){var r;console.group("%c"+e,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=v.session)&&null!=(r=r.user)&&r.isAdmin()&&v.alerts.show({type:"error"},""+t)}var Pi=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.token=function(){return pe.attribute("token").call(this)},n.userId=function(){return pe.attribute("userId").call(this)},n.title=function(){return pe.attribute("title").call(this)},n.type=function(){return pe.attribute("type").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.lastActivityAt=function(){return pe.attribute("lastActivityAt",pe.transformDate).call(this)},n.lastIpAddress=function(){return pe.attribute("lastIpAddress").call(this)},n.device=function(){return pe.attribute("device").call(this)},n.isCurrent=function(){return pe.attribute("isCurrent").call(this)},n.isSessionToken=function(){return pe.attribute("isSessionToken").call(this)},e}(pe),Bi=["background","deserialize","extract","modifyText"];function Ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Oi=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new I,this.session=void 0,this.translator=new di,this.store=new fi({"access-tokens":Pi,forums:xi,users:Ni,discussions:we,posts:Fi,groups:Ve,notifications:ki}),this.cache={},this.booted=!1,this.current=new N(null),this.previous=new N(null),this.modal=new Si,this.alerts=new Ti,this.drawer=void 0,this.history=null,this.pane=null,this.data=void 0,this.refs={fontawesome:"https://fontawesome.com/v5/search?o=r&m=free"},this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return _i(st(v.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),r+" failed to initialize",e)}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new pi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ii(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ii(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return m(Nr,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Fr,{state:e.alerts})}}),this.drawer=new mi,m.route(document.getElementById("content"),t+"/",vi(this.routes,t));var n=document.getElementById("app"),r=document.querySelector(".App-header"),i=new Kt((function(t){var e=n.getBoundingClientRect().top+document.body.scrollTop;n.classList.toggle("affix",t>=e),n.classList.toggle("scrolled",t>e),r.classList.toggle("navbar-fixed-top",t>=e)}));i.start(),i.update(),document.body.classList.add("ontouchstart"in window?"touch":"no-touch"),bi()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(hi(this.data.apiDocument),this.store.pushPayload(this.data.apiDocument));return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=m.route.get()===this.forum.attribute("basePath")+"/",n={pageTitle:this.title,forumName:this.forum.attribute("title"),pageNumber:1},r=e||!this.title?st(v.translator.trans("core.lib.meta_titles.without_page_title",n)):st(v.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=w({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=z(n,Bi),u=s||o,l=w({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(wi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;wi(l,"config",(function(t,e){e.setRequestHeader("X-HTTP-Method-Override",c)})),l.method="POST"}return l.extract=function(t){var e;e=u?u(t.responseText):t.responseText;var n=t.status;if(n<200||n>299)throw new gi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(v.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new gi(500,""+e,l,t)}},l},e.request=function(t){var e=this,n=this.transformRequestOptions(t);return this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).catch((function(n){return e.requestErrorCatch(n,t.errorHandler)}))},e.requestErrorCatch=function(t,e){var n,r,i,o=null!=(n=null==(r=t.response)||null==(r=r.errors)?void 0:r.map((function(t){var e;return decodeURI(null!=(e=t.detail)?e:"")})))?n:[];switch(t.status){case 422:i=o.map((function(t){return[t,m("br",null)]})).flat().slice(0,-1);break;case 401:case 403:i=v.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=v.translator.trans("core.lib.error.not_found_message");break;case 413:i=v.translator.trans("core.lib.error.payload_too_large_message");break;case 429:i=v.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=this.requestWasCrossOrigin(t)?v.translator.trans("core.lib.error.generic_cross_origin_message"):v.translator.trans("core.lib.error.generic_message")}var s=v.forum.attribute("debug");return t.alert={type:"error",content:i,controls:s&&[m(bt,{className:"Button Button--link",onclick:this.showDebug.bind(this,t,o)},v.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,s,o),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof gi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(t),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(kr,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+V(e,n)}));for(var i in e)e.hasOwnProperty(i)&&!e[i]&&delete e[i];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},_(t,[{key:"title",get:function(){return this._title},set:function(t){this._title=t}},{key:"titleCount",get:function(){return this._titleCount},set:function(t){this._titleCount=t}}])}(),Li=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=v.history,e=v.pane;return m("div",{className:j("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=v.history,e=null==t?void 0:t.getPrevious();return m(ce,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=v.pane;return t&&t.active?m(bt,{className:j("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=v.drawer,e=v.session.user;return m(bt,{className:j("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":v.translator.trans("core.lib.nav.drawer_button")})},e}(A),Mi=function(t){function e(){return t.call(this,{},1,20)||this}b(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=zi.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=zi.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=zi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),zi.request({url:zi.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=zi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],zi.request({url:zi.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},_(e,[{key:"type",get:function(){return"notifications"}}])}(fn),$i=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=void 0,this.value="",this.cachedSearches=new Set(t)}var e=t.prototype;return e.getInitialSearch=function(){return""},e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.add(t)},e.isCached=function(t){return this.cachedSearches.has(t)},t}(),ji=["q"],Ri=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}b(e,t);var n=e.prototype;return n.getValue=function(){return!this.initialValueSet&&this.currPageProvidesSearch()&&this.intializeValue(),t.prototype.getValue.call(this)},n.intializeValue=function(){this.setValue(this.getInitialSearch()),this.initialValueSet=!0},n.currPageProvidesSearch=function(){return zi.current.type&&zi.current.type.providesInitialSearch},n.getInitialSearch=function(){return this.currPageProvidesSearch()?this.params().q:""},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.clearInitialSearch=function(){var t=this.params(),e=(t.q,z(t,ji));D(zi.route(zi.current.get("routeName"),e))},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(zi.discussions.sortMap())[0]?delete e.sort:e.sort=t,D(zi.route(zi.current.get("routeName"),e))},e}($i);function Hi(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var Ui=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:je},e.postComponents={comment:on,discussionRenamed:an},e.pane=null,e.history=new x,e.notifications=new Mi,e.search=new Ri,e.composer=new Le,e.discussions=new gn({}),e.route=void 0,e.data=void 0,On(e),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(e)).route.bind(e),function(t){return{discussion:function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})},post:function(e){return t.route.discussion(e.discussion(),e.number())},user:function(e){return t.route("user",{username:e.slug()})}}}(e)),e}b(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),r="index";for(var i in this.routes)this.routes[i].path===n&&(r=i);this.routes[r].path="/",this.history.push(r,st(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new C(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m(Li,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),Li),m.mount(document.getElementById("header-primary"),le),m.mount(document.getElementById("header-secondary"),Be),m.mount(document.getElementById("composer"),{view:function(){return m(Me,{state:e.composer})}}),Ln(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),zi.history.home();var n=null==(e=zi.session.user)?void 0:e.id();n&&(zi.store.find("users",n),m.redraw())}})),Hi()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ue,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Mt,t)},e}(Oi),qi=new Ui;window.app=qi;const zi=qi;function Vi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Wi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?pe.attribute(t,e):pe.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=pe.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=pe.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Gi=function(){function t(){this.postComponents={}}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object.assign(t.postComponents,this.postComponents)},t}(),Yi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Ki=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this},e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Xi={Model:Wi,PostTypes:Gi,Routes:Yi,Store:Ki};var Ji="The `evented` util is deprecated and no longer supported.",Qi="2547";const Zi={handlers:null,getHandlers:function(t){return gt(Ji,Qi),this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];gt(Ji,Qi),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){gt(Ji,Qi),this.getHandlers(t).push(e)},one:function(t,e){gt(Ji,Qi);var n=function(){e.apply(this,arguments),this.off(t,n)};this.getHandlers(t).push(n)},off:function(t,e){gt(Ji,Qi);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var to={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function eo(t){return t.trim().split("\n").length>1}function no(t,e){return Array(e+1).join(t)}function ro(t){var e,n,r=t.value.slice(0,t.selectionStart),i=t.value.slice(t.selectionEnd),o=r.match(/\n*$/),s=i.match(/^\n*/),a=o?o[0].length:0,u=s?s[0].length:0;return r.match(/\S/)&&a<2&&(e=no("\n",2-a)),i.match(/\S/)&&u<2&&(n=no("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function io(t){var e=t.split("\n"),n=/^\d+\.\s+/,r=e.every((function(t){return n.test(t)})),i=e;return r&&(i=e.map((function(t){return t.replace(n,"")}))),{text:i.join("\n"),processed:r}}function oo(t){var e=t.split("\n"),n=e.every((function(t){return t.startsWith("- ")})),r=e;return n&&(r=e.map((function(t){return t.slice(2,t.length)}))),{text:r.join("\n"),processed:n}}function so(t,e){return e?"- ":t+1+". "}var ao,uo=n(5605);function lo(t,e){var n,r,i=new RegExp(String.raw(ao||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,ao=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var co=["className","class"],ho=["options","onchange","value","disabled","className","class","wrapperAttrs"],fo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,r=t.value,i=t.disabled,o=t.className,s=t.class,a=t.wrapperAttrs,u=void 0===a?{}:a,l=u.className,c=u.class,d=z(u,co),h=z(t,ho);return m("span",Object.assign({className:j("Select",l,c)},d),m("select",Object.assign({className:j("Select-input FormControl",o,s),onchange:n?bn("value",n.bind(this)):void 0,value:r,disabled:i},h),Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),rt("fas fa-sort",{className:"Select-caret"}))},e}(A),po=["className","id"],mo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=z(e,po);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:j("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},rt("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(A),vo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Nt,{text:this.attrs.tooltipText||st(e.children)},n)},e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link",e.tooltipText=e.title},e}(bt);const go={extenders:Xi,extend:o,Session:pi,Store:fi,"utils/BasicEditorDriver":At,"utils/bidi":h,"utils/evented":Zi,"utils/EventEmitter":pn,"utils/KeyboardNavigatable":Ae,"utils/liveHumanTimes":bi,"utils/ItemList":I,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e}(t),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(t){Object.assign(e.prototype,t)})),e},"utils/humanTime":at,"utils/computed":me,"utils/insertText":Ct,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},to,e);var n,r=t.value.slice(t.selectionStart,t.selectionEnd);n=e.orderedList||e.unorderedList?function(t,e){var n=t.selectionStart===t.selectionEnd,r=t.selectionStart,i=t.selectionEnd;!function(t){for(var e=t.value.split("\n"),n=0,r=0;r<e.length;r++){var i=e[r].length+1;t.selectionStart>=n&&t.selectionStart<n+i&&(t.selectionStart=n),t.selectionEnd>=n&&t.selectionEnd<n+i&&(t.selectionEnd=n+i-1),n+=i}}(t);var o=t.value.slice(t.selectionStart,t.selectionEnd),s=function(t,e){var n,r,i;return i=t.orderedList?(n=oo((r=io(e)).text)).text:(n=io((r=oo(e)).text)).text,[r,n,i]}(e,o),a=s[0],u=s[1],l=s[2],c=l.split("\n").map((function(t,n){return""+so(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+so(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+so(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-so(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=ro(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+so(0,e.unorderedList).length+p.length,0):u.processed?(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+d-h):(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+d),{text:v,selectionStart:r,selectionEnd:i}}(t,e):e.multiline&&eo(r)?function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.surroundWithNewlines,a=t.value.slice(t.selectionStart,t.selectionEnd),u=t.selectionStart,l=t.selectionEnd,c=a.split("\n"),d=i.length>0?i:n,h=o.length>0?o:d==n?r:"";if(c.every((function(t){return t.startsWith(d)&&t.endsWith(h)})))l=u+(a=c.map((function(t){return t.slice(d.length,t.length-h.length)})).join("\n")).length;else if(a=c.map((function(t){return d+t+h})).join("\n"),s||""===h){var f=ro(t),p=f.newlinesToAppend,m=f.newlinesToPrepend;l=(u+=p.length)+a.length,a=p+a+m}return{text:a,selectionStart:u,selectionEnd:l}}(t,e):function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.replaceNext,a=e.prefixSpace,u=e.scanFor,l=e.surroundWithNewlines,c=t.selectionStart,d=t.selectionEnd,h=t.value.slice(t.selectionStart,t.selectionEnd),f=eo(h)&&i.length>0?i+"\n":n,p=eo(h)&&o.length>0?"\n"+o:f===n?r:"";if(a){var m=t.value[t.selectionStart-1];0===t.selectionStart||null==m||m.match(/\s/)||(f=" "+f)}h=function(t,e,n,r){if(void 0===r&&(r=!1),t.selectionStart===t.selectionEnd)t.selectionStart=function(t,e){for(var n=e;t[n]&&null!=t[n-1]&&!t[n-1].match(/\s/);)n--;return n}(t.value,t.selectionStart),t.selectionEnd=function(t,e,n){for(var r=e,i=n?/\n/:/\s/;t[r]&&!t[r].match(i);)r++;return r}(t.value,t.selectionEnd,r);else{var i=t.selectionStart-e.length,o=t.selectionEnd+n.length,s=t.value.slice(i,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,o)===n;s&&a&&(t.selectionStart=i,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,f,p,e.multiline);var v=t.selectionStart,g=t.selectionEnd,y=s.length>0&&p.indexOf(s)>-1&&h.length>0;if(l){var b=ro(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),Ct(t,n)},"utils/Drawer":mi,"utils/EditorDriverInterface":uo,"utils/anchorScroll":se,"utils/RequestError":gi,"utils/abbreviateNumber":ut,"utils/string":t,"utils/SubtreeRetainer":ht,"utils/escapeRegExp":qt,"utils/extract":V,"utils/ScrollListener":Kt,"utils/stringToColor":Ei,"utils/Stream":It,"utils/subclassOf":E,"utils/setRouteWithForcedRefresh":D,"utils/patchMithril":f,"utils/proxifyCompat":lo,"utils/classList":j,"utils/extractText":st,"utils/formatNumber":ee,"utils/mapRoutes":vi,"utils/withAttr":bn,"utils/throttleDebounce":s,"utils/isObject":P,"utils/focusTrap":i,"utils/isDark":ve,"models/AccessToken":Pi,"models/Notification":ki,"models/User":Ni,"models/Post":Fi,"models/Discussion":we,"models/Group":Ve,"models/Forum":xi,Component:A,Fragment:function(){function t(){this.element=void 0}var e=t.prototype;return e.$=function(t){var e=$(this.element);return t?e.find(t):e},e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),Translator:di,"components/AlertManager":Fr,"components/Page":F,"components/Switch":Dn,"components/Badge":be,"components/LoadingIndicator":pt,"components/Placeholder":Vt,"components/Separator":L,"components/Dropdown":lt,"components/SplitDropdown":re,"components/RequestErrorModal":kr,"components/FieldSet":xn,"components/Select":fo,"components/Navigation":Li,"components/Alert":_t,"components/Link":G,"components/LinkButton":ce,"components/Checkbox":wn,"components/ColorPreviewInput":mo,"components/ConfirmDocumentUnload":mt,"components/SelectDropdown":fe,"components/ModalManager":Nr,"components/Button":bt,"components/Modal":Pt,"components/GroupBadge":ze,"components/TextEditor":Ft,"components/TextEditorButton":vo,"components/Tooltip":Nt,"components/EditUserModal":We,"components/LabelValue":Tn,"components/IPAddress":en,Model:pe,Application:Oi,"helpers/fullTime":tn,"helpers/avatar":Y,"helpers/fireApplicationError":_i,"helpers/fireDebugWarning":e,"helpers/icon":rt,"helpers/humanTime":ct,"helpers/punctuateSeries":function(t){if(2===t.length)return v.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,v.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return v.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":nt,"helpers/username":Jt,"helpers/userOnline":Qe,"helpers/listItems":U,"helpers/textContrastClass":ge,"resolvers/DefaultResolver":kn,"states/PaginatedListState":fn,"states/AlertManagerState":Ti,"states/ModalManagerState":Si,"states/PageState":N};var yo=function(t){function e(){return t.apply(this,arguments)||this}return b(e,t),e.initAttrs=function(e){e.className=j(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(zi.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(bt),bo=function(t){function e(){return t.apply(this,arguments)||this}b(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return m(G,{className:"PostPreview",href:zi.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Y(e),Jt(e)," ",m("span",{className:"PostPreview-excerpt"},this.excerpt())))},n.content=function(){return"comment"===this.attrs.post.contentType()&&this.attrs.post.contentPlain()},n.excerpt=function(){return this.content()?nt(this.content(),this.attrs.highlight,300):""},e}(A);const wo=Object.assign(go,{"utils/PostControls":Ue,"utils/KeyboardNavigatable":Ae,"utils/slidable":Ht,"utils/History":x,"utils/DiscussionControls":Rt,"utils/alertEmailConfirmation":Ln,"utils/UserControls":Ke,"utils/Pane":C,"utils/BasicEditorDriver":At,"utils/isSafariMobile":Hi,"states/ComposerState":Le,"states/DiscussionListState":gn,"states/GlobalSearchState":Ri,"states/NotificationListState":Mi,"states/PostStreamState":ae,"states/SearchState":$i,"states/UserSecurityPageState":Bn,"components/AffixedSidebar":Ge,"components/DiscussionPage":ue,"components/DiscussionListPane":Yt,"components/LogInModal":$t,"components/NewAccessTokenModal":Pn,"components/ComposerBody":kt,"components/ForgotPasswordModal":Ot,"components/Notification":$e,"components/LogInButton":yo,"components/DiscussionsUserPage":yn,"components/Composer":Me,"components/SessionDropdown":de,"components/HeaderPrimary":le,"components/PostEdited":rn,"components/PostStream":te,"components/ChangePasswordModal":An,"components/IndexPage":dn,"components/DiscussionRenamedNotification":je,"components/DiscussionsSearchSource":Te,"components/DiscussionsSearchItem":Se,"components/HeaderSecondary":Be,"components/ComposerButton":Ie,"components/DiscussionList":Wt,"components/ReplyPlaceholder":Zt,"components/AvatarEditor":Xe,"components/Post":qe,"components/SettingsPage":Nn,"components/TerminalPost":dt,"components/ChangeEmailModal":En,"components/NotificationsDropdown":xe,"components/UserPage":Ye,"components/PostUser":Ze,"components/UserCard":Je,"components/UsersSearchSource":_e,"components/UserSecurityPage":In,"components/NotificationGrid":Cn,"components/PostPreview":bo,"components/EventPost":sn,"components/DiscussionHero":q,"components/PostMeta":nn,"components/DiscussionRenamedPost":an,"components/DiscussionComposer":cn,"components/LogInButtons":Lt,"components/NotificationList":De,"components/WelcomeHero":ln,"components/SignUpModal":Mt,"components/CommentPost":on,"components/ComposerPostPreview":Qt,"components/ReplyComposer":Tt,"components/NotificationsPage":Fn,"components/PostStreamScrubber":ne,"components/EditPostComposer":He,"components/RenameDiscussionModal":jt,"components/Search":Pe,"components/DiscussionListItem":zt,"components/LoadingPost":Xt,"components/PostsUserPage":hn,"components/AccessTokensList":_n,"resolvers/DiscussionPageResolver":Sn,routes:On,ForumApplication:Ui});wo.app=zi;var Do=lo(wo,"forum")})(),flarum.core=r})();
|
||
|
||
|
||
(function(){const HINT={};HINT.EMOTICONS_NOT_AFTER=0;HINT.LITEDOWN_DECODE_HTML_ENTITIES=0;HINT.PREG_HAS_PASSTHROUGH=!1;HINT.RULE_AUTO_CLOSE=1;HINT.RULE_AUTO_REOPEN=1;HINT.RULE_BREAK_PARAGRAPH=1;HINT.RULE_CREATE_PARAGRAPHS=1;HINT.RULE_DISABLE_AUTO_BR=1;HINT.RULE_ENABLE_AUTO_BR=1;HINT.RULE_IGNORE_TAGS=1;HINT.RULE_IGNORE_TEXT=1;HINT.RULE_IGNORE_WHITESPACE=1;HINT.RULE_IS_TRANSPARENT=1;HINT.RULE_PREVENT_BR=1;HINT.RULE_SUSPEND_AUTO_BR=1;HINT.RULE_TRIM_FIRST_LINE=1;HINT.attributeDefaultValue=0;HINT.closeAncestor=0;HINT.closeParent=1;HINT.createChild=1;HINT.fosterParent=1;HINT.hash=1;HINT.ignoreAttrs=1;HINT.namespaces=0;HINT.onRender=1;HINT.onUpdate=1;HINT.regexp=1;HINT.regexpLimit=1;HINT.requireAncestor=0;const o553403F9=[0];const oF6AF222C=[32623];const oE98D0814=[32583];const oA385316A=[16705];const oBB818D5A=[23885];const oB565876D={flags:2};const o939F1698={flags:514};const oA80287CC={flags:3089};const o02D8DBB5={filterChain:[],required:!0};const o1BC3EAF4={filterChain:[],required:!1};const oD4869BFF={"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1};const oDF43256F=[function(attrValue,attrName){return NumericFilter.filterUint(attrValue)}];const o118B31AC=function(tag,tagConfig){return filterAttributes(tag,tagConfig,registeredVars,logger)};const o1B4F5B52=[o118B31AC];const o6CB0A318={filterChain:oDF43256F,required:!0};const o75AB9259={filterChain:oDF43256F,required:!1};const oF307D35C={filterChain:[function(attrValue,attrName){return UrlFilter.filter(attrValue,registeredVars.urlConfig,logger)}],required:!0};const o1AF69066={closeParent:oD4869BFF,flags:268,fosterParent:oD4869BFF};const oB84A1289={allowed:oE98D0814,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000};const o6C76824E={allowed:oE98D0814,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:0},tagLimit:5000};const o28E55ACF={allowed:oE98D0814,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:260,fosterParent:oD4869BFF},tagLimit:5000};const xsl=("<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"><xsl:output method=\"html\" encoding=\"utf-8\" indent=\"no\"\/><xsl:decimal-format decimal-separator=\".\"\/><$t$jDISCUSSION_URL\">https:\/\/expatbase.net\/d\/<\/$t><$t$jL_WROTE\"\/><$t$jPROFILE_URL\">https:\/\/expatbase.net\/u\/<\/$t><$t$jTAG_URL\">https:\/\/expatbase.net\/t\/<\/$t>$aB|DEL|EM|H1|H2|H3|H4|H5|H6|I|LI|S|STRONG|SUB|SUP|U|p\"><xsl:element$j{translate(name(),'BDEGHILMNOPRSTU','bdeghilmnoprstu')}\">$b<\/xsl:element>$c$aC\"><code>$b<\/code>$c$aCENTER\"><div$otext-align:center\">$b<\/div>$c$aCODE\"><pre data-s9e-livepreview-hash=\"\" data-s9e-livepreview-onupdate=\"if(window['hljsLoader'])window['hljsLoader']['highlightBlocks'](this)\"><code><$p$e@lang\"><$g$j$q>language-$d@lang\"\/><\/$g><\/$p>$b<\/code><script async=\"\" crossorigin=\"anonymous\" data-hljs-style=\"github\" data-s9e-livepreview-onrender=\"if(window['hljsLoader'])this.parentNode.removeChild(this)\" integrity=\"sha384-E9ssooeJ4kPel3JD7st0BgS50OLWFEdg4ZOp8lYPy52ctQazOIV37TCvzV8l4cYG\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/s9e\/hljs-loader@1.0.34\/loader.min.js\"\/><script>\n if(window.hljsLoader && !document.currentScript.parentNode.hasAttribute('data-s9e-livepreview-onupdate')) {\n window.hljsLoader.highlightBlocks(document.currentScript.parentNode);\n }\n <\/script><\/pre>$c$aCOLOR\"><$v$ocolor:{@color}\">$b<\/$v>$c$aE\"><$k><$f$e.=':)'\">\ud83d\ude42<\/$f><$f$e.=':D'\">\ud83d\ude03<\/$f><$f$e.=':P'\">\ud83d\ude1b<\/$f><$f$e.=':('\">\ud83d\ude41<\/$f><$f$e.=':|'\">\ud83d\ude10<\/$f><$f$e.=';)'\">\ud83d\ude09<\/$f><$f$e.=":'("\">\ud83d\ude22<\/$f><$f$e.=':O'\">\ud83d\ude2e<\/$f><$f$e.='>:('\">\ud83d\ude21<\/$f><$h>$d.\"\/><\/$h><\/$k>$c$aEMAIL\"><a$umailto:{@email}\">$b<\/a>$c$aESC\">$b$c$aGROUPMENTION\"><$v><$k><$f$e$w!=1\"><$k><$f$estring(@color)!=''\"><$g$j$q>GroupMention GroupMention--colored<\/$g><$g$jstyle\">--color:$d@color\"\/>;<\/$g><\/$f><$h><$g$j$q>GroupMention<\/$g><\/$h><\/$k><\/$f><$h><$g$j$q>GroupMention GroupMention--deleted<\/$g><\/$h><\/$k><$v$iGroupMention-name\">@$d@groupname\"\/><\/$v><$p$estring(@icon)!=''\"><i$iicon"+" {@icon}\"\/><\/$p><\/$v>$c$aHR\"><hr\/>$c$aIMG\"><img src=\"{@src}\" title=\"{@title}\" alt=\"{@alt}\">$lheight|@width\"\/><\/img>$c$aISPOILER\"><$v$ispoiler\"$m$q onclick=\"removeAttribute('class')\">$b<\/$v>$c$aLIST\"><$k><$f$enot(@type)\"><ul>$b<\/ul><\/$f><$f$estarts-with(@type,'decimal')or starts-with(@type,'lower')or starts-with(@type,'upper')\"><ol$o$s>$lstart\"\/>$b<\/ol><\/$f><$h><ul$o$s>$b<\/ul><\/$h><\/$k>$c$aPOSTMENTION\"><$k><$f$e$w!=1\"><a$u{$DISCUSSION_URL}{@discussionid}\/{@number}\"$iPostMention\"$r{@id}\">$d$n\"\/><\/a><\/$f><$h><$v$iPostMention PostMention--deleted\"$r{@id}\">$d$n\"\/><\/$v><\/$h><\/$k>$c$aQUOTE\"><blockquote><$p$enot(@author)\"><$g$j$q>uncited<\/$g><\/$p><div><$p$e@author\"><cite>$d@author\"\/><xsl:text> <\/xsl:text>$d$L_WROTE\"\/><\/cite><\/$p>$b<\/div><\/blockquote>$c$aSIZE\"><$v$ofont-size:{@size}px\">$b<\/$v>$c$aSPOILER\"><details$ispoiler\"$mopen\">$b<\/details>$c$aTAGMENTION\"><$k><$f$e$w!=1\"><a$u{$TAG_URL}{@slug}\"$r{@id}\"><$g$j$q>TagMention<$p$e@color!=''\"> TagMention--colored<\/$p><\/$g><$g$jstyle\"><$p$e@color!=''\">--color:$d@color\"\/><\/$p><\/$g><$v$iTagMention-text\"><$p$e@icon!=''\"><i$iicon {@icon}\"\/><\/$p>$d@tagname\"\/><\/$v><\/a><\/$f><$h><$v$iTagMention TagMention--deleted\"$r{@id}\"><$v$iTagMention-text\">$d@tagname\"\/><\/$v><\/$v><\/$h><\/$k>$c$aURL\"><a$u{@url}\">$lrel|@target|@title\"\/>$b<\/a>$c$aUSERMENTION\"><$k><$f$e$w!=1\"><a$u{$PROFILE_URL}{@slug}\"$iUserMention\">@$d$n\"\/><\/a><\/$f><$h><$v$iUserMention UserMention--deleted\">@$d$n\"\/><\/$v><\/$h><\/$k>$c$abr\"><br\/>$c$ae|i|s\"\/><\/xsl:stylesheet>").replace(/\$[a-w]/g,function(k){return{"$a":"<xsl:template match=\"","$b":"<xsl:apply-templates\/>","$c":"<\/xsl:template>","$d":"<xsl:value-of select=\"","$e":" test=\"","$f":"xsl:when","$g":"xsl:attribute","$h":"xsl:otherwise","$i":" class=\"","$j":" name=\"","$k":"xsl:choose","$l":"<xsl:copy-of select=\"@","$m":" data-s9e-livepreview-ignore-attrs=\"","$n":"@displayname","$o":" style=\"","$p":"xsl:if","$q":"class\"","$r":" data-id=\"","$s":"list-style-type:{@type}\"","$t":"xsl:param","$u":" href=\"","$v":"span","$w":"@deleted"}[k]});let functionCache={"1788024165":function(){if(window.hljsLoader)this.parentNode.removeChild(this);},"1983388049":function(){if(window.hljsLoader)window.hljsLoader.highlightBlocks(this);}};const EmailFilter={filter:function(attrValue){return/^[-\w.+]+@[-\w.]+$/.test(attrValue)?attrValue:!1}};const FalseFilter={filter:function(attrValue){return!1}};const HashmapFilter={filter:function(attrValue,map,strict){if(attrValue in map){return map[attrValue]}
|
||
return(strict)?!1:attrValue}};const MapFilter={filter:function(attrValue,map){let i=-1,cnt=map.length;while(++i<cnt){if(map[i][0].test(attrValue)){return map[i][1]}}
|
||
return attrValue}};const NetworkFilter={filterIp:function(attrValue){if(/^[\d.]+$/.test(attrValue)){return NetworkFilter.filterIpv4(attrValue)}
|
||
if(/^[\da-f:]+$/i.test(attrValue)){return NetworkFilter.filterIpv6(attrValue)}
|
||
return!1},filterIpport:function(attrValue){let m,ip;if(m=/^\[([\da-f:]+)(\]:[1-9]\d*)$/i.exec(attrValue)){ip=NetworkFilter.filterIpv6(m[1]);if(ip===!1){return!1}
|
||
return'['+ip+m[2]}
|
||
if(m=/^([\d.]+)(:[1-9]\d*)$/.exec(attrValue)){ip=NetworkFilter.filterIpv4(m[1]);if(ip===!1){return!1}
|
||
return ip+m[2]}
|
||
return!1},filterIpv4:function(attrValue){if(!/^\d+\.\d+\.\d+\.\d+$/.test(attrValue)){return!1}
|
||
let i=4,p=attrValue.split('.');while(--i>=0){if(p[i][0]==='0'||p[i]>255){return!1}}
|
||
return attrValue},filterIpv6:function(attrValue){return/^([\da-f]{0,4}:){2,7}(?:[\da-f]{0,4}|\d+\.\d+\.\d+\.\d+)$/.test(attrValue)?attrValue:!1}};const NumericFilter={filterFloat:function(attrValue){return/^(?:0|-?[1-9]\d*)(?:\.\d+)?(?:e[1-9]\d*)?$/i.test(attrValue)?attrValue:!1},filterInt:function(attrValue){return/^(?:0|-?[1-9]\d*)$/.test(attrValue)?attrValue:!1},filterRange:function(attrValue,min,max,logger){if(!/^(?:0|-?[1-9]\d*)$/.test(attrValue)){return!1}
|
||
attrValue=parseInt(attrValue,10);if(attrValue<min){if(logger){logger.warn('Value outside of range, adjusted up to min value',{'attrValue':attrValue,'min':min,'max':max})}
|
||
return min}
|
||
if(attrValue>max){if(logger){logger.warn('Value outside of range, adjusted down to max value',{'attrValue':attrValue,'min':min,'max':max})}
|
||
return max}
|
||
return attrValue},filterUint:function(attrValue){return/^(?:0|[1-9]\d*)$/.test(attrValue)?attrValue:!1}};const RegexpFilter={filter:function(attrValue,regexp){return regexp.test(attrValue)?attrValue:!1}};const TimestampFilter={filter:function(attrValue){let m=/^(?=\d)(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(attrValue);if(m){return 3600*(m[1]||0)+60*(m[2]||0)+(+m[3]||0)}
|
||
return NumericFilter.filterUint(attrValue)}};const UrlFilter={filter:function(attrValue,urlConfig,logger){let p=UrlFilter.parseUrl(attrValue.replace(/^\s+/,'').replace(/\s+$/,''));let error=UrlFilter.validateUrl(urlConfig,p);if(error){if(logger){p.attrValue=attrValue;logger.err(error,p)}
|
||
return!1}
|
||
return UrlFilter.rebuildUrl(urlConfig,p)},parseUrl:function(url){let regexp=/^(?:([a-z][-+.\w]*):)?(?:\/\/(?:([^:\/?#]*)(?::([^\/?#]*)?)?@)?(?:(\[[a-f\d:]+\]|[^:\/?#]+)(?::(\d*))?)?(?![^\/?#]))?([^?#]*)(\?[^#]*)?(#.*)?$/i;let m=regexp.exec(url),parts={},tokens=['scheme','user','pass','host','port','path','query','fragment'];tokens.forEach(function(name,i){parts[name]=(m[i+1]>'')?m[i+1]:''});parts.scheme=parts.scheme.toLowerCase();parts.host=parts.host.replace(/[\u3002\uff0e\uff61]/g,'.').replace(/\.+$/g,'');if(/[^\x00-\x7F]/.test(parts.host)&&typeof punycode!=='undefined'){parts.host=punycode.toASCII(parts.host)}
|
||
return parts},rebuildUrl:function(urlConfig,p){let url='';if(p.scheme!==''){url+=p.scheme+':'}
|
||
if(p.host!==''){url+='//';if(p.user!==''){url+=rawurlencode(decodeURIComponent(p.user));if(p.pass!==''){url+=':'+rawurlencode(decodeURIComponent(p.pass))}
|
||
url+='@'}
|
||
url+=p.host;if(p.port!==''){url+=':'+p.port}}else if(p.scheme==='file'){url+='//'}
|
||
let path=p.path+p.query+p.fragment;path=path.replace(/%.?[a-f]/g,function(str){return str.toUpperCase()},path);url+=UrlFilter.sanitizeUrl(path);if(!p.scheme){url=url.replace(/^([^\/]*):/,'$1%3A')}
|
||
return url},sanitizeUrl:function(url){return url.replace(/[^\u0020-\u007E]+/g,encodeURIComponent).replace(/%(?![0-9A-Fa-f]{2})|[^!#-&*-;=?-Z_a-z~]/g,function(m){return'%'+m[0].charCodeAt(0).toString(16).toUpperCase()})},validateUrl:function(urlConfig,p){if(p.scheme!==''&&!urlConfig.allowedSchemes.test(p.scheme)){return'URL scheme is not allowed'}
|
||
if(p.host!==''){let regexp=/^(?!-)[-a-z0-9]{0,62}[a-z0-9](?:\.(?!-)[-a-z0-9]{0,62}[a-z0-9])*$/i;if(!regexp.test(p.host)){if(!NetworkFilter.filterIpv4(p.host)&&!NetworkFilter.filterIpv6(p.host.replace(/^\[(.*)\]$/,'$1',p.host))){return'URL host is invalid'}}
|
||
if((urlConfig.disallowedHosts&&urlConfig.disallowedHosts.test(p.host))||(urlConfig.restrictedHosts&&!urlConfig.restrictedHosts.test(p.host))){return'URL host is not allowed'}}else if(/^(?:(?:f|ht)tps?)$/.test(p.scheme)){return'Missing host'}}};function html_entity_decode(str){let b=document.createElement('b');html_entity_decode=function(str){b.innerHTML=str.replace(/</g,'<');return b.textContent};return html_entity_decode(str)}
|
||
function htmlspecialchars_compat(str){return str.replace(/[<>&"]/g,(c)=>{const t={'<':'<','>':'>','&':'&','"':'"'};return t[c]})}
|
||
function htmlspecialchars_noquotes(str){return str.replace(/[<>&]/g,(c)=>{const t={'<':'<','>':'>','&':'&'};return t[c]})}
|
||
function rawurlencode(str){return encodeURIComponent(str).replace(/[!'()*]/g,(c)=>{return'%'+c.charCodeAt(0).toString(16).toUpperCase()})}
|
||
function returnFalse(){return!1}
|
||
function returnTrue(){return!0}
|
||
function executeAttributePreprocessors(tag,tagConfig){if(typeof tagConfig.attributePreprocessors==='undefined'){return}
|
||
tagConfig.attributePreprocessors.forEach((ap)=>{let attrName=ap[0],regexp=ap[1],map=ap[2];if(tag.hasAttribute(attrName)){executeAttributePreprocessor(tag,attrName,regexp,map)}})}
|
||
function filterAttributes(tag,tagConfig,registeredVars,logger){let attributes={},attrName;for(attrName in tagConfig.attributes){let attrConfig=tagConfig.attributes[attrName],attrValue=!1;if(tag.hasAttribute(attrName)){attrValue=executeAttributeFilterChain(attrConfig.filterChain,attrName,tag.getAttribute(attrName))}
|
||
if(attrValue!==!1){attributes[attrName]=attrValue}else if(HINT.attributeDefaultValue&&typeof attrConfig.defaultValue!=='undefined'){attributes[attrName]=attrConfig.defaultValue}else if(attrConfig.required){tag.invalidate()}}
|
||
tag.setAttributes(attributes)}
|
||
function filterTag(tag){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];logger.setTag(tag);for(let i=0;i<tagConfig.filterChain.length;++i){if(tag.isInvalid()){break}
|
||
tagConfig.filterChain[i](tag,tagConfig)}
|
||
logger.unsetTag()}
|
||
function executeAttributeFilterChain(filterChain,attrName,attrValue){logger.setAttribute(attrName);for(let i=0;i<filterChain.length;++i){attrValue=filterChain[i](attrValue,attrName);if(attrValue===!1){break}}
|
||
logger.unsetAttribute();return attrValue}
|
||
function executeAttributePreprocessor(tag,attrName,regexp,map){let attrValue=tag.getAttribute(attrName),captures=getNamedCaptures(attrValue,regexp,map),k;for(k in captures){if(k===attrName||!tag.hasAttribute(k)){tag.setAttribute(k,captures[k])}}}
|
||
function getNamedCaptures(attrValue,regexp,map){let m=regexp.exec(attrValue);if(!m){return[]}
|
||
let values={};map.forEach((k,i)=>{if(typeof m[i]==='string'&&m[i]!==''){values[k]=m[i]}});return values}
|
||
function Logger(){}Logger.prototype={add:function(type,msg,context){},clear:function(){},setAttribute:function(attrName){},setTag:function(tag){},unsetAttribute:function(){},unsetTag:function(){},debug:function(msg,context){},err:function(msg,context){},info:function(msg,context){},warn:function(msg,context){}};function Tag(type,name,pos,len,priority){this.type=+type;this.name=name;this.pos=+pos;this.len=+len;this.sortPriority=+priority||0;this.attributes={};this.cascade=[];if(isNaN(type+pos+len)){this.invalidate()}}
|
||
Tag.START_TAG=1;Tag.END_TAG=2;Tag.SELF_CLOSING_TAG=3;Tag.prototype.attributes;Tag.prototype.cascade;Tag.prototype.endTag;Tag.prototype.invalid=!1;Tag.prototype.len;Tag.prototype.name;Tag.prototype.pos;Tag.prototype.sortPriority;Tag.prototype.startTag;Tag.prototype.type;Tag.prototype.addFlags=function(flags){this.flags|=flags};Tag.prototype.cascadeInvalidationTo=function(tag){this.cascade.push(tag);if(this.invalid){tag.invalidate()}};Tag.prototype.invalidate=function(){if(!this.invalid){this.invalid=!0;this.cascade.forEach(function(tag){tag.invalidate()})}};Tag.prototype.pairWith=function(tag){if(this.canBePaired(this,tag)){this.endTag=tag;tag.startTag=this;this.cascadeInvalidationTo(tag)}else if(this.canBePaired(tag,this)){this.startTag=tag;tag.endTag=this}};Tag.prototype.canBePaired=function(startTag,endTag){return startTag.name===endTag.name&&startTag.type===Tag.START_TAG&&endTag.type===Tag.END_TAG&&startTag.pos<=startTag.pos};Tag.prototype.removeFlags=function(flags){this.flags&=~flags};Tag.prototype.setFlags=function(flags){this.flags=flags};Tag.prototype.getAttributes=function(){let attributes={};for(let attrName in this.attributes){attributes[attrName]=this.attributes[attrName]}
|
||
return attributes};Tag.prototype.getEndTag=function(){return this.endTag};Tag.prototype.getFlags=function(){return this.flags};Tag.prototype.getLen=function(){return this.len};Tag.prototype.getName=function(){return this.name};Tag.prototype.getPos=function(){return this.pos};Tag.prototype.getSortPriority=function(){return this.sortPriority};Tag.prototype.getStartTag=function(){return this.startTag};Tag.prototype.getType=function(){return this.type};Tag.prototype.canClose=function(startTag){if(this.invalid||!this.canBePaired(startTag,this)||(this.startTag&&this.startTag!==startTag)||(startTag.endTag&&startTag.endTag!==this)){return!1}
|
||
return!0};Tag.prototype.isBrTag=function(){return(this.name==='br')};Tag.prototype.isEndTag=function(){return!!(this.type&Tag.END_TAG)};Tag.prototype.isIgnoreTag=function(){return(this.name==='i')};Tag.prototype.isInvalid=function(){return this.invalid};Tag.prototype.isParagraphBreak=function(){return(this.name==='pb')};Tag.prototype.isSelfClosingTag=function(){return(this.type===Tag.SELF_CLOSING_TAG)};Tag.prototype.isSystemTag=function(){return('br i pb v'.indexOf(this.name)>-1)};Tag.prototype.isStartTag=function(){return!!(this.type&Tag.START_TAG)};Tag.prototype.isVerbatim=function(){return(this.name==='v')};Tag.prototype.getAttribute=function(attrName){return this.attributes[attrName]};Tag.prototype.hasAttribute=function(attrName){return(attrName in this.attributes)};Tag.prototype.removeAttribute=function(attrName){delete this.attributes[attrName]};Tag.prototype.setAttribute=function(attrName,attrValue){this.attributes[attrName]=attrValue};Tag.prototype.setAttributes=function(attributes){this.attributes={};for(let attrName in attributes){this.attributes[attrName]=attributes[attrName]}};const RULE_AUTO_CLOSE=1<<0;const RULE_AUTO_REOPEN=1<<1;const RULE_BREAK_PARAGRAPH=1<<2;const RULE_CREATE_PARAGRAPHS=1<<3;const RULE_DISABLE_AUTO_BR=1<<4;const RULE_ENABLE_AUTO_BR=1<<5;const RULE_IGNORE_TAGS=1<<6;const RULE_IGNORE_TEXT=1<<7;const RULE_IGNORE_WHITESPACE=1<<8;const RULE_IS_TRANSPARENT=1<<9;const RULE_PREVENT_BR=1<<10;const RULE_SUSPEND_AUTO_BR=1<<11;const RULE_TRIM_FIRST_LINE=1<<12;const RULES_AUTO_LINEBREAKS=RULE_DISABLE_AUTO_BR|RULE_ENABLE_AUTO_BR|RULE_SUSPEND_AUTO_BR;const RULES_INHERITANCE=RULE_ENABLE_AUTO_BR;const WHITESPACE=" \n\t";let cntOpen;let cntTotal;let context;let currentFixingCost;let currentTag;let isRich;let logger=new Logger;let maxFixingCost=10000;let namespaces;let openTags;let output;const plugins={"Autoemail":{parser:function(text,matches){const config={attrName:"email",tagName:"EMAIL"};let tagName=config.tagName,attrName=config.attrName;matches.forEach((m)=>{let startTag=addStartTag(tagName,m[0][1],0);startTag.setAttribute(attrName,m[0][0]);let endTag=addEndTag(tagName,m[0][1]+m[0][0].length,0);startTag.pairWith(endTag)})},quickMatch:"@",regexp:/\b[-a-z0-9_+.]+@[-a-z0-9.]*[a-z0-9]/ig,regexpLimit:50000},"Autolink":{parser:function(text,matches){const config={attrName:"url",tagName:"URL"};matches.forEach((m)=>{linkifyUrl(m[0][1],trimUrl(m[0][0]))});function linkifyUrl(tagPos,url){let endPos=tagPos+url.length,endTag=addEndTag(config.tagName,endPos,0);if(url[3]==='.'){url='http://'+url}
|
||
let startTag=addStartTag(config.tagName,tagPos,0,1);startTag.setAttribute(config.attrName,url);startTag.pairWith(endTag);let contentTag=addVerbatim(tagPos,endPos-tagPos,1000);startTag.cascadeInvalidationTo(contentTag)}
|
||
function trimUrl(url){return url.replace(/(?:(?![-=+)\/_])[\s!-.:-@[-`{-~])+$/,'')}},quickMatch:":",regexp:/\bhttps?:(?:[^\s()\[\]\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65]|\([^\s()]*\)|\[\w*\])+/ig,regexpLimit:50000},"BBCodes":{parser:function(text,matches){const config={bbcodes:{"*":{tagName:"LI"},"B":[],"CENTER":[],"CODE":{defaultAttribute:"lang"},"COLOR":[],"DEL":[],"EMAIL":{contentAttributes:["email"]},"I":[],"IMG":{contentAttributes:["src"],defaultAttribute:"src"},"LIST":{defaultAttribute:"type"},"QUOTE":{defaultAttribute:"author"},"S":[],"SIZE":[],"U":[],"URL":{contentAttributes:["url"]}}};let attributes;let bbcodeConfig;let bbcodeName;let bbcodeSuffix;let pos;let startPos;let textLen=text.length;let uppercaseText='';matches.forEach((m)=>{bbcodeName=m[1][0].toUpperCase();if(!(bbcodeName in config.bbcodes)){return}
|
||
bbcodeConfig=config.bbcodes[bbcodeName];startPos=m[0][1];pos=startPos+m[0][0].length;try
|
||
{parseBBCode()}catch(e){}});function addBBCodeEndTag(){return addEndTag(getTagName(),startPos,pos-startPos)}
|
||
function addBBCodeSelfClosingTag(){let tag=addSelfClosingTag(getTagName(),startPos,pos-startPos);tag.setAttributes(attributes);return tag}
|
||
function addBBCodeStartTag(){let prio=(bbcodeSuffix!=='')?-10:0,tag=addStartTag(getTagName(),startPos,pos-startPos,prio);tag.setAttributes(attributes);return tag}
|
||
function captureEndTag(){if(!uppercaseText){uppercaseText=text.toUpperCase()}
|
||
let match='[/'+bbcodeName+bbcodeSuffix+']',endTagPos=uppercaseText.indexOf(match,pos);if(endTagPos<0){return null}
|
||
return addEndTag(getTagName(),endTagPos,match.length)}
|
||
function getTagName(){return bbcodeConfig.tagName||bbcodeName}
|
||
function parseAttributes(){let firstPos=pos,attrName;attributes={};while(pos<textLen){let c=text[pos];if(" \n\t".indexOf(c)>-1){++pos;continue}
|
||
if('/]'.indexOf(c)>-1){return}
|
||
let spn=/^[-\w]*/.exec(text.substring(pos,pos+100))[0].length;if(spn){attrName=text.substring(pos,pos+spn).toLowerCase();pos+=spn;if(pos>=textLen){throw ''}
|
||
if(text[pos]!=='='){continue}}else if(c==='='&&pos===firstPos){attrName=bbcodeConfig.defaultAttribute||bbcodeName.toLowerCase()}else{throw ''}
|
||
if(++pos>=textLen){throw ''}
|
||
attributes[attrName]=parseAttributeValue()}}
|
||
function parseAttributeValue(){if(text[pos]==='"'||text[pos]==="'"){return parseQuotedAttributeValue()}
|
||
let match=/(?:[^\s\]]|[ \t](?!\s*(?:[-\w]+=|\/?\])))*/.exec(text.substring(pos)),attrValue=match[0];pos+=attrValue.length;return attrValue}
|
||
function parseBBCode(){parseBBCodeSuffix();if(text[startPos+1]==='/'){if(text[pos]===']'&&bbcodeSuffix===''){++pos;addBBCodeEndTag()}
|
||
return}
|
||
parseAttributes();if(bbcodeConfig.predefinedAttributes){for(let attrName in bbcodeConfig.predefinedAttributes){if(!(attrName in attributes)){attributes[attrName]=bbcodeConfig.predefinedAttributes[attrName]}}}
|
||
if(text[pos]===']'){++pos}else{if(text.substring(pos,pos+2)==='/]'){pos+=2;addBBCodeSelfClosingTag()}
|
||
return}
|
||
let contentAttributes=[];if(bbcodeConfig.contentAttributes){bbcodeConfig.contentAttributes.forEach((attrName)=>{if(!(attrName in attributes)){contentAttributes.push(attrName)}})}
|
||
let requireEndTag=(bbcodeSuffix||bbcodeConfig.forceLookahead),endTag=(requireEndTag||contentAttributes.length)?captureEndTag():null;if(endTag){contentAttributes.forEach((attrName)=>{attributes[attrName]=text.substring(pos,endTag.getPos())})}else if(requireEndTag){return}
|
||
let tag=addBBCodeStartTag();if(endTag){tag.pairWith(endTag)}}
|
||
function parseBBCodeSuffix(){bbcodeSuffix='';if(text[pos]===':'){bbcodeSuffix=/^:\d*/.exec(text.substring(pos))[0];pos+=bbcodeSuffix.length}}
|
||
function parseQuotedAttributeValue(){let quote=text[pos],valuePos=pos+1,n;do{pos=text.indexOf(quote,pos+1);if(pos<0){throw ''}
|
||
n=1;while(text[pos-n]==='\\'){++n}}
|
||
while(n%2===0);let attrValue=text.substring(valuePos,pos);if(attrValue.indexOf('\\')>-1){attrValue=attrValue.replace(/\\([\\'"])/g,'$1')}
|
||
++pos;return attrValue}},quickMatch:"[",regexp:/\[\/?(\*|[-\w]+)(?=[\]\s=:\/])/g,regexpLimit:50000},"Emoticons":{parser:function(text,matches){const config={tagName:"E"};matches.forEach((m)=>{if(HINT.EMOTICONS_NOT_AFTER&&config.notAfter&&m[0][1]&&config.notAfter.test(text[m[0][1]-1])){return}
|
||
addSelfClosingTag(config.tagName,m[0][1],m[0][0].length)})},regexp:/(?::(?:[()DOP|]|'\()|;\)|>:\()/g,regexpLimit:50000},"Escaper":{parser:function(text,matches){const config={tagName:"ESC"};matches.forEach((m)=>{addTagPair(config.tagName,m[0][1],1,m[0][1]+m[0][0].length,0)})},quickMatch:"\\",regexp:/\\[-!#()*+.:<>@[\\\]^_`{|}~]/g,regexpLimit:50000},"Litedown":{parser:function(text,matches){const config={decodeHtmlEntities:!1};let decodeHtmlEntities=config.decodeHtmlEntities;let hasEscapedChars=!1;let hasReferences=!1;let linkReferences={};if(text.indexOf('\\')>=0){hasEscapedChars=!0;text=text.replace(/\\[!"'()*<>[\\\]^_`~]/g,function(str){return{'\\!':"\x1B0",'\\"':"\x1B1","\\'":"\x1B2",'\\(':"\x1B3",'\\)':"\x1B4",'\\*':"\x1B5",'\\<':"\x1B6",'\\>':"\x1B7",'\\[':"\x1B8",'\\\\':"\x1B9",'\\]':"\x1BA",'\\^':"\x1BB",'\\_':"\x1BC",'\\`':"\x1BD",'\\~':"\x1BE"}[str]})}
|
||
text+="\n\n\x17";function decode(str){if(HINT.LITEDOWN_DECODE_HTML_ENTITIES&&decodeHtmlEntities&&str.indexOf('&')>-1){str=html_entity_decode(str)}
|
||
str=str.replace(/\x1A/g,'');if(hasEscapedChars){str=str.replace(/\x1B./g,function(seq){return{"\x1B0":'!',"\x1B1":'"',"\x1B2":"'","\x1B3":'(',"\x1B4":')',"\x1B5":'*',"\x1B6":'<',"\x1B7":'>',"\x1B8":'[',"\x1B9":'\\',"\x1BA":']',"\x1BB":'^',"\x1BC":'_',"\x1BD":'`',"\x1BE":'~'}[seq]})}
|
||
return str}
|
||
function isAfterWhitespace(pos){return(pos>0&&isWhitespace(text.charAt(pos-1)))}
|
||
function isAlnum(chr){return(' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.indexOf(chr)>0)}
|
||
function isBeforeWhitespace(pos){return isWhitespace(text[pos+1])}
|
||
function isSurroundedByAlnum(pos,len){return(pos>0&&isAlnum(text[pos-1])&&isAlnum(text[pos+len]))}
|
||
function isWhitespace(chr){return(" \n\t".indexOf(chr)>-1)}
|
||
function markBoundary(pos){text=text.substring(0,pos)+"\x17"+text.substring(pos+1)}
|
||
function overwrite(pos,len){if(len>0){text=text.substring(0,pos)+new Array(1+len).join("\x1A")+text.substring(pos+len)}}
|
||
function parseInlineMarkup(str,regexp,tagName){if(text.indexOf(str)===-1){return}
|
||
let m;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length,endPos=matchPos+matchLen-2;addTagPair(tagName,matchPos,2,endPos,2);overwrite(matchPos,2);overwrite(endPos,2)}}
|
||
function parseAbstractScript(tagName,syntaxChar,shortRegexp,longRegexp){let pos=text.indexOf(syntaxChar);if(pos===-1){return}
|
||
parseShortForm(pos);parseLongForm(pos);function parseLongForm(pos){pos=text.indexOf(syntaxChar+'(',pos);if(pos===-1){return}
|
||
let m,regexp=longRegexp,hasMatched=!1;regexp.lastIndex=pos;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length;addTagPair(tagName,matchPos,2,matchPos+matchLen-1,1);overwrite(matchPos,matchLen);hasMatched=!0}
|
||
if(hasMatched){parseLongForm(pos)}}
|
||
function parseShortForm(pos){let m,regexp=shortRegexp;regexp.lastIndex=pos;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index,matchLen=match.length,startPos=matchPos,endLen=(match.charAt(matchLen-1)===syntaxChar)?1:0,endPos=matchPos+matchLen-endLen;addTagPair(tagName,startPos,1,endPos,endLen)}}}
|
||
function setLinkAttributes(tag,linkInfo,attrName){let url=linkInfo.replace(/^\s*/,'').replace(/\s*$/,''),title='',pos=url.indexOf(' ');if(pos!==-1){title=url.substring(pos).replace(/^\s*\S/,'').replace(/\S\s*$/,'');url=url.substring(0,pos)}
|
||
if(/^<.+>$/.test(url)){url=url.replace(/^<(.+)>$/,'$1').replace(/\\>/g,'>')}
|
||
tag.setAttribute(attrName,decode(url));if(title>''){tag.setAttribute('title',decode(title))}}(function(){let setextLines={};function parse(){matchSetextLines();let blocks=[],blocksCnt=0,codeFence,codeIndent=4,codeTag,lineIsEmpty=!0,lists=[],listsCnt=0,newContext=!1,textBoundary=0,breakParagraph,continuation,ignoreLen,indentStr,indentLen,lfPos,listIndex,maxIndent,minIndent,blockDepth,tagPos,tagLen;let matches=[],m,regexp=/^(?:(?=[-*+\d \t>`~#_])((?: {0,3}>(?:(?!!)|!(?![^\n>]*?!<)) ?)+)?([ \t]+)?(\* *\* *\*[* ]*$|- *- *-[- ]*$|_ *_ *_[_ ]*$)?((?:[-*+]|\d+\.)[ \t]+(?=\S))?[ \t]*(#{1,6}[ \t]+|```+[^`\n]*$|~~~+[^~\n]*$)?)?/gm;while(m=regexp.exec(text)){matches.push(m);if(m.index===regexp.lastIndex){++regexp.lastIndex}}
|
||
matches.forEach((m)=>{let blockMarks=[],matchPos=m.index,matchLen=m[0].length,startPos,startLen,endPos,endLen;ignoreLen=0;blockDepth=0;continuation=!lineIsEmpty;lfPos=text.indexOf("\n",matchPos);lineIsEmpty=(lfPos===matchPos+matchLen&&!m[3]&&!m[4]&&!m[5]);if(!matchLen){++regexp.lastIndex}
|
||
breakParagraph=(lineIsEmpty&&continuation);if(m[1]){blockMarks=getBlockMarks(m[1]);blockDepth=blockMarks.length;ignoreLen=m[1].length;if(codeTag&&codeTag.hasAttribute('blockDepth')){blockDepth=Math.min(blockDepth,codeTag.getAttribute('blockDepth'));ignoreLen=computeBlockIgnoreLen(m[1],blockDepth)}
|
||
overwrite(matchPos,ignoreLen)}
|
||
if(blockDepth<blocksCnt&&!continuation){newContext=!0;do{let startTag=blocks.pop();addEndTag(startTag.getName(),textBoundary,0).pairWith(startTag)}
|
||
while(blockDepth<--blocksCnt);}
|
||
if(blockDepth>blocksCnt&&!lineIsEmpty){newContext=!0;do{let tagName=(blockMarks[blocksCnt]==='>!')?'SPOILER':'QUOTE';blocks.push(addStartTag(tagName,matchPos,0,-999))}
|
||
while(blockDepth>++blocksCnt);}
|
||
let indentWidth=0,indentPos=0;if(m[2]&&!codeFence){indentStr=m[2];indentLen=indentStr.length;do{if(indentStr[indentPos]===' '){++indentWidth}else{indentWidth=(indentWidth+4)&~3}}
|
||
while(++indentPos<indentLen&&indentWidth<codeIndent);}
|
||
if(codeTag&&!codeFence&&indentWidth<codeIndent&&!lineIsEmpty){newContext=!0}
|
||
if(newContext){newContext=!1;if(codeTag){if(textBoundary>codeTag.getPos()){overwrite(codeTag.getPos(),textBoundary-codeTag.getPos());codeTag.pairWith(addEndTag('CODE',textBoundary,0,-1))}else{codeTag.invalidate()}
|
||
codeTag=null;codeFence=null}
|
||
lists.forEach((list)=>{closeList(list,textBoundary)});lists=[];listsCnt=0;if(matchPos){markBoundary(matchPos-1)}}
|
||
if(indentWidth>=codeIndent){if(codeTag||!continuation){ignoreLen=(m[1]||'').length+indentPos;if(!codeTag){codeTag=addStartTag('CODE',matchPos+ignoreLen,0,-999)}
|
||
m={}}}else if(!codeTag){let hasListItem=!!m[4];if(!indentWidth&&!continuation&&!hasListItem){listIndex=-1}else if(continuation&&!hasListItem){listIndex=listsCnt-1}else if(!listsCnt){listIndex=(hasListItem)?0:-1}else{listIndex=0;while(listIndex<listsCnt&&indentWidth>lists[listIndex].maxIndent){++listIndex}}
|
||
while(listIndex<listsCnt-1){closeList(lists.pop(),textBoundary);--listsCnt}
|
||
if(listIndex===listsCnt&&!hasListItem){--listIndex}
|
||
if(hasListItem&&listIndex>=0){breakParagraph=!0;tagPos=matchPos+ignoreLen+indentPos;tagLen=m[4].length;let itemTag=addStartTag('LI',tagPos,tagLen);overwrite(tagPos,tagLen);if(listIndex<listsCnt){addEndTag('LI',textBoundary,0).pairWith(lists[listIndex].itemTag);lists[listIndex].itemTag=itemTag;lists[listIndex].itemTags.push(itemTag)}else{++listsCnt;if(listIndex){minIndent=lists[listIndex-1].maxIndent+1;maxIndent=Math.max(minIndent,listIndex*4)}else{minIndent=0;maxIndent=indentWidth}
|
||
let listTag=addStartTag('LIST',tagPos,0);if(m[4].indexOf('.')>-1){listTag.setAttribute('type','decimal');let start=+m[4];if(start!==1){listTag.setAttribute('start',start)}}
|
||
lists.push({listTag:listTag,itemTag:itemTag,itemTags:[itemTag],minIndent:minIndent,maxIndent:maxIndent,tight:!0})}}
|
||
if(listsCnt&&!continuation&&!lineIsEmpty){if(lists[0].itemTags.length>1||!hasListItem){lists.forEach((list)=>{list.tight=!1})}}
|
||
codeIndent=(listsCnt+1)*4}
|
||
if(m[5]){if(m[5][0]==='#'){startLen=m[5].length;startPos=matchPos+matchLen-startLen;endLen=getAtxHeaderEndTagLen(matchPos+matchLen,lfPos);endPos=lfPos-endLen;addTagPair('H'+/#{1,6}/.exec(m[5])[0].length,startPos,startLen,endPos,endLen);markBoundary(startPos);markBoundary(lfPos);if(continuation){breakParagraph=!0}}else if(m[5][0]==='`'||m[5][0]==='~'){tagPos=matchPos+ignoreLen;tagLen=lfPos-tagPos;if(codeTag&&m[5]===codeFence){codeTag.pairWith(addEndTag('CODE',tagPos,tagLen,-1));addIgnoreTag(textBoundary,tagPos-textBoundary);overwrite(codeTag.getPos(),tagPos+tagLen-codeTag.getPos());codeTag=null;codeFence=null}else if(!codeTag){codeTag=addStartTag('CODE',tagPos,tagLen);codeFence=m[5].replace(/[^`~]+/,'');codeTag.setAttribute('blockDepth',blockDepth);addIgnoreTag(tagPos+tagLen,1);let lang=m[5].replace(/^[`~\s]*/,'').replace(/\s+$/,'');if(lang!==''){codeTag.setAttribute('lang',lang)}}}}else if(m[3]&&!listsCnt&&text[matchPos+matchLen]!=="\x17"){addSelfClosingTag('HR',matchPos+ignoreLen,matchLen-ignoreLen);breakParagraph=!0;markBoundary(lfPos)}else if(setextLines[lfPos]&&setextLines[lfPos].blockDepth===blockDepth&&!lineIsEmpty&&!listsCnt&&!codeTag){addTagPair(setextLines[lfPos].tagName,matchPos+ignoreLen,0,setextLines[lfPos].endPos,setextLines[lfPos].endLen);markBoundary(setextLines[lfPos].endPos+setextLines[lfPos].endLen)}
|
||
if(breakParagraph){addParagraphBreak(textBoundary);markBoundary(textBoundary)}
|
||
if(!lineIsEmpty){textBoundary=lfPos}
|
||
if(ignoreLen){addIgnoreTag(matchPos,ignoreLen,1000)}})}
|
||
function closeList(list,textBoundary){addEndTag('LIST',textBoundary,0).pairWith(list.listTag);addEndTag('LI',textBoundary,0).pairWith(list.itemTag);if(list.tight){list.itemTags.forEach((itemTag)=>{itemTag.removeFlags(RULE_CREATE_PARAGRAPHS)})}}
|
||
function computeBlockIgnoreLen(str,maxBlockDepth){let remaining=str;while(--maxBlockDepth>=0){remaining=remaining.replace(/^ *>!? ?/,'')}
|
||
return str.length-remaining.length}
|
||
function getAtxHeaderEndTagLen(startPos,endPos){let content=text.substring(startPos,endPos),m=/[ \t]*#*[ \t]*$/.exec(content);return m[0].length}
|
||
function getBlockMarks(str){let blockMarks=[],regexp=/>!?/g,m;while(m=regexp.exec(str)){blockMarks.push(m[0])}
|
||
return blockMarks}
|
||
function matchSetextLines(){if(text.indexOf('-')===-1&&text.indexOf('=')===-1){return}
|
||
let m,regexp=/^(?=[-=>])(?:>!? ?)*(?=[-=])(?:-+|=+) *$/gm;while(m=regexp.exec(text)){let match=m[0],matchPos=m.index;let endPos=matchPos-1;while(endPos>0&&text[endPos-1]===' '){--endPos}
|
||
setextLines[matchPos-1]={endLen:matchPos+match.length-endPos,endPos:endPos,blockDepth:match.length-match.replace(/>/g,'').length,tagName:(match[0]==='=')?'H1':'H2'}}}
|
||
parse()})();(function(){function parse(){if(text.indexOf(']:')<0){return}
|
||
let m,regexp=/^\x1A* {0,3}\[([^\x17\]]+)\]: *([^[\s\x17]+ *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))?) *(?=$|\x17)\n?/gm;while(m=regexp.exec(text)){addIgnoreTag(m.index,m[0].length);let id=m[1].toLowerCase();if(!linkReferences[id]){hasReferences=!0;linkReferences[id]=m[2]}}}
|
||
parse()})();(function(){function parse(){let markers=getInlineCodeMarkers(),i=-1,cnt=markers.length;while(++i<(cnt-1)){let pos=markers[i].next,j=i;if(text[markers[i].pos]!=='`'){++markers[i].pos;--markers[i].len}
|
||
while(++j<cnt&&markers[j].pos===pos){if(markers[j].len===markers[i].len){addInlineCodeTags(markers[i],markers[j]);i=j;break}
|
||
pos=markers[j].next}}}
|
||
function addInlineCodeTags(left,right){let startPos=left.pos,startLen=left.len+left.trimAfter,endPos=right.pos-right.trimBefore,endLen=right.len+right.trimBefore;addTagPair('C',startPos,startLen,endPos,endLen);overwrite(startPos,endPos+endLen-startPos)}
|
||
function getInlineCodeMarkers(){let pos=text.indexOf('`');if(pos<0){return[]}
|
||
let regexp=/(`+)(\s*)[^\x17`]*/g,trimNext=0,markers=[],_text=text.replace(/\x1BD/g,'\\`'),m;regexp.lastIndex=pos;while(m=regexp.exec(_text)){markers.push({pos:m.index,len:m[1].length,trimBefore:trimNext,trimAfter:m[2].length,next:m.index+m[0].length});trimNext=m[0].length-m[0].replace(/\s+$/,'').length}
|
||
return markers}
|
||
parse()})();(function(){function parse(){let pos=text.indexOf('>0){parseInlineImages()}
|
||
if(hasReferences){parseReferenceImages()}}
|
||
function addImageTag(startPos,endPos,endLen,linkInfo,alt){let tag=addTagPair('IMG',startPos,2,endPos,endLen);setLinkAttributes(tag,linkInfo,'src');tag.setAttribute('alt',decode(alt));overwrite(startPos,endPos+endLen-startPos)}
|
||
function parseInlineImages(){let m,regexp=/!\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:[^\x17\s()]|\([^\x17\s()]*\))*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen,alt=m[0].substring(2,m[0].length-endLen);addImageTag(startPos,endPos,endLen,linkInfo,alt)}}
|
||
function parseReferenceImages(){let m,regexp=/!\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\](?: ?\[([^\x17[\]]+)\])?/g;while(m=regexp.exec(text)){let startPos=m.index,endPos=startPos+2+m[1].length,endLen=1,alt=m[1],id=alt;if(m[2]>''&&linkReferences[m[2]]){endLen=m[0].length-alt.length-2;id=m[2]}else if(!linkReferences[id]){continue}
|
||
addImageTag(startPos,endPos,endLen,linkReferences[id],alt)}}
|
||
parse()})();(function(){function parse(){parseInlineMarkup('>!',/>![^\x17]+?!</g,'ISPOILER');parseInlineMarkup('||',/\|\|[^\x17]+?\|\|/g,'ISPOILER')}
|
||
parse()})();(function(){function parse(){if(text.indexOf('](')!==-1){parseInlineLinks()}
|
||
if(text.indexOf('<')!==-1){parseAutomaticLinks()}
|
||
if(hasReferences){parseReferenceLinks()}}
|
||
function addLinkTag(startPos,endPos,endLen,linkInfo){let priority=(endLen===1)?1:-1;let tag=addTagPair('URL',startPos,1,endPos,endLen,priority);setLinkAttributes(tag,linkInfo,'url');overwrite(startPos,1);overwrite(endPos,endLen)}
|
||
function getLabels(){let labels={},m,regexp=/\[((?:[^\x17[\]]|\[[^\x17[\]]*\])*)\]/g;while(m=regexp.exec(text)){labels[m.index]=m[1].toLowerCase()}
|
||
return labels}
|
||
function parseAutomaticLinks(){let m,regexp=/<[-+.\w]+([:@])[^\x17\s>]+?(?:>|\x1B7)/g;while(m=regexp.exec(text)){let content=decode(m[0].replace(/\x1B/g,"\\\x1B")).replace(/^<(.+)>$/,'$1'),startPos=m.index,endPos=startPos+m[0].length-1,tagName=(m[1]===':')?'URL':'EMAIL',attrName=tagName.toLowerCase();addTagPair(tagName,startPos,1,endPos,1).setAttribute(attrName,content)}}
|
||
function parseInlineLinks(){let m,regexp=/\[(?:[^\x17[\]]|\[[^\x17[\]]*\])*\]\(( *(?:\([^\x17\s()]*\)|[^\x17\s)])*(?=[ )]) *(?:"[^\x17]*?"|'[^\x17]*?'|\([^\x17)]*\))? *)\)/g;while(m=regexp.exec(text)){let linkInfo=m[1],startPos=m.index,endLen=3+linkInfo.length,endPos=startPos+m[0].length-endLen;addLinkTag(startPos,endPos,endLen,linkInfo)}}
|
||
function parseReferenceLinks(){let labels=getLabels(),startPos;for(startPos in labels){let id=labels[startPos],labelPos=+startPos+2+id.length,endPos=labelPos-1,endLen=1;if(text[labelPos]===' '){++labelPos}
|
||
if(labels[labelPos]>''&&linkReferences[labels[labelPos]]){id=labels[labelPos];endLen=labelPos+2+id.length-endPos}
|
||
if(linkReferences[id]){addLinkTag(+startPos,endPos,endLen,linkReferences[id])}}}
|
||
parse()})();(function(){function parse(){parseInlineMarkup('~~',/~~[^\x17]+?~~(?!~)/g,'DEL')}
|
||
parse()})();(function(){function parse(){parseAbstractScript('SUB','~',/~[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+~?/g,/~\([^\x17()]+\)/g)}
|
||
parse()})();(function(){function parse(){parseAbstractScript('SUP','^',/\^[^\x17\s!"#$%&\'()*+,\-.\/:;<=>?@[\]^_`{}|~]+\^?/g,/\^\([^\x17()]+\)/g)}
|
||
parse()})();(function(){let closeEm;let closeStrong;let emPos;let emEndPos;let remaining;let strongPos;let strongEndPos;function parse(){parseEmphasisByCharacter('*',/\*+/g);parseEmphasisByCharacter('_',/_+/g)}
|
||
function adjustEndingPositions(){if(closeEm&&closeStrong){if(emPos<strongPos){emEndPos+=2}else{++strongEndPos}}}
|
||
function adjustStartingPositions(){if(emPos>=0&&emPos===strongPos){if(closeEm){emPos+=2}else{++strongPos}}}
|
||
function closeSpans(){if(closeEm){--remaining;addTagPair('EM',emPos,1,emEndPos,1);emPos=-1}
|
||
if(closeStrong){remaining-=2;addTagPair('STRONG',strongPos,2,strongEndPos,2);strongPos=-1}}
|
||
function getEmphasisByBlock(regexp,pos){let block=[],blocks=[],breakPos=text.indexOf("\x17",pos),m;regexp.lastIndex=pos;while(m=regexp.exec(text)){let matchPos=m.index,matchLen=m[0].length;if(matchPos>breakPos){blocks.push(block);block=[];breakPos=text.indexOf("\x17",matchPos)}
|
||
if(!ignoreEmphasis(matchPos,matchLen)){block.push([matchPos,matchLen])}}
|
||
blocks.push(block);return blocks}
|
||
function ignoreEmphasis(pos,len){return(text.charAt(pos)==='_'&&len===1&&isSurroundedByAlnum(pos,len))}
|
||
function openSpans(pos){if(remaining&1){emPos=pos-remaining}
|
||
if(remaining&2){strongPos=pos-remaining}}
|
||
function parseEmphasisByCharacter(character,regexp){let pos=text.indexOf(character);if(pos===-1){return}
|
||
getEmphasisByBlock(regexp,pos).forEach(processEmphasisBlock)}
|
||
function processEmphasisBlock(block){emPos=-1,strongPos=-1;block.forEach((pair)=>{processEmphasisMatch(pair[0],pair[1])})}
|
||
function processEmphasisMatch(matchPos,matchLen){let canOpen=!isBeforeWhitespace(matchPos+matchLen-1),canClose=!isAfterWhitespace(matchPos),closeLen=(canClose)?Math.min(matchLen,3):0;closeEm=!!(closeLen&1)&&emPos>=0;closeStrong=!!(closeLen&2)&&strongPos>=0;emEndPos=matchPos;strongEndPos=matchPos;remaining=matchLen;adjustStartingPositions();adjustEndingPositions();closeSpans();remaining=(canOpen)?Math.min(remaining,3):0;openSpans(matchPos+matchLen)}
|
||
parse()})();(function(){function parse(){let pos=text.indexOf(" \n");while(pos>0){addBrTag(pos+2).cascadeInvalidationTo(addVerbatim(pos+2,1));pos=text.indexOf(" \n",pos+3)}}
|
||
parse()})()}},"Preg":{parser:function(text,matches){const config={generics:[["USERMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#([0-9]+)\b/g,0,["","displayname","","id"]],["USERMENTION",/\B@([a-z0-9_-]+)(?!#)/ig,0,["","username"]],["POSTMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["”]#p([0-9]+)\b/g,0,["","displayname","","id"]],["GROUPMENTION",/\B@["“](((?!"#[a-z]{0,3}[0-9]+).)+)["|”]#g([0-9]+)\b/g,0,["","groupname","","id"]],["TAGMENTION",/(?:[^“"]|^)\B#([-_A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC0-9\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\p{M}]+)\b/ig,0,["","slug"]]]};config.generics.forEach((entry)=>{let tagName=entry[0],regexp=entry[1],passthroughIdx=entry[2],map=entry[3],m;regexp.lastIndex=0;while(m=regexp.exec(text)){let startTagPos=m.index,matchLen=m[0].length,tag;if(HINT.PREG_HAS_PASSTHROUGH&&passthroughIdx&&m[passthroughIdx]!==''){let contentPos=text.indexOf(m[passthroughIdx],startTagPos),contentLen=m[passthroughIdx].length,startTagLen=contentPos-startTagPos,endTagPos=contentPos+contentLen,endTagLen=matchLen-(startTagLen+contentLen);tag=addTagPair(tagName,startTagPos,startTagLen,endTagPos,endTagLen,-100)}else{tag=addSelfClosingTag(tagName,startTagPos,matchLen,-100)}
|
||
map.forEach((attrName,i)=>{if(attrName&&typeof m[i]!=='undefined'){tag.setAttribute(attrName,m[i])}})}})}}};let pos;const registeredVars={"urlConfig":{allowedSchemes:/^https?$/i}};const rootContext={allowed:oF6AF222C,flags:40};const tagsConfig={"B":oB84A1289,"C":{allowed:o553403F9,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:66},tagLimit:5000},"CENTER":{allowed:oF6AF222C,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"CODE":{allowed:o553403F9,attributes:{"lang":{filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[-0-9A-Za-z_]+$/)}],required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:4436,fosterParent:oD4869BFF},tagLimit:5000},"COLOR":{allowed:oE98D0814,attributes:{"color":{filterChain:[function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^(?:#(?:(?:[0-9a-f]{3}){1,2}|(?:[0-9a-f]{4}){1,2})|rgb\(\d{1,3}, *\d{1,3}, *\d{1,3}\)|rgba\(\d{1,3}, *\d{1,3}, *\d{1,3}, *\d*(?:\.\d+)?\)|[a-z]+)$/i)}],required:!0}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"DEL":{allowed:oF6AF222C,attributes:{},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:512},tagLimit:5000},"E":{allowed:oA385316A,attributes:{},bitNumber:6,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"EM":oB84A1289,"EMAIL":{allowed:oBB818D5A,attributes:{"email":{filterChain:[function(attrValue,attrName){return EmailFilter.filter(attrValue)}],required:!0}},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"ESC":{allowed:o553403F9,attributes:{},bitNumber:0,filterChain:o1B4F5B52,nestingLimit:10,rules:{flags:1616},tagLimit:5000},"GROUPMENTION":{allowed:oA385316A,attributes:{"groupname":o02D8DBB5,"id":o6CB0A318},bitNumber:2,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterGroupMentions(tag)})(tag,registeredVars.actor,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterGroupMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"H1":o28E55ACF,"H2":o28E55ACF,"H3":o28E55ACF,"H4":o28E55ACF,"H5":o28E55ACF,"H6":o28E55ACF,"HR":{allowed:oA385316A,attributes:{},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,flags:3349},tagLimit:5000},"I":oB84A1289,"IMG":{allowed:oA385316A,attributes:{"alt":o1BC3EAF4,"height":o75AB9259,"src":oF307D35C,"title":o1BC3EAF4,"width":o75AB9259},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oA80287CC,tagLimit:5000},"ISPOILER":o6C76824E,"LI":{allowed:oF6AF222C,attributes:{},bitNumber:4,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:{"B":1,"C":1,"COLOR":1,"EM":1,"EMAIL":1,"I":1,"LI":1,"S":1,"SIZE":1,"STRONG":1,"U":1,"URL":1},flags:264,fosterParent:oD4869BFF},tagLimit:5000},"LIST":{allowed:[32529],attributes:{"start":o75AB9259,"type":{filterChain:[function(attrValue,attrName){return HashmapFilter.filter(attrValue,{"1":"decimal","A":"upper-alpha","I":"upper-roman","a":"lower-alpha","i":"lower-roman"},!1)},function(attrValue,attrName){return RegexpFilter.filter(attrValue,/^[- +,.0-9A-Za-z_]+$/)}],required:!1}},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:{closeParent:oD4869BFF,createChild:["LI"],flags:3460,fosterParent:oD4869BFF},tagLimit:5000},"POSTMENTION":{allowed:oA385316A,attributes:{"discussionid":o6CB0A318,"displayname":o02D8DBB5,"id":o6CB0A318,"number":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterPostMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterPostMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"QUOTE":{allowed:oF6AF222C,attributes:{"author":o1BC3EAF4},bitNumber:3,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"S":oB84A1289,"SIZE":{allowed:oE98D0814,attributes:{"size":{filterChain:[function(attrValue,attrName){return NumericFilter.filterRange(attrValue,8,36,logger)}],required:!0}},bitNumber:2,filterChain:o1B4F5B52,nestingLimit:10,rules:oB565876D,tagLimit:5000},"SPOILER":{allowed:oF6AF222C,attributes:{},bitNumber:5,filterChain:o1B4F5B52,nestingLimit:10,rules:o1AF69066,tagLimit:5000},"STRONG":oB84A1289,"SUB":o6C76824E,"SUP":o6C76824E,"TAGMENTION":{allowed:oA385316A,attributes:{"id":o6CB0A318,"slug":o02D8DBB5,"tagname":o02D8DBB5},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterTagMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterTagMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000},"U":oB84A1289,"URL":{allowed:oBB818D5A,attributes:{"title":o1BC3EAF4,"url":oF307D35C},bitNumber:1,filterChain:o1B4F5B52,nestingLimit:10,rules:o939F1698,tagLimit:5000},"USERMENTION":{allowed:oA385316A,attributes:{"displayname":o02D8DBB5,"id":o6CB0A318},bitNumber:1,filterChain:[function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].filterUserMentions(tag)})(tag,registeredVars.mentions)},o118B31AC,function(tag,tagConfig){return(function(tag){return flarum.extensions["flarum-mentions"].postFilterUserMentions(tag)})(tag)}],nestingLimit:10,rules:oA80287CC,tagLimit:5000}};let tagStack;let tagStackIsSorted;let text;let textLen;let uid=0;let wsPos;function disableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!0}}
|
||
function enableTag(tagName){if(tagsConfig[tagName]){copyTagConfig(tagName).isDisabled=!1}}
|
||
function getLogger(){return logger}
|
||
function parse(_text){reset(_text);let _uid=uid;executePluginParsers();processTags();finalizeOutput();if(uid!==_uid){throw 'The parser has been reset during execution'}
|
||
if(currentFixingCost>maxFixingCost){logger.warn('Fixing cost limit exceeded')}
|
||
return output}
|
||
function reset(_text){_text=_text.replace(/\r\n?/g,"\n");_text=_text.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,'');logger.clear();cntOpen={};cntTotal={};currentFixingCost=0;currentTag=null;isRich=!1;namespaces={};openTags=[];output='';pos=0;tagStack=[];tagStackIsSorted=!1;text=_text;textLen=text.length;wsPos=0;context=rootContext;context.inParagraph=!1;++uid}
|
||
function setTagLimit(tagName,tagLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).tagLimit=tagLimit}}
|
||
function setNestingLimit(tagName,nestingLimit){if(tagsConfig[tagName]){copyTagConfig(tagName).nestingLimit=nestingLimit}}
|
||
function copyTagConfig(tagName){let tagConfig={},k;for(k in tagsConfig[tagName]){tagConfig[k]=tagsConfig[tagName][k]}
|
||
return tagsConfig[tagName]=tagConfig}
|
||
function encodeUnicodeSupplementaryCharacters(){output=output.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,encodeUnicodeSupplementaryCharactersCallback)}
|
||
function encodeUnicodeSupplementaryCharactersCallback(pair){let cp=(pair.charCodeAt(0)<<10)+pair.charCodeAt(1)-56613888;return'&#'+cp+';'}
|
||
function finalizeOutput(){let tmp;outputText(textLen,0,!0);do{tmp=output;output=output.replace(/<([^ />]+)[^>]*><\/\1>/g,'')}
|
||
while(output!==tmp);output=output.replace(/<\/i><i>/g,'');output=output.replace(/[\x00-\x08\x0B-\x1F\uFFFE\uFFFF]/g,'');encodeUnicodeSupplementaryCharacters();let tagName=(isRich)?'r':'t';tmp='<'+tagName;if(HINT.namespaces){for(let prefix in namespaces){tmp+=' xmlns:'+prefix+'="urn:s9e:TextFormatter:'+prefix+'"'}}
|
||
output=tmp+'>'+output+'</'+tagName+'>'}
|
||
function outputTag(tag){isRich=!0;let tagName=tag.getName(),tagPos=tag.getPos(),tagLen=tag.getLen(),tagFlags=tag.getFlags(),skipBefore=0,skipAfter=0;if(HINT.RULE_IGNORE_WHITESPACE&&(tagFlags&RULE_IGNORE_WHITESPACE)){skipBefore=1;skipAfter=(tag.isEndTag())?2:1}
|
||
let closeParagraph=!!(!tag.isStartTag()||(HINT.RULE_BREAK_PARAGRAPH&&(tagFlags&RULE_BREAK_PARAGRAPH)));outputText(tagPos,skipBefore,closeParagraph);let tagText=(tagLen)?htmlspecialchars_noquotes(text.substring(tagPos,tagPos+tagLen)):'';if(tag.isStartTag()){if(!HINT.RULE_BREAK_PARAGRAPH||!(tagFlags&RULE_BREAK_PARAGRAPH)){outputParagraphStart(tagPos)}
|
||
if(HINT.namespaces){let colonPos=tagName.indexOf(':');if(colonPos>0){namespaces[tagName.substring(0,colonPos)]=0}}
|
||
output+='<'+tagName;let attributes=tag.getAttributes(),attributeNames=[];for(let attrName in attributes){attributeNames.push(attrName)}
|
||
attributeNames.sort((a,b)=>(a>b)?1:-1);attributeNames.forEach((attrName)=>{output+=' '+attrName+'="'+htmlspecialchars_compat(attributes[attrName].toString()).replace(/\n/g,' ')+'"'});if(tag.isSelfClosingTag()){if(tagLen){output+='>'+tagText+'</'+tagName+'>'}else{output+='/>'}}else if(tagLen){output+='><s>'+tagText+'</s>'}else{output+='>'}}else{if(tagLen){output+='<e>'+tagText+'</e>'}
|
||
output+='</'+tagName+'>'}
|
||
pos=tagPos+tagLen;wsPos=pos;while(skipAfter&&wsPos<textLen&&text[wsPos]==="\n"){--skipAfter;++wsPos}}
|
||
function outputText(catchupPos,maxLines,closeParagraph){if(closeParagraph){if(!(context.flags&RULE_CREATE_PARAGRAPHS)){closeParagraph=!1}else{maxLines=-1}}
|
||
if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}
|
||
if(wsPos>pos){let skipPos=Math.min(catchupPos,wsPos);output+=text.substring(pos,skipPos);pos=skipPos;if(pos>=catchupPos){if(closeParagraph){outputParagraphEnd()}}}
|
||
let catchupText;if(HINT.RULE_IGNORE_TEXT&&context.flags&RULE_IGNORE_TEXT){catchupText=text.substring(pos,catchupPos);if(!/^[ \n\t]*$/.test(catchupText)){catchupText='<i>'+htmlspecialchars_noquotes(catchupText)+'</i>'}
|
||
output+=catchupText;pos=catchupPos;if(closeParagraph){outputParagraphEnd()}
|
||
return}
|
||
let ignorePos=catchupPos,ignoreLen=0;while(maxLines&&--ignorePos>=pos){let c=text[ignorePos];if(c!==' '&&c!=="\n"&&c!=="\t"){break}
|
||
if(c==="\n"){--maxLines}
|
||
++ignoreLen}
|
||
catchupPos-=ignoreLen;if(HINT.RULE_CREATE_PARAGRAPHS&&context.flags&RULE_CREATE_PARAGRAPHS){if(!context.inParagraph){outputWhitespace(catchupPos);if(catchupPos>pos){outputParagraphStart(catchupPos)}}
|
||
let pbPos=text.indexOf("\n\n",pos);while(pbPos>-1&&pbPos<catchupPos){outputText(pbPos,0,!0);outputParagraphStart(catchupPos);pbPos=text.indexOf("\n\n",pos)}}
|
||
if(catchupPos>pos){catchupText=htmlspecialchars_noquotes(text.substring(pos,catchupPos));if(HINT.RULE_ENABLE_AUTO_BR&&(context.flags&RULES_AUTO_LINEBREAKS)===RULE_ENABLE_AUTO_BR){catchupText=catchupText.replace(/\n/g,"<br/>\n")}
|
||
output+=catchupText}
|
||
if(closeParagraph){outputParagraphEnd()}
|
||
if(ignoreLen){output+=text.substring(catchupPos,catchupPos+ignoreLen)}
|
||
pos=catchupPos+ignoreLen}
|
||
function outputBrTag(tag){outputText(tag.getPos(),0,!1);output+='<br/>'}
|
||
function outputIgnoreTag(tag){let tagPos=tag.getPos(),tagLen=tag.getLen();let ignoreText=text.substring(tagPos,tagPos+tagLen);outputText(tagPos,0,!1);output+='<i>'+htmlspecialchars_noquotes(ignoreText)+'</i>';isRich=!0;pos=tagPos+tagLen}
|
||
function outputParagraphStart(maxPos){if(!HINT.RULE_CREATE_PARAGRAPHS){return}
|
||
if(context.inParagraph||!(context.flags&RULE_CREATE_PARAGRAPHS)){return}
|
||
outputWhitespace(maxPos);if(pos<textLen){output+='<p>';context.inParagraph=!0}}
|
||
function outputParagraphEnd(){if(!context.inParagraph){return}
|
||
output+='</p>';context.inParagraph=!1}
|
||
function outputVerbatim(tag){let flags=context.flags;context.flags=tag.getFlags();outputText(currentTag.getPos()+currentTag.getLen(),0,!1);context.flags=flags}
|
||
function outputWhitespace(maxPos){while(pos<maxPos&&" \n\t".indexOf(text[pos])>-1){output+=text[pos];++pos}}
|
||
function disablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!0}}
|
||
function enablePlugin(pluginName){if(plugins[pluginName]){plugins[pluginName].isDisabled=!1}}
|
||
function executePluginParser(pluginName){let pluginConfig=plugins[pluginName];if(pluginConfig.quickMatch&&text.indexOf(pluginConfig.quickMatch)<0){return}
|
||
let matches=[];if(HINT.regexp&&HINT.regexpLimit&&typeof pluginConfig.regexp!=='undefined'&&typeof pluginConfig.regexpLimit!=='undefined'){matches=getMatches(pluginConfig.regexp,pluginConfig.regexpLimit);if(!matches.length){return}}
|
||
getPluginParser(pluginName)(text,matches)}
|
||
function executePluginParsers(){for(let pluginName in plugins){if(!plugins[pluginName].isDisabled){executePluginParser(pluginName)}}}
|
||
function getMatches(regexp,limit){regexp.lastIndex=0;let matches=[],cnt=0,m;while(++cnt<=limit&&(m=regexp.exec(text))){let pos=m.index,match=[[m[0],pos]],i=0;while(++i<m.length){let str=m[i];if(str===undefined){match.push(['',-1])}else{match.push([str,text.indexOf(str,pos)]);pos+=str.length}}
|
||
matches.push(match)}
|
||
return matches}
|
||
function getPluginParser(pluginName){return plugins[pluginName].parser}
|
||
function registerParser(pluginName,parser,regexp,limit){if(!plugins[pluginName]){plugins[pluginName]={}}
|
||
if(regexp){plugins[pluginName].regexp=regexp;plugins[pluginName].limit=limit||Infinity}
|
||
plugins[pluginName].parser=parser}
|
||
function closeAncestor(tag){if(!HINT.closeAncestor){return!1}
|
||
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeAncestor){let i=openTags.length;while(--i>=0){let ancestor=openTags[i],ancestorName=ancestor.getName();if(tagConfig.rules.closeAncestor[ancestorName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(ancestor,tag.getPos(),tag.getSortPriority()-1);return!0}}}}
|
||
return!1}
|
||
function closeParent(tag){if(!HINT.closeParent){return!1}
|
||
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.closeParent){let parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.closeParent[parentName]){++currentFixingCost;tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);return!0}}}
|
||
return!1}
|
||
function createChild(tag){if(!HINT.createChild){return}
|
||
let tagConfig=tagsConfig[tag.getName()];if(tagConfig.rules.createChild){let priority=-1000,_text=text.substring(pos),tagPos=pos+_text.length-_text.replace(/^[ \n\r\t]+/,'').length;tagConfig.rules.createChild.forEach((tagName)=>{addStartTag(tagName,tagPos,0,++priority)})}}
|
||
function fosterParent(tag){if(!HINT.fosterParent){return!1}
|
||
if(openTags.length){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.fosterParent){let parent=openTags[openTags.length-1],parentName=parent.getName();if(tagConfig.rules.fosterParent[parentName]){if(parentName!==tagName&¤tFixingCost<maxFixingCost){addFosterTag(tag,parent)}
|
||
tagStack.push(tag);addMagicEndTag(parent,tag.getPos(),tag.getSortPriority()-1);currentFixingCost+=4;return!0}}}
|
||
return!1}
|
||
function requireAncestor(tag){if(!HINT.requireAncestor){return!1}
|
||
let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(tagConfig.rules.requireAncestor){let i=tagConfig.rules.requireAncestor.length;while(--i>=0){let ancestorName=tagConfig.rules.requireAncestor[i];if(cntOpen[ancestorName]){return!1}}
|
||
logger.err('Tag requires an ancestor',{'requireAncestor':tagConfig.rules.requireAncestor.join(', '),'tag':tag});return!0}
|
||
return!1}
|
||
function addFosterTag(tag,fosterTag){let coords=getMagicStartCoords(tag.getPos()+tag.getLen()),childPos=coords[0],childPrio=coords[1];let childTag=addCopyTag(fosterTag,childPos,0,childPrio);tag.cascadeInvalidationTo(childTag)}
|
||
function addMagicEndTag(startTag,tagPos,prio){let tagName=startTag.getName();if(HINT.RULE_IGNORE_WHITESPACE&&((currentTag.getFlags()|startTag.getFlags())&RULE_IGNORE_WHITESPACE)){tagPos=getMagicEndPos(tagPos)}
|
||
let endTag=addEndTag(tagName,tagPos,0,prio||0);endTag.pairWith(startTag);return endTag}
|
||
function getMagicEndPos(tagPos){while(tagPos>pos&&WHITESPACE.indexOf(text[tagPos-1])>-1){--tagPos}
|
||
return tagPos}
|
||
function getMagicStartCoords(tagPos){let nextPos,nextPrio,nextTag,prio;if(!tagStack.length){nextPos=textLen+1;nextPrio=0}else{nextTag=tagStack[tagStack.length-1];nextPos=nextTag.getPos();nextPrio=nextTag.getSortPriority()}
|
||
while(tagPos<nextPos&&WHITESPACE.indexOf(text[tagPos])>-1){++tagPos}
|
||
prio=(tagPos===nextPos)?nextPrio-1:0;return[tagPos,prio]}
|
||
function isFollowedByClosingTag(tag){return(!tagStack.length)?!1:tagStack[tagStack.length-1].canClose(tag)}
|
||
function processTags(){if(!tagStack.length){return}
|
||
for(let tagName in tagsConfig){cntOpen[tagName]=0;cntTotal[tagName]=0}
|
||
do{while(tagStack.length){if(!tagStackIsSorted){sortTags()}
|
||
currentTag=tagStack.pop();processCurrentTag()}
|
||
openTags.forEach((startTag)=>{addMagicEndTag(startTag,textLen)})}
|
||
while(tagStack.length);}
|
||
function processCurrentTag(){if((context.flags&RULE_IGNORE_TAGS)&&!currentTag.canClose(openTags[openTags.length-1])&&!currentTag.isSystemTag()){currentTag.invalidate()}
|
||
let tagPos=currentTag.getPos(),tagLen=currentTag.getLen();if(pos>tagPos&&!currentTag.isInvalid()){let startTag=currentTag.getStartTag();if(startTag&&openTags.indexOf(startTag)>=0){addEndTag(startTag.getName(),pos,Math.max(0,tagPos+tagLen-pos)).pairWith(startTag);return}
|
||
if(currentTag.isIgnoreTag()){let ignoreLen=tagPos+tagLen-pos;if(ignoreLen>0){addIgnoreTag(pos,ignoreLen);return}}
|
||
currentTag.invalidate()}
|
||
if(currentTag.isInvalid()){return}
|
||
if(currentTag.isIgnoreTag()){outputIgnoreTag(currentTag)}else if(currentTag.isBrTag()){if(!HINT.RULE_PREVENT_BR||!(context.flags&RULE_PREVENT_BR)){outputBrTag(currentTag)}}else if(currentTag.isParagraphBreak()){outputText(currentTag.getPos(),0,!0)}else if(currentTag.isVerbatim()){outputVerbatim(currentTag)}else if(currentTag.isStartTag()){processStartTag(currentTag)}else{processEndTag(currentTag)}}
|
||
function processStartTag(tag){let tagName=tag.getName(),tagConfig=tagsConfig[tagName];if(cntTotal[tagName]>=tagConfig.tagLimit){logger.err('Tag limit exceeded',{'tag':tag,'tagName':tagName,'tagLimit':tagConfig.tagLimit});tag.invalidate();return}
|
||
filterTag(tag);if(tag.isInvalid()){return}
|
||
if(currentFixingCost<maxFixingCost){if(fosterParent(tag)||closeParent(tag)||closeAncestor(tag)){return}}
|
||
if(cntOpen[tagName]>=tagConfig.nestingLimit){logger.err('Nesting limit exceeded',{'tag':tag,'tagName':tagName,'nestingLimit':tagConfig.nestingLimit});tag.invalidate();return}
|
||
if(!tagIsAllowed(tagName)){let msg='Tag is not allowed in this context',context={'tag':tag,'tagName':tagName};if(tag.getLen()>0){logger.warn(msg,context)}else{logger.debug(msg,context)}
|
||
tag.invalidate();return}
|
||
if(requireAncestor(tag)){tag.invalidate();return}
|
||
if(HINT.RULE_AUTO_CLOSE&&tag.getFlags()&RULE_AUTO_CLOSE&&!tag.isSelfClosingTag()&&!tag.getEndTag()&&!isFollowedByClosingTag(tag)){let newTag=new Tag(Tag.SELF_CLOSING_TAG,tagName,tag.getPos(),tag.getLen());newTag.setAttributes(tag.getAttributes());newTag.setFlags(tag.getFlags());tag=newTag}
|
||
if(HINT.RULE_TRIM_FIRST_LINE&&tag.getFlags()&RULE_TRIM_FIRST_LINE&&text[tag.getPos()+tag.getLen()]==="\n"){addIgnoreTag(tag.getPos()+tag.getLen(),1)}
|
||
outputTag(tag);pushContext(tag);createChild(tag)}
|
||
function processEndTag(tag){let tagName=tag.getName();if(!cntOpen[tagName]){return}
|
||
let closeTags=[];let i=openTags.length;while(--i>=0){let openTag=openTags[i];if(tag.canClose(openTag)){break}
|
||
closeTags.push(openTag);++currentFixingCost}
|
||
if(i<0){logger.debug('Skipping end tag with no start tag',{'tag':tag});return}
|
||
let flags=tag.getFlags();closeTags.forEach((openTag)=>{flags|=openTag.getFlags()});let ignoreWhitespace=(HINT.RULE_IGNORE_WHITESPACE&&(flags&RULE_IGNORE_WHITESPACE));let keepReopening=HINT.RULE_AUTO_REOPEN&&(currentFixingCost<maxFixingCost),reopenTags=[];closeTags.forEach((openTag)=>{let openTagName=openTag.getName();if(keepReopening){if(openTag.getFlags()&RULE_AUTO_REOPEN){reopenTags.push(openTag)}else{keepReopening=!1}}
|
||
let tagPos=tag.getPos();if(ignoreWhitespace){tagPos=getMagicEndPos(tagPos)}
|
||
let endTag=new Tag(Tag.END_TAG,openTagName,tagPos,0);endTag.setFlags(openTag.getFlags());outputTag(endTag);popContext()});outputTag(tag);popContext();if(closeTags.length&¤tFixingCost<maxFixingCost){let ignorePos=pos;i=tagStack.length;while(--i>=0&&++currentFixingCost<maxFixingCost){let upcomingTag=tagStack[i];if(upcomingTag.getPos()>ignorePos||upcomingTag.isStartTag()){break}
|
||
let j=closeTags.length;while(--j>=0&&++currentFixingCost<maxFixingCost){if(upcomingTag.canClose(closeTags[j])){closeTags.splice(j,1);if(reopenTags[j]){reopenTags.splice(j,1)}
|
||
ignorePos=Math.max(ignorePos,upcomingTag.getPos()+upcomingTag.getLen());break}}}
|
||
if(ignorePos>pos){outputIgnoreTag(new Tag(Tag.SELF_CLOSING_TAG,'i',pos,ignorePos-pos))}}
|
||
reopenTags.forEach((startTag)=>{let newTag=addCopyTag(startTag,pos,0);let endTag=startTag.getEndTag();if(endTag){newTag.pairWith(endTag)}})}
|
||
function popContext(){let tag=openTags.pop();--cntOpen[tag.getName()];context=context.parentContext}
|
||
function pushContext(tag){let tagName=tag.getName(),tagFlags=tag.getFlags(),tagConfig=tagsConfig[tagName];++cntTotal[tagName];if(tag.isSelfClosingTag()){return}
|
||
let allowed=[];context.allowed.forEach((v,k)=>{if(!HINT.RULE_IS_TRANSPARENT||!(tagFlags&RULE_IS_TRANSPARENT)){v=(v&0xFF00)|(v>>8)}
|
||
allowed.push(tagConfig.allowed[k]&v)});let flags=tagFlags|(context.flags&RULES_INHERITANCE);if(flags&RULE_DISABLE_AUTO_BR){flags&=~RULE_ENABLE_AUTO_BR}
|
||
++cntOpen[tagName];openTags.push(tag);context={parentContext:context};context.allowed=allowed;context.flags=flags}
|
||
function tagIsAllowed(tagName){let n=tagsConfig[tagName].bitNumber;return!!(context.allowed[n>>3]&(1<<(n&7)))}
|
||
function addStartTag(name,pos,len,prio){return addTag(Tag.START_TAG,name,pos,len,prio||0)}
|
||
function addEndTag(name,pos,len,prio){return addTag(Tag.END_TAG,name,pos,len,prio||0)}
|
||
function addSelfClosingTag(name,pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,name,pos,len,prio||0)}
|
||
function addBrTag(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'br',pos,0,prio||0)}
|
||
function addIgnoreTag(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'i',pos,Math.min(len,textLen-pos),prio||0)}
|
||
function addParagraphBreak(pos,prio){return addTag(Tag.SELF_CLOSING_TAG,'pb',pos,0,prio||0)}
|
||
function addCopyTag(tag,pos,len,prio){let copy=addTag(tag.getType(),tag.getName(),pos,len,tag.getSortPriority());copy.setAttributes(tag.getAttributes());return copy}
|
||
function addTag(type,name,pos,len,prio){let tag=new Tag(type,name,pos,len,prio||0);if(tagsConfig[name]){tag.setFlags(tagsConfig[name].rules.flags)}
|
||
if((!tagsConfig[name]&&!tag.isSystemTag())||isInvalidTextSpan(pos,len)){tag.invalidate()}else if(tagsConfig[name]&&tagsConfig[name].isDisabled){logger.warn('Tag is disabled',{'tag':tag,'tagName':name});tag.invalidate()}else{insertTag(tag)}
|
||
return tag}
|
||
function isInvalidTextSpan(pos,len){return(len<0||pos<0||pos+len>textLen||/[\uDC00-\uDFFF]/.test(text.substring(pos,pos+1)+text.substring(pos+len,pos+len+1)))}
|
||
function insertTag(tag){if(!tagStackIsSorted){tagStack.push(tag)}else{let i=tagStack.length,key=getSortKey(tag);while(i>0&&key>getSortKey(tagStack[i-1])){tagStack[i]=tagStack[i-1];--i}
|
||
tagStack[i]=tag}}
|
||
function addTagPair(name,startPos,startLen,endPos,endLen,prio){let endTag=addEndTag(name,endPos,endLen,-prio||0),startTag=addStartTag(name,startPos,startLen,prio||0);startTag.pairWith(endTag);return startTag}
|
||
function addVerbatim(pos,len,prio){return addTag(Tag.SELF_CLOSING_TAG,'v',pos,len,prio||0)}
|
||
function sortTags(){let arr={},keys=[],i=tagStack.length;while(--i>=0){let tag=tagStack[i],key=getSortKey(tag,i);keys.push(key);arr[key]=tag}
|
||
keys.sort();i=keys.length;tagStack=[];while(--i>=0){tagStack.push(arr[keys[i]])}
|
||
tagStackIsSorted=!0}
|
||
function getSortKey(tag,tagIndex){let prioFlag=(tag.getSortPriority()>=0),prio=tag.getSortPriority();if(!prioFlag){prio+=(1<<30)}
|
||
let lenFlag=(tag.getLen()>0),lenOrder;if(lenFlag){lenOrder=textLen-tag.getLen()}else{let order={};order[Tag.END_TAG]=0;order[Tag.SELF_CLOSING_TAG]=1;order[Tag.START_TAG]=2;lenOrder=order[tag.getType()]}
|
||
return hex32(tag.getPos())+(+prioFlag)+hex32(prio)+(+lenFlag)+hex32(lenOrder)+hex32(tagIndex||0)}
|
||
function hex32(number){let hex=number.toString(16);return" ".substring(hex.length)+hex}
|
||
let xslt={init:function(xsl){xslt.proc=new XSLTProcessor;xslt.proc.importStylesheet(xslt.loadXML(xsl))},loadXML:function(xml){const dom=(new DOMParser).parseFromString(xml,'text/xml');if(!dom){throw 'Cannot parse '+xml}
|
||
return dom},setParameter:function(paramName,paramValue){xslt.proc.setParameter(null,paramName,paramValue)},transformToFragment:function(xml,targetDoc){return xslt.proc.transformToFragment(xslt.loadXML(xml),targetDoc)}};xslt.init(xsl);function preview(text,target){let targetDoc=target.ownerDocument;if(!targetDoc){throw 'Target does not have a ownerDocument'}
|
||
let resultFragment=xslt.transformToFragment(parse(text).replace(/<[eis]>[^<]*<\/[eis]>/g,''),targetDoc),lastUpdated=target;if(typeof window!=='undefined'&&'chrome' in window){resultFragment.querySelectorAll('script').forEach(function(oldScript){let newScript=document.createElement('script');for(let attribute of oldScript.attributes){newScript.setAttribute(attribute.name,attribute.value)}
|
||
newScript.textContent=oldScript.textContent;oldScript.parentNode.replaceChild(newScript,oldScript)})}
|
||
if(HINT.hash){computeHashes(resultFragment)}
|
||
if(HINT.onRender){executeEvents(resultFragment,'render')}
|
||
function computeHashes(fragment){let nodes=fragment.querySelectorAll('[data-s9e-livepreview-hash]'),i=nodes.length;while(--i>=0){nodes[i].setAttribute('data-s9e-livepreview-hash',hash(nodes[i].outerHTML))}}
|
||
function executeEvent(node,eventName){let code=node.getAttribute('data-s9e-livepreview-on'+eventName),codeHash=hash(code);if(!functionCache[codeHash]){functionCache[codeHash]=new Function(code)}
|
||
functionCache[codeHash].call(node)}
|
||
function executeEvents(root,eventName){if(root instanceof Element&&root.hasAttribute('data-s9e-livepreview-on'+eventName)){executeEvent(root,eventName)}
|
||
let nodes=root.querySelectorAll('[data-s9e-livepreview-on'+eventName+']'),i=nodes.length;while(--i>=0){executeEvent(nodes[i],eventName)}}
|
||
function refreshElementContent(oldParent,newParent){let oldNodes=oldParent.childNodes,newNodes=newParent.childNodes,oldCnt=oldNodes.length,newCnt=newNodes.length,oldNode,newNode,left=0,right=0;while(left<oldCnt&&left<newCnt){oldNode=oldNodes[left];newNode=newNodes[left];if(!refreshNode(oldNode,newNode)){break}
|
||
++left}
|
||
let maxRight=Math.min(oldCnt-left,newCnt-left);while(right<maxRight){oldNode=oldNodes[oldCnt-(right+1)];newNode=newNodes[newCnt-(right+1)];if(!refreshNode(oldNode,newNode)){break}
|
||
++right}
|
||
let i=oldCnt-right;while(--i>=left){oldParent.removeChild(oldNodes[i]);lastUpdated=oldParent}
|
||
let rightBoundary=newCnt-right;if(left>=rightBoundary){return}
|
||
let newNodesFragment=targetDoc.createDocumentFragment();i=left;do{newNode=newNodes[i];if(HINT.onUpdate&&newNode instanceof Element){executeEvents(newNode,'update')}
|
||
lastUpdated=newNodesFragment.appendChild(newNode)}
|
||
while(i<--rightBoundary);if(!right){oldParent.appendChild(newNodesFragment)}else{oldParent.insertBefore(newNodesFragment,oldParent.childNodes[left])}}
|
||
function refreshNode(oldNode,newNode){if(oldNode.nodeName!==newNode.nodeName||oldNode.nodeType!==newNode.nodeType){return!1}
|
||
if(oldNode instanceof HTMLElement&&newNode instanceof HTMLElement){if(!oldNode.isEqualNode(newNode)&&!elementHashesMatch(oldNode,newNode)){if(HINT.onUpdate&&newNode.hasAttribute('data-s9e-livepreview-onupdate')){executeEvent(newNode,'update')}
|
||
syncElementAttributes(oldNode,newNode);refreshElementContent(oldNode,newNode)}}else if(oldNode.nodeType===3||oldNode.nodeType===8){if(oldNode.nodeValue!==newNode.nodeValue){oldNode.nodeValue=newNode.nodeValue;lastUpdated=oldNode}}
|
||
return!0}
|
||
function elementHashesMatch(oldEl,newEl){if(!HINT.hash){return!1}
|
||
const attrName='data-s9e-livepreview-hash';return oldEl.hasAttribute(attrName)&&newEl.hasAttribute(attrName)&&oldEl.getAttribute(attrName)===newEl.getAttribute(attrName)}
|
||
function hash(text){let pos=text.length,s1=0,s2=0;while(--pos>=0){s1=(s1+text.charCodeAt(pos))%0xFFFF;s2=(s1+s2)%0xFFFF}
|
||
return(s2<<16)|s1}
|
||
function syncElementAttributes(oldEl,newEl){let oldAttributes=oldEl.attributes,newAttributes=newEl.attributes,oldCnt=oldAttributes.length,newCnt=newAttributes.length,i=oldCnt,ignoreAttrs=' '+oldEl.getAttribute('data-s9e-livepreview-ignore-attrs')+' ';while(--i>=0){let oldAttr=oldAttributes[i],namespaceURI=oldAttr.namespaceURI,attrName=oldAttr.name;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
|
||
if(!newEl.hasAttributeNS(namespaceURI,attrName)){oldEl.removeAttributeNS(namespaceURI,attrName);lastUpdated=oldEl}}
|
||
i=newCnt;while(--i>=0){let newAttr=newAttributes[i],namespaceURI=newAttr.namespaceURI,attrName=newAttr.name,attrValue=newAttr.value;if(HINT.ignoreAttrs&&ignoreAttrs.indexOf(' '+attrName+' ')>-1){continue}
|
||
if(attrValue!==oldEl.getAttributeNS(namespaceURI,attrName)){oldEl.setAttributeNS(namespaceURI,attrName,attrValue);lastUpdated=oldEl}}}
|
||
refreshElementContent(target,resultFragment);return lastUpdated}
|
||
function setParameter(paramName,paramValue){xslt.setParameter(paramName,paramValue)}if(!window.s9e)window.s9e={};window.s9e.TextFormatter={'preview':preview}})();
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:a=>{var o=a&&a.__esModule?()=>a.default:()=>a;return t.d(o,{a:o}),o},d:(a,o)=>{for(var s in o)t.o(o,s)&&!t.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})},o:(t,a)=>Object.prototype.hasOwnProperty.call(t,a),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};(()=>{"use strict";t.r(a),t.d(a,{extend:()=>et});const o=flarum.core.compat["forum/app"];var s=t.n(o),e=function(){function t(t){this.app=t,this.loading=!1}return t.prototype.load=function(){var t=this;this.cache&&!this.app.session.user.attribute("newFlagCount")||(this.loading=!0,m.redraw(),this.app.store.find("flags").then((function(a){t.app.session.user.pushAttributes({newFlagCount:0}),t.cache=a.sort((function(t,a){return a.createdAt()-t.createdAt()}))})).catch((function(){})).then((function(){t.loading=!1,m.redraw()})))},t}();const n=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/utils/PostControls"];var l=t.n(r);const i=flarum.core.compat["common/components/Button"];var c=t.n(i);function u(t,a){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},u(t,a)}function f(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,u(t,a)}const p=flarum.core.compat["common/components/Modal"];var d=t.n(p);const g=flarum.core.compat["common/utils/Stream"];var h=t.n(g);const v=flarum.core.compat["common/utils/withAttr"];var _=t.n(v);const b=flarum.core.compat["common/utils/ItemList"];var y=t.n(b),N=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.success=!1,this.reason=h()(""),this.reasonDetail=h()("")},o.className=function(){return"FlagPostModal Modal--medium"},o.title=function(){return s().translator.trans("flarum-flags.forum.flag_post.title")},o.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},s().translator.trans("flarum-flags.forum.flag_post.confirmation_message")),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},s().translator.trans("flarum-flags.forum.flag_post.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("div",null,this.flagReasons().toArray())),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary Button--block",type:"submit",loading:this.loading,disabled:!this.reason()},s().translator.trans("flarum-flags.forum.flag_post.submit_button")))))},o.flagReasons=function(){var t=new(y()),a=s().forum.attribute("guidelinesUrl");return t.add("off-topic",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"off_topic"===this.reason(),value:"off_topic",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_off_topic_text"),"off_topic"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),70),t.add("inappropriate",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"inappropriate"===this.reason(),value:"inappropriate",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_inappropriate_text",{a:a?m("a",{href:a,target:"_blank"}):void 0}),"inappropriate"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),60),t.add("spam",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"spam"===this.reason(),value:"spam",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_spam_label")),s().translator.trans("flarum-flags.forum.flag_post.reason_spam_text"),"spam"===this.reason()&&m("textarea",{className:"FormControl",placeholder:s().translator.trans("flarum-flags.forum.flag_post.reason_details_placeholder"),value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),50),t.add("other",m("label",{className:"checkbox"},m("input",{type:"radio",name:"reason",checked:"other"===this.reason(),value:"other",onclick:_()("value",this.reason)}),m("strong",null,s().translator.trans("flarum-flags.forum.flag_post.reason_other_label")),"other"===this.reason()&&m("textarea",{className:"FormControl",value:this.reasonDetail(),oninput:_()("value",this.reasonDetail)})),10),t},o.onsubmit=function(t){var a=this;t.preventDefault(),this.loading=!0,s().store.createRecord("flags").save({reason:"other"===this.reason()?null:this.reason(),reasonDetail:this.reasonDetail(),relationships:{user:s().session.user,post:this.attrs.post}},{errorHandler:this.onerror.bind(this)}).then((function(){return a.success=!0})).catch((function(){})).then(this.loaded.bind(this))},a}(d());function F(){(0,n.extend)(l(),"userControls",(function(t,a){!a.isHidden()&&"comment"===a.contentType()&&a.canFlag()&&t.add("flag",m(c(),{icon:"fas fa-flag",onclick:function(){return s().modal.show(N,{post:a})}},s().translator.trans("flarum-flags.forum.post_controls.flag_button")))}))}const x=flarum.core.compat["forum/components/HeaderSecondary"];var w=t.n(x);const k=flarum.core.compat["forum/components/NotificationsDropdown"];var P=t.n(k);const C=flarum.core.compat["common/Component"];var D=t.n(C);const A=flarum.core.compat["common/components/Link"];var O=t.n(A);const M=flarum.core.compat["common/components/LoadingIndicator"];var L=t.n(M);const B=flarum.core.compat["common/helpers/avatar"];var j=t.n(B);const S=flarum.core.compat["common/helpers/username"];var T=t.n(S);const R=flarum.core.compat["common/helpers/icon"];var I=t.n(R);const E=flarum.core.compat["common/helpers/humanTime"];var H=t.n(E),U=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.state=this.attrs.state},o.view=function(){var t=this.state.cache||[];return m("div",{className:"NotificationList FlagList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},s().translator.trans("flarum-flags.forum.flagged_posts.title"))),m("div",{className:"NotificationList-content"},m("ul",{className:"NotificationGroup-content"},t.length?t.map((function(t){var a=t.post();return m("li",null,m(O(),{href:s().route.post(a),className:"Notification Flag",onclick:function(t){s().flags.index=a,t.redraw=!1}},j()(a.user()),I()("fas fa-flag",{className:"Notification-icon"}),m("span",{className:"Notification-content"},s().translator.trans("flarum-flags.forum.flagged_posts.item_text",{username:T()(a.user()),em:m("em",null),discussion:a.discussion().title()})),H()(t.createdAt()),m("div",{className:"Notification-excerpt"},a.contentPlain())))})):this.state.loading?m(L(),{className:"LoadingIndicator--block"}):m("div",{className:"NotificationList-empty"},s().translator.trans("flarum-flags.forum.flagged_posts.empty_text")))))},a}(D()),G=function(t){function a(){return t.apply(this,arguments)||this}f(a,t),a.initAttrs=function(a){a.label=a.label||s().translator.trans("flarum-flags.forum.flagged_posts.tooltip"),a.icon=a.icon||"fas fa-flag",t.initAttrs.call(this,a)};var o=a.prototype;return o.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.attrs.menuClassName,onclick:this.menuClick.bind(this)},this.showing&&m(U,{state:this.attrs.state}))},o.goToRoute=function(){m.route.set(s().route("flags"))},o.getUnreadCount=function(){return s().flags.cache?s().flags.cache.length:s().forum.attribute("flagCount")},o.getNewCount=function(){return s().session.user.attribute("newFlagCount")},a}(P());function q(){(0,n.extend)(w().prototype,"items",(function(t){s().forum.attribute("canViewFlags")&&t.add("flags",m(G,{state:s().flags}),15)}))}const z=flarum.core.compat["forum/components/Post"];var V=t.n(z);const J=flarum.core.compat["common/utils/humanTime"];var K=t.n(J);function Q(){(0,n.extend)(V().prototype,"elementAttrs",(function(t){this.attrs.post.flags().length&&(t.className+=" Post--flagged")})),V().prototype.dismissFlag=function(t){var a=this.attrs.post;return delete a.data.relationships.flags,this.subtree.invalidate(),s().flags.cache&&s().flags.cache.some((function(t,o){if(t.post()===a){if(s().flags.cache.splice(o,1),s().flags.index===a){var e=s().flags.cache[o];if(e||(e=s().flags.cache[0]),e){var n=e.post();s().flags.index=n,m.route.set(s().route.post(n))}}return!0}})),s().request({url:s().forum.attribute("apiUrl")+a.apiEndpoint()+"/flags",method:"DELETE",body:t})},V().prototype.flagActionItems=function(){var t=this,a=new(y()),o=l().destructiveControls(this.attrs.post);return Object.keys(o.items).forEach((function(a){var s=o.get(a).attrs;s.className="Button",(0,n.extend)(s,"onclick",(function(){return t.dismissFlag()}))})),a.add("controls",m("div",{className:"ButtonGroup"},o.toArray())),a.add("dismiss",m(c(),{className:"Button",icon:"far fa-eye-slash",onclick:this.dismissFlag.bind(this)},s().translator.trans("flarum-flags.forum.post.dismiss_flag_button")),-100),a},(0,n.extend)(V().prototype,"viewItems",(function(t){var a=this,o=this.attrs.post,s=o.flags();s.length&&(o.isHidden()&&(this.revealContent=!0),t.add("flagged",m("div",{className:"Post-flagged"},m("div",{className:"Post-flagged-flags"},s.map((function(t){return m("div",{className:"Post-flagged-flag"},a.flagReason(t))}))),m("div",{className:"Post-flagged-actions"},this.flagActionItems().toArray())),110))})),V().prototype.flagReason=function(t){if("user"===t.type()){var a=t.user(),o=t.reason()?s().translator.trans("flarum-flags.forum.flag_post.reason_"+t.reason()+"_label"):null,e=t.reasonDetail(),n=K()(t.createdAt());return[s().translator.trans(o?"flarum-flags.forum.post.flagged_by_with_reason_text":"flarum-flags.forum.post.flagged_by_text",{time:n,user:a,reason:o}),!!e&&m("span",{className:"Post-flagged-detail"},e)]}}}const W=flarum.core.compat["common/extenders"];var X=t.n(W);const Y=flarum.core.compat["common/models/Post"];var Z=t.n(Y);const $=flarum.core.compat["components/Page"];var tt=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),s().history.push("flags"),s().flags.load(),this.bodyClass="App--flags"},o.view=function(){return m("div",{className:"FlagsPage"},m(U,{state:s().flags}))},a}(t.n($)());const at=flarum.core.compat["common/Model"];var ot=t.n(at),st=function(t){function a(){return t.apply(this,arguments)||this}f(a,t);var o=a.prototype;return o.type=function(){return ot().attribute("type").call(this)},o.reason=function(){return ot().attribute("reason").call(this)},o.reasonDetail=function(){return ot().attribute("reasonDetail").call(this)},o.createdAt=function(){return ot().attribute("createdAt",ot().transformDate).call(this)},o.post=function(){return ot().hasOne("post").call(this)},o.user=function(){return ot().hasOne("user").call(this)},a}(ot());const et=[(new(X().Routes)).add("flags","/flags",tt),(new(X().Store)).add("flags",st),new(X().Model)(Z()).hasMany("flags").attribute("canFlag")],nt={"flags/addFlagsToPosts":Q,"flags/addFlagControl":F,"flags/addFlagsDropdown":q,"flags/models/Flag":st,"flags/components/FlagList":U,"flags/components/FlagPostModal":N,"flags/components/FlagsPage":tt,"flags/components/FlagsDropdown":G,"flags/states/FlagListState":e},rt=flarum.core;s().initializers.add("flarum-flags",(function(){s().flags=new e(s()),F(),q(),Q()})),Object.assign(rt.compat,nt)})(),module.exports=a})();
|
||
|
||
|
||
flarum.extensions['flarum-flags']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={297:(t,e,n)=>{var r=n(570)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},361:()=>{},433:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},570:(t,e,n)=>{var r=n(433).default;function a(){"use strict";t.exports=a=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},o=Object.prototype,s=o.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",m=c.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(e){d=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var a=e&&e.prototype instanceof T?e:T,o=Object.create(a.prototype),s=new E(r||[]);return i(o,"_invoke",{value:C(t,n,s)}),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=f;var h="suspendedStart",g="suspendedYield",v="executing",y="completed",b={};function T(){}function x(){}function w(){}var _={};d(_,l,(function(){return this}));var N=Object.getPrototypeOf,L=N&&N(N(O([])));L&&L!==o&&s.call(L,l)&&(_=L);var I=w.prototype=T.prototype=Object.create(_);function P(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(a,o,i,c){var l=p(t[a],t,o);if("throw"!==l.type){var u=l.arg,m=u.value;return m&&"object"==r(m)&&s.call(m,"__await")?e.resolve(m.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(m).then((function(t){u.value=t,i(u)}),(function(t){return n("throw",t,i,c)}))}c(l.arg)}var a;i(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}})}function C(t,n,r){var a=h;return function(o,s){if(a===v)throw Error("Generator is already running");if(a===y){if("throw"===o)throw s;return{value:e,done:!0}}for(r.method=o,r.arg=s;;){var i=r.delegate;if(i){var c=k(i,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===h)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var l=p(t,n,r);if("normal"===l.type){if(a=r.done?y:g,l.arg===b)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=y,r.method="throw",r.arg=l.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=p(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,b;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(s.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(r(t)+" is not iterable")}return x.prototype=w,i(I,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:x,configurable:!0}),x.displayName=d(w,m,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,m,"GeneratorFunction")),t.prototype=Object.create(I),t},n.awrap=function(t){return{__await:t}},P(S.prototype),d(S.prototype,u,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,a,o){void 0===o&&(o=Promise);var s=new S(f(t,e,r,a),o);return n.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},P(I),d(I,m,"Generator"),d(I,l,(function(){return this})),d(I,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&s.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,a){return i.type="throw",i.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=s.call(o,"catchLoc"),l=s.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,b):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;D(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},n}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},627:(t,e,n)=>{"use strict";n.d(e,{X:()=>Ut});const r=flarum.core.compat["forum/app"];var a=n.n(r);function o(t,e,n,r,a,o,s){try{var i=t[o](s),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,a)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var s=t.apply(e,n);function i(t){o(s,r,a,i,c,"next",t)}function c(t){o(s,r,a,i,c,"throw",t)}i(void 0)}))}}var i=n(297),c=n.n(i);const l=flarum.core.compat["common/app"];var u=n.n(l),d=function(){function t(){this.loadedIncludes=void 0}var e=t.prototype;return e.load=function(){var t=s(c().mark((function t(e){var n,r=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),this.loadedIncludes){t.next=3;break}return t.abrupt("return",this.query(e));case 3:if(0!==(n=e.filter((function(t){return!r.loadedIncludes.has(t)}))).length){t.next=6;break}return t.abrupt("return",Promise.resolve(u().store.all("tags")));case 6:return t.abrupt("return",this.query(n));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.query=function(){var t=s(c().mark((function t(e){var n=this;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),t.abrupt("return",u().store.find("tags",{include:e.join(",")}).then((function(t){return e.forEach((function(t){return n.loadedIncludes.add(t)})),t})));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}();const f=flarum.core.compat["common/extend"],p=flarum.core.compat["forum/components/IndexPage"];var h=n.n(p);const g=flarum.core.compat["common/components/Separator"];var v=n.n(g);const y=flarum.core.compat["common/components/LinkButton"];var b=n.n(y);function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}function x(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,T(t,e)}const w=flarum.core.compat["common/components/Link"];var _=n.n(w);const N=flarum.core.compat["common/utils/classList"];var L=n.n(N);function I(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),a=n.useColor,o=void 0===a||a;return e.className=L()([e.className,"icon",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color(),r&&(e.style.color=t.color())):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}var P=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=e&&e.description(),r=L()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(_(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:n||void 0},I(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))},e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.model;e.params.tags=n?n.slug():"untagged",e.route=app.route("tag",e.params)},e}(b());const S=flarum.core.compat["common/components/Page"];var C=n.n(S);const k=flarum.core.compat["common/components/LoadingIndicator"];var A=n.n(k);const D=flarum.core.compat["common/helpers/listItems"];var E=n.n(D);const O=flarum.core.compat["common/utils/ItemList"];var M=n.n(O);const R=flarum.core.compat["common/helpers/humanTime"];var j=n.n(R);const q=flarum.core.compat["common/helpers/textContrastClass"];var B=n.n(q);const H=flarum.core.compat["common/utils/extract"];var F=n.n(H);function G(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=F()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var a=t.color();a&&(e.style["--tag-bg"]=a,e.className=L()(e.className,"colored",B()(a))),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?_():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&I(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}function V(t){return t.slice(0).sort((function(t,e){var n=t.position(),r=e.position();if(null===n&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===n)return 1;var a=t.parent(),o=e.parent();return a===o?n-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:n-o.position():0}))}var K=function(t){function e(){return t.apply(this,arguments)||this}x(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),app.history.push("tags",app.translator.trans("flarum-tags.forum.header.back_to_tags_tooltip")),this.tags=[];var r=app.preloadedApiDocument();r?this.tags=V(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=V(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.setTitle(app.translator.trans("flarum-tags.forum.all_tags.meta_title_text")),app.setTitleCount(0)},n.view=function(){return m("div",{className:"TagsPage"},this.pageContent().toArray())},n.pageContent=function(){var t=new(M());return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new(M());return t.add("sidebar",this.sidebar(),100),t.add("content",this.content(),10),t},n.content=function(){return m("div",{className:"TagsPage-content sideNavOffset"},this.contentItems().toArray())},n.contentItems=function(){var t=new(M());if(this.loading)t.add("loading",m(A(),null));else{var e=this.tags.filter((function(t){return null!==t.position()})),n=this.tags.filter((function(t){return null===t.position()}));t.add("tagTiles",this.tagTileListView(e),100),n.length&&t.add("cloud",this.cloudView(n),10)}return t},n.hero=function(){return h().prototype.hero()},n.sidebar=function(){return m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,E()(this.sidebarItems().toArray())))},n.sidebarItems=function(){return h().prototype.sidebarItems()},n.tagTileListView=function(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))},n.tagTileView=function(t){var e=t.lastPostedDiscussion(),n=V(t.children()||[]);return m("li",{className:L()("TagTile",{colored:t.color()},B()(t.color())),style:{"--tag-bg":t.color()}},m(_(),{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&I(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name()),m("p",{className:"TagTile-description"},t.description()),!!n&&m("div",{className:"TagTile-children"},n.map((function(t){return[m(_(),{href:app.route.tag(t)},t.name())," "]})))),e?m(_(),{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),j()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))},n.cloudView=function(t){return m("div",{className:"TagCloud"},t.map((function(t){return[G(t,{link:!0})," "]})))},e}(C());function $(){(0,f.extend)(h().prototype,"navItems",(function(t){if(t.add("tags",m(b(),{icon:"fas fa-th-large",href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.tags_link")),-10),!a().current.matches(K)){t.add("separator",m(v(),null),-12);var e=a().search.stickyParams(),n=a().store.all("tags"),r=this.currentTag(),o=function(n){var a=r===n;!a&&r&&(a=r.parent()===n),t.add("tag"+n.id(),m(P,{model:n,params:e,active:a},null==n?void 0:n.name()),-14)};V(n).filter((function(t){return null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent()))})).forEach(o);var s=n.filter((function(t){return null===t.position()})).sort((function(t,e){return e.discussionCount()-t.discussionCount()}));s.splice(0,3).forEach(o),s.length&&t.add("moreTags",m(b(),{href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.more_link")),-16)}}))}const U=flarum.core.compat["forum/states/DiscussionListState"];var X=n.n(U);const Y=flarum.core.compat["forum/states/GlobalSearchState"];var z=n.n(Y);const J=flarum.core.compat["common/Component"];var Q=n.n(J),W=function(t){function e(){return t.apply(this,arguments)||this}x(e,t);var n=e.prototype;return n.view=function(){var t,e=this.attrs.model.color();return m("header",{className:L()("Hero","TagHero",(t={"TagHero--colored":e},t[B()(e)]=e,t)),style:e?{"--hero-bg":e}:void 0},m("div",{className:"container"},this.viewItems().toArray()))},n.viewItems=function(){var t=new(M());return t.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),t},n.contentItems=function(){var t=new(M()),e=this.attrs.model;return t.add("tag-title",m("h1",{className:"Hero-title"},e.icon()&&I(e,{},{useColor:!1})," ",e.name()),100),t.add("tag-subtitle",m("div",{className:"Hero-subtitle"},e.description()),90),t},e}(Q()),Z=function(t){return a().store.all("tags").find((function(e){return 0===e.slug().localeCompare(t,void 0,{sensitivity:"base"})}))};function tt(){h().prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=a().search.params().tags,n=null;if(e&&(n=Z(e)),e&&!n||n&&!n.isChild()&&!n.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,a().store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=Z(e),m.redraw()})).finally((function(){t.currentTagLoading=!1}))}return n?(this.currentActiveTag=n,this.currentActiveTag):void 0},(0,f.override)(h().prototype,"hero",(function(t){var e=this.currentTag();return e?m(W,{model:e}):t()})),(0,f.extend)(h().prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,f.extend)(h().prototype,"setTitle",(function(){var t=this.currentTag();t&&a().setTitle(t.name())})),(0,f.extend)(h().prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");n&&(o.attrs.className=L()([o.attrs.className,"Button--tagColored",B()(n)]),o.attrs.style={"--color":n}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,f.extend)(z().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,f.extend)(X().prototype,"requestParams",(function(t){var e;if("string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags){var n,r=null!=(n=t.filter)?n:{};r.tag=this.params.tags;var a=r.q;a&&(r.q=a+" tag:"+this.params.tags),t.filter=r}}))}const et=flarum.core.compat["forum/components/DiscussionListItem"];var nt=n.n(et);const rt=flarum.core.compat["forum/components/DiscussionHero"];var at=n.n(rt);function ot(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}var st=["link"];function it(t,e){void 0===e&&(e={});var n=[],r=e,a=r.link,o=ot(r,st);return o.className=L()("TagsLabel",o.className),t?V(t).forEach((function(e){(e||1===t.length)&&n.push(G(e,{link:a}))})):n.push(G()),m("span",o,n)}function ct(){(0,f.extend)(nt().prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",it(e),10)})),(0,f.extend)(at().prototype,"view",(function(t){var e=V(this.attrs.discussion.tags());if(e&&e.length){var n=e[0].color();n&&(t.attrs.style={"--hero-bg":n},t.attrs.className=L()(t.attrs.className,"DiscussionHero--colored",B()(n)))}})),(0,f.extend)(at().prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",it(e,{link:!0}),5)}))}const lt=flarum.core.compat["forum/utils/DiscussionControls"];var ut=n.n(lt);const mt=flarum.core.compat["common/components/Button"];var dt=n.n(mt);const ft=flarum.core.compat["forum/components/DiscussionPage"];var pt=n.n(ft);const ht=flarum.core.compat["common/utils/extractText"];var gt=n.n(ht);function vt(t){var e=app.store.all("tags");return t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}const yt=flarum.core.compat["common/helpers/highlight"];var bt=n.n(yt);const Tt=flarum.core.compat["common/utils/KeyboardNavigatable"];var xt=n.n(Tt);const wt=flarum.core.compat["common/components/Modal"];var _t=n.n(wt);const Nt=flarum.core.compat["common/utils/Stream"];var Lt=n.n(Nt),It=["className","isToggled"],Pt=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.isToggled,a=ot(e,It),o=r?"far fa-check-circle":"far fa-circle";return m(dt(),Object.assign({},a,{icon:o,className:L()([n,r&&"Button--toggled"])}),t.children)},e}(Q()),St=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.tags=void 0,e.selected=[],e.bypassReqs=!1,e.filter=Lt()(""),e.focused=!1,e.navigator=new(xt()),e.indexTag=void 0,e}x(e,t),e.initAttrs=function(e){var n,r,a,o,s,i,c,l,m,d,f,p;t.initAttrs.call(this,e),e.title||(e.title=gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.title"))),e.canSelect||(e.canSelect=function(){return!0}),null!=e.allowResetting||(e.allowResetting=!0),e.limits={min:{total:null!=(n=null==(r=e.limits)||null==(r=r.min)?void 0:r.total)?n:-1/0,primary:null!=(a=null==(o=e.limits)||null==(o=o.min)?void 0:o.primary)?a:-1/0,secondary:null!=(s=null==(i=e.limits)||null==(i=i.min)?void 0:i.secondary)?s:-1/0},max:{total:null!=(c=null==(l=e.limits)||null==(l=l.max)?void 0:l.total)?c:1/0,primary:null!=(m=null==(d=e.limits)||null==(d=d.max)?void 0:d.primary)?m:1/0,secondary:null!=(f=null==(p=e.limits)||null==(p=p.max)?void 0:p.secondary)?f:1/0}},function(t){if(t.min.primary>t.max.primary)throw new Error("The minimum number of primary tags allowed cannot be more than the maximum number of primary tags allowed.");if(t.min.secondary>t.max.secondary)throw new Error("The minimum number of secondary tags allowed cannot be more than the maximum number of secondary tags allowed.");if(t.min.total>t.max.primary+t.max.secondary)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of primary and secondary tags allowed together.");if(t.max.total<t.min.primary+t.min.secondary)throw new Error("The maximum number of tags allowed cannot be less than the minimum number of primary and secondary tags allowed together.");if(t.min.total>t.max.total)throw new Error("The minimum number of tags allowed cannot be more than the maximum number of tags allowed.")}(e.limits)};var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),u().tagList.load(["parent"]).then((function(t){n.loading=!1,n.attrs.selectableTags&&(t=n.attrs.selectableTags(t)),n.tags=V(t),n.attrs.selectedTags&&n.attrs.selectedTags.map(n.addTag.bind(n)),n.indexTag=t[0],m.redraw()}))},n.className=function(){return L()("TagSelectionModal",this.attrs.className)},n.title=function(){return this.attrs.title},n.content=function(){var t=this;if(this.loading||!this.tags)return m(A(),null);var e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),a=this.getFilteredTags(),o=Math.max(gt()(this.getInstruction(n,r)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagSelectionModal-form"},m("div",{className:"TagSelectionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},G(e))}))),m("input",{className:"FormControl",placeholder:gt()(this.getInstruction(n,r)),bidi:this.filter,style:{width:o+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagSelectionModal-form-submit App-primaryControl"},m(dt(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(n,r),icon:"fas fa-check"},u().translator.trans("flarum-tags.lib.tag_selection_modal.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagSelectionModal-list SelectTagList"},a.map((function(n){return m("li",{"data-index":n.id(),className:L()({pinned:null!==n.position(),child:!!n.parent(),colored:!!n.color(),selected:t.selected.includes(n),active:t.indexTag===n}),style:{color:n.color()},onmouseover:function(){return t.indexTag=n},onclick:t.toggleTag.bind(t,n)},I(n),m("span",{className:"SelectTagListItem-name"},bt()(n.name(),e)),n.description()?m("span",{className:"SelectTagListItem-description"},n.description()):"")}))),this.attrs.limits.allowBypassing&&m("div",{className:"TagSelectionModal-controls"},m(Pt,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},u().translator.trans("flarum-tags.lib.tag_selection_modal.bypass_requirements"))))]},n.getFilteredTags=function(){var t=this,e=this.filter().toLowerCase(),n=this.primaryCount(),r=this.secondaryCount(),a=this.tags;return this.attrs.requireParentTag&&(a=a.filter((function(e){var n=e.parent();return null!==n&&(!1===n||t.selected.includes(n))}))),this.bypassReqs||(this.selected.length>=this.attrs.limits.max.total?a=a.filter((function(e){return t.selected.includes(e)})):(n>=this.attrs.limits.max.primary&&(a=a.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),r>=this.attrs.limits.max.secondary&&(a=a.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))))),e&&(a=a.filter((function(t){return t.name().toLowerCase().includes(e)}))),this.indexTag&&a.includes(this.indexTag)||(this.indexTag=a[0]),a},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.meetsRequirements=function(t,e){return!!(this.bypassReqs||this.attrs.allowResetting&&0===this.selected.length)||!(this.selected.length<this.attrs.limits.min.total)&&t>=this.attrs.limits.min.primary&&e>=this.attrs.limits.min.secondary},n.addTag=function(t){if(t&&this.attrs.canSelect(t)){if(this.attrs.onSelect&&this.attrs.onSelect(t,this.selected),this.attrs.requireParentTag){var e=t.parent();e&&!this.selected.includes(e)&&this.selected.push(e)}this.selected.includes(t)||this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.attrs.requireParentTag&&this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)),this.attrs.onDeselect&&this.attrs.onDeselect(t,this.selected))},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.indexTag=this.tags[0]),this.onready())},n.getInstruction=function(t,e){if(this.bypassReqs)return"";if(t<this.attrs.limits.min.primary){var n=this.attrs.limits.min.primary-t;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_primary_placeholder",{count:n}))}if(e<this.attrs.limits.min.secondary){var r=this.attrs.limits.min.secondary-e;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_secondary_placeholder",{count:r}))}if(this.selected.length<this.attrs.limits.min.total){var a=this.attrs.limits.min.total-this.selected.length;return gt()(u().translator.trans("flarum-tags.lib.tag_selection_modal.choose_tags_placeholder",{count:a}))}return""},n.onsubmit=function(t){t.preventDefault(),this.attrs.onsubmit&&this.attrs.onsubmit(this.selected),this.hide()},n.select=function(t){t.metaKey||t.ctrlKey||this.indexTag&&this.selected.includes(this.indexTag)?this.selected.length&&this.$('button[type="submit"]').click():this.indexTag&&this.getItem(this.indexTag)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagSelectionModal-list > li")},n.getCurrentNumericIndex=function(){return this.indexTag?this.selectableItems().index(this.getItem(this.indexTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var a=n.eq(t);if(this.indexTag=u().store.getById("tags",a.attr("data-index")),m.redraw(),e&&this.indexTag){var o,s=r.scrollTop(),i=r.offset().top,c=i+r.outerHeight(),l=a.offset().top,d=l+a.outerHeight();l<i?o=s-i+l-parseInt(r.css("padding-top"),10):d>c&&(o=s-c+d+parseInt(r.css("padding-bottom"),10)),void 0!==o&&r.stop(!0).animate({scrollTop:o},100)}},e}(_t()),Ct=function(t){function e(){return t.apply(this,arguments)||this}return x(e,t),e.initAttrs=function(e){var n;t.initAttrs.call(this,e);var r=e.discussion?a().translator.trans("flarum-tags.forum.choose_tags.edit_title",{title:m("em",null,e.discussion.title())}):a().translator.trans("flarum-tags.forum.choose_tags.title");e.className=L()(e.className,"TagDiscussionModal"),e.title=gt()(r),e.allowResetting=!!a().forum.attribute("canBypassTagCounts"),e.limits={allowBypassing:e.allowResetting,max:{primary:a().forum.attribute("maxPrimaryTags"),secondary:a().forum.attribute("maxSecondaryTags")},min:{primary:a().forum.attribute("minPrimaryTags"),secondary:a().forum.attribute("minSecondaryTags")}},e.requireParentTag=!0,e.selectableTags=function(){return vt(e.discussion)},null!=e.selectedTags||(e.selectedTags=(null==(n=e.discussion)?void 0:n.tags())||[]),e.canSelect=function(t){return t.canStartDiscussion()};var o=e.onsubmit||null;e.onsubmit=function(t){var n=e.discussion;n&&n.save({relationships:{tags:t}}).then((function(){a().current.matches(pt())&&a().current.get("stream").update(),m.redraw()})),o&&o(t)}},e}(St);function kt(){(0,f.extend)(ut(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(dt(),{icon:"fas fa-tag",onclick:function(){return app.modal.show(Ct,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))}const At=flarum.core.compat["forum/components/DiscussionComposer"];var Dt=n.n(At);function Et(){(0,f.extend)(h().prototype,"newDiscussionAction",(function(t){var e=this.currentTag();if(e){var n=e.parent(),r=n?[n,e]:[e];t.then((function(t){return t.fields.tags=r}))}else app.composer.fields.tags=[]})),(0,f.extend)(Dt().prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),Dt().prototype.chooseTags=function(){var t=this;vt().length&&app.modal.show(Ct,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},(0,f.extend)(Dt().prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=vt();t.add("tags",m("a",{className:L()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?it(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,f.override)(Dt().prototype,"onsubmit",(function(t){var e=this,n=this.composer.fields.tags||[],r=n.filter((function(t){return null!==t.position()&&!t.isChild()})),a=n.filter((function(t){return null===t.position()})),o=vt(),s=parseInt(app.forum.attribute("minPrimaryTags")),i=parseInt(app.forum.attribute("minSecondaryTags")),c=parseInt(app.forum.attribute("maxPrimaryTags")),l=parseInt(app.forum.attribute("maxSecondaryTags"));(!n.length&&0!==c&&0!==l||r.length<s||a.length<i)&&o.length?app.modal.show(Ct,{selectedTags:n,onsubmit:function(n){e.composer.fields.tags=n,t()}}):t()})),(0,f.extend)(Dt().prototype,"data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}const Ot=flarum.core.compat["common/extenders"];var Mt=n.n(Ot);const Rt=flarum.core.compat["common/models/Discussion"];var jt=n.n(Rt);const qt=flarum.core.compat["forum/components/EventPost"];var Bt=function(t){function e(){return t.apply(this,arguments)||this}x(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.post.content()[0],r=e.post.content()[1];function a(t,e){return t.filter((function(t){return-1===e.indexOf(t)})).map((function(t){return app.store.getById("tags",t)}))}e.tagsAdded=a(r,n),e.tagsRemoved=a(n,r)};var n=e.prototype;return n.icon=function(){return"fas fa-tag"},n.descriptionKey=function(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"},n.descriptionData=function(){var t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:it(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:it(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(n.n(qt)());const Ht=flarum.core.compat["common/utils/computed"];var Ft=n.n(Ht);const Gt=flarum.core.compat["common/Model"];var Vt=n.n(Gt),Kt=function(t){function e(){return t.apply(this,arguments)||this}x(e,t);var n=e.prototype;return n.name=function(){return Vt().attribute("name").call(this)},n.slug=function(){return Vt().attribute("slug").call(this)},n.description=function(){return Vt().attribute("description").call(this)},n.color=function(){return Vt().attribute("color").call(this)},n.backgroundUrl=function(){return Vt().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return Vt().attribute("backgroundMode").call(this)},n.icon=function(){return Vt().attribute("icon").call(this)},n.position=function(){return Vt().attribute("position").call(this)},n.parent=function(){return Vt().hasOne("parent").call(this)},n.children=function(){return Vt().hasMany("children").call(this)},n.defaultSort=function(){return Vt().attribute("defaultSort").call(this)},n.isChild=function(){return Vt().attribute("isChild").call(this)},n.isHidden=function(){return Vt().attribute("isHidden").call(this)},n.discussionCount=function(){return Vt().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return Vt().attribute("lastPostedAt",Vt().transformDate).call(this)},n.lastPostedDiscussion=function(){return Vt().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return Vt().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return Vt().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return Vt().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return Ft()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(Vt());const $t=[(new(Mt().Store)).add("tags",Kt)],Ut=[].concat($t,[(new(Mt().Routes)).add("tags","/tags",K).add("tag","/t/:tags",h()).helper("tag",(function(t){return a().route("tag",{tags:t.slug()})})),(new(Mt().PostTypes)).add("discussionTagged",Bt),new(Mt().Model)(jt()).hasMany("tags").attribute("canTag")]),Xt={"tags/utils/sortTags":V,"tags/models/Tag":Kt,"tags/helpers/tagsLabel":it,"tags/helpers/tagIcon":I,"tags/helpers/tagLabel":G,"tags/components/TagSelectionModal":St,"tags/states/TagListState":d},Yt=Object.assign(Xt,{"tags/addTagFilter":tt,"tags/addTagControl":kt,"tags/components/TagHero":W,"tags/components/TagDiscussionModal":Ct,"tags/components/TagsPage":K,"tags/components/ToggleButton":Pt,"tags/components/DiscussionTaggedPost":Bt,"tags/components/TagLinkButton":P,"tags/addTagList":$,"tags/addTagLabels":ct,"tags/addTagComposer":Et,"tags/utils/getSelectableTags":vt}),zt=flarum.core;a().initializers.add("flarum-tags",(function(){a().tagList=new d,$(),tt(),ct(),kt(),Et()})),Object.assign(zt.compat,Yt)}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{extend:()=>a.X});var t=n(361),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(r,e);var a=n(627)})(),module.exports=r})();
|
||
|
||
|
||
flarum.extensions['flarum-tags']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var o={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},d:(t,r)=>{for(var e in r)o.o(r,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t);const r=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var a=o.n(e);const p=flarum.core.compat["common/models/Discussion"];var n=o.n(p);const s=flarum.core.compat["common/models/Post"];var i=o.n(s);const c=flarum.core.compat["common/components/Badge"];var u=o.n(c);const l=flarum.core.compat["forum/components/DiscussionListItem"];var d=o.n(l);const v=flarum.core.compat["forum/components/Post"];var f=o.n(v);const A=flarum.core.compat["forum/components/CommentPost"];var y=o.n(A);const b=flarum.core.compat["common/components/Button"];var g=o.n(b);const h=flarum.core.compat["forum/utils/PostControls"];var _=o.n(h);a().initializers.add("flarum-approval",(function(){n().prototype.isApproved=n().attribute("isApproved"),(0,r.extend)(n().prototype,"badges",(function(o){this.isApproved()||o.has("hidden")||o.add("awaitingApproval",m(u(),{type:"awaitingApproval",icon:"fas fa-gavel",label:a().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),i().prototype.isApproved=i().attribute("isApproved"),i().prototype.canApprove=i().attribute("canApprove"),(0,r.extend)(d().prototype,"elementAttrs",(function(o){this.attrs.discussion.isApproved()||(o.className+=" DiscussionListItem--unapproved")})),(0,r.extend)(f().prototype,"elementAttrs",(function(o){this.attrs.post.isApproved()||(o.className+=" Post--unapproved")})),(0,r.extend)(y().prototype,"headerItems",(function(o){this.attrs.post.isApproved()||this.attrs.post.isHidden()||o.add("unapproved",a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,r.override)(f().prototype,"flagReason",(function(o,t){return"approval"===t.type()?a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):o(t)})),(0,r.extend)(_(),"destructiveControls",(function(o,t){!t.isApproved()&&t.canApprove()&&o.add("approve",m(g(),{icon:"fas fa-check",onclick:_().approveAction.bind(t)},a().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),_().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports=t})();
|
||
|
||
|
||
flarum.extensions['flarum-approval']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={440:(t,u,e)=>{var n=e(75).default;function o(){"use strict";t.exports=o=function(){return u},t.exports.__esModule=!0,t.exports.default=t.exports;var u={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,u,e){t[u]=e.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",D=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,u,e){return Object.defineProperty(t,u,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[u]}try{l({},"")}catch(t){l=function(t,u,e){return t[u]=e}}function f(t,u,e,n){var o=u&&u.prototype instanceof d?u:d,r=Object.create(o.prototype),s=new M(n||[]);return i(r,"_invoke",{value:g(t,e,s)}),r}function m(t,u,e){try{return{type:"normal",arg:t.call(u,e)}}catch(t){return{type:"throw",arg:t}}}u.wrap=f;var p={};function d(){}function F(){}function h(){}var C={};l(C,a,(function(){return this}));var A=Object.getPrototypeOf,v=A&&A(A(P([])));v&&v!==e&&r.call(v,a)&&(C=v);var E=h.prototype=d.prototype=Object.create(C);function y(t){["next","throw","return"].forEach((function(u){l(t,u,(function(t){return this._invoke(u,t)}))}))}function B(t,u){function e(o,i,s,a){var D=m(t[o],t,i);if("throw"!==D.type){var c=D.arg,l=c.value;return l&&"object"==n(l)&&r.call(l,"__await")?u.resolve(l.__await).then((function(t){e("next",t,s,a)}),(function(t){e("throw",t,s,a)})):u.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return e("throw",t,s,a)}))}a(D.arg)}var o;i(this,"_invoke",{value:function(t,n){function r(){return new u((function(u,o){e(t,n,u,o)}))}return o=o?o.then(r,r):r()}})}function g(t,u,e){var n="suspendedStart";return function(o,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw r;return{value:void 0,done:!0}}for(e.method=o,e.arg=r;;){var i=e.delegate;if(i){var s=b(i,e);if(s){if(s===p)continue;return s}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var a=m(t,u,e);if("normal"===a.type){if(n=e.done?"completed":"suspendedYield",a.arg===p)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(n="completed",e.method="throw",e.arg=a.arg)}}}function b(t,u){var e=t.iterator[u.method];if(void 0===e){if(u.delegate=null,"throw"===u.method){if(t.iterator.return&&(u.method="return",u.arg=void 0,b(t,u),"throw"===u.method))return p;u.method="throw",u.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=m(e,t.iterator,u.arg);if("throw"===n.type)return u.method="throw",u.arg=n.arg,u.delegate=null,p;var o=n.arg;return o?o.done?(u[t.resultName]=o.value,u.next=t.nextLoc,"return"!==u.method&&(u.method="next",u.arg=void 0),u.delegate=null,p):o:(u.method="throw",u.arg=new TypeError("iterator result is not an object"),u.delegate=null,p)}function w(t){var u={tryLoc:t[0]};1 in t&&(u.catchLoc=t[1]),2 in t&&(u.finallyLoc=t[2],u.afterLoc=t[3]),this.tryEntries.push(u)}function x(t){var u=t.completion||{};u.type="normal",delete u.arg,t.completion=u}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function P(t){if(t){var u=t[a];if(u)return u.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function u(){for(;++e<t.length;)if(r.call(t,e))return u.value=t[e],u.done=!1,u;return u.value=void 0,u.done=!0,u};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return F.prototype=h,i(E,"constructor",{value:h,configurable:!0}),i(h,"constructor",{value:F,configurable:!0}),F.displayName=l(h,c,"GeneratorFunction"),u.isGeneratorFunction=function(t){var u="function"==typeof t&&t.constructor;return!!u&&(u===F||"GeneratorFunction"===(u.displayName||u.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},u.awrap=function(t){return{__await:t}},y(B.prototype),l(B.prototype,D,(function(){return this})),u.AsyncIterator=B,u.async=function(t,e,n,o,r){void 0===r&&(r=Promise);var i=new B(f(t,e,n,o),r);return u.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},y(E),l(E,c,"Generator"),l(E,a,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),u.keys=function(t){var u=Object(t),e=[];for(var n in u)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in u)return t.value=n,t.done=!1,t}return t.done=!0,t}},u.values=P,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var u in this)"t"===u.charAt(0)&&r.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var u=this;function e(e,n){return i.type="throw",i.arg=t,u.next=e,n&&(u.method="next",u.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),a=r.call(o,"finallyLoc");if(s&&a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,u){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=u&&u<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=u,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},complete:function(t,u){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&u&&(this.next=u),p},finish:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),x(e),p}},catch:function(t){for(var u=this.tryEntries.length-1;u>=0;--u){var e=this.tryEntries[u];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;x(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,u,e){return this.delegate={iterator:P(t),resultName:u,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},u}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},75:t=>{function u(e){return t.exports=u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,u(e)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports},507:(t,u,e)=>{var n=e(440)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},u={};function e(n){var o=u[n];if(void 0!==o)return o.exports;var r=u[n]={exports:{}};return t[n](r,r.exports,e),r.exports}e.n=t=>{var u=t&&t.__esModule?()=>t.default:()=>t;return e.d(u,{a:u}),u},e.d=(t,u)=>{for(var n in u)e.o(u,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:u[n]})},e.o=(t,u)=>Object.prototype.hasOwnProperty.call(t,u),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";e.r(n),e.d(n,{extend:()=>su,filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});var t={};e.r(t),e.d(t,{default:()=>J,insertMention:()=>q});var u={};e.r(u),e.d(u,{filterGroupMentions:()=>fu,filterPostMentions:()=>cu,filterTagMentions:()=>pu,filterUserMentions:()=>au,postFilterGroupMentions:()=>mu,postFilterPostMentions:()=>lu,postFilterTagMentions:()=>du,postFilterUserMentions:()=>Du});const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var i=e.n(r);const s=flarum.core.compat["forum/components/NotificationGrid"];var a=e.n(s);const D=flarum.core.compat["common/utils/string"],c=flarum.core.compat["common/helpers/textContrastClass"];var l=e.n(c);const f=flarum.core.compat["forum/components/Post"];var p=e.n(f);const d=flarum.core.compat["forum/components/CommentPost"];var F=e.n(d);const h=flarum.core.compat["forum/components/PostPreview"];var C=e.n(h);const A=flarum.core.compat["common/components/LoadingIndicator"];var v=e.n(A);const E=flarum.core.compat["common/components/Link"];var y=e.n(E);const B=flarum.core.compat["common/helpers/punctuateSeries"];var g=e.n(B);const b=flarum.core.compat["common/helpers/username"];var w=e.n(b);const x=flarum.core.compat["common/helpers/icon"];var M=e.n(x);const P=flarum.core.compat["common/components/Button"];var _=e.n(P);function T(t,u){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,u){return t.__proto__=u,t},T(t,u)}function S(t,u){t.prototype=Object.create(u.prototype),t.prototype.constructor=t,T(t,u)}const k=flarum.core.compat["common/components/Modal"];var L=e.n(k);function j(){return j=Object.assign?Object.assign.bind():function(t){for(var u=1;u<arguments.length;u++){var e=arguments[u];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},j.apply(this,arguments)}function N(t,u){for(var e=0;e<u.length;e++){var n=u[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}const O=flarum.core.compat["common/states/PaginatedListState"];var I=function(t){function u(u,e){return void 0===e&&(e=1),u.page=j({},u.page||{},{limit:10}),t.call(this,u,e,10)||this}var e,n;return S(u,t),e=u,(n=[{key:"type",get:function(){return"posts"}}])&&N(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(e.n(O)()),R=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.oninit=function(u){t.prototype.oninit.call(this,u),this.state=new I({filter:{mentionedPost:this.attrs.post.id()},sort:"number"}),this.state.refresh()},e.className=function(){return"MentionedByModal"},e.title=function(){return i().translator.trans("flarum-mentions.forum.mentioned_by.title")},e.content=function(){var t=this;return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(v(),null):m("[",null,m("ul",{className:"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview"},this.state.getPages().map((function(t){return t.items.map((function(t){return m("li",{"data-number":t.number()},m(C(),{post:t,onclick:function(){return i().modal.close()}}))}))}))))),this.state.hasNext()&&m("div",{className:"Modal-footer"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m(_(),{className:"Button Button--block",onclick:function(){return t.state.loadNext()},loading:this.state.isLoadingNext()},i().translator.trans("flarum-mentions.forum.mentioned_by.load_more_button"))))))},u}(L());const G=flarum.core.compat["forum/utils/DiscussionControls"];var U=e.n(G);const H=flarum.core.compat["forum/components/EditPostComposer"];var W=e.n(H);function q(t,u,e){return new Promise((function(n){var o=i().mentionFormats.mentionable("post").replacement(t)+" ";u.fields.content()||(u.body.attrs.originalContent=o);var r=u.editor.getSelectionRange()[0],s=u.fields.content().slice(0,r),a=0==s.length?0:3-s.match(/(\n{0,2})$/)[0].length;return u.editor.insertAtCursor(Array(a).join("\n")+(e?"> "+o+e.trim().replace(/\n/g,"\n> ")+"\n\n":o),!1),n(u)}))}function J(t,u){return i().composer.bodyMatches(W())&&i().composer.body.attrs.post.discussion()===t.discussion()?q(t,i().composer,u):U().replyAction.call(t.discussion()).then((function(e){return q(t,e,u)}))}const z=flarum.core.compat["common/Fragment"];var Y=e.n(z),Q=function(t){function u(u){var e;return(e=t.call(this)||this).post=u,e}S(u,t);var e=u.prototype;return e.view=function(){var t=this;return m("button",{className:"Button PostQuoteButton",onclick:function(){J(t.post,t.content)}},M()("fas fa-quote-left",{className:"Button-icon"}),i().translator.trans("flarum-mentions.forum.post.quote_button"))},e.show=function(t,u){var e=this.$().show(),n=e.offsetParent().offset();e.css("left",t-n.left).css("top",u-n.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},e.showStart=function(t,u){var e=this.$();this.show(t,$(window).scrollTop()+u-e.outerHeight()-5)},e.showEnd=function(t,u){var e=this.$();this.show(t-e.outerWidth(),$(window).scrollTop()+u+5)},e.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},u}(Y());function X(t){var u=window.getSelection();if(!u.isCollapsed){var e=u.getRangeAt(0),n=e.commonAncestorContainer;if(t[0]===n||$.contains(t[0],n)){var o=$("<div>").append(e.cloneContents());return o.find("img.emoji").replaceWith((function(){return this.alt})),o.find("img").replaceWith((function(){return""})),o.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),o.text()}}return""}const K=flarum.core.compat["common/components/TextEditor"];var V=e.n(K);const Z=flarum.core.compat["common/components/TextEditorButton"];var tt=e.n(Z);const ut=flarum.core.compat["common/utils/KeyboardNavigatable"];var et=e.n(ut),nt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(u=t.call.apply(t,[this].concat(n))||this).items=[],u.active=!1,u.index=0,u.keyWasJustPressed=!1,u}S(u,t);var e=u.prototype;return e.view=function(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((function(t){return m("li",null,t)})))},e.show=function(t,u){this.$().show().css({left:t+"px",top:u+"px"}),this.active=!0},e.hide=function(){this.$().hide(),this.active=!1},e.navigate=function(t){var u=this;this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return u.keyWasJustPressed=!1}),500)},e.complete=function(){this.$("li").eq(this.index).find("button").click()},e.setIndex=function(t,u){if(!this.keyWasJustPressed||u){var e=this.$(),n=e.find("li"),o=t;o<0?o=n.length-1:o>=n.length&&(o=0),this.index=o;var r=n.removeClass("active").eq(o).addClass("active");if(u){var i,s=e.scrollTop(),a=e.offset().top,D=a+e.outerHeight(),c=r.offset().top,l=c+r.outerHeight();c<a?i=s-a+c-parseInt(e.css("padding-top"),10):l>D&&(i=s-D+l+parseInt(e.css("padding-bottom"),10)),void 0!==i&&e.stop(!0).animate({scrollTop:i},100)}}},u}(Y());function ot(t,u){if(null==t)return{};var e,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)e=r[n],u.indexOf(e)>=0||(o[e]=t[e]);return o}function rt(t,u,e,n,o,r,i){try{var s=t[r](i),a=s.value}catch(t){return void e(t)}s.done?u(a):Promise.resolve(a).then(n,o)}function it(t){return function(){var u=this,e=arguments;return new Promise((function(n,o){var r=t.apply(u,e);function i(t){rt(r,n,o,i,s,"next",t)}function s(t){rt(r,n,o,i,s,"throw",t)}i(void 0)}))}}var st=e(507),at=e.n(st);const Dt=flarum.core.compat["common/Component"];var ct=e.n(Dt);const lt=flarum.core.compat["common/utils/classList"];var ft=e.n(lt),mt=["mentionable"],pt=function(t){function u(){return t.apply(this,arguments)||this}return S(u,t),u.prototype.view=function(t){var u=this.attrs,e=u.mentionable,n=ot(u,mt),o=ft()("MentionsDropdownItem","PostPreview","MentionsDropdown-"+e.type());return m("button",Object.assign({className:o},n),m("span",{className:"PostPreview-content"},t.children))},u}(ct());const dt=flarum.core.compat["common/utils/throttleDebounce"];var Ft=["onclick"];function ht(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return Ct(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ct(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ct(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}var At=function(){function t(t){var u=this;this.mentionables=void 0,this.results={},this.typed=null,this.searched=[],this.dropdownItemAttrs={},this.search=(0,dt.throttle)(250,it(at().mark((function t(){var e,n,o,r,i,s,a;return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u.typed&&!(u.typed.length<=1)){t.next=2;break}return t.abrupt("return");case 2:if(e=u.typed.toLowerCase(),!u.searched.includes(e)){t.next=5;break}return t.abrupt("return");case 5:n=ht(u.mentionables);case 6:if((o=n()).done){t.next=20;break}return r=o.value,t.t0=ht,t.next=11,r.search(e);case 11:t.t1=t.sent,i=(0,t.t0)(t.t1);case 13:if((s=i()).done){t.next=18;break}a=s.value,u.results[r.type()].has(a.id())||u.results[r.type()].set(a.id(),a);case 16:t.next=13;break;case 18:t.next=6;break;case 20:return u.searched.push(e),t.abrupt("return",Promise.resolve());case 22:case"end":return t.stop()}}),t)})))),this.dropdownItemAttrs=t}var u=t.prototype;return u.init=function(t){this.typed=null,this.mentionables=t;for(var u,e=ht(this.mentionables);!(u=e()).done;){var n=u.value;this.results[n.type()]=new Map(n.initialResults().map((function(t){return[t.id(),t]})))}},u.matches=function(t,u){var e;return t.matches(u,(null==(e=this.typed)?void 0:e.toLowerCase())||"")},u.makeSuggestion=function(t,u){var e=t.suggestion(u,this.typed),n=t.replacement(u),o=this.dropdownItemAttrs,r=o.onclick,i=ot(o,Ft);return m(pt,Object.assign({mentionable:t,onclick:function(){return r(n)}},i),e)},u.buildSuggestions=function(){for(var t,u=this,e=[],n=function(){var n=t.value;if(!n.enabled())return"continue";var o=Array.from(u.results[n.type()].values()).filter((function(t){return u.matches(n,t)})),r=n.maxStoreMatchedResults();r&&(o=o.splice(0,r));for(var i,s=ht(o);!(i=s()).done;){var a=i.value,D=u.makeSuggestion(n,a);e.push(D)}},o=ht(this.mentionables);!(t=o()).done;)n();return e},t}();const vt=flarum.core.compat["forum/components/Notification"];var Et=e.n(vt),yt=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-reply"},e.href=function(){var t=this.attrs.notification,u=t.subject(),e=t.content();return i().route.discussion(u.discussion(),e&&e.replyNumber)},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain()||"",200)},u}(Et()),Bt=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-at"},e.href=function(){var t=this.attrs.notification.subject();return i().route.discussion(t.discussion(),t.number())},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain(),200)},u}(Et()),gt=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.icon=function(){return"fas fa-at"},e.href=function(){var t=this.attrs.notification.subject();return i().route.discussion(t.discussion(),t.number())},e.content=function(){var t=this.attrs.notification.fromUser();return i().translator.trans("flarum-mentions.forum.notifications.group_mentioned_text",{user:t})},e.excerpt=function(){return(0,D.truncate)(this.attrs.notification.subject().contentPlain(),200)},u}(Et()),bt=function(){function t(){this.instances=void 0,this.mentionables=void 0,this.extendable=void 0}var u=t.prototype;return u.makeMentionables=function(){var t,u=this;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((function(t){return new t(u)}))},u.getMentionable=function(t){var u;return null!=(u=this.makeMentionables().find((function(u){return u.type()===t})))?u:null},u.extend=function(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)},t}();const wt=flarum.core.compat["common/helpers/avatar"];var xt=e.n(wt);const Mt=flarum.core.compat["common/helpers/highlight"];var Pt=e.n(Mt),_t=function(t){this.format=void 0,this.format=t};const Tt=flarum.core.compat["common/utils/extractText"];var St=e.n(Tt),kt=function(){return St()(i().translator.trans("core.lib.username.deleted_text"))};function $t(t,u){return void 0===u&&(u=!0),t?((u?t.displayName():t.username())||kt()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):kt().replace(/"#[a-z]{0,3}[0-9]+/,"_")}var Lt=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"user"},e.initialResults=function(){return Array.from(i().store.all("users"))},e.replacement=function(t){if(i().forum.attribute("allowUsernameMentionFormat")){var u=$t(t,!1);return this.format.format(u)}var e=$t(t);return this.format.format(e,"",t.id())},e.suggestion=function(t,u){var e,n=w()(t);return u&&(n.children=[Pt()(null!=(e=n.text)?e:"",u)],delete n.text),m("[",null,xt()(t),n)},e.matches=function(t,u){return!!u&&[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=it(at().mark((function t(u){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("users",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.enabled=function(){return!0},u}(_t);const jt=flarum.core.compat["forum/components/ReplyComposer"];var Nt=e.n(jt),Ot=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"post"},e.initialResults=function(){if(!i().composer.bodyMatches(Nt())&&!i().composer.bodyMatches(W()))return[];var t=i().composer.body.attrs,u=t.post;return(u&&u.discussion()||t.discussion).posts().filter((function(t){return t&&"comment"===t.contentType()&&(!u||t.number()<u.number())})).sort((function(t,u){return u.createdAt().getTime()-t.createdAt().getTime()}))},e.replacement=function(t){var u=$t(t.user());return this.format.format(u,"p",t.id())},e.suggestion=function(t,u){var e,n,o=t.user()||null,r=w()(o);return u&&(r.children=[Pt()(null!=(n=r.text)?n:"",u)],delete r.text),m("[",null,xt()(o),r,[i().translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," — ",(0,D.truncate)(null!=(e=t.contentPlain())?e:"",200)])},e.matches=function(t,u){var e=t.user(),n=i().mentionFormats.mentionable("user");return!u||e&&n.matches(e,u)},e.maxStoreMatchedResults=function(){return 5},e.search=function(t){return Promise.resolve([])},e.enabled=function(){return!0},u}(_t);const It=flarum.core.compat["common/models/Group"];var Rt=e.n(It);const Gt=flarum.core.compat["common/components/Badge"];var Ut=e.n(Gt),Ht=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"group"},e.initialResults=function(){return Array.from(i().store.all("groups").filter((function(t){return t.id()!==Rt().GUEST_ID&&t.id()!==Rt().MEMBER_ID})))},e.replacement=function(t){return this.format.format(t.namePlural(),"g",t.id())},e.suggestion=function(t,u){var e=t.namePlural();return u&&(e=Pt()(e,u)),m("[",null,m(Ut(),{className:"Avatar Badge Badge--group--"+t.id()+" Badge-icon",color:t.color(),type:"group",icon:t.icon()}),m("span",{className:"username"},e))},e.matches=function(t,u){return!!u&&[t.namePlural().toLowerCase(),t.nameSingular().toLowerCase()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(t){return Promise.resolve([])},e.enabled=function(){var t,u,e;return null!=(t=null==(u=i().session)||null==(e=u.user)?void 0:e.canMentionGroups())&&t},u}(_t),Wt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(u=t.call.apply(t,[this].concat(n))||this).mentionables=[Lt,Ot,Ht],u.extendable=!0,u}S(u,t);var e=u.prototype;return e.trigger=function(){return"@"},e.queryFromTyped=function(t){var u=t.match(/^["“]?((?:(?!"#).)+)$/);return u?u[1]:null},e.format=function(t,u,e){return void 0===u&&(u=""),void 0===e&&(e=null),{simple:"@"+t,safe:'@"'+t+'"#'+u+e}[e?"safe":"simple"]},u}(bt),qt=function(t){function u(){return t.apply(this,arguments)||this}S(u,t);var e=u.prototype;return e.type=function(){return"tag"},e.initialResults=function(){return Array.from(i().store.all("tags"))},e.replacement=function(t){return this.format.format(t.slug())},e.matches=function(t,u){return!!u&&[t.name().toLowerCase()].some((function(t){return t.toLowerCase().substr(0,u.length)===u}))},e.maxStoreMatchedResults=function(){return null},e.search=function(){var t=it(at().mark((function t(u){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i().store.find("tags",{filter:{q:u},page:{limit:5}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(u){return t.apply(this,arguments)}}(),e.suggestion=function(t,u){var e=t.name();return u&&(e=Pt()(e,u)),m("[",null,m(Ut(),{className:"Avatar",icon:t.icon(),color:t.color(),type:"tag"}),m("span",{className:"username"},e))},e.enabled=function(){return"flarum-tags"in flarum.extensions},u}(_t),Jt=function(t){function u(){for(var u,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(u=t.call.apply(t,[this].concat(n))||this).mentionables=[qt],u.extendable=!0,u}S(u,t);var e=u.prototype;return e.trigger=function(){return"#"},e.queryFromTyped=function(t){var u=t.match(/^(?:[\x2D0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE6\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDEFD-\uDF27\uDF30-\uDF54\uDF70-\uDF85\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC52-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE37\uDE3E-\uDE41\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])+$/gi);return u?u[0]:null},e.format=function(t){return"#"+t},u}(bt);function zt(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}var Yt=function(){function t(){this.formats=[new Wt,new Jt]}var u=t.prototype;return u.get=function(t){var u;return null!=(u=this.formats.find((function(u){return u.trigger()===t})))?u:null},u.mentionable=function(t){for(var u,e=function(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return zt(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?zt(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.formats);!(u=e()).done;){var n=u.value.getMentionable(t);if(n)return n}return null},u.extend=function(t){this.formats.push(new t)},t}();const Qt=flarum.core.compat["forum/components/UserPage"];var Xt=e.n(Qt);const Kt=flarum.core.compat["common/components/LinkButton"];var Vt=e.n(Kt);const Zt=flarum.core.compat["common/models/User"];var tu=e.n(Zt);flarum.core.compat["common/Model"];const uu=flarum.core.compat["common/extenders"];var eu=e.n(uu);const nu=flarum.core.compat["common/models/Post"];var ou=e.n(nu);const ru=flarum.core.compat["forum/components/PostsUserPage"];var iu=function(t){function u(){return t.apply(this,arguments)||this}return S(u,t),u.prototype.loadResults=function(t){return i().store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},u}(e.n(ru)());const su=[(new(eu().Routes)).add("user.mentions","/u/:username/mentions",iu),new(eu().Model)(ou()).hasMany("mentionedBy").attribute("mentionedByCount"),new(eu().Model)(tu()).attribute("canMentionGroups")];function au(t){var u;if(i().forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?u=i().store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(u=i().store.getById("users",t.getAttribute("id"))),u)return t.setAttribute("id",u.id()),t.setAttribute("slug",u.slug()),t.setAttribute("displayname",St()(w()(u))),!0;t.invalidate()}function Du(t){t.setAttribute("deleted",!1)}function cu(t){var u=i().store.getById("posts",t.getAttribute("id"));if(u)return t.setAttribute("discussionid",u.discussion().id()),t.setAttribute("number",u.number()),t.setAttribute("displayname",St()(w()(u.user()))),!0}function lu(t){t.setAttribute("deleted",!1)}function fu(t){var u,e;if(null!=(u=i().session)&&null!=(e=u.user)&&e.canMentionGroups()){var n=i().store.getById("groups",t.getAttribute("id"));if(n)return t.setAttribute("groupname",St()(n.namePlural())),!0}t.invalidate()}function mu(t){var u,e;if(null!=(u=i().session)&&null!=(e=u.user)&&e.canMentionGroups()){var n=i().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",n.color()),t.setAttribute("icon",n.icon()),t.setAttribute("deleted",!1)}}function pu(t){if("flarum-tags"in flarum.extensions){var u=i().store.getBy("tags","slug",t.getAttribute("slug"));if(u)return t.setAttribute("id",u.id()),t.setAttribute("tagname",u.name()),!0}t.invalidate()}function du(t){if("flarum-tags"in flarum.extensions){var u=i().store.getBy("tags","slug",t.getAttribute("slug"));t.setAttribute("icon",u.icon()),t.setAttribute("color",u.color()),t.setAttribute("deleted",!1)}}function Fu(t,u){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,u){if(t){if("string"==typeof t)return hu(t,u);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?hu(t,u):void 0}}(t))||u&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hu(t,u){(null==u||u>t.length)&&(u=t.length);for(var e=0,n=new Array(u);e<u;e++)n[e]=t[e];return n}const Cu={"mentions/components/MentionsUserPage":iu,"mentions/components/PostMentionedNotification":yt,"mentions/components/MentionedByModal":R,"mentions/components/MentionsDropdownItem":pt,"mentions/components/UserMentionedNotification":Bt,"mentions/components/GroupMentionedNotification":gt,"mentions/fragments/AutocompleteDropdown":nt,"mentions/fragments/PostQuoteButton":Q,"mentions/utils/getCleanDisplayName":$t,"mentions/utils/getMentionText":function(t,u,e){if(void 0!==t&&void 0===u)return i().mentionables.get("user").replacement(t);if(void 0!==t&&void 0!==u)return i().mentionables.get("post").replacement(i().store.getById("posts",u));if(void 0!==e)return i().mentionables.get("group").replacement(e);throw"No parameters were passed"},"mentions/utils/reply":t,"mentions/utils/selectedText":X,"mentions/utils/textFormatter":u,"mentions/mentionables/GroupMention":Ht,"mentions/mentionables/MentionableModel":_t,"mentions/mentionables/MentionableModels":At,"mentions/mentionables/PostMention":Ot,"mentions/mentionables/TagMention":qt,"mentions/mentionables/UserMention":Lt,"mentions/mentionables/formats/AtMentionFormat":Wt,"mentions/mentionables/formats/HashMentionFormat":Jt,"mentions/mentionables/formats/MentionFormat":bt,"mentions/mentionables/formats/MentionFormats":Yt,"mentions/extenders/Mentionables":function(){function t(){this.formats=[],this.mentionables={}}var u=t.prototype;return u.format=function(t){return this.formats.push(t),this},u.mentionable=function(t,u){return this.mentionables[t]||(this.mentionables[t]=[]),this.mentionables[t].push(u),this},u.extend=function(t){for(var u,e=Fu(this.formats);!(u=e()).done;){var n=u.value;t.mentionFormats.extend(n)}for(var o in this.mentionables){var r=t.mentionFormats.get(o);if(r)for(var i,s=Fu(this.mentionables[o]);!(i=s()).done;){var a=i.value;r.extend(a)}}},t}(),"mentions/state/MentionedByModalState":I},Au=flarum.core;i().mentionFormats=new Yt,i().initializers.add("flarum-mentions",(function(){var t,u;!function(){function t(){var t=this.attrs.post.contentHtml();if(t!==this.oldPostContentHtml&&!this.isEditing()){this.oldPostContentHtml=t;var u=this.attrs.post,e=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){var t,n=$(this),o=n.data("id"),r=$('<ul class="Dropdown-menu PostMention-preview fade"/>');e.append(r);var i=function(){return $('.PostStream-item[data-id="'+o+'"]')},s=function(){var t=i(),s=!1;if(t.length){var a=t.offset().top,D=window.pageYOffset;a>D&&a+t.height()<D+$(window).height()&&(t.addClass("pulsate"),s=!0)}if(!s){var c=function(){var t=r.outerHeight(!0),u=0;n.offset().top-t<$(window).scrollTop()+$("#header").outerHeight()?u+=n.outerHeight(!0):u-=t,r.show().css("top",n.offset().top-e.offset().top+u).css("left",n.offsetParent().offset().left-e.offset().left).css("max-width",n.offsetParent().width())},l=function(t){var e=t.discussion();m.render(r[0],[e!==u.discussion()&&m("li",null,m("span",{className:"PostMention-preview-discussion"},e.title())),m("li",null,m(C(),{post:t}))]),c()},f=app.store.getById("posts",o);f&&f.discussion()?l(f):(m.render(r[0],m(v(),null)),app.store.find("posts",o).then(l),c()),setTimeout((function(){return r.off("transitionend").addClass("in")}))}},a=function(){i().removeClass("pulsate"),r.hasClass("in")&&r.removeClass("in").one("transitionend",(function(){return r.hide()}))};n.on("touchend",(function(t){t.cancelable&&t.preventDefault()})),n.add(r).hover((function(){clearTimeout(t),t=setTimeout(s,250)}),(function(){clearTimeout(t),i().removeClass("pulsate"),t=setTimeout(a,250)})).on("touchend",(function(t){s(),t.stopPropagation()})),$(document).on("touchend",a)}))}}(0,o.extend)(F().prototype,"oncreate",t),(0,o.extend)(F().prototype,"onupdate",t)}(),function(){function t(){this.$(".Post-mentionedBy-preview").removeClass("in").one("transitionend",(function(){$(this).hide()}))}(0,o.extend)(F().prototype,"oncreate",(function(){var u,e=this,n=this.attrs.post,o=n.mentionedBy();if(o&&o.length){var r=$('<ul class="Dropdown-menu Post-mentionedBy-preview fade"/>');this.$().append(r);var s=this.$(),a=this.$(".Post-mentionedBy"),D=function(){!r.hasClass("in")&&r.is(":visible")||(m.render(r[0],m("[",null,o.map((function(u){return m("li",{"data-number":u.number()},m(C(),{post:u,onclick:t.bind(e)}))})),o.length<n.mentionedByCount()&&m("li",{className:"Post-mentionedBy-preview-more"},m(_(),{className:"PostPreview Button",onclick:function(){t.call(e),i().modal.show(R,{post:n})}},m("span",{className:"PostPreview-content"},m("span",{className:"PostPreview-badge Avatar"},M()("fas fa-reply-all")),m("span",null,i().translator.trans("flarum-mentions.forum.post.mentioned_by_more_text",{count:n.mentionedByCount()-o.length}))))))),r.show().css("top",a.offset().top-s.offset().top+a.outerHeight(!0)).css("left",a.offsetParent().offset().left-s.offset().left).css("max-width",s.width()),setTimeout((function(){return r.off("transitionend").addClass("in")})))};a.add(r).hover((function(){clearTimeout(u),u=setTimeout(D,250)}),(function(){clearTimeout(u),u=setTimeout(t,250)})),this.$().find(".Post-mentionedBy-summary a").hover((function(){r.find('[data-number="'+$(this).data("number")+'"]').addClass("active")}),(function(){r.find("[data-number]").removeClass("active")}))}})),(0,o.extend)(F().prototype,"footerItems",(function(u){var e=this,n=this.attrs.post,o=n.mentionedBy();if(o&&o.length){var r=[],s=o.sort((function(t){return t.user()===i().session.user?-1:0})).filter((function(t){var u=t.user();if(-1===r.indexOf(u))return r.push(u),!0})),a=n.mentionedByCount()>4,D=s.slice(0,a?3:4).map((function(u){var n=u.user();return m(y(),{href:i().route.post(u),onclick:t.bind(e),"data-number":u.number()},i().session.user===n?i().translator.trans("flarum-mentions.forum.post.you_text"):w()(n))}));if(a){var c=n.mentionedByCount()-D.length;D.push(i().translator.trans("flarum-mentions.forum.post.others_text",{count:c}))}u.add("replies",m("div",{className:"Post-mentionedBy"},m("span",{className:"Post-mentionedBy-summary"},M()("fas fa-reply"),i().translator.trans("flarum-mentions.forum.post.mentioned_by"+(s[0].user()===i().session.user?"_self":"")+"_text",{count:D.length,users:g()(D)}))))}}))}(),(0,o.extend)(F().prototype,"actionItems",(function(t){var u=this.attrs.post;u.isHidden()||i().session.user&&!u.discussion().canReply()||t.add("reply",m(_(),{className:"Button Button--link",onclick:function(){return J(u)}},i().translator.trans("flarum-mentions.forum.post.reply_link")))})),(0,o.extend)(F().prototype,"oncreate",(function(){var t=this.attrs.post;if(!(t.isHidden()||i().session.user&&!t.discussion().canReply())){var u=this.$(".Post-body"),e=$('<div class="Post-quoteButtonContainer"></div>'),n=new Q(t),o=function(t){setTimeout((function(){var o=X(u);if(o){n.content=o,m.render(e[0],n.render());var r=window.getSelection().getRangeAt(0).getClientRects(),i=r[0];if(t.clientY<i.bottom&&t.clientX-i.right<i.left-t.clientX)n.showStart(i.left,i.top);else{var s=r[r.length-1];n.showEnd(s.right,s.bottom)}}}),1)};this.$().after(e).on("mouseup",o),"ontouchstart"in window&&document.addEventListener("selectionchange",o,!1)}})),t=$('<div class="ComposerBody-mentionsDropdownContainer"></div>'),u=new nt,(0,o.extend)(V().prototype,"oncreate",(function(){var e=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-mentionsWrapper"></div>');this.navigator=new(et()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(e),e.after(t)})),(0,o.extend)(V().prototype,"buildEditorParams",(function(e){var n,o,r,s=this,a=new At({onmouseenter:function(){u.setIndex($(this).parent().index())},onclick:function(t){s.attrs.composer.editor.replaceBeforeCursor(o-1,t+" "),u.hide()}});e.inputListeners.push((function(){var e=s.attrs.composer.editor.getSelectionRange(),D=e[0];if(!(e[1]-D>0)){var c=s.attrs.composer.editor.getLastNChars(30);o=0;for(var l=null,f=c.length-1;f>=0;f--){var p=c.substr(f,1);if((l=i().mentionFormats.get(p))&&(0===f||/\s/.test(c.substr(f-1,1)))){n=f+1,o=D-c.length+f+1,a.init(l.makeMentionables());break}}if(u.hide(),u.active=!1,o){var d,F=c.substring(n).toLowerCase();if(!(r=l.queryFromTyped(F)))return;a.typed=r;var h=function(){var e=a.buildSuggestions();if(e.length){u.items=e,m.render(t[0],u.render()),u.show();var n=s.attrs.composer.editor.getCaretCoordinates(o),r=u.$().outerWidth(),i=u.$().outerHeight(),D=u.$().offsetParent(),c=n.left,l=n.top+15;l+i>D.height()&&(l=n.top-i-15),c+r>D.width()&&(c=D.width()-r),l=Math.max(-(D.offset().top-$(document).scrollTop()),l),c=Math.max(-D.offset().left,c),u.show(c,l)}else u.active=!1,u.hide()};u.active=!0,h(),u.setIndex(0),u.$().scrollTop(0),null==(d=a.search())||d.then(h)}}}))})),(0,o.extend)(V().prototype,"toolbarItems",(function(t){var u=this;t.add("mention",m(tt(),{onclick:function(){return u.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))})),i().notificationComponents.postMentioned=yt,i().notificationComponents.userMentioned=Bt,i().notificationComponents.groupMentioned=gt,(0,o.extend)(a().prototype,"notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:i().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:i().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,o.extend)(Xt().prototype,"navItems",(function(t){var u=this.user;t.add("mentions",m(Vt(),{href:i().route("user.mentions",{username:u.slug()}),name:"mentions",icon:"fas fa-at"},i().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),D.getPlainContent.removeSelectors.push("a.PostMention"),(0,o.extend)(p().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(l()(getComputedStyle(this).getPropertyValue("--color")))}))}))})),Object.assign(Au.compat,Cu)})(),module.exports=n})();
|
||
|
||
|
||
flarum.extensions['flarum-mentions']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)o.o(n,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>V});const n=flarum.core.compat["common/extend"],s=flarum.core.compat["forum/app"];var r=o.n(s);flarum.core.compat["common/Model"];const i=flarum.core.compat["common/models/Discussion"];var a=o.n(i);const e=flarum.core.compat["forum/components/NotificationGrid"];var c=o.n(e);const l=flarum.core.compat["common/components/Badge"];var u=o.n(l);const f=flarum.core.compat["common/components/Button"];var p=o.n(f);const b=flarum.core.compat["forum/components/DiscussionPage"];var d=o.n(b);const _=flarum.core.compat["forum/utils/DiscussionControls"];var g=o.n(_);function w(o,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},w(o,t)}function y(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,w(o,t)}const v=flarum.core.compat["common/components/Dropdown"];var h=o.n(v);const x=flarum.core.compat["common/components/Tooltip"];var S=o.n(x);const P=flarum.core.compat["common/helpers/icon"];var N=o.n(P);const M=flarum.core.compat["common/utils/extractText"];var O=o.n(M);const k=flarum.core.compat["common/utils/classList"];var j=o.n(k);const B=flarum.core.compat["common/Component"];var D=function(o){function t(){return o.apply(this,arguments)||this}return y(t,o),t.prototype.view=function(){return m("button",{className:"SubscriptionMenuItem hasIcon",onclick:this.attrs.onclick},this.attrs.active&&N()("fas fa-check",{className:"Button-icon"}),m("span",{className:"SubscriptionMenuItem-label"},N()(this.attrs.icon,{className:"Button-icon"}),m("strong",null,this.attrs.label),m("span",{className:"SubscriptionMenuItem-description"},this.attrs.description)))},t}(o.n(B)()),I=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.oninit=function(t){o.prototype.oninit.call(this,t),this.options=[{subscription:null,icon:"far fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.not_following_text")},{subscription:"follow",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.following_text")},{subscription:"ignore",icon:"far fa-eye-slash",label:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),description:r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_text")}]},n.view=function(){var o=this,t=this.attrs.discussion,n=t.subscription(),s=r().translator.trans("flarum-subscriptions.forum.sub_controls.follow_button"),i="far fa-star",a="SubscriptionMenu-button--"+n;switch(n){case"follow":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.following_button"),i="fas fa-star";break;case"ignore":s=r().translator.trans("flarum-subscriptions.forum.sub_controls.ignoring_button"),i="far fa-eye-slash"}var e=r().session.user.preferences(),c=e.notify_newPost_email,l=e.notify_newPost_alert,u=O()(r().translator.trans(c?"flarum-subscriptions.forum.sub_controls.notify_email_tooltip":"flarum-subscriptions.forum.sub_controls.notify_alert_tooltip")),f=(c||l)&&null===n,b=m(p(),{className:j()("Button","SubscriptionMenu-button",a),icon:i,onclick:this.saveSubscription.bind(this,t,-1!==["follow","ignore"].indexOf(n)?null:"follow")},s);return m("div",{className:"Dropdown ButtonGroup SubscriptionMenu"},f?m(S(),{text:u,position:"bottom"},b):b,m("button",{className:j()("Dropdown-toggle Button Button--icon",a),"data-toggle":"dropdown"},N()("fas fa-caret-down",{className:"Button-icon"})),m("ul",{className:"Dropdown-menu dropdown-menu Dropdown-menu--right"},this.options.map((function(s){return m("li",null,m(D,Object.assign({},s,{onclick:o.saveSubscription.bind(o,t,s.subscription),active:n===s.subscription})))}))))},n.saveSubscription=function(o,t){o.save({subscription:t}),this.$(".SubscriptionMenu-button").tooltip("hide")},t}(h());const A=flarum.core.compat["common/components/LinkButton"];var R=o.n(A);const T=flarum.core.compat["forum/components/IndexPage"];var L=o.n(T);const C=flarum.core.compat["forum/states/DiscussionListState"];var q=o.n(C);const F=flarum.core.compat["forum/states/GlobalSearchState"];var G=o.n(F);const z=flarum.core.compat["forum/components/SettingsPage"];var U=o.n(z);const $=flarum.core.compat["common/components/Switch"];var E=o.n($);const H=flarum.core.compat["forum/components/Notification"];var J=function(o){function t(){return o.apply(this,arguments)||this}y(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-star"},n.href=function(){var o=this.attrs.notification,t=o.subject(),n=o.content()||{};return r().route.discussion(t,n.postNumber)},n.content=function(){return r().translator.trans("flarum-subscriptions.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},t}(o.n(H)());const K=flarum.core.compat["common/extenders"];var Q=o.n(K);const V=[(new(Q().Routes)).add("following","/following",L()),new(Q().Model)(a()).attribute("subscription")],W={"subscriptions/components/NewPostNotification":J,"subscriptions/components/SubscriptionMenu":I,"subscriptions/components/SubscriptionMenuItem":D},X=flarum.core;r().initializers.add("subscriptions",(function(){r().notificationComponents.newPost=J,(0,n.extend)(a().prototype,"badges",(function(o){var t;switch(this.subscription()){case"follow":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.following_tooltip"),icon:"fas fa-star",type:"following"});break;case"ignore":t=m(u(),{label:r().translator.trans("flarum-subscriptions.forum.badge.ignoring_tooltip"),icon:"far fa-eye-slash",type:"ignoring"})}t&&o.add("subscription",t)})),(0,n.extend)(g(),"userControls",(function(o,t,n){if(r().session.user&&!(n instanceof d())){var s={none:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.follow_button"),icon:"fas fa-star",save:"follow"},follow:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unfollow_button"),icon:"far fa-star",save:null},ignore:{label:r().translator.trans("flarum-subscriptions.forum.discussion_controls.unignore_button"),icon:"fas fa-eye",save:null}},i=t.subscription()||"none";o.add("subscription",m(p(),{icon:s[i].icon,onclick:t.save.bind(t,{subscription:s[i].save})},s[i].label))}})),(0,n.extend)(d().prototype,"sidebarItems",(function(o){if(r().session.user){var t=this.discussion;o.add("subscription",m(I,{discussion:t}),80)}})),(0,n.extend)(L().prototype,"navItems",(function(o){if(r().session.user){var t=r().search.stickyParams();o.add("following",m(R(),{href:r().route("following",t),icon:"fas fa-star"},r().translator.trans("flarum-subscriptions.forum.index.following_link")),50)}})),(0,n.extend)(L().prototype,"setTitle",(function(){"following"===r().current.get("routeName")&&r().setTitle(r().translator.trans("flarum-subscriptions.forum.following.meta_title_text"))})),(0,n.extend)(G().prototype,"params",(function(o){o.onFollowing="following"===r().current.get("routeName")})),(0,n.extend)(q().prototype,"requestParams",(function(o){this.params.onFollowing&&(o.filter||(o.filter={}),o.filter.q?o.filter.q+=" is:following":o.filter.subscription="following")})),(0,n.extend)(U().prototype,"notificationsItems",(function(o){var t,n=this;o.add("followAfterReply",m(E(),{state:this.user.preferences().followAfterReply,onchange:function(o){n.followAfterReplyLoading=!0,n.user.savePreferences({followAfterReply:o}).then((function(){n.followAfterReplyLoading=!1,m.redraw()}))},loading:this.followAfterReplyLoading},r().translator.trans("flarum-subscriptions.forum.settings.follow_after_reply_label"))),o.add("notifyForAllPosts",m(E(),{id:"flarum_subscriptions__notify_for_all_posts",state:!(null==(t=this.user.preferences())||!t["flarum-subscriptions.notify_for_all_posts"]),onchange:function(o){n.user.savePreferences({"flarum-subscriptions.notify_for_all_posts":o})}},r().translator.trans("flarum-subscriptions.forum.settings.notify_for_all_posts_label")))})),(0,n.extend)(c().prototype,"notificationTypes",(function(o){o.add("newPost",{name:"newPost",icon:"fas fa-star",label:r().translator.trans("flarum-subscriptions.forum.settings.notify_new_post_label")})}))})),Object.assign(X.compat,W)})(),module.exports=t})();
|
||
|
||
|
||
flarum.extensions['flarum-subscriptions']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",s="second",r="minute",i="hour",a="day",o="week",u="month",c="quarter",l="year",d="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,p={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(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(n)+t},$={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),s=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+v(s,2,"0")+":"+v(r,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var s=12*(n.year()-e.year())+(n.month()-e.month()),r=e.clone().add(s,u),i=n-r<0,a=e.clone().add(s+(i?-1:1),u);return+(-(s+(n-r)/(i?r-a:a-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:l,w:o,d:a,D:d,h:i,m:r,s,ms:n,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",y={};y[g]=p;var M=function(t){return t instanceof D},S=function t(e,n,s){var r;if(!e)return g;if("string"==typeof e){var i=e.toLowerCase();y[i]&&(r=i),n&&(y[i]=n,r=i);var a=e.split("-");if(!r&&a.length>1)return t(a[0])}else{var o=e.name;y[o]=e,r=o}return!s&&r&&(g=r),r||!s&&g},_=function(t,e){if(M(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},b=$;b.l=S,b.i=M,b.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function p(t){this.$L=S(t.locale,null,!0),this.parse(t)}var v=p.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var s=e.match(m);if(s){var r=s[2]-1||0,i=(s[7]||"0").substring(0,3);return n?new Date(Date.UTC(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],r,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.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()},v.$utils=function(){return b},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=_(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return _(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<_(t)},v.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,c=!!b.u(e)||e,f=b.p(t),m=function(t,e){var s=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return c?s:s.endOf(a)},h=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},p=this.$W,v=this.$M,$=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case l:return c?m(1,0):m(31,11);case u:return c?m(1,v):m(0,v+1);case o:var y=this.$locale().weekStart||0,M=(p<y?p+7:p)-y;return m(c?$-M:$+(6-M),v);case a:case d:return h(g+"Hours",0);case i:return h(g+"Minutes",1);case r:return h(g+"Seconds",2);case s:return h(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var o,c=b.p(t),f="set"+(this.$u?"UTC":""),m=(o={},o[a]=f+"Date",o[d]=f+"Date",o[u]=f+"Month",o[l]=f+"FullYear",o[i]=f+"Hours",o[r]=f+"Minutes",o[s]=f+"Seconds",o[n]=f+"Milliseconds",o)[c],h=c===a?this.$D+(e-this.$W):e;if(c===u||c===l){var p=this.clone().set(d,1);p.$d[m](h),p.init(),this.$d=p.set(d,Math.min(this.$D,p.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[b.p(t)]()},v.add=function(n,c){var d,f=this;n=Number(n);var m=b.p(c),h=function(t){var e=_(f);return b.w(e.date(e.date()+Math.round(t*n)),f)};if(m===u)return this.set(u,this.$M+n);if(m===l)return this.set(l,this.$y+n);if(m===a)return h(1);if(m===o)return h(7);var p=(d={},d[r]=t,d[i]=e,d[s]=1e3,d)[m]||1,v=this.$d.getTime()+n*p;return b.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var s=t||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),i=this.$H,a=this.$m,o=this.$M,u=n.weekdays,c=n.months,l=function(t,n,r,i){return t&&(t[n]||t(e,s))||r[n].slice(0,i)},d=function(t){return b.s(i%12||12,t,"0")},m=n.meridiem||function(t,e,n){var s=t<12?"AM":"PM";return n?s.toLowerCase():s},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:b.s(o+1,2,"0"),MMM:l(n.monthsShort,o,c,3),MMMM:l(c,o),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:b.s(i,2,"0"),h:d(1),hh:d(2),a:m(i,a,!0),A:m(i,a,!1),m:String(a),mm:b.s(a,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:r};return s.replace(h,(function(t,e){return e||p[t]||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,f){var m,h=b.p(d),p=_(n),v=(p.utcOffset()-this.utcOffset())*t,$=this-p,g=b.m(this,p);return g=(m={},m[l]=g/12,m[u]=g,m[c]=g/3,m[o]=($-v)/6048e5,m[a]=($-v)/864e5,m[i]=$/e,m[r]=$/t,m[s]=$/1e3,m)[h]||$,f?g:b.a(g)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return y[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),s=S(t,e,!0);return s&&(n.$L=s),n},v.clone=function(){return b.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},p}(),w=D.prototype;return _.prototype=w,[["$ms",n],["$s",s],["$m",r],["$H",i],["$W",a],["$M",u],["$y",l],["$D",d]].forEach((function(t){w[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),_.extend=function(t,e){return t.$i||(t(e,D,_),t.$i=!0),_},_.locale=S,_.isDayjs=M,_.unix=function(t){return _(1e3*t)},_.en=y[g],_.Ls=y,_.p={},_}()},221:function(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(s,r,i){var a=r.prototype;i.utc=function(t){return new r({date:t,utc:!0,args:arguments})},a.utc=function(e){var n=i(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var u=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(s,r){var i=this.$utils().u;if(i(s))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(e);if(!s)return null;var r=(""+s[0]).match(n)||["-",0,0],i=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===i?a:-a}(s),null===s))return this;var a=Math.abs(s)<=16?60*s:s,o=this;if(r)return o.$offset=a,o.$u=0===s,o;if(0!==s){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+u,t)).$offset=a,o.$x.$localOffset=u}else o=this.utc();return o};var l=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var d=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=a.diff;a.diff=function(t,e,n){if(t&&this.$u===t.$u)return f.call(this,t,e,n);var s=this.local(),r=i(t).local();return f.call(s,r,e,n)}}}()}},e={};function n(s){var r=e[s];if(void 0!==r)return r.exports;var i=e[s]={exports:{}};return t[s].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{extend:()=>X});var t={};n.r(t),n.d(t,{getPermanentSuspensionDate:()=>k,isPermanentSuspensionDate:()=>C,localStorageKey:()=>Y});const e=flarum.core.compat.extend,r=flarum.core.compat.app;var i=n.n(r);const a=flarum.core.compat["utils/UserControls"];var o=n.n(a);const u=flarum.core.compat["components/Button"];var c=n.n(u);const l=flarum.core.compat["components/Badge"];var d=n.n(l);const f=flarum.core.compat["models/User"];var h=n.n(f);function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p(t,e)}const $=flarum.core.compat["forum/app"];var g=n.n($);const y=flarum.core.compat["components/Modal"];var M=n.n(y);const S=flarum.core.compat["utils/Stream"];var _=n.n(S);const b=flarum.core.compat["utils/withAttr"];var D=n.n(b);const w=flarum.core.compat["common/utils/ItemList"];var O=n.n(w),x=n(757),T=n.n(x),U=n(221),N=n.n(U);function k(){return new Date("2038-01-01")}function C(t){return T().utc(t).isSame(T().utc("2038-01-01"))}function Y(){return"flarum-suspend.acknowledge-suspension"}T().extend(N());var I=function(t){function e(){return t.apply(this,arguments)||this}v(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e);var n=this.attrs.user.suspendedUntil(),s=this.attrs.user.suspendReason(),r=this.attrs.user.suspendMessage(),i=null;new Date>n&&(n=null),n&&(i=9999===n.getFullYear()?"indefinitely":"limited"),this.status=_()(i),this.reason=_()(s),this.message=_()(r),this.daysRemaining=_()("limited"===i&&1-dayjs().diff(n,"days"))},n.className=function(){return"SuspendUserModal Modal--medium"},n.title=function(){return g().translator.trans("flarum-suspend.forum.suspend_user.title",{user:this.attrs.user})},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},m("div",{className:"Form-group"},m("label",null,g().translator.trans("flarum-suspend.forum.suspend_user.status_heading")),m("div",null,this.formItems().toArray())),m("div",{className:"Form-group"},m(c(),{className:"Button Button--primary",loading:this.loading,type:"submit"},g().translator.trans("flarum-suspend.forum.suspend_user.submit_button")))))},n.radioItems=function(){var t=this,e=new(O());return e.add("not-suspended",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:!this.status(),value:"",onclick:D()("value",this.status)}),g().translator.trans("flarum-suspend.forum.suspend_user.not_suspended_label")),100),e.add("indefinitely",m("label",{className:"checkbox"},m("input",{type:"radio",name:"status",checked:"indefinitely"===this.status(),value:"indefinitely",onclick:D()("value",this.status)}),g().translator.trans("flarum-suspend.forum.suspend_user.indefinitely_label")),90),e.add("time-suspension",m("label",{className:"checkbox SuspendUserModal-days"},m("input",{type:"radio",name:"status",checked:"limited"===this.status(),value:"limited",onclick:function(e){t.status(e.target.value),m.redraw.sync(),t.$(".SuspendUserModal-days-input input").select(),e.redraw=!1}}),g().translator.trans("flarum-suspend.forum.suspend_user.limited_time_label"),"limited"===this.status()&&m("div",{className:"SuspendUserModal-days-input"},m("input",{type:"number",min:"0",value:this.daysRemaining(),oninput:D()("value",this.daysRemaining),className:"FormControl"}),g().translator.trans("flarum-suspend.forum.suspend_user.limited_time_days_text"))),80),e},n.formItems=function(){var t=new(O());return t.add("radioItems",m("div",{className:"Form-group"},this.radioItems().toArray()),100),t.add("reason",m("div",{className:"Form-group"},m("label",null,g().translator.trans("flarum-suspend.forum.suspend_user.reason"),m("textarea",{className:"FormControl",bidi:this.reason,placeholder:g().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),90),t.add("message",m("div",{className:"Form-group"},m("label",null,g().translator.trans("flarum-suspend.forum.suspend_user.display_message"),m("textarea",{className:"FormControl",bidi:this.message,placeholder:g().translator.trans("flarum-suspend.forum.suspend_user.placeholder_optional"),rows:"2"}))),80),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=null;switch(this.status()){case"indefinitely":n=k();break;case"limited":n=dayjs().add(this.daysRemaining(),"days").toDate()}this.attrs.user.save({suspendedUntil:n,suspendReason:this.reason(),suspendMessage:this.message()}).then((function(){return e.hide()}),this.loaded.bind(this))},e}(M());const F=flarum.core.compat["components/Notification"];var H=n.n(F),j=function(t){function e(){return t.apply(this,arguments)||this}v(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return g().route.user(this.attrs.notification.subject())},n.content=function(){var t=this.attrs.notification,e=t.content(),n=dayjs(e).from(t.createdAt(),!0);return C(e)?g().translator.trans("flarum-suspend.forum.notifications.user_suspended_indefinite_text"):g().translator.trans("flarum-suspend.forum.notifications.user_suspended_text",{timeReadable:n})},e}(H()),L=function(t){function e(){return t.apply(this,arguments)||this}v(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-ban"},n.href=function(){return g().route.user(this.attrs.notification.subject())},n.content=function(){return this.attrs.notification,g().translator.trans("flarum-suspend.forum.notifications.user_unsuspended_text")},e}(H());const A=flarum.core.compat["common/components/Modal"];var W=n.n(A);const B=flarum.core.compat["common/components/Button"];var P=n.n(B);const R=flarum.core.compat["common/helpers/fullTime"];var z=n.n(R),Z=function(t){function e(){return t.apply(this,arguments)||this}v(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.message=this.attrs.message,this.until=this.attrs.until},n.className=function(){return"SuspensionInfoModal Modal"},n.title=function(){return g().translator.trans("flarum-suspend.forum.suspension_info.title")},n.content=function(){var t=C(new Date(this.until))?g().translator.trans("flarum-suspend.forum.suspension_info.indefinite"):g().translator.trans("flarum-suspend.forum.suspension_info.limited",{date:z()(this.until)});return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},this.message),m("p",{className:"helpText"},t),m("div",{className:"Form-group"},m(P(),{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},g().translator.trans("flarum-suspend.forum.suspension_info.dismiss_button")))))},n.hide=function(){localStorage.setItem("flarum-suspend.acknowledge-suspension",this.attrs.until.getTime()),this.attrs.state.close()},e}(W());function J(){return setTimeout((function(){if(g().session.user){var t=g().session.user.suspendMessage(),e=g().session.user.suspendedUntil(),n=t&&e&&new Date<e,s=localStorage.getItem("flarum-suspend.acknowledge-suspension")===(null==e?void 0:e.getTime().toString());n&&!s?g().modal.show(Z,{message:t,until:e}):localStorage.getItem("flarum-suspend.acknowledge-suspension")&&localStorage.removeItem("flarum-suspend.acknowledge-suspension")}}),0)}const V=flarum.core.compat["common/extenders"];var q=n.n(V);const E=flarum.core.compat["common/models/User"];var K=n.n(E);const Q=flarum.core.compat["common/Model"];var G=n.n(Q);const X=[new(q().Model)(K()).attribute("canSuspend").attribute("suspendedUntil",G().transformDate).attribute("suspendReason").attribute("suspendMessage")],tt={"suspend/components/suspendUserModal":I,"suspend/components/suspensionInfoModal":Z,"suspend/components/UserSuspendedNotification":j,"suspend/components/UserUnsuspendedNotification":L,"suspend/helpers/suspensionHelper":t,"suspend/checkForSuspension":J},et=flarum.core;i().initializers.add("flarum-suspend",(function(){i().notificationComponents.userSuspended=j,i().notificationComponents.userUnsuspended=L,(0,e.extend)(o(),"moderationControls",(function(t,e){e.canSuspend()&&t.add("suspend",m(c(),{icon:"fas fa-ban",onclick:function(){return i().modal.show(I,{user:e})}},i().translator.trans("flarum-suspend.forum.user_controls.suspend_button")))})),(0,e.extend)(h().prototype,"badges",(function(t){var e=this.suspendedUntil();new Date<e&&t.add("suspended",m(d(),{icon:"fas fa-ban",type:"suspended",label:i().translator.trans("flarum-suspend.forum.user_badge.suspended_tooltip")}),100)})),J()})),Object.assign(et.compat,tt)})(),module.exports=s})();
|
||
|
||
|
||
flarum.extensions['flarum-suspend']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return t.d(n,{a:n}),n},d:(o,n)=>{for(var s in n)t.o(n,s)&&!t.o(o,s)&&Object.defineProperty(o,s,{enumerable:!0,get:n[s]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{components:()=>bt,utils:()=>et});const n=flarum.core.compat["forum/app"];var s=t.n(n);const r=flarum.core.compat["common/Model"];var i=t.n(r);const e=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/components/IndexPage"];var l=t.n(a);const c=flarum.core.compat["forum/states/DiscussionListState"];var u=t.n(c);const f=function(){return"flarum-subscriptions"in flarum.extensions&&m.route.get().includes(s().route("following"))},p=flarum.core.compat["common/app"];var g,d=t.n(p);const b=function(t){return g||(g=["none","tags"].reduce((function(o,n){return o[n]=d().translator.trans("fof-follow-tags."+t+".following_"+n+"_label"),o}),{}))};var h,w=function(){return h||(h=b("forum.index.following")),h},v=function(){w();var t=s().data["fof-follow-tags.following_page_default"];if(h[t]||(t=null),s().session.user){var o=s().session.user.preferences().followTagsPageDefault;h[o]&&(t=o)}return t||"none"};function y(t,o){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},y(t,o)}function _(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,y(t,o)}const T=flarum.core.compat["common/Component"];var S=t.n(T);const N=flarum.core.compat["common/components/Button"];var O=t.n(N);const P=flarum.core.compat["common/components/Dropdown"];var I=t.n(P),x=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.view=function(){var t=s().discussions.followTags,o=this.options();return I().component({buttonClassName:"Button",label:o[t]||v()},Object.keys(o).map((function(n){var r=n===t;return O().component({active:r,icon:!r||"fas fa-check",onclick:function(){s().discussions.followTags=n,s().discussions.refresh()}},o[n])})))},n.options=function(){return w()},o}(S());const D=flarum.core.compat["forum/components/Notification"];var j,k=t.n(D),K=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.icon=function(){return"fas fa-user-tag"},n.href=function(){var t=this.attrs.notification.subject();return s().route.discussion(t)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_discussion_text",{user:this.attrs.notification.fromUser(),title:this.attrs.notification.subject().title()})},n.excerpt=function(){return null},o}(k());const F=((j={})[!1]="fas fa-star",j.follow="fas fa-star",j.lurk="fas fa-comments",j.ignore="fas fa-bell-slash",j.hide="fas fa-eye-slash",j);var B=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.icon=function(){return F.lurk},n.href=function(){var t=this.attrs.notification,o=t.subject(),n=t.content()||{};return s().route.discussion(o,n.postNumber)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},o}(k()),C=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.icon=function(){return"fas fa-user-tag"},n.href=function(){var t=this.attrs.notification.subject();return s().route.discussion(t)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_discussion_tag_text",{user:this.attrs.notification.fromUser(),title:this.attrs.notification.subject().title()})},n.excerpt=function(){return null},o}(k());const M=flarum.core.compat["common/models/Discussion"];var A=t.n(M);const H=flarum.core.compat["common/components/Badge"];var q=t.n(H);const U=flarum.core.compat["forum/components/SettingsPage"];var L=t.n(U);const z=flarum.core.compat["common/components/FieldSet"];var E=t.n(z);const G=flarum.core.compat["common/components/Select"];var V=t.n(G);const J=flarum.core.compat["forum/components/NotificationGrid"];var Q=t.n(J);const R=flarum.core.compat["common/helpers/icon"];var W=t.n(R);const X=flarum.core.compat["common/helpers/textContrastClass"];var Y=t.n(X);const Z=flarum.core.compat["common/utils/classList"];var $=t.n(Z);const tt=flarum.core.compat["common/utils/ItemList"];var ot=t.n(tt),nt=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.view=function(){var t,o=this.heroColor();return m("header",{className:$()("Hero","FollowingHero",(t={"FollowingHero--colored":o},t[Y()(o)]=o,t)),style:o?{"--hero-bg":o}:void 0},m("div",{className:"container"},this.viewItems().toArray()))},n.viewItems=function(){var t=new(ot());return t.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),t},n.contentItems=function(){var t=new(ot());return t.add("following-title",m("h1",{className:"Hero-title"},W()(this.heroIcon())," ",s().translator.trans("fof-follow-tags.forum.hero.title")),100),t},n.heroColor=function(){return null},n.heroIcon=function(){return"fas fa-star"},o}(S());function st(){return st=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},st.apply(this,arguments)}const rt=flarum.core.compat["common/components/Modal"];var it=t.n(rt),et=st({options:h,getOptions:w,getDefaultFollowingFiltering:v,isFollowingPage:f,subscriptionOptions:[{subscription:"not_follow",icon:"far fa-star",labelKey:"fof-follow-tags.forum.sub_controls.not_following_button",descriptionKey:"fof-follow-tags.forum.sub_controls.not_following_text"},{subscription:"follow",icon:"fas fa-star",labelKey:"fof-follow-tags.forum.sub_controls.following_button",descriptionKey:"fof-follow-tags.forum.sub_controls.following_text"},{subscription:"lurk",icon:"fas fa-eye",labelKey:"fof-follow-tags.forum.sub_controls.lurking_button",descriptionKey:"fof-follow-tags.forum.sub_controls.lurking_text"},{subscription:"ignore",icon:"fas fa-bell-slash",labelKey:"fof-follow-tags.forum.sub_controls.ignoring_button",descriptionKey:"fof-follow-tags.forum.sub_controls.ignoring_text"},{subscription:"hide",icon:"fas fa-eye-slash",labelKey:"fof-follow-tags.forum.sub_controls.hiding_button",descriptionKey:"fof-follow-tags.forum.sub_controls.hiding_text"}]},{followingPageOptions:b}),at=function(t){function o(){return t.apply(this,arguments)||this}return _(o,t),o.prototype.view=function(){var t=this.attrs.active;return m("div",{className:"SubscriptionOption "+(t?"selected":""),onclick:this.attrs.onclick},W()(this.attrs.icon,{className:"SubscriptionOption-icon"}),m("span",{className:"SubscriptionOption-title"},s().translator.trans(this.attrs.labelKey)),m("div",{className:"SubscriptionOption-description"},s().translator.trans(this.attrs.descriptionKey)),t&&W()("fas fa-check",{className:"SubscriptionOption-selectedIcon"}))},o}(S());const lt=flarum.core.compat["common/utils/Stream"];var ct=t.n(lt),ut=function(t){function o(){for(var o,n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return(o=t.call.apply(t,[this].concat(s))||this).subscription=void 0,o.loading=void 0,o.canShowTooltip=void 0,o}_(o,t);var n=o.prototype;return n.oninit=function(o){var n;t.prototype.oninit.call(this,o),this.loading=ct()(!1),this.subscription=this.attrs.model.subscription()||"not_follow";var r=null==(n=s().session.user)?void 0:n.preferences(),i=r.notify_newPostInTag_email,e=r.notify_newPostInTag_alert;(i||e)&&"not_follow"===this.subscription?this.canShowTooltip=!0:this.canShowTooltip=!1},n.className=function(){return"SubscriptionModal Modal--medium"},n.title=function(){return s().translator.trans("fof-follow-tags.forum.sub_controls.header",{tagName:this.attrs.model.name()})},n.content=function(){var t,o=this,n=null==(t=s().session.user)?void 0:t.preferences();return n.notify_newPostInTag_email,n.notify_newPostInTag_alert,m("div",{className:"Modal-body"},this.formOptionItems().toArray(),m("div",{className:"Form-group"},m(O(),{className:"Button Button--primary",onclick:function(){return o.saveSubscription(o.subscription)},loading:this.loading()},s().translator.trans("fof-follow-tags.forum.sub_controls.submit_button"))))},n.formOptionItems=function(){var t=new(ot());return t.add("subscription_type",m("div",{className:"Form-group"},m("label",null,s().translator.trans("fof-follow-tags.forum.sub_controls.subscription_label",{tagName:this.attrs.model.name()})),this.subscriptionOptionItems().toArray()),60),t},n.subscriptionOptionItems=function(){var t=this,o=new(ot()),n=100;return et.subscriptionOptions.forEach((function(s,r){var i=st({},s,{onclick:function(){t.subscription=s.subscription,t.canShowTooltip=!1},active:t.subscription===s.subscription,disabled:"hide"===s.subscription&&t.attrs.model.isHidden()});o.add("subscription-option-"+r,m(at,i),n),n-=5})),o},n.saveSubscription=function(t){var o=this,n=this.attrs.model;this.loading(!0),this.subscription=t,s().request({url:s().forum.attribute("apiUrl")+"/tags/"+n.id()+"/subscription",method:"POST",body:{data:this.requestData()}}).then((function(t){return s().store.pushPayload(t)})).then((function(){o.loading(!1),m.redraw(),o.hide()}))},n.requestData=function(){return{subscription:this.subscription}},o}(it());const ft=flarum.core.compat["common/components/Tooltip"];var pt=t.n(ft);const mt=flarum.core.compat["common/utils/extractText"];var gt=t.n(mt),dt=function(t){function o(){return t.apply(this,arguments)||this}_(o,t);var n=o.prototype;return n.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=ct()(!1),this.canShowTooltip=ct()(!1)},n.onbeforeupdate=function(o){t.prototype.onbeforeupdate.call(this,o);var n=this.attrs.subscription||!1,r=s().session.user.preferences(),i=r.notify_newPostInTag_email,e=r.notify_newPostInTag_alert;(i||e)&&!1===n?this.canShowTooltip(void 0):this.canShowTooltip(!1)},n.view=function(o){var n=this.attrs.subscription||!1,r=et.subscriptionOptions.find((function(t){return t.subscription===n})),i=r?r.icon:"fas fa-star",e=r?s().translator.trans(r.labelKey):s().translator.trans("fof-follow-tags.forum.sub_controls.follow_button");this.attrs.className=(this.attrs.className||"")+" SubscriptionButton SubscriptionButton--"+n,this.attrs.icon=i;var a=s().session.user.preferences().notify_newPostInTag_email,l=gt()(s().translator.trans(a?"fof-follow-tags.forum.sub_controls.notify_email_tooltip":"fof-follow-tags.forum.sub_controls.notify_alert_tooltip"));return m(pt(),{text:"boolean"==typeof this.canShowTooltip()?"":l,tooltipVisible:this.canShowTooltip(),position:"bottom",delay:250},t.prototype.view.call(this,Object.assign({},o,{children:e})))},o}(O()),bt={FollowingPageFilterDropdown:x,NewDiscussionNotification:K,NewDiscussionTagNotification:C,NewPostNotification:B,SubscriptionModal:ut,SubscriptionOptionItem:at,SubscriptionStateButton:dt,FollowingHero:nt};s().initializers.add("fof/follow-tags",(function(){s().initializers.has("flarum-tags")?(s().store.models.tags.prototype.subscription=i().attribute("subscription"),(0,e.extend)(l().prototype,"sidebarItems",(function(t){if(this.currentTag()&&s().session.user){var o=this.currentTag();o&&(t.has("newDiscussion")&&t.setPriority("newDiscussion",10),t.add("subscriptionButton",m(dt,{className:"Button App-primaryControl",subscription:o.subscription(),onclick:function(){return s().modal.show(ut,{model:o})}}),5))}})),(0,e.override)(l().prototype,"hero",(function(t){return"following"===s().current.get("routeName")?m(nt,null):t()})),"flarum-subscriptions"in flarum.extensions&&((0,e.extend)(A().prototype,"badges",(function(t){if(f()&&this.tags()){var o=this.tags().map((function(t){return t.subscription()})).filter((function(t){return["lurk","follow"].includes(t)})),n=o.includes("lurk")?"lurking":"following";o.length&&t.add("followTags",q().component({label:s().translator.trans("fof-follow-tags.forum.badge."+n+"_tag_tooltip"),icon:"fas fa-user-tag",type:n+"-tag"}))}})),(0,e.extend)(u().prototype,"requestParams",(function(t){if(f()&&s().session.user){this.followTags||(this.followTags=v());var o=this.followTags;"following"===s().current.get("routeName")&&"tags"===o&&(t.filter["following-tag"]=!0,delete t.filter.subscription)}})),(0,e.extend)(l().prototype,"viewItems",(function(t){f()&&s().session.user&&t.add("follow-tags",m(x,null))})),(0,e.extend)(L().prototype,"settingsItems",(function(t){var o=this;t.add("fof-follow-tags",E().component({label:s().translator.trans("fof-follow-tags.forum.user.settings.heading"),className:"Settings-follow-tags"},[m("div",{className:"Form-group"},m("p",null,s().translator.trans("fof-follow-tags.forum.user.settings.filter_label")),V().component({options:w(),value:this.user.preferences().followTagsPageDefault||v(),onchange:function(t){o.user.savePreferences({followTagsPageDefault:t}).then((function(){m.redraw()}))}}))]))}))),s().notificationComponents.newPostInTag=B,s().notificationComponents.newDiscussionInTag=K,s().notificationComponents.newDiscussionTag=C,(0,e.extend)(Q().prototype,"notificationTypes",(function(t){t.add("newDiscussionInTag",{name:"newDiscussionInTag",icon:"fas fa-user-tag",label:s().translator.trans("fof-follow-tags.forum.settings.notify_new_discussion_label")}),t.add("newPostInTag",{name:"newPostInTag",icon:"fas fa-user-tag",label:s().translator.trans("fof-follow-tags.forum.settings.notify_new_post_label")}),t.add("newDiscussionTag",{name:"newDiscussionTag",icon:"fas fa-user-tag",label:s().translator.trans("fof-follow-tags.forum.settings.notify_new_discussion_tag_label")})}))):console.error("[fof/follow-tags] flarum/tags is not enabled")}),-1)})(),module.exports=o})();
|
||
|
||
|
||
flarum.extensions['fof-follow-tags']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return t.d(o,{a:o}),o},d:(r,o)=>{for(var e in o)t.o(o,e)&&!t.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:o[e]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r);const o=flarum.core.compat["forum/app"];var e=t.n(o);const a=flarum.core.compat.extend,n=flarum.core.compat["models/User"];var s=t.n(n);const i=flarum.core.compat["components/UserCard"];var c=t.n(i);const u=flarum.core.compat["utils/UserControls"];var l=t.n(u);const d=flarum.core.compat["components/Button"];var f=t.n(d);const h=flarum.core.compat.Model;var p=t.n(h);function v(t,r){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},v(t,r)}const y=flarum.core.compat["components/Modal"];var b=t.n(y);const g=flarum.core.compat["utils/ItemList"];var _=t.n(g);const w=flarum.core.compat["components/LoadingIndicator"];var B=t.n(w);function M(t,r){if(void 0===r&&(r=2),0===t)return"0 Bytes";var o=r<0?0:r,e=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,e)).toFixed(o))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][e]}var P=function(t){var r,o;function a(){return t.apply(this,arguments)||this}o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,v(r,o);var n=a.prototype;return n.oninit=function(r){t.prototype.oninit.call(this,r),this.maxSize=parseFloat(e().forum.attribute("sycho-profile-cover.max_size")||2048),this.alertAttrs={content:e().translator.trans("sycho-profile-cover.forum.notice",{size:M(this.maxSize*Math.pow(2,10))})},this.loading=!1,this.cover=this.attrs.user.cover_thumbnail()||this.attrs.user.cover(),this.context=""},n.content=function(){var t={},r="Modal-image CoverEditor-cover";return this.cover&&(t.style={backgroundImage:"url("+this.cover+")"},r+=" CoverEditor-active"),[m("div",Object.assign({className:r},t),this.loading?m(B(),null):""),m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fieldsItems().toArray()))]},n.className=function(){return"Cover-modal Modal--small"},n.title=function(){return e().translator.trans("sycho-profile-cover.forum.edit_cover")},n.fieldsItems=function(){var t=new(_());return t.add("actions",this.controlItems().toArray()),t},n.controlItems=function(){var t=new(_());return t.add("upload",m(f(),{icon:"fas fa-upload",className:"Button",onclick:this.openPicker.bind(this)},e().translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(f(),{icon:"fas fa-times",className:"Button",onclick:this.remove.bind(this)},e().translator.trans("core.forum.user.avatar_remove_button"))),t},n.openPicker=function(){var t=this;$('<input type="file">').appendTo("body").hide().click().on("change",(function(r){t.upload($(r.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var r=new FormData;r.append("cover",t),this.loading=!0,this.context="added",m.redraw(),e().request({method:"POST",url:e().forum.attribute("apiUrl")+"/users/"+this.attrs.user.id()+"/cover",serialize:function(t){return t},body:r}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){this.loading=!0,this.context="removed",m.redraw(),e().request({method:"DELETE",url:e().forum.attribute("apiUrl")+"/users/"+this.attrs.user.id()+"/cover"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){e().store.pushPayload(t),this.showAlert("success"),this.loading=!1,m.redraw(),this.hide()},n.failure=function(){this.showAlert("error"),this.loading=!1,m.redraw()},n.showAlert=function(t){this.alertAttrs.content=e().translator.trans("sycho-profile-cover.forum."+this.context+"."+t),this.alertAttrs.type=t},a}(b());e().initializers.add("sycho-profile-cover",(function(){s().prototype.cover=p().attribute("cover"),s().prototype.cover_thumbnail=p().attribute("cover_thumbnail"),s().prototype.canSetProfileCover=p().attribute("canSetProfileCover"),(0,a.extend)(c().prototype,"view",(function(t){if(t.attrs.style&&this.attrs.user.cover()){var r=this.attrs.user.cover(),o=this.attrs.user.cover_thumbnail();r&&(this.attrs.controlsButtonClassName.includes("Button--icon")&&o&&(r=o),t.attrs.style=Object.assign(t.attrs.style,{"--background-image":"url("+r+")"}))}})),(0,a.extend)(l(),"moderationControls",(function(t,r){if(r.canSetProfileCover())return t.add("cover",m(f(),{icon:"fas fa-image",onclick:function(){return e().modal.show(P,{user:r})}},e().translator.trans("sycho-profile-cover.forum.cover"))),t}))}))})(),module.exports=r})();
|
||
|
||
|
||
flarum.extensions['sycho-profile-cover']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={649:function(){(function(){var t=[].slice;String.prototype.autoLink=function(){var e,o,r,i,n,a;return n=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,0<(i=1<=arguments.length?t.call(arguments,0):[]).length?(r=i[0],o=function(){var t;for(e in t=[],r)a=r[e],"callback"!==e&&t.push(" "+e+"='"+a+"'");return t}().join(""),this.replace(n,(function(t,e,i){return""+e+(("function"==typeof r.callback?r.callback(i):void 0)||"<a href='"+i+"'"+o+">"+i+"</a>")}))):this.replace(n,"$1<a href='$2'>$2</a>")}}).call(this)}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r].call(n.exports,n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r),o.d(r,{components:()=>_});const t=flarum.core.compat["forum/app"];var e=o.n(t);const i=flarum.core.compat["common/extend"];o(649);const n=flarum.core.compat["forum/components/UserCard"];var a=o.n(n);const s=flarum.core.compat["common/models/User"];var c=o.n(s);const l=flarum.core.compat["common/Model"];var u=o.n(l);function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}const p=flarum.core.compat["common/Component"];var d=o.n(p);const h=flarum.core.compat["common/components/LoadingIndicator"];var b=o.n(h);const v=flarum.core.compat["common/components/Button"];var g=o.n(v);const y=flarum.core.compat["common/utils/classList"];var x=o.n(y);const B=flarum.core.compat["common/utils/extractText"];var S=o.n(B),w=function(t){var o,r;function i(){return t.apply(this,arguments)||this}r=t,(o=i).prototype=Object.create(r.prototype),o.prototype.constructor=o,f(o,r);var n=i.prototype;return n.oninit=function(o){t.prototype.oninit.call(this,o),this.editing=!1,this.loading=!1,this.textareaRows="5",this.bioMaxLength=e().forum.attribute("fof-user-bio.maxLength"),this.bioPlaceholder=e().session&&e().session.user&&e().session.user.id()===this.attrs.user.id()?e().translator.trans("fof-user-bio.forum.userbioPlaceholder"):e().translator.trans("fof-user-bio.forum.userbioPlaceholderOtherUser",{username:this.attrs.user.displayName()})},n.view=function(){var t,o=this,r=this.attrs.user,i=this.attrs.editable&&this.attrs.user.attribute("canEditBio");if(this.editing){var n=this.tempBio,a=null!=n?n:r.bio();t=m("form",{onsubmit:this.save.bind(this)},m("textarea",{className:"FormControl",placeholder:S()(this.bioPlaceholder),rows:this.textareaRows,maxlength:this.bioMaxLength,oncreate:function(t){var e=t.dom;e.value=a,void 0!==n&&(e.value=n,e.focus(),void 0!==o.tempSelector&&(e.selectionStart=o.tempSelector,e.selectionEnd=o.tempSelector,delete o.tempSelector))}}),m("div",{className:"UserBio-actions"},m(g(),{className:"Button Button--primary",type:"submit"},e().translator.trans("fof-user-bio.forum.profile.save_button")),m(g(),{className:"Button",type:"reset",onclick:this.reset.bind(this)},e().translator.trans("fof-user-bio.forum.profile.cancel_button"))))}else{var s;if(this.loading)s=m("p",{className:"UserBio-placeholder"},m(b(),null));else{var c=r.bioHtml();c?s=m.trust(c):r.bio()?s=m.trust("<p>"+$("<div/>").text(r.bio()).html().replace(/\n/g,"<br>").autoLink({rel:"nofollow ugc",target:"_blank"})+"</p>"):i&&(s=m("p",{className:"UserBio-placeholder"},this.bioPlaceholder))}var l=e().forum.attribute("fof-user-bio.maxLines")||5;t=m("div",{className:"UserBio-content",onclick:i?this.edit.bind(this):function(){},onkeydown:i?this.onkeydown.bind(this):function(){},style:{"--bio-max-lines":l},role:i?"button":void 0,tabindex:i?"0":void 0,"aria-label":i?e().translator.trans("fof-user-bio.forum.profile.edit_bio_label"):void 0},s)}return m("div",{className:"UserBio "+x()({editable:i,editing:this.editing})},t)},n.onkeydown=function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.edit(t))},n.edit=function(t){if(!t.ctrlKey&&!t.metaKey){t.preventDefault();var e=window.getSelection(),o=e.anchorOffset,r=e.anchorNode&&t.target.className.includes("UserBio")?e.anchorNode:t.target,i=this.countTextLengthBefore(r),n=t.currentTarget.scrollTop,a=i+o;this.textareaRows=getComputedStyle(t.currentTarget).getPropertyValue("--bio-max-lines")||"5",this.editing=!0,m.redraw.sync(),this.$("textarea").trigger("focus").prop("selectionStart",a).prop("selectionEnd",a).prop("scrollTop",n)}},n.save=function(t){var e=this;t.preventDefault();var o=this.$("textarea").val(),r=this.attrs.user,i=this.$("textarea").prop("selectionStart");this.isDirty()&&(this.loading=!0,r.save({bio:o}).catch((function(){e.tempBio=o,e.tempSelector=i,e.edit()})).then((function(){e.loading=!1,delete e.tempBio,m.redraw()}))),this.editing=!1,m.redraw()},n.reset=function(t){t.preventDefault(),this.isDirty()&&!confirm(S()(e().translator.trans("fof-user-bio.forum.profile.cancel_confirm")))||(this.editing=!1,delete this.tempBio,m.redraw())},n.isDirty=function(){var t=this.$("textarea").val();return this.attrs.user.bio()!==t},n.countTextLengthBefore=function(t){if(!t||t instanceof HTMLElement&&t.className.includes("UserBio"))return 0;var e=0;if(t.previousSibling)for(var o=t.previousSibling;o;o=o.previousSibling)e+=o.textContent.length;return t.parentNode,e+this.countTextLengthBefore(t.parentNode)},i}(d()),_={UserBio:w};e().initializers.add("fof-user-bio",(function(){c().prototype.bio=u().attribute("bio"),c().prototype.bioHtml=u().attribute("bioHtml"),(0,i.extend)(a().prototype,"infoItems",(function(t){var e=this.attrs.user;e.attribute("canViewBio")&&t.add("bio",m(w,{user:e,editable:this.attrs.editable}),-100)}))}))})(),module.exports=r})();
|
||
|
||
|
||
flarum.extensions['fof-user-bio']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return t.d(a,{a}),a},d:(o,a)=>{for(var n in a)t.o(a,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:a[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o)};(()=>{"use strict";const o=flarum.core.compat["forum/app"];var a=t.n(o);const n=flarum.core.compat["common/Model"];var i=t.n(n);const e=flarum.core.compat["common/models/User"];var r=t.n(e);const s=flarum.core.compat["common/extend"],c=flarum.core.compat["forum/components/UserCard"];var l=t.n(c);const f=flarum.core.compat["common/components/Badge"];var u=t.n(f);const b=flarum.core.compat["common/utils/ItemList"];var d=t.n(b);const p=flarum.core.compat["common/utils/classList"];var h=t.n(p);function v(t,o){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},v(t,o)}function g(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,v(t,o)}const y=flarum.core.compat["common/components/Modal"];var w=t.n(y);const x=flarum.core.compat["common/components/Button"];var k=t.n(x);const B=flarum.core.compat["common/utils/Stream"];var N=t.n(B);const S=flarum.core.compat["common/Component"];var C=t.n(S);const E=flarum.core.compat["common/utils/withAttr"];var F=t.n(E);function _(t){var o;try{o=new URL(t)}catch(t){return!1}return["http:","https:"].includes(o.protocol)}const O=flarum.core.compat["common/components/Dropdown"];var U=t.n(O);const j=flarum.core.compat["common/helpers/icon"];var P=t.n(j),I={google:function(t){return"https://www.google.com/s2/favicons?domain="+t},duckduckgo:function(t){return"https://icons.duckduckgo.com/ip3/"+t+".ico"},yandex:function(t){return"https://favicon.yandex.net/favicon/"+t}};const A=function(t){var o,n=a().forum.attribute("fof-socialprofile.favicon_provider");if(!_(t)||!(n in I))return null;var i=function(t){var o;try{o=new URL(t)}catch(t){return null}return["http:","https:"].includes(o.protocol)?o.host:null}(t);return null==(o=I[n])?void 0:o.call(I,i)};var M=function(t){function o(){return t.apply(this,arguments)||this}g(o,t),o.initAttrs=function(o){t.initAttrs.call(this,o),o.className="icondropdown",o.buttonClassName="Button Button--icon",o.menuClassName="social-dropdown-menu"};var a=o.prototype;return a.oninit=function(o){t.prototype.oninit.call(this,o),this.icons={social:["fas fa-envelope","fas fa-globe","fab fa-amazon","fab fa-angellist","fab fa-apple","fab fa-behance","fab fa-bitbucket","fab fa-codepen","fab fa-connectdevelop","fab fa-dashcube","fab fa-delicious","fab fa-deviantart","fab fa-digg","fab fa-discord","fab fa-dribbble","fab fa-dropbox","fab fa-drupal","fab fa-facebook","fab fa-flickr","fab fa-foursquare","fab fa-get-pocket","fab fa-git","fab fa-github","fab fa-github-alt","fab fa-google","fab fa-google-plus","fab fa-google-wallet","fab fa-hacker-news","fab fa-instagram","fab fa-ioxhost","fab fa-joomla","fab fa-jsfiddle","fab fa-lastfm","fab fa-leanpub","fab fa-linkedin","fab fa-mastodon","fab fa-medium","fab fa-odnoklassniki","fab fa-opencart","fab fa-pagelines","fab fa-paypal","fab fa-pied-piper-alt","fab fa-pinterest-p","fab fa-playstation","fab fa-qq","fab fa-reddit","fab fa-renren","fab fa-sellsy","fas fa-share-alt","fab fa-shirtsinbulk","fab fa-simplybuilt","fab fa-skyatlas","fab fa-skype","fab fa-slack","fab fa-slideshare","fab fa-soundcloud","fab fa-spotify","fab fa-stack-exchange","fab fa-stack-overflow","fab fa-steam","fab fa-stumbleupon","fab fa-telegram","fab fa-tencent-weibo","fab fa-trello","fab fa-tripadvisor","fab fa-tumblr","fab fa-twitch","fab fa-twitter","fab fa-viacoin","fab fa-vimeo","fab fa-vine","fab fa-vk","fab fa-weibo","fab fa-weixin","fab fa-whatsapp","fab fa-wordpress","fab fa-xbox","fab fa-xing","fab fa-y-combinator","fab fa-yandex","fab fa-yandex-international","fab fa-yelp","fab fa-youtube"]}},a.view=function(o){return this.faviconUrl=A(this.attrs.url()),o.children=this.items().toArray(),t.prototype.view.call(this,o)},a.getButtonContent=function(){var t=this,o=function(t){return P()(t,{className:"icondropdown-activeIcon fa-fw"})};return[/^favicon(-\w+)?$/.test(this.attrs.selection())?this.attrs.allowsExternal?[m("img",{className:h()({"icondropdown-activeIcon":!0,"social-greyscale-button":"favicon-grey"===this.attrs.selection(),"social-button":"favicon-grey"===!this.attrs.selection()}),alt:"",src:this.faviconUrl,onerror:function(){t.attrs.favicon("none"),t.select(t.icons.social[0])}})]:o("fas fa-globe"):o(this.attrs.selection()),this.attrs.caretIcon?P()(this.attrs.caretIcon,{className:"Button-caret"}):""]},a.items=function(){var t=this,o=new(d());return"none"!==this.attrs.favicon()&&this.attrs.allowsExternal&&(o.add("favicon",m("div",{onclick:function(){return t.select("favicon")},role:"button",className:h()({"iconpicker-item":!0,"iconpicker-item--highlighted":"favicon"===this.attrs.selection()}),title:"Favicon"},m("img",{className:"iconpicker-image-"+this.attrs.index(),alt:"favicon",style:{width:"14px",height:"14px",margin:"0 2px 0 2px"},src:this.faviconUrl})),102),o.add("favicon-grey",m("div",{onclick:function(){return t.select("favicon-grey")},role:"button",className:h()({"iconpicker-item iconpicker-item--invertColors":!0,"iconpicker-item--highlighted":"favicon-grey"===this.attrs.selection()}),title:"Grey Favicon"},m("img",{className:"social-greyscale-button iconpicker-image-"+this.attrs.index(),alt:"favicon",style:{width:"14px",height:"14px",margin:"0 2px 0 2px"},src:this.faviconUrl})),101)),this.icons.social.forEach((function(a){o.add(a.replace(/ /,"-"),m("div",{onclick:function(){return t.select(a)},className:h()({"iconpicker-item":!0,"iconpicker-item--highlighted":t.attrs.selection()===a}),role:"button",title:"."+a},P()(a,{className:"social-icon fa-fw"})),100)})),o},a.select=function(t){this.attrs.selection(t)},o}(U()),L=function(t){function o(){return t.apply(this,arguments)||this}g(o,t);var n=o.prototype;return n.oninit=function(o){t.prototype.oninit.call(this,o),this.button=this.attrs.button,this.allowsExternal=a().forum.attribute("fof-socialprofile.allow_external_favicons")},n.view=function(t){return m("div",{className:"Form-group form-group-social",id:"socialgroup-"+this.button.index()},m("input",{type:"text",className:"FormControl SocialFormControl SocialFormControl-title",placeholder:a().translator.trans("fof-socialprofile.forum.edit.title"),tabIndex:2*(this.button.index()+1)-1,bidi:this.button.title}),M.component({selection:this.button.icon,favicon:this.button.favicon,index:this.button.index,allowsExternal:this.allowsExternal,url:this.button.url}),m("input",{type:"text",className:"FormControl SocialFormControl SocialFormControl-url",placeholder:a().translator.trans("fof-socialprofile.forum.edit.url"),tabIndex:2*(this.button.index()+1),value:this.button.url(),onchange:F()("value",this.onUrlChange.bind(this))}),m("input",{type:"hidden",className:"FormControl SocialFormControl SocialFormControl-icon",id:"icon"+this.button.index()+"-icon",bidi:this.button.icon}),m("input",{type:"hidden",className:"SocialFormControl SocialFormControl-favicon",id:"icon"+this.button.index()+"-favicon",bidi:this.button.favicon}))},n.onUrlChange=function(t){var o=this;this.button.url(t),this.allowsExternal&&(clearTimeout(this.waitUntilFinished),"fas fa-circle-notch fa-spin"!==this.button.icon()&&(this.button.icon("fas fa-circle-notch fa-spin"),this.button.favicon("none")),this.waitUntilFinished=setTimeout((function(){_(o.button.url())?(o.button.icon("favicon"),o.button.favicon("external")):(o.button.icon("fas fa-globe"),o.button.favicon("none")),m.redraw()}),1e3))},o}(C()),q=function(t){function o(){return t.apply(this,arguments)||this}g(o,t);var n=o.prototype;return n.oninit=function(o){var a=this;t.prototype.oninit.call(this,o),this.buttons=[];var n=this.attrs.user.socialButtons();n.length?n.forEach((function(t,o){t&&t.title&&a.createButtonObject(o,t)})):this.createButtonObject(0)},n.className=function(){return"SocialButtonsModal Modal--small"},n.title=function(){return a().translator.trans("fof-socialprofile.forum.edit.headtitle")},n.content=function(){var t=this.buttons.some((function(t){return"fas fa-circle-notch fa-spin"===t.icon()}));return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.buttons.map((function(t){return L.component({button:t})})),m("div",{className:"Form-group",id:"submit-button-group"},m("div",{className:"Button Button--primary EditSocialButtons-add",style:"margin-left: 1%;",onclick:this.addSocialButton.bind(this)},m("i",{className:"fas fa-fw fa-plus"})),m("div",{className:"Button Button--primary EditSocialButtons-del",style:"margin-left: 1%;",onclick:this.delSocialButton.bind(this)},m("i",{className:"fas fa-fw fa-minus"})),k().component({type:"submit",style:"float: right;",className:"Button Button--primary EditSocialButtons-save",loading:this.loading,disabled:t,title:t?a().translator.trans("fof-socialprofile.forum.edit.save_disabled_fetching_favicons"):null},a().translator.trans("fof-socialprofile.forum.edit.submit")))))},n.data=function(){var t=[];return this.buttons.forEach((function(o){o&&o.title()&&o.url()&&t.push({title:o.title(),url:o.url(),icon:o.icon()})})),{socialButtons:JSON.stringify(t)}},n.onsubmit=function(t){var o=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).then($("#app").trigger("refreshSocialButtons",[this.data().socialButtons])).catch((function(){o.loading=!1,m.redraw()}))},n.addSocialButton=function(){var t=this;this.createButtonObject(this.buttons.length),m.redraw(),$("document").ready((function(){$("#socialgroup-"+(t.buttons.length-1)).slideDown()}))},n.delSocialButton=function(){var t=this,o=this.buttons.length-1;$("#socialgroup-"+o).slideUp("normal",(function(){t.buttons.splice(o,1),m.redraw()}))},n.createButtonObject=function(t,o){var a;void 0===o&&(o=null),null==o?(this.buttons[t]={},this.buttons[t].index=N()(t),this.buttons[t].favicon=N()("none"),this.buttons[t].title=N()(""),this.buttons[t].url=N()(""),this.buttons[t].icon=N()("fas fa-globe")):(this.buttons[t]={},this.buttons[t].index=N()(t),this.buttons[t].favicon=N()(null!=(a=o.icon)&&a.startsWith("favicon")?"external":"none"),this.buttons[t].title=N()(o.title),this.buttons[t].url=N()(o.url),this.buttons[t].icon=N()(o.icon))},o}(w());a().initializers.add("fof/socialprofile",(function(){r().prototype.socialButtons=i().attribute("socialButtons",(function(t){return JSON.parse(t||"[]")})),r().prototype.canViewSocialProfile=i().attribute("canViewSocialProfile"),r().prototype.canEditSocialProfile=i().attribute("canEditSocialProfile"),(0,s.extend)(l().prototype,"infoItems",(function(t){var o=this,n=this.attrs.user;if(n.canViewSocialProfile()){this.canEdit=n.canEditSocialProfile(),this.buttons=this.attrs.user.socialButtons();var i=new(d());this.buttons.length?(this.buttons.forEach((function(t,n){if(t&&t.title&&t.icon&&t.url){var e,r,s={},c=h()(((e={})["social-button "+t.icon+"-"+n+" social-icon-"+n]=!0,e["social-greyscale-button"]="favicon-grey"===t.icon,e));"favicon"!==t.icon&&"favicon-grey"!==t.icon||(a().forum.attribute("fof-socialprofile.allow_external_favicons")?s={backgroundImage:'url("'+A(t.url)+'")',backgroundSize:"60%",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:c+=" fas fa-globe"),i.add("social-icon-"+n,m("a",{href:t.url,target:"_blank",rel:"noreferrer noopener nofollow"},u().component({className:h()((r={},r[c]=!0,r["social-icon--deleting"]=o.deleting,r)),type:"social",icon:t.icon,label:t.title,style:s})))}})),this.canEdit&&i.add("settings social-button",u().component({type:"social social-settings",icon:"fas fa-cog",label:a().translator.trans("fof-socialprofile.forum.edit.edit"),onclick:function(){a().modal.show(q,{user:o.attrs.user})}}),-1)):this.canEdit&&i.add("settings social-button",u().component({type:"social null-social-settings",icon:"fas fa-plus",label:a().translator.trans("fof-socialprofile.forum.edit.add"),onclick:function(){a().modal.show(q,{user:o.attrs.user})}}),-1),i.toArray().length>0&&t.add("fofsocialprofile",i.toArray(),20)}}))}))})(),module.exports={}})();
|
||
|
||
|
||
flarum.extensions['fof-socialprofile']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},d:(r,e)=>{for(var o in e)t.o(e,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:e[o]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r);const e=flarum.core.compat["forum/app"];var o=t.n(e);const n=flarum.core.compat["common/extend"],a=flarum.core.compat["forum/components/DiscussionPage"];var i=t.n(a);const c=flarum.core.compat["common/components/Button"];var s=t.n(c);const u=flarum.core.compat["common/Model"];var l=t.n(u);const f=flarum.core.compat["common/models/Discussion"];var p=t.n(f);const d=flarum.core.compat["common/components/SplitDropdown"];var h=t.n(d);function y(t,r){return y=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},y(t,r)}function v(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,y(t,r)}const b=flarum.core.compat["common/components/Modal"];var g=t.n(b);const w=flarum.core.compat["common/helpers/icon"];var S=t.n(w);const k=flarum.core.compat["common/utils/ItemList"];var _=t.n(k);const A=flarum.core.compat["common/utils/classList"];var O=t.n(A);const j=flarum.core.compat["common/utils/string"];var q={facebook:"//facebook.com/sharer/sharer.php?u={url}",twitter:"//twitter.com/share?url={url}&text={title}",linkedin:"//linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}",reddit:"//www.reddit.com/submit?url={url}&title={title}",whatsapp:"//api.whatsapp.com/send/?phone&text={title}%20{url}",telegram:"//telegram.me/share/url?url={url}&text={title}",vkontakte:"//vk.com/share.php?url={url}&title={title}&description={description}",odnoklassniki:"//connect.ok.ru/offer?url={url}",my_mail:"//connect.mail.ru/share?url={url}&title={title}&description={description}",qq:"//connect.qq.com/widget/shareqq/iframe_index.html?url={url}&title={title}",qzone:"//sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&summary={description}&title={title}",native:function(t){return navigator.share(M(t))}},x={vkontakte:"fab fa-vk",my_mail:"fas fa-at",qq:"fab fa-qq",qzone:"fas fa-star",native:"fas fa-share-square"},I=function(t){var r;return{url:t.shareUrl(),title:o().title,description:t.firstPost()&&(0,j.truncate)((0,j.getPlainContent)(null==(r=t.firstPost())?void 0:r.contentHtml()),150,0)||""}},M=function(t){return{title:t.title,text:t.description,url:t.url}};function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}function B(t,r,e){return B=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,r,e){var o=[null];o.push.apply(o,r);var n=new(Function.bind.apply(t,o));return e&&y(n,e.prototype),n},B.apply(null,arguments)}function E(t){var r="function"==typeof Map?new Map:void 0;return E=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,o)}function o(){return B(t,arguments,P(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),y(o,t)},E(t)}function U(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}var z=function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")};function C(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}var T=function(t){function r(r){var e;return(e=t.call(this,"Missing a value for "+(r?"the placeholder: "+r:"a placeholder"),r)||this).name="MissingValueError",e.key=r,e}return v(r,t),r}(E(Error));function N(t,r,e){var o=void 0===e?{}:e,n=o.ignoreMissing,a=void 0!==n&&n,i=o.transform,c=void 0===i?function(t){return t.value}:i;if("string"!=typeof t)throw new TypeError("Expected a `string` in the first argument, got `"+typeof t+"`");if("object"!=typeof r)throw new TypeError("Expected an `object` or `Array` in the second argument, got `"+typeof r+"`");var s,u=function(t,e){for(var o,n=r,i=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return C(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?C(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split("."));!(o=i()).done;){var s=o.value;n=n?n[s]:void 0}var u=c({value:n,key:e});if(void 0===u){if(a)return t;throw new T(e)}return String(u)},l=/{{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}}/gi;return l.test(t)&&(t=t.replace(l,(s=u,function(){return function(t){if("string"==typeof t)return z(t);for(var r=t[0],e=arguments.length,o=new Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];for(var a,i=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return U(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?U(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(o.entries());!(a=i()).done;){var c=a.value,s=c[0],u=c[1];r=r+z(String(u))+t[s+1]}return r}(s.apply(void 0,arguments))}))),t.replace(/{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}/gi,u)}function R(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=new Array(r);e<r;e++)o[e]=t[e];return o}var F=function(t){var r=t.network,e=t.discussion,n=t.isRounded,a=void 0!==n&&n;return m(s(),{className:O()("Button Button--block Share--"+r,a&&"Button--rounded"),icon:(x[r]||"fab fa-"+r)+" fa-lg fa-fw",onclick:L.bind(void 0,r,e)},o().translator.trans("fof-share-social.lib.networks."+r))},L=function(t,r){var e=I(r),n=q[t];if("function"==typeof n)return n(e);var a="width=1000, height= 500, top="+($(window).height()/2-250)+", left="+($(window).width()/2-500)+", status=no, scrollbars=no, resizable=no";for(var i in e)e[i]=encodeURIComponent(e[i]);window.open(N(n,e),o().title,a)},D=function(t,r){for(var e,n=new(_()),a=o().forum.attribute("fof-share-social.networks"),i=o().forum.attribute("fof-share-social.default"),c=function(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,r){if(t){if("string"==typeof t)return R(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?R(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(a);!(e=c()).done;){var s=e.value;("native"!==s||null!=navigator.canShare&&navigator.canShare(I(t)))&&n.add(s,F({network:s,discussion:t,isRounded:r}))}return n.has(i)&&n.setPriority(i,1e3),n},H=function(t){function r(){return t.apply(this,arguments)||this}v(r,t);var e=r.prototype;return e.oninit=function(r){t.prototype.oninit.call(this,r),this.networks=this.attrs.networks,this.discussion=this.attrs.discussion},e.className=function(){return"FofShareSocialModal Modal--small"},e.title=function(){return o().translator.trans("fof-share-social.forum.modal.title")},e.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},this.shareItems().toArray())))},e.shareItems=function(){var t=D(this.discussion,!0);return o().forum.attribute("fof-share-social.plain-copy")&&t.add("plain-copy",m("div",{className:"ShareUrl"},m("input",{className:"FormControl",type:"text",value:this.discussion.shareUrl()}),m(s(),{className:"Button Button--primary","aria-label":o().translator.trans("fof-share-social.forum.modal.copy_button"),onclick:this.copy.bind(this)},S()("fas fa-copy fa-check")))),t},e.onclick=function(t){return share(t)},e.copy=function(){var t=document.querySelector(".ShareUrl input");t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),this.toggleCopyIcon()},e.toggleCopyIcon=function(){var t=document.querySelector(".ShareUrl button i");t.classList.toggle("fa-copy"),setTimeout((function(){t.classList.toggle("fa-copy")}),3e3)},r}(g());o().initializers.add("fof/share-social",(function(){p().prototype.shareUrl=l().attribute("shareUrl"),(0,n.extend)(i().prototype,"sidebarItems",(function(t){var r=this,e=o().forum.attribute("fof-share-social.networks"),n=o().forum.attribute("fof-share-social.default"),a="native"===n,i=a&&(null==navigator.canShare?void 0:navigator.canShare(M(this.discussion)));if(!n||a&&!i)t.add("share-social",m(s(),{class:"Button Button-icon Button--share",icon:"fas fa-share-alt",onclick:function(){return o().modal.show(H,{networks:e,discussion:r.discussion})}},o().translator.trans("fof-share-social.forum.discussion.share_button")),-1);else{var c=D(this.discussion);if(a&&(c.get("native").children=o().translator.trans("fof-share-social.forum.discussion.share_button")),c.isEmpty())return;t.add("share-social",m(h(),{icon:"fas fa-share-alt",buttonClassName:"Button--share",accessibleToggleLabel:o().translator.trans("fof-share-social.forum.discussion.share_dropdown_accessible_label"),lazyDraw:!0},c.toArray()))}}))}))})(),module.exports=r})();
|
||
|
||
|
||
flarum.extensions['fof-share-social']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t,r,e,n,o={195:(t,r,e)=>{t.exports=e(236)},236:t=>{var r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,a=Object.create(o.prototype),i=new O(n||[]);return a._invoke=function(t,r,e){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return T()}for(e.method=o,e.arg=a;1;){var i=e.delegate;if(i){var c=B(i,e);if(c){if(c===m)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=d,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=h;var u=l(t,r,e);if("normal"===u.type){if(n=e.done?d:p,u.arg===m)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=d,e.method="throw",e.arg=u.arg)}}}(t,e,i),a}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",m={};function v(){}function y(){}function g(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==e&&n.call(x,a)&&(b=x);var _=g.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function E(t,r){function e(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,c)}),(function(t){e("throw",t,i,c)})):r.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return e("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function a(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(a,a):a()}}function B(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=r,B(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:r,done:!0}}return y.prototype=g,u(_,"constructor",g),u(g,"constructor",y),y.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(r,e,n,o,a){void 0===a&&(a=Promise);var i=new E(s(r,e,n,o),a);return t.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),u(_,c,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=r,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;j(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},t}(1?t.exports:0);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},a={};function i(t){var r=a[t];if(void 0!==r)return r.exports;var e=a[t]={exports:{}};return o[t].call(e.exports,e,e.exports,i),e.exports}i.m=o,i.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;return i.d(r,{a:r}),r},r=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,i.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var a={};t=t||[null,r({}),r([]),r(r)];for(var c=2&n&&e;"object"==typeof c&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach((t=>a[t]=()=>e[t]));return a["default"]=()=>e,i.d(o,a),o},i.d=(t,r)=>{for(var e in r)i.o(r,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((r,e)=>(i.f[e](t,r),r)),[])),i.u=t=>"chunk~"+"modules"+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),e={},n="module.exports:",i.l=(t,r,o,a)=>{if(e[t])e[t].push(r);else{var c,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==n+o){c=f;break}}c||(u=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",n+o),c.src=t),e[t]=[r];var p=(r,n)=>{c.onerror=c.onload=null,clearTimeout(h);var o=e[t];if(delete e[t],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((t=>t(n))),r)return r(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=p.bind(null,c.onerror),c.onload=p.bind(null,c.onload),u&&document.head.appendChild(c)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var r=i.g.document;if(!t&&r&&(r.currentScript&&(t=r.currentScript.src),!t)){var e=r.getElementsByTagName("script");if(e.length)for(var n=e.length-1;n>-1&&!t;)t=e[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{var t={315:0};i.f.j=(r,e)=>{var n=i.o(t,r)?t[r]:void 0;if(0!==n)if(n)e.push(n[2]);else if(1){var o=new Promise(((e,o)=>n=t[r]=[e,o]));e.push(n[2]=o);var a=i.p+i.u(r),c=new Error;i.l(a,(e=>{if(i.o(t,r)&&(0!==(n=t[r])&&(t[r]=void 0),n)){var o=e&&("load"===e.type?"missing":e.type),a=e&&e.target&&e.target.src;c.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,n[1](c)}}),"chunk-"+r,r)}};var r=(r,e)=>{var n,o,[a,c,u]=e,s=0;if(a.some((r=>0!==t[r]))){for(n in c)i.o(c,n)&&(i.m[n]=c[n]);u&&u(i)}for(r&&r(e);s<a.length;s++)o=a[s],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0},e=self["webpackChunkmodule_exports"]=self["webpackChunkmodule_exports"]||[];e.forEach(r.bind(null,0)),e.push=r.bind(null,e.push.bind(e))})();var c={};(()=>{"use strict";i.r(c),i.d(c,{components:()=>B});const t=flarum.core.compat["forum/app"];var r=i.n(t);const e=flarum.core.compat["common/extend"],n=flarum.core.compat["forum/components/AvatarEditor"];var o=i.n(n);function a(t,r,e,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function c(t){a(i,n,o,c,u,"next",t)}function u(t){a(i,n,o,c,u,"throw",t)}c(void 0)}))}}function s(t,r){return s=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},s(t,r)}var l=i(195),f=i.n(l);const p=flarum.core.compat["common/components/Modal"];var h=i.n(p);const d=flarum.core.compat["common/components/Button"];var v=i.n(d);const y=flarum.core.compat["common/components/LoadingIndicator"];var g=i.n(y);function b(t){var r=t.match(/data:([^;]+)/)[1],e=t.replace(/^[^,]+,/,"");return function(t,r){t=t||[],"string"==typeof(r=r||{})&&(r={type:r});try{return new Blob(t,r)}catch(o){if("TypeError"!==o.name)throw o;for(var e=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<t.length;n+=1)e.append(t[n]);return e.getBlob(r.type)}}([w(atob(e))],{type:r})}function w(t){for(var r=t.length,e=new ArrayBuffer(r),n=new Uint8Array(e),o=-1;++o<r;)n[o]=t.charCodeAt(o);return e}var x=function(){return i.p=r().forum.attribute("assetsBaseUrl")+"/extensions/fof-profile-image-crop/"},_=function(){var t=u(f().mark((function t(){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.prev=0,x(),t.next=4,i.e(54).then(i.t.bind(i,558,23));case 4:return t.abrupt("return",t.sent["default"]);case 7:t.prev=7,t.t0=t["catch"](0),console.error("[fof/profile-image-crop] An error occurred while loading `cropperjs`.",t.t0);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=u(f().mark((function t(){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.prev=0,x(),t.next=4,i.e(54).then(i.t.bind(i,291,23));case 4:return t.abrupt("return",t.sent["default"]);case 7:t.prev=7,t.t0=t["catch"](0),console.error("[fof/profile-image-crop] An error occurred while loading `image-blob-reduce`.",t.t0);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),E=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.className=function(){return"FofProfileImageCropModal Modal--small"},a.title=function(){return r().translator.trans("core.forum.user.avatar_upload_button")},a.oninit=function(r){var e=this;t.prototype.oninit.call(this,r);var n=new FileReader;n.addEventListener("load",(function(){e.image=n.result,m.redraw()})),n.readAsDataURL(this.attrs.file)},a.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Image-container"},!this.ready&&m(g(),{size:"tiny"}),this.image&&m("img",{src:this.image,"data-ready":!!this.ready,onload:this.loadPicker.bind(this)})),m("br",null),this.ready&&this.cropper&&m("p",{className:"helpText"},r().translator.trans("fof-profile-image-crop.forum.modal.help_text",{disableResize:this.noResize?m("s",null):m("a",{onclick:this.disableResize.bind(this)}),disableCrop:this.cropper?m("a",{onclick:this.disableCrop.bind(this)}):m("s",null)})),m("div",{className:"Modal-buttons"},m(v(),{className:"Button Button--primary",loading:this.loading,onclick:this.upload.bind(this),disabled:!this.ready},r().translator.trans("fof-profile-image-crop.forum.modal."+(this.cropper?"submit_crop":"submit")+"_button")),m(v(),{className:"Button Button--icon Button--danger",icon:"fas fa-times",onclick:this.hide.bind(this)})))},a.loadPicker=function(){var t=u(f().mark((function t(e){var n,o,a=this;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return n=e.target||e.path[0],t.next=3,_();case 3:(o=t.sent)||(this.alertAttrs={type:"error",content:r().translator.trans("fof-profile-image-crop.forum.modal.error.failed_to_load_cropper")}),setTimeout((function(){a.ready=!0,o&&(a.cropper=new o(n,{aspectRatio:1,viewMode:1,guides:!1,background:!1,responsive:!0})),m.redraw()}),500);case 6:case"end":return t.stop()}}),t,this)})));return function(r){return t.apply(this,arguments)}}(),a.onbeforeupdate=function(e){var n=e.attrs.error;n&&(this.loading=!1,n.alert?delete this.alertAttrs:this.alertAttrs={type:"error",content:(null==n.toLocaleString?void 0:n.toLocaleString())||n},delete e.attrs.error,delete r().modal.modal.attrs.error),t.prototype.onbeforeupdate.call(this,e)},a.disableResize=function(){this.noResize=!0,m.redraw()},a.disableCrop=function(){this.cropper.destroy(),this.cropper=null,m.redraw()},a.upload=function(){var t=u(f().mark((function t(){var e,n,o,a;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:if(!this.loading){t.next=2;break}return t.abrupt("return");case 2:if(this.loading=!0,this.cropper){t.next=5;break}return t.abrupt("return",this.submitBlob(b(this.image)));case 5:if(e=this.cropper.getCroppedCanvas(),!this.noResize){t.next=12;break}return t.t0=this,t.next=10,this.canvasToBlob(e);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.submitBlob.call(t.t0,t.t1));case 12:return t.next=14,k();case 14:if(n=t.sent){t.next=19;break}return this.loaded(),this.disableResize(),t.abrupt("return",this.upload());case 19:return o=e,t.prev=20,t.next=23,this.canvasToBlob(e);case 23:return a=t.sent,t.next=26,n().toCanvas(a,{max:100});case 26:o=t.sent,t.next=36;break;case 29:return t.prev=29,t.t2=t["catch"](20),console.error("[fof/profile-image-crop] An error occurred while resizing the image.",t.t2),this.alertAttrs={type:"error",content:"ERR_GET_IMAGE_DATA"===t.t2.code?r().translator.trans("fof-profile-image-crop.forum.modal.error.get_image_data"):r().translator.trans("fof-profile-image-crop.forum.modal.error.generic_resize")},this.loaded(),this.disableCrop(),t.abrupt("return");case 36:return t.t3=this,t.next=39,this.canvasToBlob(o);case 39:return t.t4=t.sent,t.abrupt("return",t.t3.submitBlob.call(t.t3,t.t4));case 41:case"end":return t.stop()}}),t,this,[[20,29]])})));return function(){return t.apply(this,arguments)}}(),a.canvasToBlob=function(){var t=u(f().mark((function t(r){return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return r.toBlob(t)})));case 1:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),a.submitBlob=function(){var t=u(f().mark((function t(r){var e;return f().wrap((function(t){for(;1;)switch(t.prev=t.next){case 0:return e=new File([r],this.attrs.file.name,{type:this.attrs.file.type}),t.abrupt("return",this.attrs.upload(e));case 2:case"end":return t.stop()}}),t,this)})));return function(r){return t.apply(this,arguments)}}(),o}(h());E.isDismissible=!1,r().initializers.add("fof/profile-image-crop",(function(){(0,e.override)(o().prototype,"upload",(function(t,e){if(!e||!window.FileReader)return t();this.loading||r().modal.show(E,{file:e,upload:t})})),(0,e.extend)(o().prototype,"success",(function(){r().modal.close()})),(0,e.extend)(o().prototype,"failure",(function(t,e){r().modal&&r().modal.modal&&r().modal.modal.componentClass===E&&(r().modal.modal.attrs.error=e,m.redraw())}))}));var B={ProfileImageCropModal:E}})(),module.exports=c})();
|
||
|
||
|
||
flarum.extensions['fof-profile-image-crop']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{Themes:()=>c,getTheme:()=>w,perDeviceSetting:()=>o,setSelectedTheme:()=>n,switchTheme:()=>r});var o={};e.r(o),e.d(o,{KEY:()=>v,get:()=>y,remove:()=>T,set:()=>b});var n={};e.r(n),e.d(n,{default:()=>N,getUrls:()=>_,setStyle:()=>I,setTheme:()=>U,setThemeFromID:()=>D});var r={};e.r(r),e.d(r,{getIsLight:()=>$,switchTheme:()=>J});const a=flarum.core.compat["common/app"];var i=e.n(a);const c={AUTO:0,LIGHT:1,DARK:2,DEFAULT:function(){return i().forum.attribute("fof-nightmode.default_theme")||0}},s=flarum.core.compat["common/extend"],f=flarum.core.compat["common/components/Page"];var u=e.n(f);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},d.apply(null,arguments)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function p(e,t){if(!t)return"";var o="; "+e;return!0===t?o:o+"="+t}function h(){return function(e){for(var t,o={},n=function(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(o)return(o=o.call(e)).next.bind(o);if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return l(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e?e.split("; "):[]);!(t=n()).done;){var r=t.value.split("="),a=r.slice(1).join("=");'"'===a[0]&&(a=a.slice(1,-1));try{o[decodeURIComponent(r[0])]=a.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(e){}}return o}(document.cookie)}function g(e,t,o){document.cookie=function(e,t,o){return encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=Math.min(Date.now()+864e5*e.expires,864e13);e.expires=new Date(t)}return p("Expires",e.expires?e.expires.toUTCString():"")+p("Domain",e.domain)+p("Path",e.path)+p("Secure",e.secure)+p("Partitioned",e.partitioned)+p("SameSite",e.sameSite)}(o)}(e,t,d({path:"/"},o))}var v="flarum_nightmode",y=function(){var e,t=(e=v,h()[e]);return t||"0"===t?Number(t):c.DEFAULT()},b=function(e){return g(v,e,{sameSite:"lax",secure:"https:"===location.protocol||void 0})},T=function(){g(v,"",d({},undefined,{expires:-1}))};function S(){var e=Array.from(new Set(Object.values(c))),t=y();isNaN(t)?A("Theme is not a valid integer! Resetting..."):e.includes(t)||A("Theme is out of bounds! Resetting...")}function A(e){console.warn(e),b(c.DEFAULT())}function w(){var e,t=i().session.user,o=!t||!!t.preferences().fofNightMode_perDevice,n=t&&t.preferences().fofNightMode;return o?e=y():"number"==typeof n&&-1!==n&&(e=n),"number"==typeof e?e:c.DEFAULT()}function N(){(0,s.extend)(u().prototype,"oninit",U),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",U)}function U(){var e,t=i().session.user,o=null==(e=i().session.user)?void 0:e.preferences().fofNightMode_perDevice;t&&!o||S(),o&&S(),D(w())}function _(){return{day:i().data["fof-nightmode.assets.day"],night:i().data["fof-nightmode.assets.night"]}}function D(e){e===c.DARK?I("night"):e===c.LIGHT?I("day"):I(window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day")}function I(e){var t=document.querySelector("link.nightmode-light[rel=stylesheet]"),o=document.querySelector("link.nightmode-dark[rel=stylesheet]");e:if(t&&o){if(w()===c.AUTO)break e;var n=document.createElement("link");"onload"in n?n.onload=function(){t.remove(),o.remove()}:(t.remove(),o.remove()),n.rel="stylesheet",n.className="nightmode",n.href=_()[e],document.head.append(n)}else{var r=t||o||document.querySelector("link.nightmode[rel=stylesheet]"),a=_()[e];a!==r.href&&(r.href=a,r.className="nightmode")}var i=document.querySelector('meta[name="color-scheme"]');i&&(i.content="night"===e?"dark":"light");var s=new CustomEvent("fofnightmodechange",{detail:e});document.dispatchEvent(s)}const M=flarum.core.compat["forum/app"];var O=e.n(M);const k=flarum.core.compat["forum/components/SettingsPage"];var x=e.n(k);const L=flarum.core.compat["forum/components/SessionDropdown"];var E=e.n(L);const R=flarum.core.compat["forum/components/HeaderSecondary"];var C=e.n(R);const P=flarum.core.compat["common/components/Button"];var j=e.n(P);const F=flarum.core.compat["common/components/LoadingIndicator"];var H=e.n(F);const B=flarum.core.compat["common/components/Select"];var G=e.n(B);const K=flarum.core.compat["common/components/FieldSet"];var q=e.n(K);const z=flarum.core.compat["common/components/Switch"];var Y=e.n(z);function $(e){return e===c.LIGHT||e===c.AUTO&&!window.matchMedia("(prefers-color-scheme: dark)").matches}function J(){var e,t=w(),o=$(t),n=O().session.user;if(n){var r=o?c.DARK:c.LIGHT;if(n.preferences().fofNightMode_perDevice)return b(r),void U();n.savePreferences({fofNightMode:r}).then((function(){U()}))}else{var a=(e=t)===c.AUTO?c.LIGHT:e===c.LIGHT?c.DARK:c.AUTO;b(a),U()}}var Q=function(e){return O().translator.trans("fof-nightmode.forum.user.settings."+e)};O().initializers.add("fof-nightmode",(function(){(0,s.extend)(x().prototype,"settingsItems",(function(e){var t=O().session.user,o=!!t.preferences().fofNightMode_perDevice;o&&S();var n=!window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches,r=w(),a={0:Q("options.auto"),1:Q("options.day"),2:Q("options.night")};n&&(delete a[0],r===c.AUTO&&(r=O().forum.attribute("fofNightMode_autoUnsupportedFallback"))),e.add("fof-nightmode",q().component({label:Q("heading"),className:"Settings-theme"},[m("p",{className:"description"},Q("description")),m("p",{className:"description"},Q("description2")),n?m("p",{class:"description NightMode-autoUnsupported"},Q("auto_unsupported")):null,Y().component({className:"Settings-theme--per_device_cb",state:o,onchange:function(e){e?b(r):T(),t.savePreferences({fofNightMode_perDevice:e}).then((function(){U()}))}},Q("device_specific_setting_checkbox")),G().component({value:r,className:"Settings-theme--input",onchange:function(e){if(o)return b(e),void U();t.savePreferences({fofNightMode:e}).then((function(){m.redraw(),U()}))},options:a}),m("p",{className:"Settings-theme--selection_description"},r===c.AUTO?Q("option_descriptions.auto"):r===c.LIGHT?Q("option_descriptions.day"):r===c.DARK?Q("option_descriptions.night"):H().component())]))})),(0,s.extend)(C().prototype,"items",(function(e){if(!O().session.user||O().forum.attribute("fofNightMode.showThemeToggleOnHeaderAlways")){var t=w(),o=$(t),n=O().forum.attribute("fofNightMode.showThemeToggleInSolid")?"fas fa-":"far fa-";e.add("nightmode",m(j(),{className:"Button Button--flat",onclick:function(){J()},icon:t===c.AUTO?"fas fa-adjust":o?n+"sun":n+"moon"},O().translator.trans("fof-nightmode.forum.header.nightmode_button")),15)}})),(0,s.extend)(E().prototype,"items",(function(e){if(O().session.user){var t=$(w()),o=O().forum.attribute("fofNightMode.showThemeToggleInSolid")?"fas fa-":"far fa-";e.add(t?"nightmode":"daymode",j().component({icon:t?o+"moon":o+"sun",onclick:function(){J()}},O().translator.trans("fof-nightmode.forum."+(t?"night":"day"))),-1)}})),N()}))})(),module.exports=t})();
|
||
|
||
|
||
flarum.extensions['fof-nightmode']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:n=>{var r=n&&n.__esModule?()=>n.default:()=>n;return t.d(r,{a:r}),r},d:(n,r)=>{for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};(()=>{"use strict";t.r(n),t.d(n,{components:()=>x,extend:()=>E,models:()=>H,utils:()=>M});const r=flarum.core.compat["forum/app"];var e=t.n(r);const o=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/HeaderPrimary"];var a=t.n(i);function s(t){return t.slice(0).sort((function(t,n){var r=t.position(),e=n.position();return r>e?1:r<e?-1:0}))}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(t){var n=function(t,n){if("object"!=l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var e=r.call(t,"string");if("object"!=l(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(n)?n:n+""}function c(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,u(e.key),e)}}function p(t,n){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},p(t,n)}function f(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n)}const h=flarum.core.compat["common/components/Link"];var d=t.n(h);const b=flarum.core.compat["common/components/LinkButton"];var y=t.n(b);const k=flarum.core.compat["common/helpers/icon"];var v=t.n(k);const w=flarum.core.compat["common/components/Separator"];var g=t.n(w);const L=flarum.core.compat["common/utils/classList"];var B=t.n(L);const N=flarum.core.compat["common/components/Button"];var O=t.n(N),S=function(t){function n(){for(var n,r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];return(n=t.call.apply(t,[this].concat(e))||this).attrs=void 0,n}f(n,t);var r,o,i=n.prototype;return i.view=function(t){return this.isLabel?this.labelView(t):this.linkView(t)},i.labelView=function(t){var n=this,r=this.attrs.link,e=this.attrs.inDropdown?"span":O();return m("[",null,this.attrs.inDropdown&&m(g(),null),m(e,{class:B()(this.class,"LinksButton--label"),onclick:function(t){n.attrs.inDropdown&&t.stopPropagation()},"data-toggle":this.attrs.isDropdownButton?"dropdown":void 0},this.icon,m("span",{className:"LinksButton-title"},r.title())),this.attrs.inDropdown&&m(g(),null))},i.linkView=function(t){var n=this.attrs.link,r={className:this.class,rel:this.rel,target:this.linkTarget,external:!n.isNewtab()&&!n.isInternal(),href:this.linkHref};return m(d(),r,this.icon,m("span",{className:"LinksButton-title"},n.title()))},r=n,(o=[{key:"isInternal",get:function(){var t=this.attrs.link;return t.isInternal()&&!t.isNewtab()}},{key:"isLabel",get:function(){return 0===this.attrs.link.url().length}},{key:"linkHref",get:function(){var t=this.attrs.link,n=t.url();return n.startsWith("/")&&t.isInternal()?e().forum.attribute("baseUrl")+n:n}},{key:"icon",get:function(){var t=this.attrs.link.icon();return t?v()(t,{className:"Button-icon LinksButton-icon"}):null}},{key:"rel",get:function(){return B()(this.attrs.link.isNewtab()&&"noopener noreferrer",this.attrs.link.useRelMe()&&"me")||void 0}},{key:"class",get:function(){return B()("LinksButton",this.attrs.className||"Button Button--link",{"LinksButton--inDropdown":this.attrs.inDropdown,active:this.isLinkCurrentPage})}},{key:"isLinkCurrentPage",get:function(){if(!this.attrs.link.isInternal())return!1;var t=e().forum.attribute("baseUrl"),n=new URL(m.route.get()||"/",t).href.replace(t,""),r=new URL(this.linkHref,t).href.replace(t,"");return 0===n.indexOf(r)&&("/"===n||"/"!==r)}},{key:"linkTarget",get:function(){var t=this.attrs.link;if(!this.isInternal)return t.isNewtab()?"_blank":void 0}}])&&c(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r}(y());function P(){return P=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)({}).hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},P.apply(null,arguments)}const D=flarum.core.compat["common/components/SplitDropdown"];var j=t.n(D);const I=flarum.core.compat["common/utils/ItemList"];var C=t.n(I),_=function(t){function n(){return t.apply(this,arguments)||this}f(n,t),n.initAttrs=function(n){t.initAttrs.call(this,n),n.className+=" LinkDropdown",n.buttonClassName+=" Button--link"};var r=n.prototype;return r.view=function(n){var r=this.items().toArray();return t.prototype.view.call(this,P({},n,{children:r}))},r.getButton=function(t){var n=this.getFirstChild(t);return n.attrs.className=B()(n.attrs.className,"SplitDropdown-button Button",this.attrs.buttonClassName),n.attrs.isDropdownButton=!0,[n,m("button",{className:B()("Dropdown-toggle","Button","Button--icon",this.attrs.buttonClassName),"data-toggle":"dropdown"},v()("fas fa-caret-down",{className:"Button-caret"}))]},r.items=function(){var t=new(C()),n=this.attrs.link;return t.add("link"+n.id(),S.component({link:n})),s(e().store.all("links")).filter((function(t){return t.parent()===n})).forEach((function(r){t.add("link"+n.id()+"-"+r.id(),S.component({link:r,inDropdown:!0}))})),t},n}(j()),x={LinkDropdown:_,LinkItem:S},M={sortLinks:s};const R=flarum.core.compat["common/Model"];var T=t.n(R),A=function(t){function n(){return t.apply(this,arguments)||this}f(n,t);var r=n.prototype;return r.title=function(){return T().attribute("title").call(this)},r.icon=function(){return T().attribute("icon").call(this)},r.type=function(){return T().attribute("type").call(this)},r.url=function(){return T().attribute("url").call(this)},r.position=function(){return T().attribute("position").call(this)},r.isInternal=function(){return T().attribute("isInternal").call(this)},r.isNewtab=function(){return T().attribute("isNewtab").call(this)},r.useRelMe=function(){return T().attribute("useRelMe").call(this)},r.isChild=function(){return T().attribute("isChild").call(this)},r.parent=function(){return T().hasOne("parent").call(this)},r.isRestricted=function(){return T().attribute("isRestricted").call(this)},r.guestOnly=function(){return T().attribute("guestOnly").call(this)},n}(T()),H={Link:A};const U=flarum.core.compat["common/extenders"],V=[(new(t.n(U)().Store)).add("links",A)],E=[].concat(V);e().initializers.add("fof-links",(function(){(0,o.extend)(a().prototype,"items",(function(t){var n=e().store.all("links");s(n.filter((function(t){return!t.isChild()}))).map((function(r){var e=n.some((function(t){return t.parent()==r}));(null!=r&&r.url()||e)&&t.add("link"+(null==r?void 0:r.id()),e?_.component({link:r}):S.component({link:r}))}))}))}))})(),module.exports=n})();
|
||
|
||
|
||
flarum.extensions['fof-links']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={976:(t,o,n)=>{var e=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")(),f=Object.prototype.toString,m=Math.max,p=Math.min,d=function(){return l.Date.now()};function v(t){var o=typeof t;return!!t&&("object"==o||"function"==o)}function h(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==f.call(t)}(t))return NaN;if(v(t)){var o="function"==typeof t.valueOf?t.valueOf():t;t=v(o)?o+"":o}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(e,"");var n=a.test(t);return n||i.test(t)?s(t.slice(2),n?2:8):r.test(t)?NaN:+t}t.exports=function(t,o,n){var e,r,a,i,s,c,u=0,l=!1,f=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(o){var n=e,a=r;return e=r=void 0,u=o,i=t.apply(a,n)}function b(t){var n=t-c;return void 0===c||n>=o||n<0||f&&t-u>=a}function w(){var t=d();if(b(t))return N(t);s=setTimeout(w,function(t){var n=o-(t-c);return f?p(n,a-(t-u)):n}(t))}function N(t){return s=void 0,g&&e?y(t):(e=r=void 0,i)}function x(){var t=d(),n=b(t);if(e=arguments,r=this,c=t,n){if(void 0===s)return function(t){return u=t,s=setTimeout(w,o),l?y(t):i}(c);if(f)return s=setTimeout(w,o),y(c)}return void 0===s&&(s=setTimeout(w,o)),i}return o=h(o)||0,v(n)&&(l=!!n.leading,a=(f="maxWait"in n)?m(h(n.maxWait)||0,o):a,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==s&&clearTimeout(s),u=0,e=c=r=s=void 0},x.flush=function(){return void 0===s?i:N(d())},x}},24:(t,o,n)=>{var e=n(116).default;function r(){"use strict";t.exports=r=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var o,n={},a=Object.prototype,i=a.hasOwnProperty,s=Object.defineProperty||function(t,o,n){t[o]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function m(t,o,n){return Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[o]}try{m({},"")}catch(o){m=function(t,o,n){return t[o]=n}}function p(t,o,n,e){var r=o&&o.prototype instanceof w?o:w,a=Object.create(r.prototype),i=new E(e||[]);return s(a,"_invoke",{value:O(t,n,i)}),a}function d(t,o,n){try{return{type:"normal",arg:t.call(o,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",h="suspendedYield",g="executing",y="completed",b={};function w(){}function N(){}function x(){}var L={};m(L,u,(function(){return this}));var k=Object.getPrototypeOf,P=k&&k(k(M([])));P&&P!==a&&i.call(P,u)&&(L=P);var V=x.prototype=w.prototype=Object.create(L);function _(t){["next","throw","return"].forEach((function(o){m(t,o,(function(t){return this._invoke(o,t)}))}))}function F(t,o){function n(r,a,s,c){var u=d(t[r],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==e(f)&&i.call(f,"__await")?o.resolve(f.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):o.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)}var r;s(this,"_invoke",{value:function(t,e){function a(){return new o((function(o,r){n(t,e,o,r)}))}return r=r?r.then(a,a):a()}})}function O(t,n,e){var r=v;return function(a,i){if(r===g)throw Error("Generator is already running");if(r===y){if("throw"===a)throw i;return{value:o,done:!0}}for(e.method=a,e.arg=i;;){var s=e.delegate;if(s){var c=j(s,e);if(c){if(c===b)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===v)throw r=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=g;var u=d(t,n,e);if("normal"===u.type){if(r=e.done?y:h,u.arg===b)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(r=y,e.method="throw",e.arg=u.arg)}}}function j(t,n){var e=n.method,r=t.iterator[e];if(r===o)return n.delegate=null,"throw"===e&&t.iterator.return&&(n.method="return",n.arg=o,j(t,n),"throw"===n.method)||"return"!==e&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+e+"' method")),b;var a=d(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=o),n.delegate=null,b):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function I(t){var o={tryLoc:t[0]};1 in t&&(o.catchLoc=t[1]),2 in t&&(o.finallyLoc=t[2],o.afterLoc=t[3]),this.tryEntries.push(o)}function S(t){var o=t.completion||{};o.type="normal",delete o.arg,t.completion=o}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=o,n.done=!0,n};return a.next=a}}throw new TypeError(e(t)+" is not iterable")}return N.prototype=x,s(V,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:N,configurable:!0}),N.displayName=m(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var o="function"==typeof t&&t.constructor;return!!o&&(o===N||"GeneratorFunction"===(o.displayName||o.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,m(t,f,"GeneratorFunction")),t.prototype=Object.create(V),t},n.awrap=function(t){return{__await:t}},_(F.prototype),m(F.prototype,l,(function(){return this})),n.AsyncIterator=F,n.async=function(t,o,e,r,a){void 0===a&&(a=Promise);var i=new F(p(t,o,e,r),a);return n.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(V),m(V,f,"Generator"),m(V,u,(function(){return this})),m(V,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var o=Object(t),n=[];for(var e in o)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in o)return t.value=e,t.done=!1,t}return t.done=!0,t}},n.values=M,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=o)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,r){return s.type="throw",s.arg=t,n.next=e,r&&(n.method="next",n.arg=o),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(t,o){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc<=this.prev&&i.call(e,"finallyLoc")&&this.prev<e.finallyLoc){var r=e;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=o&&o<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=o,r?(this.method="next",this.next=r.finallyLoc,b):this.complete(a)},complete:function(t,o){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&o&&(this.next=o),b},finish:function(t){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),b}},catch:function(t){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc===t){var e=n.completion;if("throw"===e.type){var r=e.arg;S(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:M(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=o),b}},n}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},116:t=>{function o(n){return t.exports=o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},183:(t,o,n)=>{var e=n(24)();t.exports=e;try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return n.d(o,{a:o}),o},n.d=(t,o)=>{for(var e in o)n.o(o,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:o[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};(()=>{"use strict";function t(o,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},t(o,n)}function o(o,n){o.prototype=Object.create(n.prototype),o.prototype.constructor=o,t(o,n)}n.r(e),n.d(e,{components:()=>At,extend:()=>Tt,helpers:()=>Ht,models:()=>s});const r=flarum.core.compat["common/Model"];var a=n.n(r),i=function(t){function n(){return t.apply(this,arguments)||this}o(n,t);var e=n.prototype;return e.points=function(){return a().attribute("points").call(this)},e.name=function(){return a().attribute("name").call(this)},e.color=function(){return a().attribute("color").call(this)},n}(a()),s={Rank:i};const c=flarum.core.compat["forum/app"];var u=n.n(c);const l=flarum.core.compat["common/extend"],f=flarum.core.compat["forum/components/IndexPage"];var p=n.n(f);const d=flarum.core.compat["forum/states/DiscussionListState"];var v=n.n(d);const h=flarum.core.compat["common/components/LinkButton"];var g=n.n(h);const y=flarum.core.compat["common/components/Button"];var b=n.n(y);const w=flarum.core.compat["forum/components/CommentPost"];var N=n.n(w);const x=flarum.core.compat["common/utils/classList"];var L=n.n(x);const k=flarum.core.compat["forum/utils/PostControls"];var P=n.n(k);const V=flarum.core.compat["common/components/Modal"];var _=n.n(V);const F=flarum.core.compat["common/components/LoadingIndicator"];var O=n.n(F);const j=flarum.core.compat["common/helpers/avatar"];var I=n.n(j);const S=flarum.core.compat["common/helpers/username"];var E=n.n(S);const M=flarum.core.compat["common/components/Link"];var G=n.n(M),R=function(t){function n(){return t.apply(this,arguments)||this}o(n,t);var e=n.prototype;return e.className=function(){return"VotesModal Modal--small"},e.title=function(){return u().translator.trans("fof-gamification.forum.modal.title")},e.oninit=function(o){t.prototype.oninit.call(this,o),this.loading=!this.attrs.post.upvotes()||!this.attrs.post.downvotes(),this.loading&&this.load()},e.content=function(){var t=this;return this.loading?m("div",{className:"Modal-body"},m(O(),null)):m("div",{className:"Modal-body"},m("ul",{className:"VotesModal-list"},["upvotes","downvotes"].map((function(o){var n=t.attrs.post[o]();if(n&&n.length)return m("div",null,m("legend",null,u().translator.trans("fof-gamification.forum.modal."+o+"_label")),n.map((function(t){return m("li",null,m(G(),{href:u().route.user(t)},I()(t)," ",E()(t)))})))}))))},e.load=function(){return u().store.find("posts",this.attrs.post.id(),{include:"upvotes,downvotes"}).then(this.loaded.bind(this))},n}(_());const B=function(t,o){void 0===o&&(o=!1);var n=u().data["fof-gamification."+t];return o?!!parseInt(n):n},D=flarum.core.compat["forum/utils/DiscussionControls"];var U=n.n(D);const T=function(t,o,n,e,r){if(void 0===r&&(r=t.discussion()),u().session.user){if(!r||r.canVote()||t.canVote())return o&&n&&(o=!1,n=!1),e&&e(!0),m.redraw(),t.save([o,n,"vote"]).then((function(){return null}),(function(){return null})).then((function(){e&&e(!1),r&&r.pushAttributes({votes:t.votes()}),m.redraw()}))}else U().replyAction.call(r,!0)},A=flarum.core.compat["forum/components/DiscussionListItem"];var C=n.n(A);const H=flarum.core.compat["common/utils/abbreviateNumber"];var $=n.n(H);const z=flarum.core.compat["common/helpers/icon"];var W=n.n(z);const Y=flarum.core.compat["forum/components/PostUser"];var q=n.n(Y);const J=flarum.core.compat["forum/components/UserCard"];var K=n.n(J);function Q(t,o){void 0===o&&(o={}),o.style=o.style||{},o.className="rankLabel "+(o.className||"");var n=t.color();return o.style.backgroundColor=o.style.color=n,o.className+=" colored",m("span",o,m("span",{className:"rankLabel-text"},t.name()))}const X=flarum.core.compat["forum/components/DiscussionPage"];var Z=n.n(X),tt=n(976),ot=n.n(tt),nt=function(t){return u().store.find("posts",t).then((function(){return m.redraw()}))},et=[];var rt=function(t,o){var n=t.firstPost();return n&&void 0!==n[o]()?n[o]():t[o]()};const at=flarum.core.compat["common/states/DiscussionListState"];var it=n.n(at);const st=flarum.core.compat["forum/components/Notification"];var ct=function(t){function n(){return t.apply(this,arguments)||this}o(n,t);var e=n.prototype;return e.icon=function(){var t=B("iconName")||"thumbs";return this.attrs.notification.content()>0?"fas fa-"+t+"-up":"fas fa-"+t+"-down"},e.href=function(){return u().route.post(this.attrs.notification.subject())},e.content=function(){var t=this.attrs.notification.fromUser();return parseInt(this.attrs.notification.content())>0?u().translator.trans("fof-gamification.forum.notification.upvote",{user:t}):u().translator.trans("fof-gamification.forum.notification.downvote",{user:t})},e.excerpt=function(){return this.attrs.notification.subject().contentPlain()},n}(n.n(st)());const ut=flarum.core.compat["forum/components/NotificationGrid"];var lt=n.n(ut);function ft(t,o,n,e,r,a,i){try{var s=t[a](i),c=s.value}catch(t){return void n(t)}s.done?o(c):Promise.resolve(c).then(e,r)}var mt=n(183),pt=n.n(mt);const dt=flarum.core.compat["common/Component"];var vt=n.n(dt);const ht=flarum.core.compat["common/components/Tooltip"];var gt=n.n(ht);const yt=flarum.core.compat["common/utils/SubtreeRetainer"];var bt=n.n(yt),wt=function(t){function n(){for(var o,n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return(o=t.call.apply(t,[this].concat(e))||this).subtreeRetainer=void 0,o.lastRenderVotes=-1,o.loading=!1,o}o(n,t);var e=n.prototype;return e.oninit=function(o){var n=this;t.prototype.oninit.call(this,o),this.loading=!this.attrs.post.upvotes(),this.loading&&this.load(),this.subtreeRetainer=new(bt())((function(){return n.loading}),(function(){return n.attrs.post.votes()}),(function(){var t;return null==(t=n.attrs.post)||null==t.upvotes||null==(t=t.upvotes())?void 0:t.length}))},e.onbeforeupdate=function(o){return t.prototype.onbeforeupdate.call(this,o),this.subtreeRetainer.needsRebuild()},e.onupdate=function(t){this.lastRenderVotes!==this.attrs.post.votes()&&(this.loading=!0,setTimeout((function(){return m.redraw()}),0),this.lastRenderVotes=this.attrs.post.votes(),this.load())},e.view=function(){if(!1===this.attrs.post.votes()||!1===this.attrs.post.upvotes())return m("div",{className:"VotingContainer"},m("div",{className:"FoFGamification-voters"},m("div",{className:"FoFGamification-voters-title"},m("span",{className:"FoFGamification-voters-title-icon"},W()("fas fa-users"),m("span",{className:"FoFGamification-voters-title-label"},u().translator.trans("fof-gamification.forum.voters.label")),m("span",{className:"FoFGamification-voters-title-label FoFGamification-voters-title-label--mobile"},u().translator.trans("fof-gamification.forum.voters.label")))),m(O(),{display:"inline"})));var t=this.attrs.post.upvotes();return m("div",{className:"VotingContainer"},m("div",{className:"FoFGamification-voters"},m("div",{className:"FoFGamification-voters-title"},m("span",{className:"FoFGamification-voters-title-icon"},W()("fas fa-users"),m("span",{className:"FoFGamification-voters-title-label"},u().translator.trans("fof-gamification.forum.voters.label")),m("span",{className:"FoFGamification-voters-title-label FoFGamification-voters-title-label--mobile"},0===t.length?u().translator.trans("fof-gamification.forum.voters.label_none"):u().translator.trans("fof-gamification.forum.voters.label")))),m("div",{className:"FoFGamification-voters-message"},0===t.length?u().translator.trans("fof-gamification.forum.voters.none"):null),m("div",{className:"FoFGamification-voters-list"},t.slice(0,15).map((function(t){return m(G(),{href:u().route("user",{username:t.slug()}),className:"FoFGamification-voters-item"},m(gt(),{text:t.displayName()},I()(t)))})),t.length>15?m("span",{className:"FoFGamification-voters-item FoFGamification-voters-item--plus"},m("span",{className:"Avatar"},"+"+(t.length-15))):null)))},e.load=function(){var t,o=(t=pt().mark((function t(){return pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u().store.find("posts",this.attrs.post.id(),{include:"upvotes"});case 2:this.loading=!1,m.redraw();case 4:case"end":return t.stop()}}),t,this)})),function(){var o=this,n=arguments;return new Promise((function(e,r){var a=t.apply(o,n);function i(t){ft(a,e,r,i,s,"next",t)}function s(t){ft(a,e,r,i,s,"throw",t)}i(void 0)}))});return function(){return o.apply(this,arguments)}}(),n}(vt());const Nt=flarum.core.compat["forum/components/UserPage"];var xt=n.n(Nt);const Lt=flarum.core.compat["forum/components/PostsUserPage"];var kt=function(t){function n(){return t.apply(this,arguments)||this}return o(n,t),n.prototype.loadResults=function(t){return u().store.find("posts",{filter:{type:"comment",voted:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n}(n.n(Lt)());const Pt=flarum.core.compat["common/extenders"];var Vt=n.n(Pt);const _t=[(new(Vt().Store)).add("ranks",i)],Ft=flarum.core.compat["common/components/Page"];var Ot=n.n(Ft);const jt=flarum.core.compat["common/helpers/listItems"];var It=n.n(jt),St=function(t){function n(){return t.apply(this,arguments)||this}return o(n,t),n.prototype.view=function(){var t=u().forum.attribute("fof-gamification.topimage"+this.attrs.place+"Url"),o=this.attrs.place;return t?m("img",{className:"rankings-mobile rankings-image rankings-"+o,src:t,alt:""}):m("td",{className:"rankings-mobile rankings-"+o},W()("fas fa-trophy"))},n}(vt()),Et=function(t){function n(){return t.apply(this,arguments)||this}o(n,t);var e=n.prototype;return e.oninit=function(o){t.prototype.oninit.call(this,o),u().forum.attribute("canViewRankingPage")||m.route.set("/"),this.loading=!0,this.users=[],this.refresh()},e.view=function(){var t,o=this;return t=this.loading?O().component():b().component({className:"Button",onclick:this.loadMore.bind(this)},u().translator.trans("core.forum.discussion_list.load_more_button")),m("div",{className:"IndexPage"},p().prototype.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,It()(p().prototype.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("table",{class:"rankings"},m("tr",null,m("th",{className:"rankings-mobile"},u().translator.trans("fof-gamification.forum.ranking.rank")),m("th",null,u().translator.trans("fof-gamification.forum.ranking.name")),m("th",null,u().translator.trans("fof-gamification.forum.ranking.amount"))),this.users.map((function(t,n){return++n,[m("tr",{className:"ranking-"+n},n<4?m(St,{place:n}):m("td",{className:"rankings-4 rankings-mobile"},o.addOrdinalSuffix(n)),m("td",null,m("div",{className:"PostUser"},m("h3",{className:"PostUser-name rankings-info"},m(G(),{href:u().route.user(t),force:!0},n<4?I()(t,{className:"info-avatar rankings-"+n+"-avatar"}):""," ",E()(t))))),n<4?m("td",{className:"rankings-"+n},t.points()):m("td",{className:"rankings-4"},t.points()))]}))),m("div",{className:"rankings-loadmore"}," ",t)))))},e.refresh=function(t){var o=this;return void 0===t&&(t=!0),t&&(this.loading=!0,this.users=[]),this.loadResults().then((function(t){o.users=[],o.parseResults(t)}),(function(){o.loading=!1,m.redraw()}))},e.addOrdinalSuffix=function(t){if("en"===u().data.locale){var o=t%10,n=t%100;return 1===o&&11!==n?t+"st":2===o&&12!==n?t+"nd":3===o&&13!==n?t+"rd":t+"th"}return t},e.loadResults=function(t){var o={};return o.page={offset:t,limit:"10"},u().store.find("rankings",o)},e.loadMore=function(){this.loading=!0,this.loadResults(this.users.length).then(this.parseResults.bind(this))},e.parseResults=function(t){return[].push.apply(this.users,t),this.loading=!1,this.users.sort((function(t,o){return parseFloat(o.points())-parseFloat(t.points())})),m.redraw(),t},n}(Ot());const Mt=flarum.core.compat["common/models/Discussion"];var Gt=n.n(Mt);const Rt=flarum.core.compat["common/models/Post"];var Bt=n.n(Rt);const Dt=flarum.core.compat["common/models/User"];var Ut=n.n(Dt);const Tt=[].concat(_t,[(new(Vt().Routes)).add("rankings","/rankings",Et),new(Vt().Model)(Gt()).attribute("votes").attribute("hasUpvoted").attribute("hasDownvoted").attribute("canVote").attribute("seeVotes"),new(Vt().Model)(Bt()).hasMany("upvotes").hasMany("downvotes").attribute("votes").attribute("canVote").attribute("canSeeVotes").attribute("hasUpvoted").attribute("hasDownvoted").attribute("seeVoters"),new(Vt().Model)(Ut()).attribute("points").hasMany("ranks").attribute("canHaveVotingNotifications")]);var At={RankingsPage:Et,VoteNotification:ct,VotesModal:R,Voters:wt};function Ct(){return Ct=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var e in n)({}).hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},Ct.apply(null,arguments)}var Ht=Ct({saveVote:T,setting:B},{rankLabel:Q});u().initializers.add("fof-gamification",(function(){var t,o;(0,l.extend)(P(),"moderationControls",(function(t,o){o.seeVoters()&&t.add("viewVotes",[m(b(),{icon:"fas fa-thumbs-up",onclick:function(){u().modal.show(R,{post:o})}},u().translator.trans("fof-gamification.forum.mod_item"))])})),(0,l.extend)(N().prototype,"actionItems",(function(t){var o=this,n=this.attrs.post,e=n.hasDownvoted(),r=n.hasUpvoted(),a=B("iconName")||"thumbs",i=B("upVotesOnly",!0),s=n.canSeeVotes(),c=!u().session.user||n.canVote(),l=function(t,e){return T(n,t,e,(function(t){return o.voteLoading=t}))};t.add("votes",m("div",{className:L()("CommentPost-votes",B("useAlternateLayout",!0)&&"alternateLayout")},b().component({icon:this.voteLoading?void 0:"fas fa-fw fa-"+a+"-up",className:L()("Post-vote Post-upvote",r&&"Post-vote--active"),loading:this.voteLoading,disabled:this.voteLoading||!c||!s,onclick:function(){return l(!r,!1)},"aria-label":u().translator.trans("fof-gamification.forum.post.upvote_button")}),m("label",{className:"Post-points"},n.votes()),!i&&b().component({icon:this.voteLoading?void 0:"fas fa-fw fa-"+a+"-down",className:L()("Post-vote Post-downvote",e&&"Post-vote--active"),loading:this.voteLoading,disabled:!c||!s,onclick:function(){return l(!1,!e)},"aria-label":u().translator.trans("fof-gamification.forum.post.downvote_button")})),10)})),(0,l.extend)(p().prototype,"navItems",(function(t){u().forum.attribute("canViewRankingPage")&&t.add("rankings",g().component({href:u().route("rankings"),icon:"fas fa-trophy"},u().translator.trans("fof-gamification.forum.nav.name")),80)})),(0,l.extend)(v().prototype,"sortMap",(function(t){t.hot="-hotness"})),(0,l.extend)(it().prototype,"sortMap",(function(t){t.votes="-votes"})),t=function(t){return function(o){return o&&o.attrs&&o.attrs.className&&String(o.attrs.className).split(" ").includes(t)}},o=function(n,e){var r=[];if(n&&n.children&&Array.isArray(n.children)){var a=n.children.find(t(e));a&&r.push(a),n.children.forEach((function(t){r.push.apply(r,o(t,e))}))}return r},(0,l.extend)(K().prototype,"infoItems",(function(t){var o=this.attrs.user;t.add("points",m("div",null,W()("fas fa-medal"),u().translator.trans("fof-gamification.forum.user.card.points",{count:o.points()})),50)})),(0,l.extend)(K().prototype,"view",(function(n){var e=this.attrs.user,r=o(n,"UserCard-profile")[0],a=Number(B("rankAmt"));if(r){var i=r.children.find(t("UserCard-badges"));return e.ranks()&&(i?e.ranks().reverse().map((function(t,o){if(!a||o<a)return m("li",{className:"User-Rank"},Q(t))})).forEach((function(t){t&&i.children.push(t)})):r.children.splice(1,0,m("ul",{className:"UserCard-badges badges"},e.ranks().reverse().map((function(t,o){if(!a||o<a)return m("li",{className:"User-Rank"},Q(t))}))))),n}})),(0,l.extend)(q().prototype,"view",(function(o){var n,e=this.attrs.post.user();if(!e)return o;var r=o.children.find(t("PostUser-name")),a=null!=(n=Number(B("rankAmt")))?n:e.ranks().length;e.ranks()&&(r.children=r.children.concat(e.ranks().reverse().splice(0,a).map((function(t){return m("span",{className:"Post-Rank"},Q(t))}))).filter((function(t){return void 0!==t.tag})))})),B("showVotesOnDiscussionPage",!0)&&!B("useAlternateLayout",!0)&&((0,l.extend)(C().prototype,"elementAttrs",(function(t){this.attrs.discussion.seeVotes()&&(t.className+=" DiscussionListItem--withVotes")})),(0,l.extend)(C().prototype,"infoItems",(function(t){this.attrs.discussion.seeVotes()&&t.add("discussion-votes",m("span",{className:"DiscussionListItem-votes",title:u().translator.trans("fof-gamification.forum.votes")},W()("far fa-thumbs-up"),$()(this.attrs.discussion.votes())),20)}))),(0,l.extend)(Z().prototype,"oncreate",(function(){u().pusher&&u().pusher.then((function(t){t.pusher.bind("newVote",(function(t){var o,n,e=u().store.getById("posts",t.post_id),r=t.user_id;e&&e.votes()!==t.votes&&r!=u().session.user.id()&&(o=e.id(),(n=et[o])?n(o):(n=et[o]=ot()(nt,1500))(o))}))}))})),(0,l.extend)(Z().prototype,"onremove",(function(){u().pusher&&u().pusher.then((function(t){t.pusher.unbind("newVote")}))})),u().notificationComponents.vote=ct,(0,l.extend)(lt().prototype,"notificationTypes",(function(t){var o,n=null==(o=u().session)?void 0:o.user;null!=n&&null!=n.canHaveVotingNotifications&&n.canHaveVotingNotifications()&&t.add("vote",{name:"vote",icon:"fas fa-thumbs-up",label:u().translator.trans("fof-gamification.forum.notification.prefrences.vote")})})),(0,l.extend)(Z().prototype,"sidebarItems",(function(t){var o=this.discussion.posts()||[],n=null==o?void 0:o[0];null!=n&&null!=n.canSeeVotes&&n.canSeeVotes()&&null!=n&&null!=n.seeVoters&&n.seeVoters()&&u().forum.attribute("fof-gamification-op-votes-only")&&t.add("op-voters",m(wt,{post:n}),90)})),u().routes["user.votes"]={path:"/u/:username/votes",component:kt},(0,l.extend)(xt().prototype,"navItems",(function(t){var o=this.user,n=B("iconName")||"thumbs";t.add("votes",m(g(),{href:u().route("user.votes",{username:o.slug()}),name:"votes",icon:"fas fa-fw fa-"+n+"-up"},u().translator.trans("fof-gamification.forum.user.votes_link")),85)})),B("useAlternateLayout",!0)&&((0,l.extend)(C().prototype,"oninit",(function(){var t=this;this.attrs.discussion.seeVotes()&&this.subtree.check((function(){return t.voteLoading}))})),(0,l.extend)(C().prototype,"view",(function(t){var o=this,n=this.attrs.discussion;if(n.seeVotes()&&t&&t.children){var e=t.children.find((function(t){return t&&t.attrs&&t.attrs.className&&t.attrs.className.includes("DiscussionListItem-content")})),r=n.firstPost(),a=rt(n,"hasUpvoted"),i=rt(n,"hasDownvoted"),s=!u().session.user||rt(n,"canVote"),c=B("upVotesOnly",!0),l=B("iconNameAlt")||"arrow",f=function(t,n){return T(r,t,n,(function(t){return o.voteLoading=t}))};e.children.unshift(m("div",{className:"DiscussionListItem-votes alternateLayout","data-upvotes-only":c},m(b(),{className:"DiscussionListItem-voteButton DiscussionListItem-voteButton--up Button Button--icon Button--text",icon:"fas fa-fw fa-"+l+"-up","data-active":a,disabled:!s||this.voteLoading,onclick:function(){return f(!a,!1)},"aria-label":u().translator.trans("fof-gamification.forum.post.upvote_button")}),m("span",{class:"DiscussionListItem-voteCount"},$()(rt(n,"votes")||0)),!c&&m(b(),{className:"DiscussionListItem-voteButton DiscussionListItem-voteButton--down Button Button--icon Button--text",icon:"fas fa-fw fa-"+l+"-down","data-active":i,disabled:!s||this.voteLoading,onclick:function(){return f(!1,!i)},"aria-label":u().translator.trans("fof-gamification.forum.post.downvote_button")}),this.voteLoading&&m(O(),{display:"inline",size:"small"})))}}))),B("altPostVotingUi",!0)&&((0,l.extend)(N().prototype,"actionItems",(function(t){this.attrs.post.isHidden()||t.remove("votes")})),(0,l.extend)(N().prototype,"classes",(function(t){if(!this.attrs.post.isHidden()){var o=B("upVotesOnly",!0);t.push("votesAlternativeLayout"),o&&t.push("votesUpvotesOnly")}})),(0,l.extend)(N().prototype,"headerItems",(function(t){var o=this,n=this.attrs.post;if(!n.isHidden()&&n.canSeeVotes()){var e=n.hasDownvoted(),r=n.hasUpvoted(),a=B("iconName")||"thumbs",i=B("upVotesOnly",!0),s=n.canSeeVotes(),c=!u().session.user||n.canVote(),l=function(t,e){return T(n,t,e,(function(t){o.voteLoading=t}))};t.add("votes",m("div",{className:"Post-votes alternateLayout","data-upvotes-only":i},m(b(),{className:"Post-voteButton Post-voteButton--up Button Button--icon Button--text",icon:"fas fa-fw fa-"+a+"-up","data-active":r,disabled:!c||this.voteLoading||!s,onclick:function(){return l(!r,!1)},"aria-label":u().translator.trans("fof-gamification.forum.post.upvote_button")}),m("span",{class:"Post-voteCount"},$()(n.votes()||0)),!i&&m(b(),{className:"Post-voteButton Post-voteButton--down Button Button--icon Button--text",icon:"fas fa-fw fa-"+a+"-down","data-active":e,disabled:!c||this.voteLoading,onclick:function(){return l(!1,!e)},"aria-label":u().translator.trans("fof-gamification.forum.post.downvote_button")}),this.voteLoading&&m(O(),{display:"inline",size:"small"})),1e4)}})))}))})(),module.exports=e})();
|
||
|
||
|
||
flarum.extensions['fof-gamification']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return t.d(n,{a:n}),n},d:(o,n)=>{for(var e in n)t.o(n,e)&&!t.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:n[e]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>S});const n=flarum.core.compat["forum/app"];var e=t.n(n);const s=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/states/DiscussionListState"];var i=t.n(r);const a=flarum.core.compat["forum/components/DiscussionListItem"];var c=t.n(a);const u=flarum.core.compat["common/utils/abbreviateNumber"];var l=t.n(u);const d=flarum.core.compat["common/helpers/icon"];var f=t.n(d);const p=flarum.core.compat["common/components/Button"];var v=t.n(p);const w=flarum.core.compat["forum/utils/DiscussionControls"];var b=t.n(w);function y(t,o){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},y(t,o)}const h=flarum.core.compat["common/components/Modal"];var _=t.n(h);const g=flarum.core.compat["common/utils/Stream"];var O=t.n(g),C=function(t){function o(){return t.apply(this,arguments)||this}var n,s;s=t,(n=o).prototype=Object.create(s.prototype),n.prototype.constructor=n,y(n,s);var r=o.prototype;return r.oninit=function(o){t.prototype.oninit.call(this,o),this.discussion=this.attrs.discussion,this.currentViewsCount=this.attrs.discussion.views(),this.newViewsCount=O()(this.currentViewsCount)},r.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("label",null,e().translator.trans("fof-discussion-views.forum.modal_resetviews.label")),m("input",{className:"FormControl",type:"number",min:"0",bidi:this.newViewsCount})),m("div",{className:"Form-group"},m(v(),{className:"Button Button--primary",type:"submit",loading:this.loading},e().translator.trans("fof-discussion-views.forum.modal_resetviews.submit")))))},r.title=function(){return e().translator.trans("fof-discussion-views.forum.modal_resetviews.title")},r.className=function(){return"Modal--small"},r.onsubmit=function(t){var o=this;t.preventDefault(),this.loading=!0;var n=parseInt(this.newViewsCount()),e=this.currentViewsCount;n>=0&&n!==e&&this.attrs.discussion.save({views:n}).then((function(){m.redraw()})).catch((function(t){o.loading=!1,console.warn(t)})),this.hide()},o}(_());const M=flarum.core.compat["common/extenders"];var N=t.n(M);const j=flarum.core.compat["common/models/Discussion"];var x=t.n(j);const S=[new(N().Model)(x()).attribute("canReset").attribute("views")];e().initializers.add("fof-discussion-views",(function(){(0,s.extend)(i().prototype,"sortMap",(function(t){t.popular="-view_count",t.unpopular="view_count"})),(0,s.extend)(c().prototype,"infoItems",(function(t){var o=this.attrs.discussion.views();t.add("discussion-views",m("span",null,f()("far fa-eye")," ",l()(o)))})),(0,s.extend)(b(),"moderationControls",(function(t,o){o.canReset()&&t.add("reset",m(v(),{icon:"far fa-eye",onclick:function(){return e().modal.show(C,{discussion:o})}},e().translator.trans("fof-discussion-views.forum.discussion_controls.resetviews_button")),-10)}))}))})(),module.exports=o})();
|
||
|
||
|
||
flarum.extensions['fof-discussion-views']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={493:t=>{"use strict";t.exports=flarum.extensions["fof-user-directory"]},752:(t,e,r)=>{var n=r(327).default;function s(){"use strict";t.exports=s=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function m(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{m({},"")}catch(e){m=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var s=e&&e.prototype instanceof g?e:g,o=Object.create(s.prototype),i=new T(n||[]);return a(o,"_invoke",{value:j(t,r,i)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var p="suspendedStart",v="suspendedYield",w="executing",b="completed",y={};function g(){}function A(){}function x(){}var _={};m(_,c,(function(){return this}));var P=Object.getPrototypeOf,S=P&&P(P(C([])));S&&S!==o&&i.call(S,c)&&(_=S);var B=x.prototype=g.prototype=Object.create(_);function N(t){["next","throw","return"].forEach((function(e){m(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(s,o,a,u){var c=d(t[s],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,s){r(t,n,e,s)}))}return s=s?s.then(o,o):o()}})}function j(t,r,n){var s=p;return function(o,i){if(s===w)throw Error("Generator is already running");if(s===b){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(s===p)throw s=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);s=w;var c=d(t,r,n);if("normal"===c.type){if(s=n.done?b:v,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(s=b,n.method="throw",n.arg=c.arg)}}}function k(t,r){var n=r.method,s=t.iterator[n];if(s===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(s,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,o=function r(){for(;++s<t.length;)if(i.call(t,s))return r.value=t[s],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return A.prototype=x,a(B,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:A,configurable:!0}),A.displayName=m(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===A||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,m(t,f,"GeneratorFunction")),t.prototype=Object.create(B),t},r.awrap=function(t){return{__await:t}},N(L.prototype),m(L.prototype,l,(function(){return this})),r.AsyncIterator=L,r.async=function(t,e,n,s,o){void 0===o&&(o=Promise);var i=new L(h(t,e,n,s),o);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},N(B),m(B,f,"Generator"),m(B,c,(function(){return this})),m(B,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=C,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,s){return a.type="throw",a.arg=t,r.next=n,s&&(r.method="next",r.arg=e),!!s}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var s=n;break}}s&&("break"===t||"continue"===t)&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=t,o.arg=e,s?(this.method="next",this.next=s.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var s=n.arg;I(r)}return s}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},r}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports},327:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},943:(t,e,r)=>{var n=r(752)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{components:()=>xt,extend:()=>It});const t=flarum.core.compat["forum/app"];var e=r.n(t);function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)}const i=flarum.core.compat["forum/components/Notification"];var a=r.n(i),u=function(t){function r(){return t.apply(this,arguments)||this}o(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-comment-dots"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){return e().translator.trans("fof-best-answer.forum.notification.content")},n.excerpt=function(){return null},r}(a());const c=flarum.core.compat["common/extend"],l=flarum.core.compat["common/components/Button"];var f=r.n(l);const h=flarum.core.compat["forum/utils/PostControls"];var d=r.n(h);const p=flarum.core.compat["forum/components/DiscussionPage"];var v=r.n(p);const w=flarum.core.compat["forum/components/CommentPost"];var b=r.n(w);const y=flarum.core.compat["common/utils/extractText"];var g=r.n(y);const A=flarum.core.compat["forum/components/Post"];var x=r.n(A);const _=flarum.core.compat["common/Component"];var P=r.n(_);const S=flarum.core.compat["common/helpers/icon"];var B=r.n(S);const N=flarum.core.compat["common/helpers/humanTime"];var L=r.n(N);const j=flarum.core.compat["common/components/Link"];var k=r.n(j);const O=flarum.core.compat["common/utils/ItemList"];var I=r.n(O),T=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return(e=t.call.apply(t,[this].concat(n))||this).post=void 0,e.discussion=void 0,e}o(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.post=this.attrs.post,this.discussion=this.attrs.discussion},n.view=function(){return m("li",{className:"Post--BestAnswer"},this.items().toArray())},n.getSetTime=function(t){if(null!=t.bestAnswerSetAt&&t.bestAnswerSetAt()){var e=null==t.bestAnswerSetAt?void 0:t.bestAnswerSetAt();if(e)return L()(e)}},n.items=function(){var t,r,n,s,o=new(I());o.add("post",this.post?m("span",null,B()("fas fa-check"),e().translator.trans("fof-best-answer.forum.best_answer_button")):m(k(),{href:e().route.post(this.post),"data-number":this.post.number()},B()("fas fa-check"),e().translator.trans("fof-best-answer.forum.best_answer_button")));var i=null==(t=(r=this.discussion).bestAnswerUser)?void 0:t.call(r);return i&&o.add("user",m("span",{className:"BestAnswer--User"},e().translator.trans("fof-best-answer.forum.best_answer_label",{user:null==(n=(s=this.discussion).bestAnswerUser)?void 0:n.call(s),time_set:this.getSetTime(this.discussion),a:m("a",{onclick:function(){return m.route.set(e().route.user(i))}})}))),o},r}(P());const C=flarum.core.compat["common/helpers/username"];var D=r.n(C);const E=flarum.core.compat["common/helpers/userOnline"];var q=r.n(E);const R=flarum.core.compat["common/utils/classList"];var M=r.n(R),U=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return(e=t.call.apply(t,[this].concat(n))||this).user=void 0,e.post=void 0,e.discussion=void 0,e}o(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.user=this.attrs.user,this.post=this.attrs.post,this.discussion=this.attrs.discussion},n.view=function(){var t=this,r=e().forum.attribute("fof-best-answer.show_max_lines");return m("div",{className:"CommentPost",onclick:function(){return e().current.get("stream").goToNumber(t.post.number())}},m("div",{className:"Post-header"},m("ul",null,this.headerItems().toArray())),m("div",{className:M()("Post-body",r>0&&"Post-body--truncate"),style:{"--max-lines":r}},m.trust(this.postContent())))},n.postContent=function(){return this.post.contentHtml()},n.headerItems=function(){var t=new(I());return t.add("user",this.userItem()),t.add("meta",this.metaItem()),t.add("bestAnswer",m(T,{post:this.post,discussion:this.discussion}),-100),t},n.userItem=function(){return m("li",{className:"item-user"},m("div",{className:"PostUser"},this.user&&q()(this.user),m("h3",null,this.user?m(k(),{href:e().route.user(this.user)},D()(this.user)):D()(this.user))))},n.metaItem=function(){var t=this.post;return m("li",{className:"item-meta"},m("span",{className:"PostMeta-time"},L()(t.createdAt())))},r}(P());const F=flarum.core.compat["common/models/Discussion"];var G=r.n(F);const Q=flarum.core.compat["common/components/Badge"];var H=function(t){function r(){return t.apply(this,arguments)||this}return o(r,t),r.initAttrs=function(t){t.type="bestAnswer",t.icon="fas fa-check",t.label=g()(e().translator.trans("fof-best-answer.forum.answered_badge"))},r}(r.n(Q)()),Y=function(t){function r(){return t.apply(this,arguments)||this}o(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return e().translator.trans("fof-best-answer.forum.notification.awarded",{user:t})},n.excerpt=function(){return null},r}(a()),z=function(t){function r(){return t.apply(this,arguments)||this}o(r,t);var n=r.prototype;return n.icon=function(){return"fas fa-check"},n.href=function(){var t=this.attrs.notification.subject();return e().route.discussion(t)},n.content=function(){var t=this.attrs.notification.fromUser();return e().translator.trans("fof-best-answer.forum.notification.best_answer_in_discussion",{user:t})},n.excerpt=function(){return null},r}(a());const J=flarum.core.compat["forum/components/NotificationGrid"];var K=r.n(J);const V=flarum.core.compat["forum/components/UserCard"];var W=r.n(V);function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},X.apply(null,arguments)}const Z=flarum.core.compat["forum/components/Search"];var $=r.n(Z);function tt(t,e,r,n,s,o,i){try{var a=t[o](i),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,s)}var et=r(943),rt=r.n(et);const nt=flarum.core.compat["common/components/LinkButton"];var st=r.n(nt);const ot=flarum.core.compat["common/helpers/highlight"];var it=r.n(ot);const at=flarum.core.compat["tags/common/helpers/tagsLabel"];var ut=r.n(at),ct=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return(e=t.call.apply(t,[this].concat(n))||this).query=void 0,e.discussion=void 0,e.bestAnswerPost=void 0,e.mostRelevantPost=void 0,e.tags=void 0,e}o(r,t);var n=r.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.bestAnswerPost=this.attrs.bestAnswerPost,this.mostRelevantPost=this.attrs.mostRelevantPost,this.tags=this.attrs.tags},n.view=function(){return m("li",{className:"SolutionSearchResult DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(k(),{href:e().route.discussion(this.discussion,this.bestAnswerPost&&this.bestAnswerPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.bestAnswerContent=function(){var t;return null==(t=this.bestAnswerPost)?void 0:t.contentPlain()},n.mostRelevantContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,r,n=new(I());return e().forum.attribute("showTagsInSearchResults")&&n.add("tags",m("div",{className:"SolutionSearchResult-tags"},ut()(this.tags)),100),n.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},it()(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&n.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},it()(null!=(t=this.mostRelevantContent())?t:"",this.query,100)),80),this.bestAnswerPost&&n.add("best-answer",m("div",{className:"DiscussionSearchResult-excerpt SolutionSearchResult-bestAnswer"},it()(null!=(r=this.bestAnswerContent())?r:"",this.query,100)),70),n},r}(P()),lt=function(){function t(){this.results=new Map,this.queryString=null}var r=t.prototype;return r.search=function(){var t,r=(t=rt().mark((function t(r){var n,s=this;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=r.toLowerCase(),this.results.set(r,[]),this.setQueryString(r),n={filter:{q:this.queryString||r},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",e().store.find("discussions",n).then((function(t){s.results.set(r,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})),function(){var e=this,r=arguments;return new Promise((function(n,s){var o=t.apply(e,r);function i(t){tt(o,n,s,i,a,"next",t)}function a(t){tt(o,n,s,i,a,"throw",t)}i(void 0)}))});return function(t){return r.apply(this,arguments)}}(),r.view=function(t){t=t.toLowerCase(),this.setQueryString(t);var r=(this.results.get(t)||[]).map((function(e){var r=e.bestAnswerPost(),n=e.mostRelevantPost(),s=e.tags();return m(ct,{query:t,discussion:e,bestAnswerPost:r,mostRelevantPost:n,tags:s})}));return[m("li",{className:"Dropdown-header"},m(H,null)," ",e().translator.trans("fof-best-answer.forum.search.discussions_solutions_heading")),m("li",null,m(st(),{icon:"fas fa-search",href:e().route("index",{q:this.queryString})},e().translator.trans("fof-best-answer.forum.search.all_discussions_solutions_button",{query:t})))].concat(r)},r.includes=function(){return["mostRelevantPost","bestAnswerPost","tags"]},r.limit=function(){return 3},r.queryMutators=function(){return["is:solved"]},r.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}();const ft=flarum.core.compat["forum/components/DiscussionsSearchSource"];var mt=r.n(ft);const ht=flarum.core.compat["forum/components/IndexPage"];var dt=r.n(ht);const pt=flarum.core.compat["common/components/Dropdown"];var vt=r.n(pt),wt=function(t){function r(){return t.apply(this,arguments)||this}o(r,t);var n=r.prototype;return n.view=function(){var t=this;if(!this.shouldShowFilter())return null;var r=e().discussions.bestAnswer,n=["all","solved","unsolved"];return vt().component({buttonClassName:"Button",label:e().translator.trans("fof-best-answer.forum.filter."+(n[r]||Object.keys(n).map((function(t){return n[Number(t)]}))[0])+"_label"),accessibleToggleLabel:e().translator.trans("fof-best-answer.forum.filter.accessible_label")},Object.keys(n).map((function(s){var o=n[Number(s)],i=(r||Object.keys(n)[0])===s;return f().component({icon:!i||"fas fa-check",active:i,onclick:function(){e().discussions.bestAnswer=s,"0"===s&&delete e().discussions.bestAnswer,t.reloadDiscussions()}},e().translator.trans("fof-best-answer.forum.filter."+o+"_label"))})))},n.reloadDiscussions=function(){e().discussions.refresh()},n.shouldShowFilter=function(){var t=this.attrs,r=t.currentTag;return!(!t.alwaysShow&&(!e().forum.attribute("showBestAnswerFilterUi")||(null==r||null==r.isQnA||!r.isQnA())&&(e().discussions.bestAnswer&&(delete e().discussions.bestAnswer,e().discussions.refresh()),1)))},r}(P());const bt=flarum.core.compat["forum/states/DiscussionListState"];var yt=r.n(bt);const gt=flarum.core.compat["forum/components/DiscussionComposer"];var At=r.n(gt),xt={SelectBestAnswerItem:T,SolutionSearchSource:lt,BestAnswerFooterPreview:U,AwardedBestAnswerNotification:Y,BestAnswerBadge:H,BestAnswerInDiscussionNotification:z,SelectBestAnswerNotification:u,SolutionSearchItem:ct,SolvedFilter:wt};const _t=flarum.core.compat["common/extenders"];var Pt=r.n(_t);const St=flarum.core.compat["tags/common/models/Tag"];var Bt=r.n(St);const Nt=[new(Pt().Model)(Bt()).attribute("isQnA").attribute("reminders")],Lt=flarum.core.compat["common/models/User"];var jt=r.n(Lt);const kt=flarum.core.compat["common/Model"];var Ot=r.n(kt);const It=[].concat(Nt,[new(Pt().Model)(G()).hasOne("bestAnswerPost").hasOne("bestAnswerUser").attribute("hasBestAnswer").attribute("canSelectBestAnswer").attribute("bestAnswerSetAt",Ot().transformDate),new(Pt().Model)(jt()).attribute("bestAnswerCount")]);e().initializers.add("fof/best-answer",(function(){var t,n,s,o,i,a;e().notificationComponents.selectBestAnswer=u,e().notificationComponents.awardedBestAnswer=Y,e().notificationComponents.bestAnswerInDiscussion=z,(0,c.extend)(G().prototype,"badges",(function(t){this.hasBestAnswer()&&!t.has("hidden")&&t.add("bestAnswer",m(H,null))})),t=function(t,r){return r.isHidden()||1===r.number()||!t.canSelectBestAnswer()||!e().session.user},n=function(t){var r,n=t.user();return!e().forum.attribute("canSelectBestAnswerOwnPost")&&!1!==n&&n.id()===(null==(r=e().session.user)?void 0:r.id())},s=function(t,e){var r=t.bestAnswerPost(),n=t.hasBestAnswer();return void 0!==n&&n&&null!==r&&r.id()===e.id()},o=function(t){return g()(e().translator.trans(t?"fof-best-answer.forum.remove_best_answer":"fof-best-answer.forum.this_best_answer"))},i=function(t,r,n){var s;return t.save({bestAnswerPostId:r?n.id():0,bestAnswerUserId:null==(s=e().session.user)?void 0:s.id(),relationships:r?{bestAnswerPost:n,bestAnswerUser:e().session.user}:{bestAnswerPost:null}},{params:{include:"tags"}}).then((function(){r||t.data.relationships&&(delete t.data.relationships.bestAnswerPost,delete t.data.relationships.bestAnswerUser),e().current.matches(v())&&e().current.get("stream").update(),m.redraw(),r&&m.route.set(e().route.discussion(t))}))},(0,c.extend)(d(),"moderationControls",(function(r,a){if(!e().forum.attribute("useAlternativeBestAnswerUi")){var u=a.discussion(),c=s(u,a);a.pushAttributes({isBestAnswer:c}),"comment"===a.contentType()&&(t(u,a)||n(a)||!e().current.matches(v())||r.add("bestAnswer",m(f(),{icon:"fa"+(c?"s":"r")+" fa-comment-dots",onclick:function(){i(u,c=!c,a).finally((function(){c=s(u,a)}))}},o(c))))}})),(0,c.extend)(b().prototype,"actionItems",(function(r){if(e().forum.attribute("useAlternativeBestAnswerUi")){var a=this.attrs.post,u=this.attrs.post.discussion(),c=s(u,a),l=null!==u.bestAnswerPost();a.pushAttributes({isBestAnswer:c}),t(u,a)||n(a)||!e().current.matches(v())||r.add("bestAnswer",m(f(),{className:"Button Button--"+(!l||c?"primary":"link"),onclick:function(){l=!l,i(u,c=!c,a).finally((function(){l=!!u.hasBestAnswer()&&null!==u.bestAnswerPost(),c=s(u,a)}))}},o(c)))}})),(0,c.extend)(b().prototype,"headerItems",(function(t){var e,r=this.attrs.post,n=r.discussion();null!=n&&n.hasBestAnswer()&&n.bestAnswerPost()&&(null==(e=n.bestAnswerPost())?void 0:e.id())===r.id()&&!r.isHidden()&&t.add("isBestAnswer",m(T,{post:r,discussion:n}),-100)})),(0,c.extend)(b().prototype,"footerItems",(function(t){var e=this.attrs.post,r=e.discussion(),n=r.hasBestAnswer()&&r.bestAnswerPost();if(n&&!n.isHidden()&&1===e.number()&&!e.isHidden()){var s=n.user();t.add("bestAnswerPost",m(U,{post:n,user:s,discussion:r}),-10)}})),(0,c.extend)(x().prototype,"elementAttrs",(function(t){var e=this.attrs.post,r=e.discussion();null!=r&&r.hasBestAnswer()&&r.bestAnswerPost()&&r.bestAnswerPost().id()===e.id()&&!e.isHidden()&&(t.className?t.className+=" Post--bestAnswer":t.className="Post--bestAnswer")})),(0,c.extend)(v().prototype,"sidebarItems",(function(t){var r;if(e().forum.attribute("bestAnswerDiscussionSidebarJumpButton")){var n=this.discussion;if(null!==n){var s=n.hasBestAnswer()&&n.bestAnswerPost();!s||s.isHidden()||1===s.number()||null!=(r=n.bestAnswerPost())&&r.isHidden()||t.add("jumpToBestAnswer",m(f(),{className:"Button Button-jumpBestAnswer",icon:"fas fa-check",onclick:function(){return e().current.get("stream").goToNumber(s.number())},"aria-label":e().translator.trans("fof-best-answer.forum.discussion.jump_to_best_answer_button")},e().translator.trans("fof-best-answer.forum.discussion.jump_to_best_answer_button")),90)}}})),(0,c.extend)(W().prototype,"infoItems",(function(t){var r=this.attrs.user;t.add("best-answer-count",m("span",{className:"UserCard-bestAnswerCount"},B()("fas fa-check"),e().translator.trans("fof-best-answer.forum.user.best-answer-count",{count:r.bestAnswerCount()})),55)})),(a=r(493))&&(0,c.override)(a.SortMap.prototype,"sortMap",(function(t){return X({},t(),{most_best_answers:"-bestAnswerCount",least_best_answers:"bestAnswerCount"})})),(0,c.extend)(K().prototype,"notificationTypes",(function(t){t.add("awardedBestAnswer",{name:"awardedBestAnswer",icon:"fas fa-check",label:e().translator.trans("fof-best-answer.forum.notification.preferences.awarded_best_answer")}),t.add("bestAnswerInDiscussion",{name:"bestAnswerInDiscussion",icon:"fas fa-check",label:e().translator.trans("fof-best-answer.forum.notification.preferences.best_answer_in_discussion")}),t.add("selectBestAnswer",{name:"selectBestAnswer",icon:"fas fa-stopwatch",label:e().translator.trans("fof-best-answer.forum.notification.preferences.select_best_answer")})})),(0,c.extend)($().prototype,"sourceItems",(function(t){e().forum.attribute("solutionSearchEnabled")&&t.add("solution",new lt,110)})),(0,c.extend)(mt().prototype,"queryMutators",(function(t){e().forum.attribute("removeSolutionResultsFromMainSearch")&&t.push("-is:solved")})),(0,c.extend)(dt().prototype,"sidebarItems",(function(t){var r=this.currentTag();if(null!=r&&null!=r.isQnA&&r.isQnA()){var n=e().forum.attribute("canStartDiscussion")||!e().session.user;if(t.has("newDiscussion")){var s=t.get("newDiscussion");s.children=e().translator.trans(n?"fof-best-answer.forum.index.ask_question":"fof-best-answer.forum.index.cannot_ask_question"),t.has("startDiscussion")&&t.setContent("startDiscussion",s)}}})),(0,c.extend)(dt().prototype,"viewItems",(function(t){var e=this.currentTag();e&&t.add("solved-filter",m(wt,{currentTag:e}))})),(0,c.extend)(yt().prototype,"requestParams",(function(t){if(e().discussions.bestAnswer){var r="2"===e().discussions.bestAnswer?"-":"";t.filter||(t.filter={}),t.filter[r+"solved-discussions"]="true",t.filter.q&&(t.filter.q+=" "+r+"is:solved")}})),(0,c.extend)(At().prototype,"headerItems",(function(t){var r=this.composer.fields.tags;void 0!==r&&r.some((function(t){return t.isQnA()}))&&(this.attrs.titlePlaceholder=e().translator.trans("fof-best-answer.forum.composer.titlePlaceholder"),t.has("discussionTitle")&&t.setContent("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))))}))}))})(),module.exports=n})();
|
||
|
||
|
||
flarum.extensions['fof-best-answer']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:n=>{var s=n&&n.__esModule?()=>n.default:()=>n;return t.d(s,{a:s}),s},d:(n,s)=>{for(var a in s)t.o(s,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:s[a]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)};(()=>{"use strict";const n=flarum.core.compat["forum/app"];var s=t.n(n);const a=flarum.core.compat["common/Model"];var o=t.n(a);const e=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/utils/PostControls"];var i=t.n(r);const d=flarum.core.compat["forum/utils/UserControls"];var p=t.n(d);const u=flarum.core.compat["common/components/Button"];var l=t.n(u);function h(t,n){return h=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t},h(t,n)}function c(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n)}const b=flarum.core.compat["common/app"];var f=t.n(b);const _=flarum.core.compat["common/components/Modal"];var y=t.n(_);const v=flarum.core.compat["common/components/Alert"];var O=t.n(v);const g=flarum.core.compat["common/utils/Stream"];var P=t.n(g);const B=flarum.core.compat["common/helpers/punctuateSeries"];var I=t.n(B),U=function(t){function n(){return t.apply(this,arguments)||this}c(n,t);var s=n.prototype;return s.oninit=function(n){if(t.prototype.oninit.call(this,n),this.address=this.attrs.address,this.post=this.attrs.post,this.user=this.attrs.user||this.post&&this.post.user(),!this.user&&this.address){var s=f().store.getBy("banned_ips","address",this.address);s&&(this.user=s.user())}this.banOptions=[],(this.post&&this.post.ipAddress()||this.address)&&this.banOptions.push("only"),this.user&&this.banOptions.push("all"),this.banOption=P()(this.banOptions[0]),this.reason=P()(""),this.otherUsers={},this.loading=!1},s.className=function(){return"BanIPModal Modal--medium"},s.title=function(){return f().translator.trans("fof-ban-ips.lib.modal.title")},s.content=function(){var t=this,n=this.otherUsers[this.banOption()],s=n&&n.map((function(t){return t&&t.displayName()||f().translator.trans("core.lib.username.deleted_text")}));return m("div",{className:"Modal-body"},m("p",null,f().translator.trans("fof-ban-ips.lib.modal.ban_ip_confirmation")),m("div",{className:"Form-group"},this.banOptions.map((function(n){return m("div",null,m("input",{type:"radio",name:"ban-option",id:"ban-option-"+n,checked:t.banOption()===n,onclick:t.banOption.bind(t,n)})," ",m("label",{htmlFor:"ban-option-"+n},f().translator.trans("fof-ban-ips.forum.modal.ban_options_"+n+"_ip",{user:t.user,ip:t.address||t.post&&t.post.ipAddress()})))}))),m("div",{className:"Form-group"},m("label",{className:"label"},f().translator.trans("fof-ban-ips.lib.modal.reason_label")),m("input",{type:"text",className:"FormControl",bidi:this.reason})),n?n.length?O().component({dismissible:!1},f().translator.trans("fof-ban-ips.lib.modal.ban_ip_users",{users:I()(s),count:s.length})):O().component({dismissible:!1,type:"success"},f().translator.trans("fof-ban-ips.forum.modal.ban_ip_no_users")):"",n&&m("br",null),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",type:"submit",loading:this.loading},s?f().translator.trans("fof-ban-ips.lib.modal.ban_button"):f().translator.trans("fof-ban-ips.lib.modal.check_button"))))},s.onsubmit=function(t){var n=this;if(t.preventDefault(),this.loading=!0,void 0===this.otherUsers[this.banOption()])return this.getOtherUsers();var s={reason:this.reason(),userId:this.user.id()};"only"===this.banOption()?(s.address=this.post.ipAddress(),f().store.createRecord("banned_ips").save(s).then(this.hide.bind(this)).catch(this.onerror.bind(this)).then(this.loaded.bind(this))):"all"===this.banOption()&&f().request({body:{data:{attributes:s}},url:""+f().forum.attribute("apiUrl")+this.user.apiEndpoint()+"/ban",method:"POST",errorHandler:this.onerror.bind(this)}).then((function(t){return f().store.pushPayload(t).forEach(n.done.bind(n))})).then(this.hide.bind(this)).catch((function(){})).then(this.loaded.bind(this))},s.getOtherUsers=function(){var t=this,n={};"only"===this.banOption()&&(n.ip=this.address||this.post.ipAddress()),f().request({params:n,url:f().forum.attribute("apiUrl")+"/fof/ban-ips/check-users/"+this.user.id(),method:"GET",errorHandler:this.onerror.bind(this)}).then((function(n){t.otherUsers[t.banOption()]=n.data.map((function(t){return f().store.pushObject(t)})).filter((function(t){return 0===t.bannedIPs().length})),t.loading=!1})).catch((function(){})).then(this.loaded.bind(this))},s.done=function(t){var n={type:"banned_ips",id:t.id()};this.post&&(this.post.data.relationships.banned_ip={data:n}),this.user.data.relationships.banned_ips||(this.user.data.relationships.banned_ips={data:[]}),this.user.data.relationships.banned_ips.data.push(n),this.user.data.attributes.isBanned=!0,f().store.pushObject(this.user.data)},n}(y());flarum.core.compat["common/helpers/username"];var A=function(t){function n(){return t.apply(this,arguments)||this}c(n,t);var s=n.prototype;return s.title=function(){return f().translator.trans("fof-ban-ips.lib.modal.unban_title")},s.className=function(){return"UnbanIPModal Modal--medium"},s.content=function(){var t=this,n=this.otherUsers[this.banOption()],s=n&&n.map((function(t){return t&&t.displayName()||f().translator.trans("core.lib.username.deleted_text")}));return this.bannedIPs?m("div",{className:"Modal-body"},O().component({dismissible:!1,type:"success"},f().translator.trans("fof-ban-ips.lib.modal.unbanned_ips",{ips:I()(this.bannedIPs)}))):m("div",{className:"Modal-body"},m("p",null,f().translator.trans("fof-ban-ips.lib.modal.unban_ip_confirmation")),m("div",{className:"Form-group"},this.banOptions.map((function(n){return m("div",null,m("input",{type:"radio",name:"ban-option",id:"ban-option-"+n,checked:t.banOption()===n,onclick:t.banOption.bind(t,n)})," ",m("label",{htmlFor:"ban-option-"+n},f().translator.trans("fof-ban-ips.lib.modal.unban_options_"+n+"_ip",{user:t.user,ip:t.address||t.post&&t.post.ipAddress()})))}))),n?n.length?O().component({dismissible:!1},f().translator.trans("fof-ban-ips.lib.modal.unban_ip_users",{users:I()(s),count:s.length})):O().component({dismissible:!1,type:"success"},f().translator.trans("fof-ban-ips.lib.modal.unban_ip_no_users")):"",n&&m("br",null),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary",type:"submit",loading:this.loading},s?f().translator.trans("fof-ban-ips.lib.modal.unban_button"):f().translator.trans("fof-ban-ips.lib.modal.check_button"))))},s.onsubmit=function(t){if(t.preventDefault(),this.loading=!0,void 0===this.otherUsers[this.banOption()])return this.getOtherUsers();var n={};if("only"===this.banOption()){n.address=this.address||this.post.ipAddress();var s=this.post?this.post.bannedIP():f().store.getBy("banned_ips","address",this.address);s.delete().then(this.done.bind(this,s)).catch(this.onerror.bind(this)).then(this.hide.bind(this))}else"all"===this.banOption()&&f().request({body:{data:{attributes:n}},url:""+f().forum.attribute("apiUrl")+this.user.apiEndpoint()+"/unban",method:"POST",errorHandler:this.onerror.bind(this)}).then(this.done.bind(this)).catch(this.onerror.bind(this)).then(this.hide.bind(this))},s.getOtherUsers=function(){var t=this,n={};"only"===this.banOption()&&(n.ip=this.address||this.post.ipAddress(),n.skipValidation=!0);var s=f().forum.attribute("apiUrl")+"/fof/ban-ips/check-users";this.user&&(s+="/"+this.user.id()),f().request({params:n,url:s,method:"GET",errorHandler:this.onerror.bind(this)}).then((function(n){var s=f().store.pushPayload(n);t.otherUsers[t.banOption()]=s.filter((function(t){return 1===t.bannedIPs().length})),t.loading=!1,m.redraw()})).catch((function(){})).then(this.loaded.bind(this))},s.done=function(t){this.loading=!1,this.post&&delete this.post.data.relationships.banned_ip,!this.user||this.user.data.relationships||t?this.user&&t instanceof f().store.models.banned_ips&&(this.user.data.relationships.banned_ips={data:this.user.data.relationships.banned_ips.data.filter((function(n){return n.id!==t.id()}))},this.user.data.attributes.isBanned=0!==this.user.data.relationships.banned_ips.data.length):(this.user.data.relationships.banned_ips.data=[],this.user.data.attributes.isBanned=!1),t&&Array.isArray(t.data)&&(this.bannedIPs=t.data.map((function(t){return t.attributes.address})),this.loading=!1,m.redraw())},s.hide=function(){t.prototype.hide.call(this),this.attrs.redraw||location.reload()},n}(U);const N=flarum.core.compat["common/utils/mixin"];var M=function(t){function n(){return t.apply(this,arguments)||this}return c(n,t),n.prototype.apiEndpoint=function(){return"/fof/ban-ips"+(this.exists?"/"+this.id():"")},n}(t.n(N)()(o(),{creator:o().hasOne("creator"),user:o().hasOne("user"),address:o().attribute("address"),reason:o().attribute("reason"),createdAt:o().attribute("createdAt",o().transformDate),deletedAt:o().attribute("deletedAt",o().transformDate)}));const k=flarum.core.compat["common/models/User"];var x=t.n(k);const F=flarum.core.compat["common/components/Badge"];var j=t.n(F);const w={"fof/ban-ips/components/BanIPModal":U,"fof/ban-ips/components/UnbanIPModal":A,"fof/ban-ips/models/BannedIP":M},E=flarum.core;s().initializers.add("fof/ban-ips",(function(){s().store.models.posts.prototype.canBanIP=o().attribute("canBanIP"),s().store.models.posts.prototype.ipAddress=o().attribute("ipAddress"),s().store.models.posts.prototype.bannedIP=o().hasOne("banned_ip"),s().store.models.users.prototype.canBanIP=o().attribute("canBanIP"),s().store.models.users.prototype.isBanned=o().attribute("isBanned"),s().store.models.users.prototype.bannedIPs=o().hasMany("banned_ips"),s().store.models.banned_ips=M,(0,e.extend)(i(),"userControls",(function(t,n){if(n&&n.user()){var a=n.user().isBanned(),o=a?"un":"";n.canBanIP()&&!n.isHidden()&&n.user()!==s().session.user&&"comment"===n.contentType()&&t.add(o+"ban",l().component({icon:"fas fa-gavel",onclick:function(){return s().modal.show(a?A:U,{post:n})}},s().translator.trans("fof-ban-ips.forum."+o+"ban_ip_button")))}})),(0,e.extend)(p(),"moderationControls",(function(t,n){if(n.canBanIP()&&n!==s().session.user){var a=n.isBanned(),o=a?"un":"";t.add(o+"ban",l().component({icon:"fas fa-gavel",onclick:function(){return s().modal.show(a?A:U,{user:n})}},s().translator.trans("fof-ban-ips.forum.user_controls."+o+"ban_button")))}})),(0,e.extend)(x().prototype,"badges",(function(t){this.isBanned()&&t.add("banned",j().component({icon:"fas fa-gavel",type:"banned",label:s().translator.trans("fof-ban-ips.forum.user_badge.banned_tooltip")}))}))})),Object.assign(E.compat,w)})(),module.exports={}})();
|
||
|
||
|
||
flarum.extensions['fof-ban-ips']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:o=>{var s=o&&o.__esModule?()=>o.default:()=>o;return t.d(s,{a:s}),s},d:(o,s)=>{for(var n in s)t.o(s,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:s[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{extend:()=>L});const s=flarum.core.compat["forum/app"];var n=t.n(s);const e=flarum.core.compat["common/extend"],c=flarum.core.compat["common/models/Discussion"];var r=t.n(c);const i=flarum.core.compat["common/components/Badge"];var a=t.n(i);const u=flarum.core.compat["forum/utils/DiscussionControls"];var f=t.n(u);const p=flarum.core.compat["forum/components/DiscussionPage"];var l=t.n(p);const d=flarum.core.compat["common/components/Button"];var y=t.n(d);const k=flarum.core.compat["forum/states/DiscussionListState"];var v=t.n(k);const b=flarum.core.compat["forum/components/DiscussionListItem"];var h=t.n(b);const S=flarum.core.compat["forum/components/IndexPage"];var _=t.n(S);const P=flarum.core.compat["common/utils/string"],g=flarum.core.compat["common/utils/classList"];var x=t.n(g);const O=flarum.core.compat["common/extenders"];var j=t.n(O);function D(t,o){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},D(t,o)}const w=flarum.core.compat["forum/components/EventPost"];var I=function(t){var o,s;function n(){return t.apply(this,arguments)||this}s=t,(o=n).prototype=Object.create(s.prototype),o.prototype.constructor=o,D(o,s);var e=n.prototype;return e.icon=function(){return"fas fa-thumbtack"},e.descriptionKey=function(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"},n}(t.n(w)());const L=[(new(j().PostTypes)).add("discussionStickied",I),new(j().Model)(r()).attribute("isSticky").attribute("canSticky")],M={"sticky/components/DiscussionStickiedPost":I},A=flarum.core;n().initializers.add("flarum-sticky",(function(){(0,e.extend)(r().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:n().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,e.extend)(f(),"moderationControls",(function(t,o){o.canSticky()&&t.add("sticky",m(y(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(o)},n().translator.trans("flarum-sticky.forum.discussion_controls."+(o.isSticky()?"unsticky":"sticky")+"_button")))})),f().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((function(){n().current.matches(l())&&n().current.get("stream").update(),m.redraw()}))},(0,e.extend)(v().prototype,"requestParams",(function(t){(n().current.matches(_())||n().current.matches(l()))&&t.include.push("firstPost")})),(0,e.extend)(h().prototype,"infoItems",(function(t){var o=this.attrs.discussion;if(o.isSticky()&&!this.attrs.params.q&&!o.lastReadPostNumber()){var s=o.firstPost();if(s){var n=(0,P.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,n),-100)}}})),(0,e.extend)(h().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=x()(t.className,"DiscussionListItem--sticky"))}))})),Object.assign(A.compat,M)})(),module.exports=o})();
|
||
|
||
|
||
flarum.extensions['flarum-sticky']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var r in e)t.o(e,r)&&!t.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:e[r]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o);const e=flarum.core.compat["forum/app"];var r=t.n(e);const n=flarum.core.compat["common/app"];var i=t.n(n);const a=flarum.core.compat["common/extend"],c=flarum.core.compat["common/components/TextEditor"];var l=t.n(c);const s=flarum.core.compat["common/utils/BasicEditorDriver"];var d=t.n(s);const u=flarum.core.compat["common/utils/styleSelectedText"];var f=t.n(u);function p(t,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},p(t,o)}function h(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,p(t,o)}const k=flarum.core.compat["common/Component"];var y=t.n(k),b=function(t){function o(){return t.apply(this,arguments)||this}return h(o,t),o.prototype.view=function(t){return m("div",{className:"MarkdownToolbar"},t.children)},o}(y());const x=flarum.core.compat["common/helpers/icon"];var v=t.n(x);const g=flarum.core.compat["common/components/Tooltip"];var w=t.n(g),_=function(t){function o(){return t.apply(this,arguments)||this}h(o,t);var e=o.prototype;return e.oncreate=function(o){t.prototype.oncreate.call(this,o)},e.view=function(){var t=m("button",{className:"Button Button--icon Button--link",type:"button","data-hotkey":this.attrs.hotkey,onkeydown:this.keydown.bind(this),onclick:this.attrs.onclick},v()(this.attrs.icon));return this.attrs.title?m(w(),{text:this.attrs.title},t):t},e.keydown=function(t){" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.element.click())},o}(y());const O=flarum.core.compat["common/utils/ItemList"];var j=t.n(O),T=navigator.userAgent.match(/Macintosh/)?"⌘":"ctrl",P={header:{prefix:"### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](https://)",replaceNext:"https://",scanFor:"https?://"},image:{prefix:"",replaceNext:"https://",scanFor:"https?://"},unordered_list:{prefix:"- ",multiline:!0,surroundWithNewlines:!0},ordered_list:{prefix:"1. ",multiline:!0,orderedList:!0},spoiler:{prefix:">!",suffix:"!<",blockPrefix:">! ",multiline:!0,trimFirst:!0}},S=function(t,o){f()(o.el,P[t])};function I(t,o,e){return function(r){r.key===o&&(r.metaKey&&"⌘"===T||r.ctrlKey&&"ctrl"===T)&&(r.preventDefault(),S(t,e))}}function M(t){var o=this,e="function"==typeof t?t():new(j());function r(t,o){return i().translator.trans("flarum-markdown.lib.composer."+t+"_tooltip")+(o?" <"+T+"-"+o+">":"")}var n=function(t){return function(){return S(t,o.attrs.composer.editor)}};return e.add("header",m(_,{title:r("header"),icon:"fas fa-heading",onclick:n("header")}),1e3),e.add("bold",m(_,{title:r("bold","b"),icon:"fas fa-bold",onclick:n("bold")}),900),e.add("italic",m(_,{title:r("italic","i"),icon:"fas fa-italic",onclick:n("italic")}),800),e.add("strikethrough",m(_,{title:r("strikethrough"),icon:"fas fa-strikethrough",onclick:n("strikethrough")}),700),e.add("quote",m(_,{title:r("quote"),icon:"fas fa-quote-left",onclick:n("quote")}),600),e.add("spoiler",m(_,{title:r("spoiler"),icon:"fas fa-exclamation-triangle",onclick:n("spoiler")}),500),e.add("code",m(_,{title:r("code"),icon:"fas fa-code",onclick:n("code")}),400),e.add("link",m(_,{title:r("link"),icon:"fas fa-link",onclick:n("link")}),300),e.add("image",m(_,{title:r("image"),icon:"fas fa-image",onclick:n("image")}),200),e.add("unordered_list",m(_,{title:r("unordered_list"),icon:"fas fa-list-ul",onclick:n("unordered_list")}),100),e.add("ordered_list",m(_,{title:r("ordered_list"),icon:"fas fa-list-ol",onclick:n("ordered_list")}),0),e}function F(){return F=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var e=arguments[o];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},F.apply(this,arguments)}const N=F({},{"markdown/components/MarkdownButton":_,"markdown/components/MarkdownToolbar":b}),q=flarum.core;r().initializers.add("flarum-markdown",(function(t){(0,a.extend)(d().prototype,"keyHandlers",(function(t){t.add("bold",I("bold","b",this)),t.add("italic",I("italic","i",this))})),l().prototype.markdownToolbarItems?(0,a.override)(l().prototype,"markdownToolbarItems",M):l().prototype.markdownToolbarItems=M,(0,a.extend)(l().prototype,"toolbarItems",(function(t){t.add("markdown",m(b,{for:this.textareaId,setShortcutHandler:function(t){return shortcutHandler=t}},this.markdownToolbarItems().toArray()),100)}))})),Object.assign(q.compat,N)})(),module.exports=o})();
|
||
|
||
|
||
flarum.extensions['flarum-markdown']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var c in n)o.o(n,c)&&!o.o(t,c)&&Object.defineProperty(t,c,{enumerable:!0,get:n[c]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>j});const n=flarum.core.compat["common/extend"],c=flarum.core.compat["forum/app"];var e=o.n(c);const r=flarum.core.compat["forum/components/NotificationGrid"];var s=o.n(r);function a(o,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},a(o,t)}function i(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,a(o,t)}const u=flarum.core.compat["forum/components/Notification"];var l=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-lock"},n.href=function(){var o=this.attrs.notification;return e().route.discussion(o.subject(),o.content().postNumber)},n.content=function(){return e().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})},t}(o.n(u)());const f=flarum.core.compat["common/models/Discussion"];var d=o.n(f);const p=flarum.core.compat["common/components/Badge"];var k=o.n(p);const y=flarum.core.compat["forum/utils/DiscussionControls"];var b=o.n(y);const _=flarum.core.compat["forum/components/DiscussionPage"];var v=o.n(_);const h=flarum.core.compat["common/components/Button"];var L=o.n(h);const g=flarum.core.compat["common/extenders"];var O=o.n(g);const x=flarum.core.compat["forum/components/EventPost"];var P=function(o){function t(){return o.apply(this,arguments)||this}i(t,o);var n=t.prototype;return n.icon=function(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"},n.descriptionKey=function(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"},t}(o.n(x)());const j=[(new(O().PostTypes)).add("discussionLocked",P),new(O().Model)(d()).attribute("isLocked").attribute("canLock")],D={"lock/components/DiscussionLockedNotification":l,"lock/components/DiscussionLockedPost":P},S=flarum.core;e().initializers.add("flarum-lock",(function(){e().notificationComponents.discussionLocked=l,(0,n.extend)(d().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(k(),{type:"locked",label:e().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,n.extend)(b(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(L(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},e().translator.trans("flarum-lock.forum.discussion_controls."+(t.isLocked()?"unlock":"lock")+"_button")))})),b().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((function(){e().current.matches(v())&&e().current.get("stream").update(),m.redraw()}))},(0,n.extend)(s().prototype,"notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:e().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))})),Object.assign(S.compat,D)})(),module.exports=t})();
|
||
|
||
|
||
flarum.extensions['flarum-lock']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var d={n:e=>{var u=e&&e.__esModule?()=>e.default:()=>e;return d.d(u,{a:u}),u},d:(e,u)=>{for(var a in u)d.o(u,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:u[a]})},o:(d,e)=>Object.prototype.hasOwnProperty.call(d,e),r:d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},e={};(()=>{"use strict";d.r(e);const u=flarum.core.compat["forum/app"];var a=d.n(u);const n=JSON.parse('{"🇦":["regional_indicator_a"],"🇧":["regional_indicator_b"],"🇨":["regional_indicator_c"],"🇩":["regional_indicator_d"],"🇪":["regional_indicator_e"],"🇫":["regional_indicator_f"],"🇬":["regional_indicator_g"],"🇭":["regional_indicator_h"],"🇮":["regional_indicator_i"],"🇯":["regional_indicator_j"],"🇰":["regional_indicator_k"],"🇱":["regional_indicator_l"],"🇲":["regional_indicator_m"],"🇳":["regional_indicator_n"],"🇴":["regional_indicator_o"],"🇵":["regional_indicator_p"],"🇶":["regional_indicator_q"],"🇷":["regional_indicator_r"],"🇸":["regional_indicator_s"],"🇹":["regional_indicator_t"],"🇺":["regional_indicator_u"],"🇻":["regional_indicator_v"],"🇼":["regional_indicator_w"],"🇽":["regional_indicator_x"],"🇾":["regional_indicator_y"],"🇿":["regional_indicator_z"],"😀":["grinning","grinning_face"],"😃":["grinning_face_with_big_eyes","smiley"],"😄":["grinning_face_with_closed_eyes","smile"],"😁":["beaming_face","grin"],"😆":["laughing","lol","satisfied","squinting_face"],"😅":["grinning_face_with_sweat","sweat_smile"],"🤣":["rofl"],"😂":["joy","lmao","tears_of_joy"],"🙂":["slightly_smiling_face"],"🙃":["upside_down_face"],"🫠":["melt","melting_face"],"😉":["wink","winking_face"],"😊":["blush","smiling_face_with_closed_eyes"],"😇":["halo","innocent"],"🥰":["smiling_face_with_3_hearts"],"😍":["heart_eyes","smiling_face_with_heart_eyes"],"🤩":["star_struck"],"😘":["blowing_a_kiss","kissing_heart"],"😗":["kissing","kissing_face"],"☺️":["relaxed","smiling_face"],"😚":["kissing_closed_eyes","kissing_face_with_closed_eyes"],"😙":["kissing_face_with_smiling_eyes","kissing_smiling_eyes"],"🥲":["smiling_face_with_tear"],"😋":["savoring_food","yum"],"😛":["face_with_tongue","stuck_out_tongue"],"😜":["stuck_out_tongue_winking_eye"],"🤪":["zany","zany_face"],"😝":["stuck_out_tongue_closed_eyes"],"🤑":["money_mouth_face"],"🤗":["hug","hugging","hugging_face"],"🤭":["face_with_hand_over_mouth","hand_over_mouth"],"🫢":["face_with_open_eyes_hand_over_mouth","gasp"],"🫣":["face_with_peeking_eye","peek"],"🤫":["shush","shushing_face"],"🤔":["thinking","thinking_face","wtf"],"🫡":["salute","saluting_face"],"🤐":["zipper_mouth","zipper_mouth_face"],"🤨":["face_with_raised_eyebrow","raised_eyebrow"],"😐️":["neutral","neutral_face"],"😑":["expressionless","expressionless_face"],"😶":["no_mouth"],"🫥":["dotted_line_face"],"😶🌫️":["in_clouds"],"😏":["smirk","smirking","smirking_face"],"😒":["unamused","unamused_face"],"🙄":["rolling_eyes"],"😬":["grimacing","grimacing_face"],"😮💨":["exhale","exhaling"],"🤥":["lying","lying_face"],"😌":["relieved","relieved_face"],"😔":["pensive","pensive_face"],"😪":["sleepy","sleepy_face"],"🤤":["drooling","drooling_face"],"😴":["sleeping","sleeping_face"],"😷":["mask","medical_mask"],"🤒":["face_with_thermometer"],"🤕":["face_with_head_bandage"],"🤢":["nauseated","nauseated_face"],"🤮":["face_vomiting","vomiting"],"🤧":["sneezing","sneezing_face"],"🥵":["hot","hot_face"],"🥶":["cold","cold_face"],"🥴":["woozy","woozy_face"],"😵":["dizzy_face","knocked_out"],"😵💫":["dizzy_eyes"],"🤯":["exploding_head"],"🤠":["cowboy","cowboy_face"],"🥳":["hooray","partying","partying_face"],"🥸":["disguised","disguised_face"],"😎":["smiling_face_with_sunglasses","sunglasses_cool","too_cool"],"🤓":["nerd","nerd_face"],"🧐":["face_with_monocle"],"😕":["confused","confused_face"],"🫤":["face_with_diagonal_mouth"],"😟":["worried","worried_face"],"🙁":["slightly_frowning_face"],"☹️":["white_frowning_face"],"😮":["face_with_open_mouth","open_mouth"],"😯":["hushed","hushed_face"],"😲":["astonished","astonished_face"],"😳":["flushed","flushed_face"],"🥺":["pleading","pleading_face"],"🥹":["face_holding_back_tears","watery_eyes"],"😦":["frowning","frowning_face"],"😧":["anguished","anguished_face"],"😨":["fearful","fearful_face"],"😰":["anxious","anxious_face","cold_sweat"],"😥":["disappointed_relieved","sad_relieved_face"],"😢":["cry","crying_face"],"😭":["loudly_crying_face","sob"],"😱":["scream","screaming_in_fear"],"😖":["confounded","confounded_face"],"😣":["persevere","persevering_face"],"😞":["disappointed","disappointed_face"],"😓":["downcast_face","sweat"],"😩":["weary","weary_face"],"😫":["tired","tired_face"],"🥱":["yawn","yawning","yawning_face"],"😤":["nose_steam","triumph"],"😡":["pout","pouting_face","rage"],"😠":["angry","angry_face"],"🤬":["censored","face_with_symbols_on_mouth"],"😈":["smiling_imp"],"👿":["angry_imp","imp"],"💀":["skull"],"☠️":["skull_and_crossbones"],"💩":["poop","shit"],"🤡":["clown","clown_face"],"👹":["japanese_ogre","ogre"],"👺":["goblin","japanese_goblin"],"👻":["ghost"],"👽️":["alien"],"👾":["alien_monster","space_invader"],"🤖":["robot","robot_face"],"😺":["grinning_cat","smiley_cat"],"😸":["grinning_cat_with_closed_eyes","smile_cat"],"😹":["joy_cat","tears_of_joy_cat"],"😻":["heart_eyes_cat","smiling_cat_with_heart_eyes"],"😼":["smirk_cat","wry_smile_cat"],"😽":["kissing_cat"],"🙀":["scream_cat","weary_cat"],"😿":["crying_cat"],"😾":["pouting_cat"],"🙈":["see_no_evil"],"🙉":["hear_no_evil"],"🙊":["speak_no_evil"],"💋":["kiss"],"💌":["love_letter"],"💘":["cupid","heart_with_arrow"],"💝":["gift_heart","heart_with_ribbon"],"💖":["sparkling_heart"],"💗":["growing_heart","heartpulse"],"💓":["beating_heart","heartbeat"],"💞":["revolving_hearts"],"💕":["two_hearts"],"💟":["heart_decoration"],"❣️":["heart_exclamation"],"💔":["broken_heart"],"❤️🔥":["heart_on_fire"],"❤️🩹":["mending_heart"],"❤️":["heart","red_heart"],"🧡":["orange_heart"],"💛":["yellow_heart"],"💚":["green_heart"],"💙":["blue_heart"],"💜":["purple_heart"],"🤎":["brown_heart"],"🖤":["black_heart"],"🤍":["white_heart"],"💯":["100"],"💢":["anger"],"💥":["boom","collision"],"💫":["dizzy"],"💦":["sweat_drops"],"💨":["dash","dashing_away"],"🕳️":["hole"],"💣️":["bomb"],"💬":["speech_balloon"],"👁🗨":["eye_in_speech_bubble"],"🗨️":["left_speech_bubble"],"🗯️":["right_anger_bubble"],"💭":["thought_balloon"],"💤":["zzz"],"👋":["wave","waving_hand"],"🤚":["raised_back_of_hand"],"🖐️":["raised_hand_with_fingers_splayed"],"✋":["high_five","raised_hand"],"🖖":["vulcan"],"🫱":["rightwards_hand"],"🫲":["leftwards_hand"],"🫳":["palm_down"],"🫴":["palm_up"],"👌":["ok_hand"],"🤌":["pinch","pinched_fingers"],"🤏":["pinching_hand"],"✌️":["v","victory"],"🤞":["fingers_crossed"],"🫰":["hand_with_index_finger_and_thumb_crossed"],"🤟":["love_you_gesture"],"🤘":["metal","sign_of_the_horns"],"🤙":["call_me_hand"],"👈️":["point_left"],"👉️":["point_right"],"👆️":["point_up"],"🖕":["middle_finger"],"👇️":["point_down"],"☝️":["point_up_2"],"🫵":["point_forward"],"👍️":["+1","thumbsup","yes"],"👎️":["-1","no","thumbsdown"],"✊":["fist"],"👊":["punch"],"🤛":["left_facing_fist"],"🤜":["right_facing_fist"],"👏":["clap","clapping_hands"],"🙌":["raised_hands"],"🫶":["heart_hands"],"👐":["open_hands"],"🤲":["palms_up_together"],"🤝":["handshake"],"🙏":["folded_hands","pray"],"✍️":["writing_hand"],"💅":["nail_care","nail_polish"],"🤳":["selfie"],"💪":["muscle","right_bicep"],"🦾":["mechanical_arm"],"🦿":["mechanical_leg"],"🦵":["leg"],"🦶":["foot"],"👂️":["ear"],"🦻":["ear_with_hearing_aid","hearing_aid"],"👃":["nose"],"🧠":["brain"],"🫀":["anatomical_heart"],"🫁":["lungs"],"🦷":["tooth"],"🦴":["bone"],"👀":["eyes"],"👁️":["eye"],"👅":["tongue"],"👄":["lips","mouth"],"🫦":["biting_lip"],"👶":["baby"],"🧒":["child"],"👦":["boy"],"👧":["girl"],"🧑":["adult"],"👱":["blond_haired"],"👨":["man"],"🧔":["person_bearded"],"🧔♂️":["man_bearded"],"🧔♀️":["woman_bearded"],"👨🦰":["man_red_haired"],"👨🦱":["man_curly_haired"],"👨🦳":["man_white_haired"],"👨🦲":["man_bald"],"👩":["woman"],"👩🦰":["woman_red_haired"],"🧑🦰":["red_haired"],"👩🦱":["woman_curly_haired"],"🧑🦱":["curly_haired"],"👩🦳":["woman_white_haired"],"🧑🦳":["white_haired"],"👩🦲":["woman_bald"],"🧑🦲":["bald"],"👱♀️":["woman_blond_haired"],"👱♂️":["man_blond_haired"],"🧓":["older_adult"],"👴":["older_man"],"👵":["older_woman"],"🙍":["person_frowning"],"🙍♂️":["man_frowning"],"🙍♀️":["woman_frowning"],"🙎":["person_pouting","pouting"],"🙎♂️":["man_pouting"],"🙎♀️":["woman_pouting"],"🙅":["no_good","person_gesturing_no"],"🙅♂️":["man_gesturing_no"],"🙅♀️":["woman_gesturing_no"],"🙆":["all_good","person_gesturing_ok"],"🙆♂️":["man_gesturing_ok"],"🙆♀️":["woman_gesturing_ok"],"💁":["person_tipping_hand"],"💁♂️":["man_tipping_hand"],"💁♀️":["woman_tipping_hand"],"🙋":["person_raising_hand"],"🙋♂️":["man_raising_hand"],"🙋♀️":["woman_raising_hand"],"🧏":["deaf_person"],"🧏♂️":["deaf_man"],"🧏♀️":["deaf_woman"],"🙇":["bow","person_bowing"],"🙇♂️":["man_bowing"],"🙇♀️":["woman_bowing"],"🤦":["facepalm","person_facepalming"],"🤦♂️":["man_facepalming"],"🤦♀️":["woman_facepalming"],"🤷":["person_shrugging","shrug"],"🤷♂️":["man_shrugging"],"🤷♀️":["woman_shrugging"],"🧑⚕️":["health_worker"],"👨⚕️":["man_health_worker"],"👩⚕️":["woman_health_worker"],"🧑🎓":["student"],"👨🎓":["man_student"],"👩🎓":["woman_student"],"🧑🏫":["teacher"],"👨🏫":["man_teacher"],"👩🏫":["woman_teacher"],"🧑⚖️":["judge"],"👨⚖️":["man_judge"],"👩⚖️":["woman_judge"],"🧑🌾":["farmer"],"👨🌾":["man_farmer"],"👩🌾":["woman_farmer"],"🧑🍳":["cook"],"👨🍳":["man_cook"],"👩🍳":["woman_cook"],"🧑🔧":["mechanic"],"👨🔧":["man_mechanic"],"👩🔧":["woman_mechanic"],"🧑🏭":["factory_worker"],"👨🏭":["man_factory_worker"],"👩🏭":["woman_factory_worker"],"🧑💼":["office_worker"],"👨💼":["man_office_worker"],"👩💼":["woman_office_worker"],"🧑🔬":["scientist"],"👨🔬":["man_scientist"],"👩🔬":["woman_scientist"],"🧑💻":["technologist"],"👨💻":["man_technologist"],"👩💻":["woman_technologist"],"🧑🎤":["singer"],"👨🎤":["man_singer"],"👩🎤":["woman_singer"],"🧑🎨":["artist"],"👨🎨":["man_artist"],"👩🎨":["woman_artist"],"🧑✈️":["pilot"],"👨✈️":["man_pilot"],"👩✈️":["woman_pilot"],"🧑🚀":["astronaut"],"👨🚀":["man_astronaut"],"👩🚀":["woman_astronaut"],"🧑🚒":["firefighter"],"👨🚒":["man_firefighter"],"👩🚒":["woman_firefighter"],"👮":["cop","police_officer"],"👮♂️":["man_police_officer"],"👮♀️":["woman_police_officer"],"🕵️":["detective"],"🕵️♂️":["man_detective"],"🕵️♀️":["woman_detective"],"💂":["guard"],"💂♂️":["man_guard"],"💂♀️":["woman_guard"],"🥷":["ninja"],"👷":["construction_worker"],"👷♂️":["man_construction_worker"],"👷♀️":["woman_construction_worker"],"🫅":["person_with_crown","royalty"],"🤴":["prince"],"👸":["princess"],"👳":["person_wearing_turban"],"👳♂️":["man_wearing_turban"],"👳♀️":["woman_wearing_turban"],"👲":["person_with_skullcap"],"🧕":["woman_with_headscarf"],"🤵":["person_in_tuxedo"],"🤵♂️":["man_in_tuxedo"],"🤵♀️":["woman_in_tuxedo"],"👰":["person_with_veil"],"👰♂️":["man_with_veil"],"👰♀️":["woman_with_veil"],"🤰":["pregnant_woman"],"🫃":["pregnant_man"],"🫄":["pregnant_person"],"🤱":["breast_feeding"],"👩🍼":["woman_feeding_baby"],"👨🍼":["man_feeding_baby"],"🧑🍼":["person_feeding_baby"],"👼":["angel"],"🎅":["santa"],"🤶":["mrs_claus"],"🧑🎄":["mx_claus"],"🦸":["superhero"],"🦸♂️":["man_superhero"],"🦸♀️":["woman_superhero"],"🦹":["supervillain"],"🦹♂️":["man_supervillain"],"🦹♀️":["woman_supervillain"],"🧙":["mage"],"🧙♂️":["man_mage"],"🧙♀️":["woman_mage"],"🧚":["fairy"],"🧚♂️":["man_fairy"],"🧚♀️":["woman_fairy"],"🧛":["vampire"],"🧛♂️":["man_vampire"],"🧛♀️":["woman_vampire"],"🧜":["merperson"],"🧜♂️":["merman"],"🧜♀️":["mermaid"],"🧝":["elf"],"🧝♂️":["man_elf"],"🧝♀️":["woman_elf"],"🧞":["genie"],"🧞♂️":["man_genie"],"🧞♀️":["woman_genie"],"🧟":["zombie"],"🧟♂️":["man_zombie"],"🧟♀️":["woman_zombie"],"🧌":["troll"],"💆":["massage","person_getting_massage"],"💆♂️":["man_getting_massage"],"💆♀️":["woman_getting_massage"],"💇":["haircut","person_getting_haircut"],"💇♂️":["man_getting_haircut"],"💇♀️":["woman_getting_haircut"],"🚶":["person_walking","walking"],"🚶♂️":["man_walking"],"🚶♀️":["woman_walking"],"🧍":["person_standing","standing"],"🧍♂️":["man_standing"],"🧍♀️":["woman_standing"],"🧎":["kneeling","person_kneeling"],"🧎♂️":["man_kneeling"],"🧎♀️":["woman_kneeling"],"🧑🦯":["person_with_probing_cane","person_with_white_cane"],"👨🦯":["man_with_probing_cane","man_with_white_cane"],"👩🦯":["woman_with_probing_cane","woman_with_white_cane"],"🧑🦼":["person_in_motorized_wheelchair"],"👨🦼":["man_in_motorized_wheelchair"],"👩🦼":["woman_in_motorized_wheelchair"],"🧑🦽":["person_in_manual_wheelchair"],"👨🦽":["man_in_manual_wheelchair"],"👩🦽":["woman_in_manual_wheelchair"],"🏃":["person_running","running"],"🏃♂️":["man_running"],"🏃♀️":["woman_running"],"💃":["dancer","woman_dancing"],"🕺":["man_dancing"],"🕴️":["levitate","levitating","person_in_suit_levitating"],"👯":["dancers","people_with_bunny_ears_partying"],"👯♂️":["men_with_bunny_ears_partying"],"👯♀️":["women_with_bunny_ears_partying"],"🧖":["person_in_steamy_room"],"🧖♂️":["man_in_steamy_room"],"🧖♀️":["woman_in_steamy_room"],"🧗":["climbing","person_climbing"],"🧗♂️":["man_climbing"],"🧗♀️":["woman_climbing"],"🤺":["fencer","fencing","person_fencing"],"🏇":["horse_racing"],"⛷️":["person_skiing","skier","skiing"],"🏂️":["person_snowboarding","snowboarder","snowboarding"],"🏌️":["golfer","golfing","person_golfing"],"🏌️♂️":["man_golfing"],"🏌️♀️":["woman_golfing"],"🏄️":["person_surfing","surfer","surfing"],"🏄♂️":["man_surfing"],"🏄♀️":["woman_surfing"],"🚣":["person_rowing_boat","rowboat"],"🚣♂️":["man_rowing_boat"],"🚣♀️":["woman_rowing_boat"],"🏊️":["person_swimming","swimmer","swimming"],"🏊♂️":["man_swimming"],"🏊♀️":["woman_swimming"],"⛹️":["person_bouncing_ball"],"⛹️♂️":["man_bouncing_ball"],"⛹️♀️":["woman_bouncing_ball"],"🏋️":["person_lifting_weights","weight_lifter","weight_lifting"],"🏋️♂️":["man_lifting_weights"],"🏋️♀️":["woman_lifting_weights"],"🚴":["bicyclist","biking","person_biking"],"🚴♂️":["man_biking"],"🚴♀️":["woman_biking"],"🚵":["mountain_bicyclist","mountain_biking","person_mountain_biking"],"🚵♂️":["man_mountain_biking"],"🚵♀️":["woman_mountain_biking"],"🤸":["cartwheeling","person_cartwheel"],"🤸♂️":["man_cartwheeling"],"🤸♀️":["woman_cartwheeling"],"🤼":["people_wrestling","wrestlers","wrestling"],"🤼♂️":["men_wrestling"],"🤼♀️":["women_wrestling"],"🤽":["person_playing_water_polo","water_polo"],"🤽♂️":["man_playing_water_polo"],"🤽♀️":["woman_playing_water_polo"],"🤾":["handball","person_playing_handball"],"🤾♂️":["man_playing_handball"],"🤾♀️":["woman_playing_handball"],"🤹":["juggler","juggling","person_juggling"],"🤹♂️":["man_juggling"],"🤹♀️":["woman_juggling"],"🧘":["person_in_lotus_position"],"🧘♂️":["man_in_lotus_position"],"🧘♀️":["woman_in_lotus_position"],"🛀":["bath","person_taking_bath"],"🛌":["person_in_bed","sleeping_accommodation"],"🧑🤝🧑":["people_holding_hands"],"👭":["two_women_holding_hands"],"👫":["couple"],"👬":["two_men_holding_hands"],"💏":["couple_kiss","couplekiss"],"👩❤️💋👨":["kiss_mw","kiss_wm"],"👨❤️💋👨":["kiss_mm"],"👩❤️💋👩":["kiss_ww"],"💑":["couple_with_heart"],"👩❤️👨":["couple_with_heart_mw","couple_with_heart_wm"],"👨❤️👨":["couple_with_heart_mm"],"👩❤️👩":["couple_with_heart_ww"],"👪️":["family"],"👨👩👦":["family_mwb"],"👨👩👧":["family_mwg"],"👨👩👧👦":["family_mwgb"],"👨👩👦👦":["family_mwbb"],"👨👩👧👧":["family_mwgg"],"👨👨👦":["family_mmb"],"👨👨👧":["family_mmg"],"👨👨👧👦":["family_mmgb"],"👨👨👦👦":["family_mmbb"],"👨👨👧👧":["family_mmgg"],"👩👩👦":["family_wwb"],"👩👩👧":["family_wwg"],"👩👩👧👦":["family_wwgb"],"👩👩👦👦":["family_wwbb"],"👩👩👧👧":["family_wwgg"],"👨👦":["family_mb"],"👨👦👦":["family_mbb"],"👨👧":["family_mg"],"👨👧👦":["family_mgb"],"👨👧👧":["family_mgg"],"👩👦":["family_wb"],"👩👦👦":["family_wbb"],"👩👧":["family_wg"],"👩👧👦":["family_wgb"],"👩👧👧":["family_wgg"],"🗣️":["speaking_head"],"👤":["bust_in_silhouette"],"👥":["busts_in_silhouette"],"🫂":["people_hugging"],"👣":["footprints"],"🏻":["tone1","tone_light"],"🏼":["tone2","tone_medium_light"],"🏽":["tone3","tone_medium"],"🏾":["tone4","tone_medium_dark"],"🏿":["tone5","tone_dark"],"🦰":["red_hair"],"🦱":["curly_hair"],"🦳":["white_hair"],"🦲":["no_hair"],"🐵":["monkey_face"],"🐒":["monkey"],"🦍":["gorilla"],"🦧":["orangutan"],"🐶":["dog_face"],"🐕️":["dog"],"🦮":["guide_dog"],"🐕🦺":["service_dog"],"🐩":["poodle"],"🐺":["wolf","wolf_face"],"🦊":["fox","fox_face"],"🦝":["raccoon"],"🐱":["cat_face"],"🐈️":["cat"],"🐈⬛":["black_cat"],"🦁":["lion","lion_face"],"🐯":["tiger_face"],"🐅":["tiger"],"🐆":["leopard"],"🐴":["horse_face"],"🐎":["horse","racehorse"],"🦄":["unicorn","unicorn_face"],"🦓":["zebra"],"🦌":["deer"],"🦬":["bison"],"🐮":["cow_face"],"🐂":["ox"],"🐃":["water_buffalo"],"🐄":["cow"],"🐷":["pig_face"],"🐖":["pig"],"🐗":["boar"],"🐽":["pig_nose"],"🐏":["ram"],"🐑":["ewe","sheep"],"🐐":["goat"],"🐪":["dromedary_camel"],"🐫":["camel"],"🦙":["llama"],"🦒":["giraffe"],"🐘":["elephant"],"🦣":["mammoth"],"🦏":["rhino","rhinoceros"],"🦛":["hippo"],"🐭":["mouse_face"],"🐁":["mouse"],"🐀":["rat"],"🐹":["hamster","hamster_face"],"🐰":["rabbit_face"],"🐇":["rabbit"],"🐿️":["chipmunk"],"🦫":["beaver"],"🦔":["hedgehog"],"🦇":["bat"],"🐻":["bear","bear_face"],"🐻❄️":["polar_bear","polar_bear_face"],"🐨":["koala","koala_face"],"🐼":["panda","panda_face"],"🦥":["sloth"],"🦦":["otter"],"🦨":["skunk"],"🦘":["kangaroo"],"🦡":["badger"],"🐾":["paw_prints"],"🦃":["turkey"],"🐔":["chicken","chicken_face"],"🐓":["rooster"],"🐣":["hatching_chick"],"🐤":["baby_chick"],"🐥":["hatched_chick"],"🐦️":["bird","bird_face"],"🐧":["penguin","penguin_face"],"🕊️":["dove"],"🦅":["eagle"],"🦆":["duck"],"🦢":["swan"],"🦉":["owl"],"🦤":["dodo"],"🪶":["feather"],"🦩":["flamingo"],"🦚":["peacock"],"🦜":["parrot"],"🐸":["frog","frog_face"],"🐊":["crocodile"],"🐢":["turtle"],"🦎":["lizard"],"🐍":["snake"],"🐲":["dragon_face"],"🐉":["dragon"],"🦕":["sauropod"],"🦖":["t-rex","trex"],"🐳":["spouting_whale"],"🐋":["whale"],"🐬":["dolphin"],"🦭":["seal"],"🐟️":["fish"],"🐠":["tropical_fish"],"🐡":["blowfish"],"🦈":["shark"],"🐙":["octopus"],"🐚":["shell"],"🪸":["coral"],"🐌":["snail"],"🦋":["butterfly"],"🐛":["bug"],"🐜":["ant"],"🐝":["bee"],"🪲":["beetle"],"🐞":["lady_beetle"],"🦗":["cricket"],"🪳":["cockroach"],"🕷️":["spider"],"🕸️":["spider_web"],"🦂":["scorpion"],"🦟":["mosquito"],"🪰":["fly"],"🪱":["worm"],"🦠":["microbe"],"💐":["bouquet"],"🌸":["cherry_blossom"],"💮":["white_flower"],"🪷":["lotus"],"🏵️":["rosette"],"🌹":["rose"],"🥀":["wilted_flower"],"🌺":["hibiscus"],"🌻":["sunflower"],"🌼":["blossom"],"🌷":["tulip"],"🌱":["seedling"],"🪴":["potted_plant"],"🌲":["evergreen_tree"],"🌳":["deciduous_tree"],"🌴":["palm_tree"],"🌵":["cactus"],"🌾":["ear_of_rice","sheaf_of_rice"],"🌿":["herb"],"☘️":["shamrock"],"🍀":["four_leaf_clover"],"🍁":["maple_leaf"],"🍂":["fallen_leaf"],"🍃":["leaves"],"🪹":["empty_nest","nest"],"🪺":["nest_with_eggs"],"🍇":["grapes"],"🍈":["melon"],"🍉":["watermelon"],"🍊":["orange","tangerine"],"🍋":["lemon"],"🍌":["banana"],"🍍":["pineapple"],"🥭":["mango"],"🍎":["apple","red_apple"],"🍏":["green_apple"],"🍐":["pear"],"🍑":["peach"],"🍒":["cherries"],"🍓":["strawberry"],"🫐":["blueberries"],"🥝":["kiwi"],"🍅":["tomato"],"🫒":["olive"],"🥥":["coconut"],"🥑":["avocado"],"🍆":["eggplant"],"🥔":["potato"],"🥕":["carrot"],"🌽":["corn","ear_of_corn"],"🌶️":["hot_pepper"],"🫑":["bell_pepper"],"🥒":["cucumber"],"🥬":["leafy_green"],"🥦":["broccoli"],"🧄":["garlic"],"🧅":["onion"],"🍄":["mushroom"],"🥜":["peanuts"],"🫘":["beans"],"🌰":["chestnut"],"🍞":["bread"],"🥐":["croissant"],"🥖":["baguette_bread"],"🫓":["flatbread"],"🥨":["pretzel"],"🥯":["bagel"],"🥞":["pancakes"],"🧇":["waffle"],"🧀":["cheese"],"🍖":["meat_on_bone"],"🍗":["poultry_leg"],"🥩":["cut_of_meat"],"🥓":["bacon"],"🍔":["hamburger"],"🍟":["french_fries","fries"],"🍕":["pizza"],"🌭":["hotdog"],"🥪":["sandwich"],"🌮":["taco"],"🌯":["burrito"],"🫔":["tamale"],"🥙":["stuffed_flatbread"],"🧆":["falafel"],"🥚":["egg"],"🍳":["cooking","fried_egg"],"🥘":["shallow_pan_of_food"],"🍲":["pot_of_food","stew"],"🫕":["fondue"],"🥣":["bowl_with_spoon"],"🥗":["green_salad","salad"],"🍿":["popcorn"],"🧈":["butter"],"🧂":["salt"],"🥫":["canned_food"],"🍱":["bento","bento_box"],"🍘":["rice_cracker"],"🍙":["rice_ball"],"🍚":["cooked_rice","rice"],"🍛":["curry","curry_rice"],"🍜":["ramen","steaming_bowl"],"🍝":["spaghetti"],"🍠":["sweet_potato"],"🍢":["oden"],"🍣":["sushi"],"🍤":["fried_shrimp"],"🍥":["fish_cake"],"🥮":["moon_cake"],"🍡":["dango"],"🥟":["dumpling"],"🥠":["fortune_cookie"],"🥡":["takeout_box"],"🦀":["crab"],"🦞":["lobster"],"🦐":["shrimp"],"🦑":["squid"],"🦪":["oyster"],"🍦":["icecream","soft_serve"],"🍧":["shaved_ice"],"🍨":["ice_cream"],"🍩":["doughnut"],"🍪":["cookie"],"🎂":["birthday","birthday_cake"],"🍰":["cake","shortcake"],"🧁":["cupcake"],"🥧":["pie"],"🍫":["chocolate_bar"],"🍬":["candy"],"🍭":["lollipop"],"🍮":["custard"],"🍯":["honey_pot"],"🍼":["baby_bottle"],"🥛":["glass_of_milk","milk"],"☕️":["coffee"],"🫖":["teapot"],"🍵":["tea"],"🍶":["sake"],"🍾":["champagne"],"🍷":["wine_glass"],"🍸️":["cocktail"],"🍹":["tropical_drink"],"🍺":["beer"],"🍻":["beers"],"🥂":["clinking_glasses"],"🥃":["tumbler_glass","whisky"],"🫗":["pour","pouring_liquid"],"🥤":["cup_with_straw"],"🧋":["boba_drink","bubble_tea"],"🧃":["beverage_box","juice_box"],"🧉":["mate"],"🧊":["ice","ice_cube"],"🥢":["chopsticks"],"🍽️":["fork_knife_plate"],"🍴":["fork_and_knife"],"🥄":["spoon"],"🔪":["knife"],"🫙":["jar"],"🏺":["amphora"],"🌍️":["earth_africa","earth_europe"],"🌎️":["earth_americas"],"🌏️":["earth_asia"],"🌐":["globe_with_meridians"],"🗺️":["world_map"],"🗾":["japan_map"],"🧭":["compass"],"🏔️":["mountain_snow"],"⛰️":["mountain"],"🌋":["volcano"],"🗻":["mount_fuji"],"🏕️":["camping"],"🏖️":["beach","beach_with_umbrella"],"🏜️":["desert"],"🏝️":["desert_island","island"],"🏞️":["national_park"],"🏟️":["stadium"],"🏛️":["classical_building"],"🏗️":["building_construction","construction_site"],"🧱":["bricks"],"🪨":["rock"],"🪵":["wood"],"🛖":["hut"],"🏘️":["homes","houses"],"🏚️":["derelict_house","house_abandoned"],"🏠️":["house"],"🏡":["house_with_garden"],"🏢":["office"],"🏣":["post_office"],"🏤":["european_post_office"],"🏥":["hospital"],"🏦":["bank"],"🏨":["hotel"],"🏩":["love_hotel"],"🏪":["convenience_store"],"🏫":["school"],"🏬":["department_store"],"🏭️":["factory"],"🏯":["japanese_castle"],"🏰":["castle","european_castle"],"💒":["wedding"],"🗼":["tokyo_tower"],"🗽":["statue_of_liberty"],"⛪️":["church"],"🕌":["mosque"],"🛕":["hindu_temple"],"🕍":["synagogue"],"⛩️":["shinto_shrine"],"🕋":["kaaba"],"⛲️":["fountain"],"⛺️":["tent"],"🌁":["foggy"],"🌃":["night_with_stars"],"🏙️":["cityscape"],"🌄":["sunrise_over_mountains"],"🌅":["sunrise"],"🌆":["city_dusk"],"🌇":["city_sunrise","city_sunset"],"🌉":["bridge_at_night"],"♨️":["hotsprings"],"🎠":["carousel_horse"],"🛝":["playground_slide","slide"],"🎡":["ferris_wheel"],"🎢":["roller_coaster"],"💈":["barber","barber_pole"],"🎪":["circus_tent"],"🚂":["steam_locomotive"],"🚃":["railway_car"],"🚄":["bullettrain_side"],"🚅":["bullettrain_front"],"🚆":["train"],"🚇️":["metro"],"🚈":["light_rail"],"🚉":["station"],"🚊":["tram"],"🚝":["monorail"],"🚞":["mountain_railway"],"🚋":["tram_car"],"🚌":["bus"],"🚍️":["oncoming_bus"],"🚎":["trolleybus"],"🚐":["minibus"],"🚑️":["ambulance"],"🚒":["fire_engine"],"🚓":["police_car"],"🚔️":["oncoming_police_car"],"🚕":["taxi"],"🚖":["oncoming_taxi"],"🚗":["car","red_car"],"🚘️":["oncoming_automobile"],"🚙":["blue_car","suv"],"🛻":["pickup_truck"],"🚚":["delivery_truck","truck"],"🚛":["articulated_lorry"],"🚜":["tractor"],"🏎️":["racing_car"],"🏍️":["motorcycle"],"🛵":["motor_scooter"],"🦽":["manual_wheelchair"],"🦼":["motorized_wheelchair"],"🛺":["auto_rickshaw"],"🚲️":["bicycle","bike"],"🛴":["scooter"],"🛹":["skateboard"],"🛼":["roller_skate"],"🚏":["busstop"],"🛣️":["motorway"],"🛤️":["railway_track"],"🛢️":["oil_drum"],"⛽️":["fuelpump"],"🛞":["wheel"],"🚨":["rotating_light"],"🚥":["traffic_light"],"🚦":["vertical_traffic_light"],"🛑":["octagonal_sign","stop_sign"],"🚧":["construction"],"⚓️":["anchor"],"🛟":["lifebuoy","ring_buoy"],"⛵️":["sailboat"],"🛶":["canoe"],"🚤":["speedboat"],"🛳️":["cruise_ship","passenger_ship"],"⛴️":["ferry"],"🛥️":["motorboat"],"🚢":["ship"],"✈️":["airplane"],"🛩️":["small_airplane"],"🛫":["airplane_departure"],"🛬":["airplane_arriving"],"🪂":["parachute"],"💺":["seat"],"🚁":["helicopter"],"🚟":["suspension_railway"],"🚠":["mountain_cableway"],"🚡":["aerial_tramway"],"🛰️":["satellite"],"🚀":["rocket"],"🛸":["flying_saucer"],"🛎️":["bellhop"],"🧳":["luggage"],"⌛️":["hourglass"],"⏳️":["hourglass_flowing_sand"],"⌚️":["watch"],"⏰":["alarm_clock"],"⏱️":["stopwatch"],"⏲️":["timer_clock"],"🕰️":["clock"],"🕛️":["clock12"],"🕧️":["clock1230"],"🕐️":["clock1"],"🕜️":["clock130"],"🕑️":["clock2"],"🕝️":["clock230"],"🕒️":["clock3"],"🕞️":["clock330"],"🕓️":["clock4"],"🕟️":["clock430"],"🕔️":["clock5"],"🕠️":["clock530"],"🕕️":["clock6"],"🕡️":["clock630"],"🕖️":["clock7"],"🕢️":["clock730"],"🕗️":["clock8"],"🕣️":["clock830"],"🕘️":["clock9"],"🕤️":["clock930"],"🕙️":["clock10"],"🕥️":["clock1030"],"🕚️":["clock11"],"🕦️":["clock1130"],"🌑":["new_moon"],"🌒":["waxing_crescent_moon"],"🌓":["first_quarter_moon"],"🌔":["waxing_gibbous_moon"],"🌕️":["full_moon"],"🌖":["waning_gibbous_moon"],"🌗":["last_quarter_moon"],"🌘":["waning_crescent_moon"],"🌙":["crescent_moon"],"🌚":["new_moon_with_face"],"🌛":["first_quarter_moon_with_face"],"🌜️":["last_quarter_moon_with_face"],"🌡️":["thermometer"],"☀️":["sun"],"🌝":["full_moon_with_face"],"🌞":["sun_with_face"],"🪐":["ringed_planet","saturn"],"⭐️":["star"],"🌟":["glowing_star","star2"],"🌠":["shooting_star","stars"],"🌌":["milky_way"],"☁️":["cloud"],"⛅️":["partly_sunny","sun_behind_cloud"],"⛈️":["stormy","thunder_cloud_and_rain"],"🌤️":["sun_behind_small_cloud","sunny"],"🌥️":["cloudy","sun_behind_large_cloud"],"🌦️":["sun_and_rain","sun_behind_rain_cloud"],"🌧️":["cloud_with_rain","rainy"],"🌨️":["cloud_with_snow","snowy"],"🌩️":["cloud_with_lightning","lightning"],"🌪️":["tornado"],"🌫️":["fog"],"🌬️":["wind_blowing_face"],"🌀":["cyclone"],"🌈":["rainbow"],"🌂":["closed_umbrella"],"☂️":["umbrella"],"☔️":["umbrella_with_rain"],"⛱️":["beach_umbrella","umbrella_on_ground"],"⚡️":["high_voltage","zap"],"❄️":["snowflake"],"☃️":["snowman2"],"⛄️":["snowman"],"☄️":["comet"],"🔥":["fire"],"💧":["droplet"],"🌊":["ocean","water_wave"],"🎃":["jack_o_lantern"],"🎄":["christmas_tree"],"🎆":["fireworks"],"🎇":["sparkler"],"🧨":["firecracker"],"✨":["sparkles"],"🎈":["balloon"],"🎉":["party","party_popper","tada"],"🎊":["confetti_ball"],"🎋":["tanabata_tree"],"🎍":["bamboo"],"🎎":["dolls"],"🎏":["carp_streamer","flags"],"🎐":["wind_chime"],"🎑":["moon_ceremony","rice_scene"],"🧧":["red_envelope"],"🎀":["ribbon"],"🎁":["gift"],"🎗️":["reminder_ribbon"],"🎟️":["admission_tickets","tickets"],"🎫":["ticket"],"🎖️":["military_medal"],"🏆️":["trophy"],"🏅":["sports_medal"],"🥇":["1st","first_place_medal"],"🥈":["2nd","second_place_medal"],"🥉":["3rd","third_place_medal"],"⚽️":["soccer"],"⚾️":["baseball"],"🥎":["softball"],"🏀":["basketball"],"🏐":["volleyball"],"🏈":["football"],"🏉":["rugby_football"],"🎾":["tennis"],"🥏":["flying_disc"],"🎳":["bowling"],"🏏":["cricket_game"],"🏑":["field_hockey"],"🏒":["hockey"],"🥍":["lacrosse"],"🏓":["ping_pong"],"🏸":["badminton"],"🥊":["boxing_glove"],"🥋":["martial_arts_uniform"],"🥅":["goal_net"],"⛳️":["golf"],"⛸️":["ice_skate"],"🎣":["fishing_pole","fishing_pole_and_fish"],"🤿":["diving_mask"],"🎽":["running_shirt","running_shirt_with_sash"],"🎿":["ski"],"🛷":["sled"],"🥌":["curling_stone"],"🎯":["bullseye","dart","direct_hit"],"🪀":["yo_yo"],"🪁":["kite"],"🎱":["8ball","billiards"],"🔮":["crystal_ball"],"🪄":["magic_wand"],"🧿":["nazar_amulet"],"🪬":["hamsa"],"🎮️":["controller","video_game"],"🕹️":["joystick"],"🎰":["slot_machine"],"🎲":["game_die"],"🧩":["jigsaw","puzzle_piece"],"🧸":["teddy_bear"],"🪅":["pinata"],"🪩":["disco","disco_ball","mirror_ball"],"🪆":["nesting_dolls"],"♠️":["spades"],"♥️":["hearts"],"♦️":["diamonds"],"♣️":["clubs"],"♟️":["chess_pawn"],"🃏":["black_joker"],"🀄️":["mahjong"],"🎴":["flower_playing_cards"],"🎭️":["performing_arts"],"🖼️":["frame_with_picture","framed_picture"],"🎨":["art","palette"],"🧵":["thread"],"🪡":["sewing_needle"],"🧶":["yarn"],"🪢":["knot"],"👓️":["eyeglasses","glasses"],"🕶️":["sunglasses"],"🥽":["goggles"],"🥼":["lab_coat"],"🦺":["safety_vest"],"👔":["necktie"],"👕":["shirt"],"👖":["jeans"],"🧣":["scarf"],"🧤":["gloves"],"🧥":["coat"],"🧦":["socks"],"👗":["dress"],"👘":["kimono"],"🥻":["sari"],"🩱":["one_piece_swimsuit"],"🩲":["briefs"],"🩳":["shorts"],"👙":["bikini"],"👚":["womans_clothes"],"👛":["purse"],"👜":["handbag"],"👝":["clutch_bag","pouch"],"🛍️":["shopping_bags"],"🎒":["backpack","school_satchel"],"🩴":["thong_sandal"],"👞":["mans_shoe"],"👟":["athletic_shoe","sneaker"],"🥾":["hiking_boot"],"🥿":["flat_shoe","womans_flat_shoe"],"👠":["high_heel"],"👡":["sandal"],"🩰":["ballet_shoes"],"👢":["boot"],"👑":["crown"],"👒":["womans_hat"],"🎩":["top_hat","tophat"],"🎓️":["graduation_cap","mortar_board"],"🧢":["billed_cap"],"🪖":["military_helmet"],"⛑️":["helmet_with_cross","rescue_worker_helmet"],"📿":["prayer_beads"],"💄":["lipstick"],"💍":["ring"],"💎":["gem"],"🔇":["mute","no_sound"],"🔈️":["low_volume","quiet_sound","speaker"],"🔉":["medium_volumne","sound"],"🔊":["high_volume","loud_sound"],"📢":["loudspeaker"],"📣":["mega","megaphone"],"📯":["postal_horn"],"🔔":["bell"],"🔕":["no_bell"],"🎼":["musical_score"],"🎵":["musical_note"],"🎶":["musical_notes","notes"],"🎙️":["studio_microphone"],"🎚️":["level_slider"],"🎛️":["control_knobs"],"🎤":["microphone"],"🎧️":["headphones"],"📻️":["radio"],"🎷":["saxophone"],"🪗":["accordion"],"🎸":["guitar"],"🎹":["musical_keyboard"],"🎺":["trumpet"],"🎻":["violin"],"🪕":["banjo"],"🥁":["drum"],"🪘":["long_drum"],"📱":["android","iphone","mobile_phone"],"📲":["calling","mobile_phone_arrow"],"☎️":["telephone"],"📞":["telephone_receiver"],"📟️":["pager"],"📠":["fax","fax_machine"],"🔋":["battery"],"🪫":["low_battery"],"🔌":["electric_plug"],"💻️":["laptop"],"🖥️":["computer","desktop_computer"],"🖨️":["printer"],"⌨️":["keyboard"],"🖱️":["computer_mouse"],"🖲️":["trackball"],"💽":["computer_disk","minidisc"],"💾":["floppy_disk"],"💿️":["cd","optical_disk"],"📀":["dvd"],"🧮":["abacus"],"🎥":["movie_camera"],"🎞️":["film_frames"],"📽️":["film_projector"],"🎬️":["clapper"],"📺️":["tv"],"📷️":["camera"],"📸":["camera_with_flash"],"📹️":["video_camera"],"📼":["vhs","videocassette"],"🔍️":["mag"],"🔎":["mag_right"],"🕯️":["candle"],"💡":["bulb","light_bulb"],"🔦":["flashlight"],"🏮":["izakaya_lantern","red_paper_lantern"],"🪔":["diya_lamp"],"📔":["notebook_with_decorative_cover"],"📕":["closed_book"],"📖":["book","open_book"],"📗":["green_book"],"📘":["blue_book"],"📙":["orange_book"],"📚️":["books"],"📓":["notebook"],"📒":["ledger"],"📃":["page_with_curl"],"📜":["scroll"],"📄":["page_facing_up"],"📰":["newspaper"],"🗞️":["rolled_up_newspaper"],"📑":["bookmark_tabs"],"🔖":["bookmark"],"🏷️":["label"],"💰️":["moneybag"],"🪙":["coin"],"💴":["yen"],"💵":["dollar"],"💶":["euro"],"💷":["pound"],"💸":["money_with_wings"],"💳️":["credit_card"],"🧾":["receipt"],"💹":["chart"],"✉️":["envelope"],"📧":["e-mail","email"],"📨":["incoming_envelope"],"📩":["envelope_with_arrow"],"📤️":["outbox_tray"],"📥️":["inbox_tray"],"📦️":["package"],"📫️":["mailbox"],"📪️":["mailbox_closed"],"📬️":["mailbox_with_mail"],"📭️":["mailbox_with_no_mail"],"📮":["postbox"],"🗳️":["ballot_box"],"✏️":["pencil"],"✒️":["black_nib"],"🖋️":["fountain_pen"],"🖊️":["pen"],"🖌️":["paintbrush"],"🖍️":["crayon"],"📝":["memo"],"💼":["briefcase"],"📁":["file_folder"],"📂":["open_file_folder"],"🗂️":["card_index_dividers"],"📅":["date"],"📆":["calendar"],"🗒️":["notepad_spiral"],"🗓️":["calendar_spiral"],"📇":["card_index"],"📈":["chart_increasing","chart_with_upwards_trend"],"📉":["chart_decreasing","chart_with_downwards_trend"],"📊":["bar_chart"],"📋️":["clipboard"],"📌":["pushpin"],"📍":["round_pushpin"],"📎":["paperclip"],"🖇️":["paperclips"],"📏":["straight_ruler"],"📐":["triangular_ruler"],"✂️":["scissors"],"🗃️":["card_file_box"],"🗄️":["file_cabinet"],"🗑️":["trashcan","wastebasket"],"🔒️":["lock","locked"],"🔓️":["unlock","unlocked"],"🔏":["lock_with_ink_pen","locked_with_pen"],"🔐":["closed_lock_with_key","locked_with_key"],"🔑":["key"],"🗝️":["old_key"],"🔨":["hammer"],"🪓":["axe"],"⛏️":["pick"],"⚒️":["hammer_and_pick"],"🛠️":["hammer_and_wrench"],"🗡️":["dagger"],"⚔️":["crossed_swords"],"🔫":["gun","pistol"],"🪃":["boomerang"],"🏹":["bow_and_arrow"],"🛡️":["shield"],"🪚":["carpentry_saw"],"🔧":["wrench"],"🪛":["screwdriver"],"🔩":["nut_and_bolt"],"⚙️":["gear"],"🗜️":["clamp","compression"],"⚖️":["scales"],"🦯":["probing_cane","white_cane"],"🔗":["link"],"⛓️":["chains"],"🪝":["hook"],"🧰":["toolbox"],"🧲":["magnet"],"🪜":["ladder"],"⚗️":["alembic"],"🧪":["test_tube"],"🧫":["petri_dish"],"🧬":["dna","double_helix"],"🔬":["microscope"],"🔭":["telescope"],"📡":["satellite_antenna"],"💉":["syringe"],"🩸":["drop_of_blood"],"💊":["pill"],"🩹":["adhesive_bandage","bandaid"],"🩼":["crutch"],"🩺":["stethoscope"],"🩻":["x-ray","xray"],"🚪":["door"],"🛗":["elevator"],"🪞":["mirror"],"🪟":["window"],"🛏️":["bed"],"🛋️":["couch_and_lamp"],"🪑":["chair"],"🚽":["toilet"],"🪠":["plunger"],"🚿":["shower"],"🛁":["bathtub"],"🪤":["mouse_trap"],"🪒":["razor"],"🧴":["lotion_bottle"],"🧷":["safety_pin"],"🧹":["broom"],"🧺":["basket"],"🧻":["roll_of_paper","toilet_paper"],"🪣":["bucket"],"🧼":["soap"],"🫧":["bubbles"],"🪥":["toothbrush"],"🧽":["sponge"],"🧯":["fire_extinguisher"],"🛒":["shopping_cart"],"🚬":["cigarette","smoking"],"⚰️":["coffin"],"🪦":["headstone"],"⚱️":["funeral_urn"],"🗿":["moai","moyai"],"🪧":["placard"],"🪪":["id_card"],"🏧":["atm"],"🚮":["litter_bin","put_litter_in_its_place"],"🚰":["potable_water"],"♿️":["handicapped","wheelchair"],"🚹️":["mens"],"🚺️":["womens"],"🚻":["bathroom","restroom"],"🚼️":["baby_symbol"],"🚾":["water_closet","wc"],"🛂":["passport_control"],"🛃":["customs"],"🛄":["baggage_claim"],"🛅":["left_luggage"],"⚠️":["warning"],"🚸":["children_crossing"],"⛔️":["no_entry"],"🚫":["no_entry_sign"],"🚳":["no_bicycles"],"🚭️":["no_smoking"],"🚯":["do_not_litter","no_littering"],"🚱":["non-potable_water"],"🚷":["no_pedestrians"],"📵":["no_mobile_phones"],"🔞":["no_one_under_18","underage"],"☢️":["radioactive"],"☣️":["biohazard"],"⬆️":["arrow_up"],"↗️":["arrow_upper_right"],"➡️":["arrow_right"],"↘️":["arrow_lower_right"],"⬇️":["arrow_down"],"↙️":["arrow_lower_left"],"⬅️":["arrow_left"],"↖️":["arrow_upper_left"],"↕️":["arrow_up_down"],"↔️":["left_right_arrow"],"↩️":["arrow_left_hook","leftwards_arrow_with_hook"],"↪️":["arrow_right_hook","rightwards_arrow_with_hook"],"⤴️":["arrow_heading_up"],"⤵️":["arrow_heading_down"],"🔃":["arrows_clockwise","clockwise"],"🔄":["arrows_counterclockwise","counterclockwise"],"🔙":["back"],"🔚":["end"],"🔛":["on"],"🔜":["soon"],"🔝":["top"],"🛐":["place_of_worship"],"⚛️":["atom","atom_symbol"],"🕉️":["om"],"✡️":["star_of_david"],"☸️":["wheel_of_dharma"],"☯️":["yin_yang"],"✝️":["latin_cross"],"☦️":["orthodox_cross"],"☪️":["star_and_crescent"],"☮️":["peace","peace_symbol"],"🕎":["menorah"],"🔯":["six_pointed_star"],"♈️":["aries"],"♉️":["taurus"],"♊️":["gemini"],"♋️":["cancer"],"♌️":["leo"],"♍️":["virgo"],"♎️":["libra"],"♏️":["scorpius"],"♐️":["sagittarius"],"♑️":["capricorn"],"♒️":["aquarius"],"♓️":["pisces"],"⛎":["ophiuchus"],"🔀":["shuffle","twisted_rightwards_arrows"],"🔁":["repeat"],"🔂":["repeat_one"],"▶️":["arrow_forward","play"],"⏩️":["fast_forward"],"⏭️":["next_track"],"⏯️":["play_pause"],"◀️":["arrow_backward","reverse"],"⏪️":["fast_reverse","rewind"],"⏮️":["previous_track"],"🔼":["arrow_up_small","up"],"⏫":["arrow_double_up","fast_up"],"🔽":["arrow_down_small","down"],"⏬":["arrow_double_down","fast_down"],"⏸️":["pause"],"⏹️":["stop"],"⏺️":["record"],"⏏️":["eject"],"🎦":["cinema"],"🔅":["dim_button","low_brightness"],"🔆":["bright_button","high_brightness"],"📶":["antenna_bars","signal_strength"],"📳":["vibration_mode"],"📴":["mobile_phone_off"],"♀️":["female","female_sign"],"♂️":["male","male_sign"],"⚧️":["transgender_symbol"],"✖️":["multiplication","multiply"],"➕":["plus"],"➖":["minus"],"➗":["divide","division"],"🟰":["heavy_equals_sign"],"♾️":["infinity"],"‼️":["bangbang","double_exclamation"],"⁉️":["exclamation_question","interrobang"],"❓️":["question"],"❔":["white_question"],"❕":["white_exclamation"],"❗️":["exclamation"],"〰️":["wavy_dash"],"💱":["currency_exchange"],"💲":["heavy_dollar_sign"],"⚕️":["medical","medical_symbol"],"♻️":["recycle","recycling_symbol"],"⚜️":["fleur-de-lis"],"🔱":["trident"],"📛":["name_badge"],"🔰":["beginner"],"⭕️":["hollow_red_circle","red_o"],"✅":["check_mark_button","white_check_mark"],"☑️":["ballot_box_with_check"],"✔️":["check_mark","heavy_check_mark"],"❌":["cross_mark","x"],"❎":["cross_mark_button","negative_squared_cross_mark"],"➰":["curly_loop"],"➿":["double_curly_loop","loop"],"〽️":["part_alternation_mark"],"✳️":["eight_spoked_asterisk"],"✴️":["eight_pointed_black_star"],"❇️":["sparkle"],"©️":["copyright"],"®️":["registered"],"™️":["tm","trade_mark"],"#️⃣":["hash","number_sign"],"*️⃣":["asterisk"],"0️⃣":["zero"],"1️⃣":["one"],"2️⃣":["two"],"3️⃣":["three"],"4️⃣":["four"],"5️⃣":["five"],"6️⃣":["six"],"7️⃣":["seven"],"8️⃣":["eight"],"9️⃣":["nine"],"🔟":["ten"],"🔠":["capital_abcd"],"🔡":["abcd"],"🔢":["1234"],"🔣":["symbols"],"🔤":["abc"],"🅰️":["a","a_blood"],"🆎":["ab","ab_blood"],"🅱️":["b","b_blood"],"🆑":["cl"],"🆒":["cool"],"🆓":["free"],"ℹ️":["info","information_source"],"🆔":["id"],"Ⓜ️":["m"],"🆕":["new"],"🆖":["ng"],"🅾️":["o","o_blood"],"🆗":["ok"],"🅿️":["parking"],"🆘":["sos"],"🆙":["up2"],"🆚":["vs"],"🈁":["ja_here","koko"],"🈂️":["ja_service_charge"],"🈷️":["ja_monthly_amount"],"🈶":["ja_not_free_of_carge"],"🈯️":["ja_reserved"],"🉐":["ideograph_advantage","ja_bargain"],"🈹":["ja_discount"],"🈚️":["ja_free_of_charge"],"🈲":["ja_prohibited"],"🉑":["accept","ja_acceptable"],"🈸":["ja_application"],"🈴":["ja_passing_grade"],"🈳":["ja_vacancy"],"㊗️":["congratulations","ja_congratulations"],"㊙️":["ja_secret","secret"],"🈺":["ja_open_for_business"],"🈵":["ja_no_vacancy"],"🔴":["red_circle"],"🟠":["orange_circle"],"🟡":["yellow_circle"],"🟢":["green_circle"],"🔵":["blue_circle"],"🟣":["purple_circle"],"🟤":["brown_circle"],"⚫️":["black_circle"],"⚪️":["white_circle"],"🟥":["red_square"],"🟧":["orange_square"],"🟨":["yellow_square"],"🟩":["green_square"],"🟦":["blue_square"],"🟪":["purple_square"],"🟫":["brown_square"],"⬛️":["black_large_square"],"⬜️":["white_large_square"],"◼️":["black_medium_square"],"◻️":["white_medium_square"],"◾️":["black_medium_small_square"],"◽️":["white_medium_small_square"],"▪️":["black_small_square"],"▫️":["white_small_square"],"🔶":["large_orange_diamond"],"🔷":["large_blue_diamond"],"🔸":["small_orange_diamond"],"🔹":["small_blue_diamond"],"🔺":["small_red_triangle"],"🔻":["small_red_triangle_down"],"💠":["diamond_shape_with_a_dot_inside","diamond_with_a_dot"],"🔘":["radio_button"],"🔳":["white_square_button"],"🔲":["black_square_button"],"🏁":["checkered_flag"],"🚩":["triangular_flag","triangular_flag_on_post"],"🎌":["crossed_flags"],"🏴":["black_flag"],"🏳️":["white_flag"],"🏳️🌈":["rainbow_flag"],"🏳️⚧️":["transgender_flag"],"🏴☠️":["jolly_roger","pirate_flag"],"🇦🇨":["ascension_island","flag_ac"],"🇦🇩":["andorra","flag_ad"],"🇦🇪":["flag_ae","united_arab_emirates"],"🇦🇫":["afghanistan","flag_af"],"🇦🇬":["antigua_barbuda","flag_ag"],"🇦🇮":["anguilla","flag_ai"],"🇦🇱":["albania","flag_al"],"🇦🇲":["armenia","flag_am"],"🇦🇴":["angola","flag_ao"],"🇦🇶":["antarctica","flag_aq"],"🇦🇷":["argentina","flag_ar"],"🇦🇸":["american_samoa","flag_as"],"🇦🇹":["austria","flag_at"],"🇦🇺":["australia","flag_au"],"🇦🇼":["aruba","flag_aw"],"🇦🇽":["aland_islands","flag_ax"],"🇦🇿":["azerbaijan","flag_az"],"🇧🇦":["bosnia_herzegovina","flag_ba"],"🇧🇧":["barbados","flag_bb"],"🇧🇩":["bangladesh","flag_bd"],"🇧🇪":["belgium","flag_be"],"🇧🇫":["burkina_faso","flag_bf"],"🇧🇬":["bulgaria","flag_bg"],"🇧🇭":["bahrain","flag_bh"],"🇧🇮":["burundi","flag_bi"],"🇧🇯":["benin","flag_bj"],"🇧🇱":["flag_bl","st_barthelemy"],"🇧🇲":["bermuda","flag_bm"],"🇧🇳":["brunei","flag_bn"],"🇧🇴":["bolivia","flag_bo"],"🇧🇶":["caribbean_netherlands","flag_bq"],"🇧🇷":["brazil","flag_br"],"🇧🇸":["bahamas","flag_bs"],"🇧🇹":["bhutan","flag_bt"],"🇧🇻":["bouvet_island","flag_bv"],"🇧🇼":["botswana","flag_bw"],"🇧🇾":["belarus","flag_by"],"🇧🇿":["belize","flag_bz"],"🇨🇦":["canada","flag_ca"],"🇨🇨":["cocos_islands","flag_cc"],"🇨🇩":["congo_kinshasa","flag_cd"],"🇨🇫":["central_african_republic","flag_cf"],"🇨🇬":["congo_brazzaville","flag_cg"],"🇨🇭":["flag_ch","switzerland"],"🇨🇮":["cote_divoire","flag_ci"],"🇨🇰":["cook_islands","flag_ck"],"🇨🇱":["chile","flag_cl"],"🇨🇲":["cameroon","flag_cm"],"🇨🇳":["china","flag_cn"],"🇨🇴":["colombia","flag_co"],"🇨🇵":["clipperton_island","flag_cp"],"🇨🇷":["costa_rica","flag_cr"],"🇨🇺":["cuba","flag_cu"],"🇨🇻":["cape_verde","flag_cv"],"🇨🇼":["curacao","flag_cw"],"🇨🇽":["christmas_island","flag_cx"],"🇨🇾":["cyprus","flag_cy"],"🇨🇿":["czech_republic","czechia","flag_cz"],"🇩🇪":["flag_de","germany"],"🇩🇬":["diego_garcia","flag_dg"],"🇩🇯":["djibouti","flag_dj"],"🇩🇰":["denmark","flag_dk"],"🇩🇲":["dominica","flag_dm"],"🇩🇴":["dominican_republic","flag_do"],"🇩🇿":["algeria","flag_dz"],"🇪🇦":["ceuta_melilla","flag_ea"],"🇪🇨":["ecuador","flag_ec"],"🇪🇪":["estonia","flag_ee"],"🇪🇬":["egypt","flag_eg"],"🇪🇭":["flag_eh","western_sahara"],"🇪🇷":["eritrea","flag_er"],"🇪🇸":["flag_es","spain"],"🇪🇹":["ethiopia","flag_et"],"🇪🇺":["european_union","flag_eu"],"🇫🇮":["finland","flag_fi"],"🇫🇯":["fiji","flag_fj"],"🇫🇰":["falkland_islands","flag_fk"],"🇫🇲":["flag_fm","micronesia"],"🇫🇴":["faroe_islands","flag_fo"],"🇫🇷":["flag_fr","france"],"🇬🇦":["flag_ga","gabon"],"🇬🇧":["flag_gb","uk","united_kingdom"],"🇬🇩":["flag_gd","grenada"],"🇬🇪":["flag_ge","georgia"],"🇬🇫":["flag_gf","french_guiana"],"🇬🇬":["flag_gg","guernsey"],"🇬🇭":["flag_gh","ghana"],"🇬🇮":["flag_gi","gibraltar"],"🇬🇱":["flag_gl","greenland"],"🇬🇲":["flag_gm","gambia"],"🇬🇳":["flag_gn","guinea"],"🇬🇵":["flag_gp","guadeloupe"],"🇬🇶":["equatorial_guinea","flag_gq"],"🇬🇷":["flag_gr","greece"],"🇬🇸":["flag_gs","south_georgia_south_sandwich_islands"],"🇬🇹":["flag_gt","guatemala"],"🇬🇺":["flag_gu","guam"],"🇬🇼":["flag_gw","guinea_bissau"],"🇬🇾":["flag_gy","guyana"],"🇭🇰":["flag_hk","hong_kong"],"🇭🇲":["flag_hm","heard_mcdonald_islands"],"🇭🇳":["flag_hn","honduras"],"🇭🇷":["croatia","flag_hr"],"🇭🇹":["flag_ht","haiti"],"🇭🇺":["flag_hu","hungary"],"🇮🇨":["canary_islands","flag_ic"],"🇮🇩":["flag_id","indonesia"],"🇮🇪":["flag_ie","ireland"],"🇮🇱":["flag_il","israel"],"🇮🇲":["flag_im","isle_of_man"],"🇮🇳":["flag_in","india"],"🇮🇴":["british_indian_ocean_territory","flag_io"],"🇮🇶":["flag_iq","iraq"],"🇮🇷":["flag_ir","iran"],"🇮🇸":["flag_is","iceland"],"🇮🇹":["flag_it","italy"],"🇯🇪":["flag_je","jersey"],"🇯🇲":["flag_jm","jamaica"],"🇯🇴":["flag_jo","jordan"],"🇯🇵":["flag_jp","japan"],"🇰🇪":["flag_ke","kenya"],"🇰🇬":["flag_kg","kyrgyzstan"],"🇰🇭":["cambodia","flag_kh"],"🇰🇮":["flag_ki","kiribati"],"🇰🇲":["comoros","flag_km"],"🇰🇳":["flag_kn","st_kitts_nevis"],"🇰🇵":["flag_kp","north_korea"],"🇰🇷":["flag_kr","south_korea"],"🇰🇼":["flag_kw","kuwait"],"🇰🇾":["cayman_islands","flag_ky"],"🇰🇿":["flag_kz","kazakhstan"],"🇱🇦":["flag_la","laos"],"🇱🇧":["flag_lb","lebanon"],"🇱🇨":["flag_lc","st_lucia"],"🇱🇮":["flag_li","liechtenstein"],"🇱🇰":["flag_lk","sri_lanka"],"🇱🇷":["flag_lr","liberia"],"🇱🇸":["flag_ls","lesotho"],"🇱🇹":["flag_lt","lithuania"],"🇱🇺":["flag_lu","luxembourg"],"🇱🇻":["flag_lv","latvia"],"🇱🇾":["flag_ly","libya"],"🇲🇦":["flag_ma","morocco"],"🇲🇨":["flag_mc","monaco"],"🇲🇩":["flag_md","moldova"],"🇲🇪":["flag_me","montenegro"],"🇲🇫":["flag_mf","st_martin"],"🇲🇬":["flag_mg","madagascar"],"🇲🇭":["flag_mh","marshall_islands"],"🇲🇰":["flag_mk","macedonia"],"🇲🇱":["flag_ml","mali"],"🇲🇲":["burma","flag_mm","myanmar"],"🇲🇳":["flag_mn","mongolia"],"🇲🇴":["flag_mo","macao","macau"],"🇲🇵":["flag_mp","northern_mariana_islands"],"🇲🇶":["flag_mq","martinique"],"🇲🇷":["flag_mr","mauritania"],"🇲🇸":["flag_ms","montserrat"],"🇲🇹":["flag_mt","malta"],"🇲🇺":["flag_mu","mauritius"],"🇲🇻":["flag_mv","maldives"],"🇲🇼":["flag_mw","malawi"],"🇲🇽":["flag_mx","mexico"],"🇲🇾":["flag_my","malaysia"],"🇲🇿":["flag_mz","mozambique"],"🇳🇦":["flag_na","namibia"],"🇳🇨":["flag_nc","new_caledonia"],"🇳🇪":["flag_ne","niger"],"🇳🇫":["flag_nf","norfolk_island"],"🇳🇬":["flag_ng","nigeria"],"🇳🇮":["flag_ni","nicaragua"],"🇳🇱":["flag_nl","netherlands"],"🇳🇴":["flag_no","norway"],"🇳🇵":["flag_np","nepal"],"🇳🇷":["flag_nr","nauru"],"🇳🇺":["flag_nu","niue"],"🇳🇿":["flag_nz","new_zealand"],"🇴🇲":["flag_om","oman"],"🇵🇦":["flag_pa","panama"],"🇵🇪":["flag_pe","peru"],"🇵🇫":["flag_pf","french_polynesia"],"🇵🇬":["flag_pg","papua_new_guinea"],"🇵🇭":["flag_ph","philippines"],"🇵🇰":["flag_pk","pakistan"],"🇵🇱":["flag_pl","poland"],"🇵🇲":["flag_pm","st_pierre_miquelon"],"🇵🇳":["flag_pn","pitcairn_islands"],"🇵🇷":["flag_pr","puerto_rico"],"🇵🇸":["flag_ps","palestinian_territories"],"🇵🇹":["flag_pt","portugal"],"🇵🇼":["flag_pw","palau"],"🇵🇾":["flag_py","paraguay"],"🇶🇦":["flag_qa","qatar"],"🇷🇪":["flag_re","reunion"],"🇷🇴":["flag_ro","romania"],"🇷🇸":["flag_rs","serbia"],"🇷🇺":["flag_ru","russia"],"🇷🇼":["flag_rw","rwanda"],"🇸🇦":["flag_sa","saudi_arabia"],"🇸🇧":["flag_sb","solomon_islands"],"🇸🇨":["flag_sc","seychelles"],"🇸🇩":["flag_sd","sudan"],"🇸🇪":["flag_se","sweden"],"🇸🇬":["flag_sg","singapore"],"🇸🇭":["flag_sh","st_helena"],"🇸🇮":["flag_si","slovenia"],"🇸🇯":["flag_sj","svalbard_jan_mayen"],"🇸🇰":["flag_sk","slovakia"],"🇸🇱":["flag_sl","sierra_leone"],"🇸🇲":["flag_sm","san_marino"],"🇸🇳":["flag_sn","senegal"],"🇸🇴":["flag_so","somalia"],"🇸🇷":["flag_sr","suriname"],"🇸🇸":["flag_ss","south_sudan"],"🇸🇹":["flag_st","sao_tome_principe"],"🇸🇻":["el_salvador","flag_sv"],"🇸🇽":["flag_sx","sint_maarten"],"🇸🇾":["flag_sy","syria"],"🇸🇿":["eswatini","flag_sz","swaziland"],"🇹🇦":["flag_ta","tristan_da_cunha"],"🇹🇨":["flag_tc","turks_caicos_islands"],"🇹🇩":["chad","flag_td"],"🇹🇫":["flag_tf","french_southern_territories"],"🇹🇬":["flag_tg","togo"],"🇹🇭":["flag_th","thailand"],"🇹🇯":["flag_tj","tajikistan"],"🇹🇰":["flag_tk","tokelau"],"🇹🇱":["flag_tl","timor_leste"],"🇹🇲":["flag_tm","turkmenistan"],"🇹🇳":["flag_tn","tunisia"],"🇹🇴":["flag_to","tonga"],"🇹🇷":["flag_tr","turkey_tr"],"🇹🇹":["flag_tt","trinidad_tobago"],"🇹🇻":["flag_tv","tuvalu"],"🇹🇼":["flag_tw","taiwan"],"🇹🇿":["flag_tz","tanzania"],"🇺🇦":["flag_ua","ukraine"],"🇺🇬":["flag_ug","uganda"],"🇺🇲":["flag_um","us_outlying_islands"],"🇺🇳":["flag_un","un","united_nations"],"🇺🇸":["flag_us","united_states","usa"],"🇺🇾":["flag_uy","uruguay"],"🇺🇿":["flag_uz","uzbekistan"],"🇻🇦":["flag_va","vatican_city"],"🇻🇨":["flag_vc","st_vincent_grenadines"],"🇻🇪":["flag_ve","venezuela"],"🇻🇬":["british_virgin_islands","flag_vg"],"🇻🇮":["flag_vi","us_virgin_islands"],"🇻🇳":["flag_vn","vietnam"],"🇻🇺":["flag_vu","vanuatu"],"🇼🇫":["flag_wf","wallis_futuna"],"🇼🇸":["flag_ws","samoa"],"🇽🇰":["flag_xk","kosovo"],"🇾🇪":["flag_ye","yemen"],"🇾🇹":["flag_yt","mayotte"],"🇿🇦":["flag_za","south_africa"],"🇿🇲":["flag_zm","zambia"],"🇿🇼":["flag_zw","zimbabwe"],"🏴":["england","flag_gbeng"],"🏴":["flag_gbsct","scotland"],"🏴":["flag_gbwls","wales"]}'),o=flarum.core.compat["common/extend"],i=flarum.core.compat["common/components/TextEditor"];var r=d.n(i);const _=flarum.core.compat["common/components/TextEditorButton"];var f=d.n(_);const c=flarum.core.compat["common/utils/KeyboardNavigatable"];var t=d.n(c);function l(d,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,e){return d.__proto__=e,d},l(d,e)}const s=flarum.core.compat["common/Fragment"];var g=function(d){var e,u;function a(){for(var e,u=arguments.length,a=new Array(u),n=0;n<u;n++)a[n]=arguments[n];return(e=d.call.apply(d,[this].concat(a))||this).items=[],e.active=!1,e.index=0,e.keyWasJustPressed=!1,e}u=d,(e=a).prototype=Object.create(u.prototype),e.prototype.constructor=e,l(e,u);var n=a.prototype;return n.view=function(){return m("ul",{className:"Dropdown-menu EmojiDropdown"},m("li",{className:"Dropdown-header"},app.translator.trans("flarum-emoji.forum.composer.type_to_search_text")),this.items.map((function(d){return m("li",{key:d.attrs.key},d)})))},n.show=function(d,e){this.$().show().css({left:d+"px",top:e+"px"}),this.active=!0},n.hide=function(){this.$().hide(),this.active=!1},n.navigate=function(d){var e=this;this.keyWasJustPressed=!0,this.setIndex(this.index+d,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((function(){return e.keyWasJustPressed=!1}),500)},n.complete=function(){this.$("li:not(.Dropdown-header)").eq(this.index).find("button").click()},n.setIndex=function(d,e){if(!this.keyWasJustPressed||e){var u=this.$(),a=u.find("li:not(.Dropdown-header)"),n=d;n<0?n=a.length-1:n>=a.length&&(n=0),this.index=n;var o=a.removeClass("active").eq(n).addClass("active");if(e){var i,r=u.scrollTop(),_=u.offset().top,f=_+u.outerHeight(),c=o.offset().top,t=c+o.outerHeight();c<_?i=r-_+c-parseInt(u.css("padding-top"),10):t>f&&(i=r-f+t+parseInt(u.css("padding-bottom"),10)),void 0!==i&&u.stop(!0).animate({scrollTop:i},100)}}},a}(d.n(s)()),b=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var e="string"==typeof d?parseInt(d,16):d;return e<65536?r(e):r(55296+((e-=65536)>>10),56320+(1023&e))},toCodePoint:h},onerror:function(){this.parentNode&&this.parentNode.replaceChild(_(this.alt,!1),this)},parse:function(e,u){return u&&"function"!=typeof u||(u={callback:u}),("string"==typeof e?s:l)(e,{callback:u.callback||f,attributes:"function"==typeof u.attributes?u.attributes:m,base:"string"==typeof u.base?u.base:d.base,ext:u.ext||d.ext,size:u.folder||(a=u.size||d.size,"number"==typeof a?a+"x"+a:a),className:u.className||d.className,onerror:u.onerror||d.onerror});var a},replace:b,test:function(d){u.lastIndex=0;var e=u.test(d);return u.lastIndex=0,e}},e={"&":"&","<":"<",">":">","'":"'",'"':"""},u=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,a=/\uFE0F/g,n=String.fromCharCode(8205),o=/[&<>'"]/g,i=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function _(d,e){return document.createTextNode(e?d.replace(a,""):d)}function f(d,e){return"".concat(e.base,e.size,"/",d,e.ext)}function c(d,e){for(var u,a,n=d.childNodes,o=n.length;o--;)3===(a=(u=n[o]).nodeType)?e.push(u):1!==a||"ownerSVGElement"in u||i.test(u.nodeName.toLowerCase())||c(u,e);return e}function t(d){return h(d.indexOf(n)<0?d.replace(a,""):d)}function l(d,e){for(var a,n,o,i,r,f,l,s,g,m,b,h,p,w=c(d,[]),k=w.length;k--;){for(o=!1,i=document.createDocumentFragment(),f=(r=w[k]).nodeValue,s=0;l=u.exec(f);){if((g=l.index)!==s&&i.appendChild(_(f.slice(s,g),!0)),h=t(b=l[0]),s=g+b.length,p=e.callback(h,e),h&&p){for(n in(m=new Image).onerror=e.onerror,m.setAttribute("draggable","false"),a=e.attributes(b,h))a.hasOwnProperty(n)&&0!==n.indexOf("on")&&!m.hasAttribute(n)&&m.setAttribute(n,a[n]);m.className=e.className,m.alt=b,m.src=p,o=!0,i.appendChild(m)}m||i.appendChild(_(b,!1)),m=null}o&&(s<f.length&&i.appendChild(_(f.slice(s),!0)),r.parentNode.replaceChild(i,r))}return d}function s(d,e){return b(d,(function(d){var u,a,n=d,i=t(d),r=e.callback(i,e);if(i&&r){for(a in n="<img ".concat('class="',e.className,'" ','draggable="false" ','alt="',d,'"',' src="',r,'"'),u=e.attributes(d,i))u.hasOwnProperty(a)&&0!==a.indexOf("on")&&-1===n.indexOf(" "+a+"=")&&(n=n.concat(" ",a,'="',u[a].replace(o,g),'"'));n=n.concat("/>")}return n}))}function g(d){return e[d]}function m(){return null}function b(d,e){return String(d).replace(u,e)}function h(d,e){for(var u=[],a=0,n=0,o=0;o<d.length;)a=d.charCodeAt(o++),n?(u.push((65536+(n-55296<<10)+(a-56320)).toString(16)),n=0):55296<=a&&a<=56319?n=a:u.push(a.toString(16));return u.join(e||"-")}}();const h=b;var p=String.fromCharCode(8205),w=/\uFE0F/g;function k(d){return h.convert.toCodePoint(d.indexOf(p)<0?d.replace(w,""):d)}const y="https://cdn.jsdelivr.net/gh/twitter/twemoji@"+/([0-9]+).[0-9]+.[0-9]+/g.exec(h.base)[1]+"/assets/";function v(d,e){var u="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(u)return(u=u.call(d)).next.bind(u);if(Array.isArray(d)||(u=function(d,e){if(d){if("string"==typeof d)return x(d,e);var u=Object.prototype.toString.call(d).slice(8,-1);return"Object"===u&&d.constructor&&(u=d.constructor.name),"Map"===u||"Set"===u?Array.from(d):"Arguments"===u||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?x(d,e):void 0}}(d))||e&&d&&"number"==typeof d.length){u&&(d=u);var a=0;return function(){return a>=d.length?{done:!0}:{done:!1,value:d[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(d,e){(null==e||e>d.length)&&(e=d.length);for(var u=0,a=new Array(e);u<e;u++)a[u]=d[u];return a}const j=flarum.core.compat["common/models/Post"];var z=d.n(j),q={base:y,attributes:function(){return{loading:"lazy"}}};const C={"emoji/fragments/AutocompleteDropdown":g,"emoji/helpers/getEmojiIconCode":k},O=flarum.core;a().initializers.add("flarum-emoji",(function(){var d,e,u;d=Object.keys(n),e=$('<div class="ComposerBody-emojiDropdownContainer"></div>'),u=new g,(0,o.extend)(r().prototype,"oncreate",(function(){var d=this.$(".TextEditor-editor").wrap('<div class="ComposerBody-emojiWrapper"></div>');this.navigator=new(t()),this.navigator.when((function(){return u.active})).onUp((function(){return u.navigate(-1)})).onDown((function(){return u.navigate(1)})).onSelect(u.complete.bind(u)).onCancel(u.hide.bind(u)).bindTo(d),d.after(e)})),(0,o.extend)(r().prototype,"buildEditorParams",(function(a){var o,i,r,_=this;a.inputListeners.push((function(){var a=_.attrs.composer.editor.getSelectionRange(),f=a[0];if(!(a[1]-f>0)){var c=_.attrs.composer.editor.getLastNChars(15);i=0;for(var t=c.length-1;t>=0;t--){var l=c.substr(t,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(l))break;if(":"===l&&(0==t||/\s/.test(c.substr(t-1,1)))){o=t+1,i=f-c.length+t+1;break}}if(u.hide(),u.active=!1,i){r=c.substring(o).toLowerCase();var s=function(d){var e=d.emoji,a=d.name,n=d.code;return m("button",{key:e,onclick:function(){return d=e,_.attrs.composer.editor.replaceBeforeCursor(i-1,d+" "),void u.hide();var d},onmouseenter:function(){u.setIndex($(this).parent().index()-1)}},m("img",{alt:e,className:"emoji",draggable:"false",loading:"lazy",src:y+"72x72/"+n+".png"}),a)};!function(){var a,o,f=[],c=(a=r,o=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g"),new RegExp("(.*)"+a.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(o,"(\\$1)")+"$","i")),t=7,l=function(e){for(var u=0;u<d.length&&t>0;u++){var a=d[u];if(-1===f.indexOf(a))for(var o,i=v(n[a]);!(o=i()).done;)if(e(o.value)){--t,f.push(a);break}}};l((function(d){return 0===d.indexOf(r)})),l((function(d){return c.test(d)}));var g=f.map((function(d){return{emoji:d,name:n[d][0],code:k(d)}})).map(s);if(g.length){u.items=g,m.render(e[0],u.render()),u.show();var b=_.attrs.composer.editor.getCaretCoordinates(i),h=u.$().outerWidth(),p=u.$().outerHeight(),w=u.$().offsetParent(),y=b.left,x=b.top+15;x+p>w.height()&&(x=b.top-p-15),y+h>w.width()&&(y=w.width()-h),x=Math.max(-(w.offset().top-$(document).scrollTop()),x),y=Math.max(-w.offset().left,y),u.show(y,x)}}(),u.setIndex(0),u.$().scrollTop(0),u.active=!0}}}))})),(0,o.extend)(r().prototype,"toolbarItems",(function(d){var e=this;d.add("emoji",m(f(),{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" :")},icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))})),(0,o.override)(z().prototype,"contentHtml",(function(d){var e,u,a=d();if(this.oldContentHtml!==a){var n=h.parse((e=a,(u=document.implementation.createHTMLDocument()).body.innerHTML=e,u.body),q);this.emojifiedContentHtml=n.innerHTML,this.oldContentHtml=a}return this.emojifiedContentHtml})),(0,o.override)(s9e.TextFormatter,"preview",(function(d,e,u){d(e,u),h.parse(u,q)}))})),Object.assign(O.compat,C)})(),module.exports=e})();
|
||
|
||
|
||
flarum.extensions['flarum-emoji']=module.exports;
|
||
|
||
var module={};
|
||
|
||
/*! For license information please see forum.js.LICENSE.txt */
|
||
(()=>{var t={24:(t,e,r)=>{var n=r(735).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),a=new F(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function v(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var d="suspendedStart",m="suspendedYield",g="executing",y="completed",w={};function b(){}function k(){}function x(){}var L={};f(L,c,(function(){return this}));var E=Object.getPrototypeOf,_=E&&E(E(T([])));_&&_!==o&&a.call(_,c)&&(L=_);var P=x.prototype=b.prototype=Object.create(L);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(i,o,s,u){var c=v(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==n(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function A(t,r,n){var i=d;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=S(s,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var c=v(t,r,n);if("normal"===c.type){if(i=n.done?y:m,c.arg===w)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function S(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var o=v(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,w;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(a.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return k.prototype=x,s(P,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:k,configurable:!0}),k.displayName=f(x,h,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===k||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,h,"GeneratorFunction")),t.prototype=Object.create(P),t},r.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new j(p(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(P),f(P,h,"Generator"),f(P,c,(function(){return this})),f(P,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,w):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),w},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),w}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},735:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},183:(t,e,r)=>{var n=r(24)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";const t=flarum.core.compat["forum/app"];var e=r.n(t);const n=flarum.core.compat["common/extend"],i=flarum.core.compat["forum/components/CommentPost"];var o=r.n(i);function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}const s=flarum.core.compat["common/Component"];var u=r.n(s);const c=flarum.core.compat["common/helpers/icon"];var l=r.n(c);const h=flarum.core.compat["common/utils/classList"];var f=r.n(h);const p=flarum.core.compat["common/components/LoadingIndicator"];var v=r.n(p);function d(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)}))}}var y=r(183),w=r.n(y),b=new Map;const k=new(function(){function t(){this.queue=void 0,this.timeout=void 0,this.processing=void 0,this.BATCH_DELAY=void 0,this.queue=new Map,this.timeout=null,this.processing=!1,this.BATCH_DELAY=50,this.setupCacheCleanup()}var r=t.prototype;return r.add=function(t,r){e().forum.attribute("datlechin-link-preview.enableBatchRequests")?b.has(t)?r(b.get(t)):(this.queue.has(t)||this.queue.set(t,[]),this.queue.get(t).push(r),this.scheduleProcessing()):this.fetchSingle(t,r)},r.scheduleProcessing=function(){var t=this;this.timeout||(this.timeout=setTimeout((function(){return t.process()}),this.BATCH_DELAY))},r.fetchSingle=function(){var t=g(w().mark((function t(r,n){var i;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e().request({url:e().forum.attribute("apiUrl")+"/datlechin-link-preview",method:"GET",params:{url:r}});case 3:i=t.sent,n(i),b.set(r,i),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),n({error:"Failed to fetch preview"});case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e,r){return t.apply(this,arguments)}}(),r.process=function(){var t=g(w().mark((function t(){var e,r,n;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.processing&&0!==this.queue.size){t.next=2;break}return t.abrupt("return");case 2:return this.processing=!0,this.timeout=null,e=Array.from(this.queue.keys()),r=Array.from(this.queue.values()),this.queue.clear(),t.prev=7,t.next=10,this.fetchBatch(e);case 10:n=t.sent,this.handleSuccess(n,r),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),this.handleError(r);case 17:this.processing=!1,this.queue.size>0&&this.scheduleProcessing();case 19:case"end":return t.stop()}}),t,this,[[7,14]])})));return function(){return t.apply(this,arguments)}}(),r.fetchBatch=function(){var t=g(w().mark((function t(r){return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e().request({url:e().forum.attribute("apiUrl")+"/datlechin-link-preview/batch",method:"POST",body:{urls:r}});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),r.handleSuccess=function(t,e){Object.entries(t).forEach((function(t,r){var n=t[0],i=t[1];b.set(n,i),e[r].forEach((function(t){return t(i)}))}))},r.handleError=function(t){var e={error:"Failed to fetch preview"};t.forEach((function(t){return t.forEach((function(t){return t(e)}))}))},r.setupCacheCleanup=function(){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&b.clear()}))},r.clearCache=function(){b.clear()},r.getCacheSize=function(){return b.size},t}());var x=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).loading=void 0,e.link=void 0,e.linkAttributes=void 0,e.linkClasses=void 0,e.data=void 0,e.useGoogleFavicons=void 0,e}var r,n;n=t,(r=e).prototype=Object.create(n.prototype),r.prototype.constructor=r,a(r,n);var i=e.prototype;return i.oninit=function(e){t.prototype.oninit.call(this,e);var r=e.attrs;this.loading=!0,this.link=r.link,this.link.classList.add("LinkPreview-captured"),this.linkAttributes=Object.assign.apply(Object,[{}].concat(Array.from(this.link.attributes,(function(t){var e,r=t.name,n=t.value;return(e={})[r]=n,e})))),this.linkClasses=this.linkAttributes.class||"",this.linkAttributes.target=r.openLinksInNewTab?"_blank":"_self",delete this.linkAttributes.class,this.data=null,this.useGoogleFavicons=r.useGoogleFavicons,this.fetchData()},i.view=function(){var t,e,r,n,i,o,a={loading:this.loading};return m("div",{className:f()("LinkPreview",a)},this.loading||this.getImage()?m("div",{className:"LinkPreview-image"},this.loading?m(v(),{display:"unset",containerClassName:f()("LinkPreview-loading",this.loading&&"active"),size:"small"}):m("img",{src:this.getImage(),"data-link-preview":!0})):null,m("div",{className:"LinkPreview-main"},m("div",{className:"LinkPreview-title"},this.getLink(null!=(t=null==(e=this.data)?void 0:e.title)?t:null==(r=this.data)?void 0:r.error)),m("div",{className:"LinkPreview-description"},this.loading?"":null!=(n=null==(i=this.data)?void 0:i.description)?n:""),m("div",{className:"LinkPreview-domain"},this.useGoogleFavicons?m("img",{src:this.getFavicon(),"data-link-preview":!0}):l()("fas fa-external-link-alt"),this.getLink(null==(o=this.data)?void 0:o.site_name))))},i.oncreate=function(t){this.link.parentNode&&this.link.parentNode.insertBefore(t.dom,this.link)},i.getLink=function(t){return m("a",Object.assign({},this.linkAttributes,{className:f()("LinkPreview-link",this.linkClasses)}),this.loading?this.getDomain():null!=t?t:this.getDomain())},i.getHref=function(){return this.link.href},i.getDomain=function(){return this.getHref().split("/")[2]},i.getImage=function(){var t;return(null==(t=this.data)?void 0:t.image)||this.getFavicon()},i.getFavicon=function(){return this.useGoogleFavicons?"https://www.google.com/s2/favicons?sz=64&domain_url="+this.getDomain():null},i.fetchData=function(){var t=this;k.add(this.getHref(),(function(e){t.setData(e),t.loading=!1,m.redraw()}))},i.setData=function(t){this.data=t,m.redraw()},e}(u());function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}e().initializers.add("datlechin/flarum-link-preview",(function(){(0,n.extend)(o().prototype,"refreshContent",(function(){var t,r,n,i=function(t){var r=e().forum.attribute(t);return r?r.split(/[,\n]/).map((function(t){return t.trim()})):[]},o=function(t,e){if(0===e.length)return!1;if(e.includes(t))return!0;for(var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(r=n()).done;){var i=r.value.replace(/[-\[\]\/{}()*+?.\\^$|]/g,"\\$&").replace("\\*",".*").replace("\\?",".");if(t.match(new RegExp(i,"i")))return!0}return!1},a=i("datlechin-link-preview.blacklist"),s=i("datlechin-link-preview.whitelist"),u=null!=(t=e().forum.attribute("datlechin-link-preview.convertMediaURLs"))&&t,c=null!=(r=e().forum.attribute("datlechin-link-preview.useGoogleFavicons"))&&r,l=null!=(n=e().forum.attribute("datlechin-link-preview.openLinksInNewTab"))&&n,h=[".PostMention",".UserMention",".LinkPreview-link",".LinkPreview-captured"].map((function(t){return":not("+t+")"})).join("");this.element.querySelectorAll(".Post-body a[rel]"+h).forEach((function(t){var e,r,n=t.href.replace(/^https?:\/\/(.+?)\/?$/i,"$1");s.length&&!o(n,s)||a.length&&o(n,a)||t.href.replace(/\/$/,"")!==(null!=(e=null==(r=t.textContent)?void 0:r.replace(/\/$/,""))?e:"")||u&&n.match(/\.(jpe?g|png|gif|svg|webp|mp3|mp4|m4a|wav)$/)||m.mount(t,{view:function(){return m(x,{link:t,useGoogleFavicons:c,openLinksInNewTab:l})}})}))}))}))})(),module.exports={}})();
|
||
|
||
|
||
flarum.extensions['datlechin-link-preview']=module.exports;
|
||
|
||
var module={};
|
||
|
||
(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var e in n)o.o(n,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{components:()=>B});const n=flarum.core.compat["forum/app"];var e=o.n(n);const a=flarum.core.compat["common/extend"],r=flarum.core.compat["common/Application"];var s=o.n(r);function i(o,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},i(o,t)}function c(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,i(o,t)}const l=flarum.core.compat["common/Component"];var u=o.n(l);const p=flarum.core.compat["common/helpers/listItems"];var f=o.n(p);const d=flarum.core.compat["common/utils/ItemList"];var b=o.n(d);const v=flarum.core.compat["common/components/LinkButton"];var y=o.n(v);const h=flarum.core.compat["common/components/Button"];var g=o.n(h);const w=flarum.core.compat["forum/components/LogInModal"];var O=o.n(w),_=function(o){function t(){return o.apply(this,arguments)||this}return c(t,o),t.prototype.view=function(o){var t=this.attrs,n=t.route,e=t.icon,a=t.label;return m(y(),{href:n,icon:e,title:a},a)},t}(u());const M=flarum.core.compat["forum/components/SessionDropdown"];var N=o.n(M);const j=flarum.core.compat["common/helpers/avatar"];var x=o.n(j),S=function(o){function t(){return o.apply(this,arguments)||this}return c(t,o),t.prototype.getButtonContent=function(){var o=e().session.user;return[x()(o)," ",m("span",{className:"Button-label"},e().translator.trans("acpl-mobile-tab.forum.profile"))]},t}(N()),T=function(o){function t(){return o.apply(this,arguments)||this}c(t,o);var n=t.prototype;return n.view=function(o){return m("nav",{className:"MobileTab"},m("ul",{className:"MobileTab-items"},f()(this.items().toArray())))},n.items=function(){var o=new(b());if(o.add("home",m(_,{route:"/",icon:"fas fa-home",label:e().translator.trans("acpl-mobile-tab.forum.home")}),100),"/all"===e().routes.index.path?o.add("all",m(_,{route:e().route("index"),icon:"fas fa-comments",label:e().translator.trans("acpl-mobile-tab.forum.all_discussions")}),90):"askvortsov-categories"in flarum.extensions?o.add("categories",m(_,{route:e().route("categories"),icon:"fas fa-th-list",label:e().translator.trans("acpl-mobile-tab.forum.categories")}),90):"flarum-tags"in flarum.extensions&&o.add("tags",m(_,{route:e().route("tags"),icon:"fas fa-tags",label:e().translator.trans("acpl-mobile-tab.forum.tags")}),90),e().session.user){var t=e().session.user.unreadNotificationCount();o.add("notifications",m(y(),{href:e().route("notifications"),icon:"fas fa-bell",title:e().translator.trans("acpl-mobile-tab.forum.notifications"),className:"Dropdown NotificationsDropdown"},t?m("span",{className:"NotificationsDropdown-unread"},t):"",e().translator.trans("acpl-mobile-tab.forum.notifications")),80),o.add("session",m(S,null),70)}else o.add("logIn",m(g(),{icon:"fas fa-user",className:"Button Button--link",onclick:function(){return e().modal.show(O(),{})}},e().translator.trans("acpl-mobile-tab.forum.log_in")),70);return o},t}(u()),B={MobileTab:T,MobileTabItem:_,MobileTabSessionDropdown:S};e().initializers.add("acpl/mobile-tab",(function(){(0,a.extend)(s().prototype,"mount",(function(){var o=document.createElement("div");m.mount(document.body.appendChild(o),T)}))}))})(),module.exports=t})();
|
||
|
||
|
||
flarum.extensions['acpl-mobile-tab']=module.exports;
|
||
|
||
//# sourceMappingURL=https://expatbase.net/assets/forum.js.map
|