mirror of
https://github.com/flarum/framework.git
synced 2025-02-09 00:47:57 +08:00
72 lines
220 KiB
JavaScript
72 lines
220 KiB
JavaScript
flarum.core=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=144)}([function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),o=function(){function t(t){void 0===t&&(t={}),this.element=void 0,this.props=void 0,this.props=t}var e=t.prototype;return e.view=function(t){throw new Error("Component#view must be implemented by subclass")},e.oninit=function(t){this.setProps(t.attrs)},e.oncreate=function(t){this.setProps(t.attrs),this.element=t.dom},e.onbeforeupdate=function(t){this.setProps(t.attrs)},e.onupdate=function(t){this.setProps(t.attrs)},e.onbeforeremove=function(t){this.setProps(t.attrs)},e.onremove=function(t){this.setProps(t.attrs)},e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){return m(this,this.props)},t.component=function(t,e){void 0===t&&(t={});var n=Object(r.a)({},t);return e&&(n.children=e),m(this,n)},t.initProps=function(t){void 0===t&&(t={})},e.setProps=function(t){this.constructor.initProps(t),this.props=t},t}()},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r,o,i){return{tag:t,key:e,attrs:n,children:r,text:o,dom:i,domSize:void 0,state:void 0,events:void 0,instance:void 0}}r.normalize=function(t){return Array.isArray(t)?r("[",void 0,void 0,r.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:r("#",void 0,void 0,String(t),void 0,void 0)},r.normalizeChildren=function(t){var e=[];if(t.length){for(var n=null!=t[0]&&null!=t[0].key,o=1;o<t.length;o++)if((null!=t[o]&&null!=t[o].key)!==n)throw new TypeError("Vnodes must either always have keys or never have keys!");for(o=0;o<t.length;o++)e[o]=r.normalize(t[o])}return e},t.exports=r},function(t,e){t.exports=m},function(t,e,n){"use strict";var r=n(13);t.exports=n(43)(r,requestAnimationFrame,console)},function(t,e,n){"use strict";var r=n(14),o=n(15);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("?"),i=t.indexOf("#"),a=i<0?t.length:i,s=n<0?a:n,c=t.slice(0,s),u={};o(u,e);var l=c.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete u[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),f=l.indexOf("?"),p=l.indexOf("#"),d=p<0?l.length:p,h=f<0?d:f,m=l.slice(0,h);n>=0&&(m+=t.slice(n,a)),f>=0&&(m+=(n<0?"?":"&")+l.slice(f,d));var v=r(u);return v&&(m+=(n<0&&f<0?"?":"&")+v),i>=0&&(m+=t.slice(i)),p>=0&&(m+=(i<0?"":"&")+l.slice(p)),m}},function(t,e,n){"use strict";var r=n(16);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),o=n<0?t.length:n,i=e<0?o:e,a=t.slice(0,i).replace(/\/{2,}/g,"/");return a?("/"!==a[0]&&(a="/"+a),a.length>1&&"/"===a[a.length-1]&&(a=a.slice(0,-1))):a="/",{path:a,params:e<0?{}:r(t.slice(e+1,o))}}},function(t,e,n){"use strict";var r=n(3),o=n(9),i=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,a={},s={}.hasOwnProperty;function c(t){for(var e in t)if(s.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=o.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?function(t,e){var n=e.attrs,o=r.normalizeChildren(e.children),i=s.call(n,"class"),a=i?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!c(t.attrs)&&!c(n)){var u={};for(var l in n)s.call(n,l)&&(u[l]=n[l]);n=u}for(var l in t.attrs)s.call(t.attrs,l)&&"className"!==l&&!s.call(n,l)&&(n[l]=t.attrs[l]);for(var l in null==a&&null==t.attrs.className||(n.className=null!=a?null!=t.attrs.className?String(t.attrs.className)+" "+String(a):a:null!=t.attrs.className?t.attrs.className:null),i&&(n.class=null),n)if(s.call(n,l)&&"key"!==l){e.attrs=n;break}return Array.isArray(o)&&1===o.length&&null!=o[0]&&"#"===o[0].tag?e.text=o[0].children:e.children=o,e}(a[t]||function(t){for(var e,n="div",r=[],o={};e=i.exec(t);){var s=e[1],c=e[2];if(""===s&&""!==c)n=c;else if("#"===s)o.id=c;else if("."===s)r.push(c);else if("["===e[3][0]){var u=e[6];u&&(u=u.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(u):o[e[4]]=""===u?u:u||!0}}return r.length>0&&(o.className=r.join(" ")),a[t]={tag:n,attrs:o}}(t),e):(e.tag=t,e)}},function(t,e,n){"use strict";var r=n(3);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)}},function(t,e,n){"use strict";(function(e){var r=n(11);"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!==e?(void 0===e.Promise?e.Promise=r:e.Promise.prototype.finally||(e.Promise.prototype.finally=r.prototype.finally),t.exports=e.Promise):t.exports=r}).call(this,n(2))},function(t,e,n){"use strict";(function(e){var n=function t(n){if(!(this instanceof t))throw new Error("Promise must be called with `new`");if("function"!=typeof n)throw new TypeError("executor must be a function");var r=this,o=[],i=[],a=l(o,!0),s=l(i,!1),c=r._instance={resolvers:o,rejectors:i},u="function"==typeof e?e:setTimeout;function l(t,e){return function n(a){var l;try{if(!e||null==a||"object"!=typeof a&&"function"!=typeof a||"function"!=typeof(l=a.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",a);for(var r=0;r<t.length;r++)t[r](a);o.length=0,i.length=0,c.state=e,c.retry=function(){n(a)}}));else{if(a===r)throw new TypeError("Promise can't be resolved w/ itself");f(l.bind(a))}}catch(t){s(t)}}}function f(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(s);try{t(n(a),r)}catch(t){r(t)}}f(n)};n.prototype.then=function(t,e){var r,o,i=this._instance;function a(t,e,n,a){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){o&&o(t)}})),"function"==typeof i.retry&&a===i.state&&i.retry()}var s=new n((function(t,e){r=t,o=e}));return a(t,i.resolvers,r,!0),a(e,i.rejectors,o,!1),s},n.prototype.catch=function(t){return this.then(null,t)},n.prototype.finally=function(t){return this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){return n.reject(e)}))}))},n.resolve=function(t){return t instanceof n?t:new n((function(e){e(t)}))},n.reject=function(t){return new n((function(e,n){n(t)}))},n.all=function(t){return new n((function(e,n){var r=t.length,o=0,i=[];if(0===t.length)e([]);else for(var a=0;a<t.length;a++)!function(a){function s(t){o++,i[a]=t,o===r&&e(i)}null==t[a]||"object"!=typeof t[a]&&"function"!=typeof t[a]||"function"!=typeof t[a].then?s(t[a]):t[a].then(s,n)}(a)}))},n.race=function(t){return new n((function(e,n){for(var r=0;r<t.length;r++)t[r].then(e,n)}))},t.exports=n}).call(this,n(12).setImmediate)},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(40),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},function(t,e,n){"use strict";t.exports=n(42)(window)},function(t,e,n){"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 o=0;o<n.length;o++)r(t+"["+o+"]",n[o]);else if("[object Object]"===Object.prototype.toString.call(n))for(var o in n)r(t+"["+o+"]",n[o]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},function(t,e,n){"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},function(t,e,n){"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={},o=0;o<e.length;o++){var i=e[o].split("="),a=decodeURIComponent(i[0]),s=2===i.length?decodeURIComponent(i[1]):"";"true"===s?s=!0:"false"===s&&(s=!1);var c=a.split(/\]\[?|\[/),u=r;a.indexOf("[")>-1&&c.pop();for(var l=0;l<c.length;l++){var f=c[l],p=c[l+1],d=""==p||!isNaN(parseInt(p,10));if(""===f)null==n[a=c.slice(0,l).join()]&&(n[a]=Array.isArray(u)?u.length:0),f=n[a]++;else if("__proto__"===f)break;if(l===c.length-1)u[f]=s;else{var h=Object.getOwnPropertyDescriptor(u,f);null!=h&&(h=h.value),null==h&&(u[f]=h=d?[]:{}),u=h}}}return r}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";n(29),n(31),n(34),n(48),n(50),n(52),n(54),n(55),n(56),n(57);var r=function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},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},i=function(){var t=void 0,e=void 0,n=void 0,i=void 0,a=void 0,s=void 0,c=void 0,u=void 0,l=void 0,f=void 0,p=void 0,d=void 0;function h(t){return t.getBoundingClientRect().top+e}function m(n){l||(l=n),p=a(f=n-l,e,c,u),window.scrollTo(0,p),f<u?window.requestAnimationFrame(m):function(){window.scrollTo(0,e+c),t&&s&&(t.setAttribute("tabindex","-1"),t.focus());"function"==typeof d&&d();l=!1}()}return function(l){var f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(u=f.duration||1e3,i=f.offset||0,d=f.callback,a=f.easing||r,s=f.a11y||!1,e=window.scrollY||window.pageYOffset,void 0===l?"undefined":o(l)){case"number":t=void 0,s=!1,n=e+l;break;case"object":n=h(t=l);break;case"string":t=document.querySelector(l),n=h(t)}switch(c=n-e+i,o(f.duration)){case"number":u=f.duration;break;case"function":u=f.duration(c)}window.requestAnimationFrame(m)}}(),a=n(19);var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},c=function(){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,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},f=function(){function t(e,n){s(this,t),p.call(this),n=u({},l,n),e.jquery&&(e=e[0]),this.reference=e,this.options=n;var r="string"==typeof n.trigger?n.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(e,r,n)}return c(t,[{key:"_create",value:function(t,e,n,r){var o=window.document.createElement("div");o.innerHTML=e.trim();var i=o.childNodes[0];i.id="tooltip_"+Math.random().toString(36).substr(2,10),i.setAttribute("aria-hidden","false");var a=o.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,r,a),i}},{key:"_addTitleContent",value:function(t,e,n,r){if(1===e.nodeType||11===e.nodeType)n&&r.appendChild(e);else if((i=e)&&"[object Function]"==={}.toString.call(i)){var o=e.call(t);n?r.innerHTML=o:r.textContent=o}else n?r.innerHTML=e:r.textContent=e;
|
|
/**!
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
* @version 1.3.2
|
|
* @license
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
var i}},{key:"_show",value:function(t,e){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var n=t.getAttribute("title")||e.title;if(!n)return this;var r=this._create(t,e.template,n,e.html);t.setAttribute("aria-describedby",r.id);var o=this._findContainer(e.container,t);return this._append(r,o),this._popperOptions=u({},e.popperOptions,{placement:e.placement}),this._popperOptions.modifiers=u({},this._popperOptions.modifiers,{arrow:u({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:e.arrowSelector}),offset:u({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:e.offset})}),e.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:e.boundariesElement}),this.popperInstance=new a.a(t,r,this._popperOptions),this._tooltipNode=r,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach((function(e){var n=e.func,r=e.event;t.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var r=this,o=[],i=[];e.forEach((function(t){switch(t){case"hover":o.push("mouseenter"),i.push("mouseleave");break;case"focus":o.push("focus"),i.push("blur");break;case"click":o.push("click"),i.push("click")}})),o.forEach((function(e){var o=function(e){!0!==r._isOpening&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:o}),t.addEventListener(e,o)})),i.forEach((function(e){var o=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:o}),t.addEventListener(e,o),"click"===e&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(e){if(r._isOpening){var n=r.popperInstance.popper;t.contains(e.target)||n.contains(e.target)||o(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var r=this;this._isOpening=!0;var o=e&&e.show||e||0;this._showTimeout=window.setTimeout((function(){return r._show(t,n)}),o)}},{key:"_scheduleHide",value:function(t,e,n,r){var o=this;this._isOpening=!1;var i=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==o._isOpen&&document.body.contains(o._tooltipNode)){if("mouseleave"===r.type)if(o._setTooltipNodeEvent(r,t,e,n))return;o._hide(t,n)}}),i)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,n){1===n.nodeType||11===n.nodeType?e&&t.removeChild(n):e?t.innerHTML="":t.textContent=""}}]),t}(),p=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this._events=[],this._setTooltipNodeEvent=function(e,n,r,o){var i=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(i)&&(t._tooltipNode.addEventListener(e.type,(function r(i){var a=i.relatedreference||i.toElement||i.relatedTarget;t._tooltipNode.removeEventListener(e.type,r),n.contains(a)||t._scheduleHide(n,o.delay,o,i)})),!0)}},d=f;$.fn.tooltip=function(t){return this.each((function(){var e=$(this),n=e.data("bs.tooltip"),r="object"==typeof t&&t||{};e.attr("title")&&(r.title=e.attr("title"),e.removeAttr("title"),e.attr("data-original-title",r.title)),"destroy"===t&&(t="dispose"),!n&&["dispose","hide"].includes(t)||(n||e.data("bs.tooltip",n=new d(this,r)),"string"==typeof t&&n[t]&&n[t]())}))},["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));$.fn["outer"+e]=function(e){var n=this;if(n){var r=n[t]();return{width:["left","right"],height:["top","bottom"]}[t].forEach((function(t){e&&(r+=parseInt(n.css("margin-"+t),10))})),r}return null}})),$.expr[":"].input=function(){if("disabled"in this||["INPUT","SELECT","TEXTAREA","BUTTON"].includes(this.tagName))return this},$.fn.hover=function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)},$.fn.animatedScrollTop=function(t,e,n){return void 0===e&&(e=$.fx.speeds._default),"number"==typeof t&&(t-=window.scrollY||window.pageYOffset),i(t,{duration:$.fx.speeds[e]||e,callback:n}),this},$.fn.extend=$.extend.bind($),
|
|
/**
|
|
* Enable special events on Zepto
|
|
* @license Original Copyright 2013 Enideo. Released under dual MIT and GPL licenses.
|
|
*/
|
|
$.event.special=$.event.special||{};var h=$.fn.bind;$.fn.bind=function(t,e,n){var r=this;return n||(n=e,e=null),$.each(t.split(/\s/),(function(t,n){if((n=n.split(/\./)[0])in $.event.special){var o=$.event.special[n];o._init||(o._init=!0,o.originalHandler=o.handler,o.handler=function(){var t=Array.prototype.slice.call(arguments);t[0]=$.extend({},t[0]),$.event.handle=function(){var t=Array.prototype.slice.call(arguments),e=t[0],n=$(e.target);n.trigger.apply(n,arguments)},o.originalHandler.apply(this,t)}),o.setup.apply(r,[e])}return!0})),h.apply(this,[t,n])};n(58),n(61),n(62);var m,v,g=n(20),y=n.n(g),b=n(21),w=n.n(b),x=n(4),k=n.n(x),N=n(22),E=n.n(N),C=n(1);dayjs.extend(y.a),dayjs.extend(w.a),m=window.m,v=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];if(arguments[1]||(arguments[1]={}),t.prototype&&t.prototype instanceof C.a){var o=n.slice(1);1===o.length&&Array.isArray(o[0])&&(o=o[0]),o&&(Object.defineProperty(arguments[1],"children",{writable:!0}),arguments[1].children=(arguments[1].children||[]).concat(o))}var i=m.apply(this,arguments);return i.attrs||(i.attrs={}),i.attrs.bidi&&k.a.bidi(i,i.attrs.bidi),i.attrs.route&&(i.attrs.href=i.attrs.route,i.attrs.tag=k.a.route.Link,delete i.attrs.route),i},Object.keys(m).forEach((function(t){return v[t]=m[t]})),v.withAttr=function(t,e){return function(){e(this.getAttribute(t)||this[t])}},v.prop=E.a,window.m=v},function(t,e,n){"use strict";(function(t){for(
|
|
/**!
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
* @version 1.15.0
|
|
* @license
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Trident","Firefox"],o=0,i=0;i<r.length;i+=1)if(n&&navigator.userAgent.indexOf(r[i])>=0){o=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),o))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function c(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=c(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?t:l(u(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function m(t){return null!==t.parentNode?m(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,o=n?e:t,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,c=i.commonAncestorContainer;if(t!==c&&e!==c||r.contains(o))return"BODY"===(s=(a=c).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(c):c;var u=m(t);return u.host?v(u.host,e):v(t,m(e).host)}function g(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){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,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),N=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},E=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function C(t){return E({},t,{right:t.left+t.width,bottom:t.top+t.height})}function T(t){var e={};try{if(d(10)){e=t.getBoundingClientRect();var n=g(t,"top"),r=g(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i="HTML"===t.nodeName?w(t.ownerDocument):{},a=i.width||t.clientWidth||o.right-o.left,s=i.height||t.clientHeight||o.bottom-o.top,u=t.offsetWidth-a,l=t.offsetHeight-s;if(u||l){var f=c(t);u-=y(f,"x"),l-=y(f,"y"),o.width-=u,o.height-=l}return C(o)}function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=d(10),o="HTML"===e.nodeName,i=T(t),a=T(e),s=l(t),u=c(e),f=parseFloat(u.borderTopWidth,10),p=parseFloat(u.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=C({top:i.top-a.top-f,left:i.left-a.left-p,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!r&&o){var m=parseFloat(u.marginTop,10),v=parseFloat(u.marginLeft,10);h.top-=f-m,h.bottom-=f-m,h.left-=p-v,h.right-=p-v,h.marginTop=m,h.marginLeft=v}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),o=g(e,"left"),i=n?-1:1;return t.top+=r*i,t.bottom+=r*i,t.left+=o*i,t.right+=o*i,t}(h,e)),h}function O(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===c(e,"transform");)e=e.parentElement;return e||document.documentElement}function S(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?O(t):v(t,e);if("viewport"===r)i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=_(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left");return C({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i})}(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(u(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=_(s,a,o);if("HTML"!==s.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===c(e,"position"))return!0;var r=u(e);return!!r&&t(r)}(a))i=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;i.top+=f.top-f.marginTop,i.bottom=d+f.top,i.left+=f.left-f.marginLeft,i.right=h+f.left}}var m="number"==typeof(n=n||0);return i.left+=m?n:n.left||0,i.top+=m?n:n.top||0,i.right-=m?n:n.right||0,i.bottom-=m?n:n.bottom||0,i}function A(t,e,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=S(n,r,i,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},c=Object.keys(s).map((function(t){return E({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),u=c.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=u.length>0?u[0].key:c[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function j(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return _(n,r?O(e):v(e,n),r)}function P(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function M(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function D(t,e,n){n=n.split("-")[0];var r=P(t),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",c=i?"height":"width",u=i?"width":"height";return o[a]=e[a]+e[c]/2-r[c]/2,o[s]=n===s?e[s]-r[u]:e[M(s)],o}function L(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function $(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=L(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&s(n)&&(e.offsets.popper=C(e.offsets.popper),e.offsets.reference=C(e.offsets.reference),e=n(e,t))})),e}function I(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=A(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=D(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=$(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function B(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function R(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var o=e[r],i=o?""+o+n:t;if(void 0!==document.body.style[i])return i}return null}function U(){return this.state.isDestroyed=!0,B(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[R("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function F(t){var e=t.ownerDocument;return e?e.defaultView:window}function H(t,e,n,r){n.updateBound=r,F(t).addEventListener("resize",n.updateBound,{passive:!0});var o=l(t);return function t(e,n,r,o){var i="BODY"===e.nodeName,a=i?e.ownerDocument.defaultView:e;a.addEventListener(n,r,{passive:!0}),i||t(l(a.parentNode),n,r,o),o.push(a)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function z(){this.state.eventsEnabled||(this.state=H(this.reference,this.options,this.state,this.scheduleUpdate))}function q(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,F(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function Y(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function W(t,e){Object.keys(e).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Y(e[n])&&(r="px"),t.style[n]=e[n]+r}))}var K=n&&/Firefox/i.test(navigator.userAgent);function V(t,e,n){var r=L(t,(function(t){return t.name===e})),o=!!r&&t.some((function(t){return t.name===n&&t.enabled&&t.order<r.order}));if(!o){var i="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var Z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],G=Z.slice(3);function J(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=G.indexOf(t),r=G.slice(n+1).concat(G.slice(0,n));return e?r.reverse():r}var X={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Q(t,e,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(L(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(t,r){var o=(1===r?!i:i)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[e]/100*i}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}(t,o,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,r){Y(n)&&(o[e]+=n*("-"===t[r-1]?-1:1))}))})),o}var tt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var o=t.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",u=s?"width":"height",l={start:N({},c,i[c]),end:N({},c,i[c]+i[u]-a[u])};t.offsets.popper=E({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,o=t.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],c=void 0;return c=Y(+n)?[+n,0]:Q(n,i,a,s),"left"===s?(i.top+=c[0],i.left-=c[1]):"right"===s?(i.top+=c[0],i.left+=c[1]):"top"===s?(i.left+=c[0],i.top-=c[1]):"bottom"===s&&(i.left+=c[0],i.top+=c[1]),t.popper=i,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=R("transform"),o=t.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var c=S(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=i,o.left=a,o[r]=s,e.boundaries=c;var u=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]<c[t]&&!e.escapeWithReference&&(n=Math.max(l[t],c[t])),N({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=l[n];return l[t]>c[t]&&!e.escapeWithReference&&(r=Math.min(l[n],c[t]-("right"===t?l.width:l.height))),N({},n,r)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=E({},l,f[e](t))})),t.offsets.popper=l,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,o=t.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",c=a?"left":"top",u=a?"width":"height";return n[s]<i(r[c])&&(t.offsets.popper[c]=i(r[c])-n[u]),n[c]>i(r[s])&&(t.offsets.popper[c]=i(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!V(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],i=t.offsets,a=i.popper,s=i.reference,u=-1!==["left","right"].indexOf(o),l=u?"height":"width",f=u?"Top":"Left",p=f.toLowerCase(),d=u?"left":"top",h=u?"bottom":"right",m=P(r)[l];s[h]-m<a[p]&&(t.offsets.popper[p]-=a[p]-(s[h]-m)),s[p]+m>a[h]&&(t.offsets.popper[p]+=s[p]+m-a[h]),t.offsets.popper=C(t.offsets.popper);var v=s[p]+s[l]/2-m/2,g=c(t.instance.popper),y=parseFloat(g["margin"+f],10),b=parseFloat(g["border"+f+"Width"],10),w=v-t.offsets.popper[p]-y-b;return w=Math.max(Math.min(a[l]-m,w),0),t.arrowElement=r,t.offsets.arrow=(N(n={},p,Math.round(w)),N(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(B(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=M(r),i=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case X.FLIP:a=[r,o];break;case X.CLOCKWISE:a=J(r);break;case X.COUNTERCLOCKWISE:a=J(r,!0);break;default:a=e.behavior}return a.forEach((function(s,c){if(r!==s||a.length===c+1)return t;r=t.placement.split("-")[0],o=M(r);var u=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(u.right)>f(l.left)||"right"===r&&f(u.left)<f(l.right)||"top"===r&&f(u.bottom)>f(l.top)||"bottom"===r&&f(u.top)<f(l.bottom),d=f(u.left)<f(n.left),h=f(u.right)>f(n.right),m=f(u.top)<f(n.top),v=f(u.bottom)>f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===i&&d||y&&"end"===i&&h||!y&&"start"===i&&m||!y&&"end"===i&&v),w=!!e.flipVariationsByContent&&(y&&"start"===i&&h||y&&"end"===i&&d||!y&&"start"===i&&v||!y&&"end"===i&&m),x=b||w;(p||g||x)&&(t.flipped=!0,(p||g)&&(r=a[c+1]),x&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=r+(i?"-"+i:""),t.offsets.popper=E({},t.offsets.popper,D(t.instance.popper,t.offsets.reference,t.placement)),t=$(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),t.placement=M(e),t.offsets.popper=C(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!V(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=L(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,r=e.y,o=t.offsets.popper,i=L(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:e.gpuAcceleration,s=h(t.instance.popper),c=T(s),u={position:o.position},l=function(t,e){var n=t.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(t){return t},c=i(o.width),u=i(r.width),l=-1!==["left","right"].indexOf(t.placement),f=-1!==t.placement.indexOf("-"),p=e?l||f||c%2==u%2?i:a:s,d=e?i:s;return{left:p(c%2==1&&u%2==1&&!f&&e?r.left-1:r.left),top:d(r.top),bottom:d(r.bottom),right:p(r.right)}}(t,window.devicePixelRatio<2||!K),f="bottom"===n?"top":"bottom",p="right"===r?"left":"right",d=R("transform"),m=void 0,v=void 0;if(v="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-c.height+l.bottom:l.top,m="right"===p?"HTML"===s.nodeName?-s.clientWidth+l.right:-c.width+l.right:l.left,a&&d)u[d]="translate3d("+m+"px, "+v+"px, 0)",u[f]=0,u[p]=0,u.willChange="transform";else{var g="bottom"===f?-1:1,y="right"===p?-1:1;u[f]=v*g,u[p]=m*y,u.willChange=f+", "+p}var b={"x-placement":t.placement};return t.attributes=E({},b,t.attributes),t.styles=E({},u,t.styles),t.arrowStyles=E({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return W(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&W(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,r,o){var i=j(o,e,t,n.positionFixed),a=A(n.placement,i,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),W(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},et=function(){function t(e,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=E({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(E({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){r.options.modifiers[e]=E({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return E({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&s(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return k(t,[{key:"update",value:function(){return I.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return z.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),t}();et.Utils=("undefined"!=typeof window?window:t).PopperUtils,et.placements=Z,et.Defaults=tt,e.a=et}).call(this,n(2))},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype;n.en.relativeTime={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"};var o=function(t,e,r,o){for(var i,a,s=r.$locale().relativeTime,c=[{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"}],u=c.length,l=0;l<u;l+=1){var f=c[l];f.d&&(i=o?n(t).diff(r,f.d,!0):r.diff(t,f.d,!0));var p=Math.round(Math.abs(i));if(p<=f.r||!f.r){1===p&&l>0&&(f=c[l-1]),a=s[f.l].replace("%d",p);break}}return e?a:(i>0?s.future:s.past).replace("%s",a)};r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var i=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(i(this),t)},r.fromNow=function(t){return this.from(i(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var r=e.prototype,o=r.format,i={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"};n.en.formats=i,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,r=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,r){var o=r&&r.toUpperCase();return e||n[r]||i[r]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return o.call(this,r)}}}()},function(t,e,n){"use strict";t.exports=n(63)},function(t,e,n){var r=n(64),o=n(91),i=n(92),a="[object Null]",s="[object Undefined]",c=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:c&&c in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(68),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(67)(Object,"create");t.exports=r},function(t,e,n){var r=n(75);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(132);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){(function(e){t.exports=e.jQuery=n(30)}).call(this,n(2))},function(t,e,n){var r;(function(){var o;o=this,void 0===(r=function(){return function(t){var e=function(){var e,n,r,o,i,a,s=[],c=s.concat,u=s.filter,l=s.slice,f=t.document,p={},d={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},m=/^\s*<(\w+|!)[^>]*>/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,g=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,y=/^(?:body|html)$/i,b=/([A-Z])/g,w=["val","css","html","text","data","width","height","offset"],x=f.createElement("table"),k=f.createElement("tr"),N={tr:f.createElement("tbody"),tbody:x,thead:x,tfoot:x,td:k,th:k,"*":f.createElement("div")},E=/complete|loaded|interactive/,C=/^[\w-]*$/,T={},_=T.toString,O={},S=f.createElement("div"),A={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},j=Array.isArray||function(t){return t instanceof Array};function P(t){return null==t?String(t):T[_.call(t)]||"object"}function M(t){return"function"==P(t)}function D(t){return null!=t&&t==t.window}function L(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==P(t)}function I(t){return $(t)&&!D(t)&&Object.getPrototypeOf(t)==Object.prototype}function B(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!D(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function R(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function U(t){return t in d?d[t]:d[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function F(t,e){return"number"!=typeof e||h[R(t)]?e:e+"px"}function H(t){return"children"in t?l.call(t.children):r.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function z(t,e){var n,r=t?t.length:0;for(n=0;n<r;n++)this[n]=t[n];this.length=r,this.selector=e||""}function q(t,r,o){for(n in r)o&&(I(r[n])||j(r[n]))?(I(r[n])&&!I(t[n])&&(t[n]={}),j(r[n])&&!j(t[n])&&(t[n]=[]),q(t[n],r[n],o)):r[n]!==e&&(t[n]=r[n])}function Y(t,e){return null==e?r(t):r(t).filter(e)}function W(t,e,n,r){return M(e)?e.call(t,n,r):e}function K(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function V(t,n){var r=t.className||"",o=r&&r.baseVal!==e;if(n===e)return o?r.baseVal:r;o?r.baseVal=n:t.className=n}function Z(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function G(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)G(t.childNodes[n],e)}return O.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,o=t.parentNode,i=!o;return i&&(o=S).appendChild(t),r=~O.qsa(o,e).indexOf(t),i&&S.removeChild(t),r},i=function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},a=function(t){return u.call(t,(function(e,n){return t.indexOf(e)==n}))},O.fragment=function(t,n,o){var i,a,s;return v.test(t)&&(i=r(f.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(g,"<$1></$2>")),n===e&&(n=m.test(t)&&RegExp.$1),n in N||(n="*"),(s=N[n]).innerHTML=""+t,i=r.each(l.call(s.childNodes),(function(){s.removeChild(this)}))),I(o)&&(a=r(i),r.each(o,(function(t,e){w.indexOf(t)>-1?a[t](e):a.attr(t,e)}))),i},O.Z=function(t,e){return new z(t,e)},O.isZ=function(t){return t instanceof O.Z},O.init=function(t,n){var o,i;if(!t)return O.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&m.test(t))o=O.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=O.qsa(f,t)}else{if(M(t))return r(f).ready(t);if(O.isZ(t))return t;if(j(t))i=t,o=u.call(i,(function(t){return null!=t}));else if($(t))o=[t],t=null;else if(m.test(t))o=O.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);o=O.qsa(f,t)}}return O.Z(o,t)},(r=function(t,e){return O.init(t,e)}).extend=function(t){var e,n=l.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){q(t,n,e)})),t},O.qsa=function(t,e){var n,r="#"==e[0],o=!r&&"."==e[0],i=r||o?e.slice(1):e,a=C.test(i);return t.getElementById&&a&&r?(n=t.getElementById(i))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:l.call(a&&!r&&t.getElementsByClassName?o?t.getElementsByClassName(i):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=P,r.isFunction=M,r.isWindow=D,r.isArray=j,r.isPlainObject=I,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return s.indexOf.call(e,t,n)},r.camelCase=i,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,o,i,a,s=[];if(B(t))for(o=0;o<t.length;o++)null!=(n=e(t[o],o))&&s.push(n);else for(i in t)null!=(n=e(t[i],i))&&s.push(n);return(a=s).length>0?r.fn.concat.apply([],a):a},r.each=function(t,e){var n,r;if(B(t)){for(n=0;n<t.length;n++)if(!1===e.call(t[n],n,t[n]))return t}else for(r in t)if(!1===e.call(t[r],r,t[r]))return t;return t},r.grep=function(t,e){return u.call(t,e)},t.JSON&&(r.parseJSON=JSON.parse),r.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(t,e){T["[object "+e+"]"]=e.toLowerCase()})),r.fn={constructor:O.Z,length:0,forEach:s.forEach,reduce:s.reduce,push:s.push,sort:s.sort,splice:s.splice,indexOf:s.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=O.isZ(e)?e.toArray():e;return c.apply(O.isZ(this)?this.toArray():this,n)},map:function(t){return r(r.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return r(l.apply(this,arguments))},ready:function(t){return E.test(f.readyState)&&f.body?t(r):f.addEventListener("DOMContentLoaded",(function(){t(r)}),!1),this},get:function(t){return t===e?l.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return s.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return M(t)?this.not(this.not(t)):r(u.call(this,(function(e){return O.matches(e,t)})))},add:function(t,e){return r(a(this.concat(r(t,e))))},is:function(t){return this.length>0&&O.matches(this[0],t)},not:function(t){var n=[];if(M(t)&&t.call!==e)this.each((function(e){t.call(this,e)||n.push(this)}));else{var o="string"==typeof t?this.filter(t):B(t)&&M(t.item)?l.call(t):r(t);this.forEach((function(t){o.indexOf(t)<0&&n.push(t)}))}return r(n)},has:function(t){return this.filter((function(){return $(t)?r.contains(this,t):r(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:r(t)},find:function(t){var e=this;return t?"object"==typeof t?r(t).filter((function(){var t=this;return s.some.call(e,(function(e){return r.contains(e,t)}))})):1==this.length?r(O.qsa(this[0],t)):this.map((function(){return O.qsa(this,t)})):r()},closest:function(t,e){var n=[],o="object"==typeof t&&r(t);return this.each((function(r,i){for(;i&&!(o?o.indexOf(i)>=0:O.matches(i,t));)i=i!==e&&!L(i)&&i.parentNode;i&&n.indexOf(i)<0&&n.push(i)})),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,(function(t){if((t=t.parentNode)&&!L(t)&&e.indexOf(t)<0)return e.push(t),t}));return Y(e,t)},parent:function(t){return Y(a(this.pluck("parentNode")),t)},children:function(t){return Y(this.map((function(){return H(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(t){return Y(this.map((function(t,e){return u.call(H(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return r.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,p[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),p[t]=n),p[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=M(t);if(this[0]&&!e)var n=r(t).get(0),o=n.parentNode||this.length>1;return this.each((function(i){r(this).wrapAll(e?t.call(this,i):o?n.cloneNode(!0):n)}))},wrapAll:function(t){if(this[0]){var e;for(r(this[0]).before(t=r(t));(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=M(t);return this.each((function(n){var o=r(this),i=o.contents(),a=e?t.call(this,n):t;i.length?i.wrapAll(a):o.append(a)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()}))},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var n=this.innerHTML;r(this).empty().append(W(this,t,e,n))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=W(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var o;return"string"!=typeof t||1 in arguments?this.each((function(e){if(1===this.nodeType)if($(t))for(n in t)K(this,n,t[n]);else K(this,t,W(this,r,e,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(o=this[0].getAttribute(t))?o:e},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){K(this,t)}),this)}))},prop:function(t,e){return t=A[t]||t,1 in arguments?this.each((function(n){this[t]=W(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=A[t]||t,this.each((function(){delete this[t]}))},data:function(t,n){var r="data-"+t.replace(b,"-$1").toLowerCase(),o=1 in arguments?this.attr(r,n):this.attr(r);return null!==o?Z(o):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=W(this,t,e,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var n=r(this),o=W(this,e,t,n.offset()),i=n.offsetParent().offset(),a={top:o.top-i.top,left:o.left-i.left};"static"==n.css("position")&&(a.position="relative"),n.css(a)}));if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var o=this[0];if("string"==typeof t){if(!o)return;return o.style[i(t)]||getComputedStyle(o,"").getPropertyValue(t)}if(j(t)){if(!o)return;var a={},s=getComputedStyle(o,"");return r.each(t,(function(t,e){a[e]=o.style[i(e)]||s.getPropertyValue(e)})),a}}var c="";if("string"==P(t))e||0===e?c=R(t)+":"+F(t,e):this.each((function(){this.style.removeProperty(R(t))}));else for(n in t)t[n]||0===t[n]?c+=R(n)+":"+F(n,t[n])+";":this.each((function(){this.style.removeProperty(R(n))}));return this.each((function(){this.style.cssText+=";"+c}))},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&s.some.call(this,(function(t){return this.test(V(t))}),U(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){o=[];var n=V(this);W(this,t,e,n).split(/\s+/g).forEach((function(t){r(this).hasClass(t)||o.push(t)}),this),o.length&&V(this,n+(n?" ":"")+o.join(" "))}})):this},removeClass:function(t){return this.each((function(n){if("className"in this){if(t===e)return V(this,"");o=V(this),W(this,t,n,o).split(/\s+/g).forEach((function(t){o=o.replace(U(t)," ")})),V(this,o.trim())}}))},toggleClass:function(t,n){return t?this.each((function(o){var i=r(this);W(this,t,o,V(this)).split(/\s+/g).forEach((function(t){(n===e?!i.hasClass(t):n)?i.addClass(t):i.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),o=y.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,o.top+=parseFloat(r(e[0]).css("border-top-width"))||0,o.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-o.top,left:n.left-o.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||f.body;t&&!y.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var n=t.replace(/./,(function(t){return t[0].toUpperCase()}));r.fn[t]=function(o){var i,a=this[0];return o===e?D(a)?a["inner"+n]:L(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[t]:this.each((function(e){(a=r(this)).css(t,W(this,o,e,a[t]()))}))}})),["after","prepend","before","append"].forEach((function(n,o){var i=o%2;r.fn[n]=function(){var n,a,s=r.map(arguments,(function(t){var o=[];return"array"==(n=P(t))?(t.forEach((function(t){return t.nodeType!==e?o.push(t):r.zepto.isZ(t)?o=o.concat(t.get()):void(o=o.concat(O.fragment(t)))})),o):"object"==n||null==t?t:O.fragment(t)})),c=this.length>1;return s.length<1?this:this.each((function(e,n){a=i?n:n.parentNode,n=0==o?n.nextSibling:1==o?n.firstChild:2==o?n:null;var u=r.contains(f.documentElement,a);s.forEach((function(e){if(c)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),u&&G(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},r.fn[i?n+"To":"insert"+(o?"Before":"After")]=function(t){return r(t)[n](this),this}})),O.Z.prototype=z.prototype=r.fn,O.uniq=a,O.deserializeValue=Z,r.zepto=O,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){var n,r=1,o=Array.prototype.slice,i=e.isFunction,a=function(t){return"string"==typeof t},s={},c={},u="onfocusin"in t,l={focus:"focusin",blur:"focusout"},f={mouseenter:"mouseover",mouseleave:"mouseout"};function p(t){return t._zid||(t._zid=r++)}function d(t,e,n,r){if((e=h(e)).ns)var o=(i=e.ns,new RegExp("(?:^| )"+i.replace(" "," .* ?")+"(?: |$)"));var i;return(s[p(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||o.test(t.ns))&&(!n||p(t.fn)===p(n))&&(!r||t.sel==r)}))}function h(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!u&&t.e in l||!!e}function v(t){return f[t]||u&&l[t]||t}function g(t,r,o,i,a,c,u){var l=p(t),d=s[l]||(s[l]=[]);r.split(/\s/).forEach((function(r){if("ready"==r)return e(document).ready(o);var s=h(r);s.fn=o,s.sel=a,s.e in f&&(o=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return s.fn.apply(this,arguments)}),s.del=c;var l=c||o;s.proxy=function(e){if(!(e=N(e)).isImmediatePropagationStopped()){e.data=i;var r=l.apply(t,e._args==n?[e]:[e].concat(e._args));return!1===r&&(e.preventDefault(),e.stopPropagation()),r}},s.i=d.length,d.push(s),"addEventListener"in t&&t.addEventListener(v(s.e),s.proxy,m(s,u))}))}function y(t,e,n,r,o){var i=p(t);(e||"").split(/\s/).forEach((function(e){d(t,e,n,r).forEach((function(e){delete s[i][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,m(e,o))}))}))}c.click=c.mousedown=c.mouseup=c.mousemove="MouseEvents",e.event={add:g,remove:y},e.proxy=function(t,n){var r=2 in arguments&&o.call(arguments,2);if(i(t)){var s=function(){return t.apply(n,r?r.concat(o.call(arguments)):arguments)};return s._zid=p(t),s}if(a(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},w=function(){return!1},x=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,k={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function N(t,r){return!r&&t.isDefaultPrevented||(r||(r=t),e.each(k,(function(e,n){var o=r[e];t[e]=function(){return this[n]=b,o&&o.apply(r,arguments)},t[n]=w})),t.timeStamp||(t.timeStamp=Date.now()),(r.defaultPrevented!==n?r.defaultPrevented:"returnValue"in r?!1===r.returnValue:r.getPreventDefault&&r.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function E(t){var e,r={originalEvent:t};for(e in t)x.test(e)||t[e]===n||(r[e]=t[e]);return N(r,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,r,s,c,u){var l,f,p=this;return t&&!a(t)?(e.each(t,(function(t,e){p.on(t,r,s,e,u)})),p):(a(r)||i(c)||!1===c||(c=s,s=r,r=n),c!==n&&!1!==s||(c=s,s=n),!1===c&&(c=w),p.each((function(n,i){u&&(l=function(t){return y(i,t.type,c),c.apply(this,arguments)}),r&&(f=function(t){var n,a=e(t.target).closest(r,i).get(0);if(a&&a!==i)return n=e.extend(E(t),{currentTarget:a,liveFired:i}),(l||c).apply(a,[n].concat(o.call(arguments,1)))}),g(i,t,c,s,r,f||l)})))},e.fn.off=function(t,r,o){var s=this;return t&&!a(t)?(e.each(t,(function(t,e){s.off(t,r,e)})),s):(a(r)||i(o)||!1===o||(o=r,r=n),!1===o&&(o=w),s.each((function(){y(this,t,o,r)})))},e.fn.trigger=function(t,n){return(t=a(t)||e.isPlainObject(t)?e.Event(t):N(t))._args=n,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,o;return this.each((function(i,s){(r=E(a(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(t,e){if(o=e.proxy(r),r.isImmediatePropagationStopped())return!1}))})),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){a(t)||(t=(e=t).type);var n=document.createEvent(c[t]||"Events"),r=!0;if(e)for(var o in e)"bubbles"==o?r=!!e[o]:n[o]=e[o];return n.initEvent(t,r,!0),N(n)}}(e),function(e){var n,r,o=+new Date,i=t.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,c=/^(?:text|application)\/xml/i,u="application/json",l="text/html",f=/^\s*$/,p=i.createElement("a");function d(t,n,r,o){if(t.global)return function(t,n,r){var o=e.Event(n);return e(t).trigger(o,r),!o.isDefaultPrevented()}(n||i,r,o)}function h(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===d(e,n,"ajaxBeforeSend",[t,e]))return!1;d(e,n,"ajaxSend",[t,e])}function m(t,e,n,r){var o=n.context;n.success.call(o,t,"success",e),r&&r.resolveWith(o,[t,"success",e]),d(n,o,"ajaxSuccess",[e,n,t]),g("success",e,n)}function v(t,e,n,r,o){var i=r.context;r.error.call(i,n,e,t),o&&o.rejectWith(i,[n,e,t]),d(r,i,"ajaxError",[n,r,t||e]),g(e,n,r)}function g(t,n,r){var o=r.context;r.complete.call(o,n,t),d(r,o,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}(r)}function y(){}function b(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(t,n,r,o){return e.isFunction(n)&&(o=r,r=n,n=void 0),e.isFunction(r)||(o=r,r=void 0),{url:t,data:n,success:r,dataType:o}}p.href=t.location.href,e.active=0,e.ajaxJSONP=function(n,r){if(!("type"in n))return e.ajax(n);var a,s,c=n.jsonpCallback,u=(e.isFunction(c)?c():c)||"Zepto"+o++,l=i.createElement("script"),f=t[u],p=function(t){e(l).triggerHandler("error",t||"abort")},d={abort:p};return r&&r.promise(d),e(l).on("load error",(function(o,i){clearTimeout(s),e(l).off().remove(),"error"!=o.type&&a?m(a[0],d,n,r):v(null,i||"error",d,n,r),t[u]=f,a&&e.isFunction(f)&&f(a[0]),f=a=void 0})),!1===h(d,n)?(p("abort"),d):(t[u]=function(){a=arguments},l.src=n.url.replace(/\?(.+)=\?/,"?$1="+u),i.head.appendChild(l),n.timeout>0&&(s=setTimeout((function(){p("timeout")}),n.timeout)),d)},e.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:u,xml:"application/xml, text/xml",html:l,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},e.ajax=function(o){var a,g,w=e.extend({},o||{}),x=e.Deferred&&e.Deferred();for(n in e.ajaxSettings)void 0===w[n]&&(w[n]=e.ajaxSettings[n]);!function(t){t.global&&0==e.active++&&d(t,null,"ajaxStart")}(w),w.crossDomain||((a=i.createElement("a")).href=w.url,a.href=a.href,w.crossDomain=p.protocol+"//"+p.host!=a.protocol+"//"+a.host),w.url||(w.url=t.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=b(t.url,t.data),t.data=void 0)}(w);var k=w.dataType,N=/\?.+=\?/.test(w.url);if(N&&(k="jsonp"),!1!==w.cache&&(o&&!0===o.cache||"script"!=k&&"jsonp"!=k)||(w.url=b(w.url,"_="+Date.now())),"jsonp"==k)return N||(w.url=b(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),e.ajaxJSONP(w,x);var E,C=w.accepts[k],T={},_=function(t,e){T[t.toLowerCase()]=[t,e]},O=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:t.location.protocol,S=w.xhr(),A=S.setRequestHeader;if(x&&x.promise(S),w.crossDomain||_("X-Requested-With","XMLHttpRequest"),_("Accept",C||"*/*"),(C=w.mimeType||C)&&(C.indexOf(",")>-1&&(C=C.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(C)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&_("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(r in w.headers)_(r,w.headers[r]);if(S.setRequestHeader=_,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=y,clearTimeout(E);var t,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==O){if(k=k||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==l?"html":t==u?"json":s.test(t)?"script":c.test(t)&&"xml")||"text"}(w.mimeType||S.getResponseHeader("content-type")),"arraybuffer"==S.responseType||"blob"==S.responseType)t=S.response;else{t=S.responseText;try{t=function(t,e,n){if(n.dataFilter==y)return t;var r=n.context;return n.dataFilter.call(r,t,e)}(t,k,w),"script"==k?(0,eval)(t):"xml"==k?t=S.responseXML:"json"==k&&(t=f.test(t)?null:e.parseJSON(t))}catch(t){n=t}if(n)return v(n,"parsererror",S,w,x)}m(t,S,w,x)}else v(S.statusText||null,S.status?"error":"abort",S,w,x)}},!1===h(S,w))return S.abort(),v(null,"abort",S,w,x),S;var j=!("async"in w)||w.async;if(S.open(w.type,w.url,j,w.username,w.password),w.xhrFields)for(r in w.xhrFields)S[r]=w.xhrFields[r];for(r in T)A.apply(S,T[r]);return w.timeout>0&&(E=setTimeout((function(){S.onreadystatechange=y,S.abort(),v(null,"timeout",S,w,x)}),w.timeout)),S.send(w.data?w.data:null),S},e.get=function(){return e.ajax(w.apply(null,arguments))},e.post=function(){var t=w.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=w.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var o,i=this,s=t.split(/\s/),c=w(t,n,r),u=c.success;return s.length>1&&(c.url=s[0],o=s[1]),c.success=function(t){i.html(o?e("<div>").html(t.replace(a,"")).find(o):t),u&&u.apply(i,arguments)},e.ajax(c),this};var x=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(x(t)+"="+x(n))},function t(n,r,o,i){var a,s=e.isArray(r),c=e.isPlainObject(r);e.each(r,(function(r,u){a=e.type(u),i&&(r=o?i:i+"["+(c||"object"==a||"array"==a?r:"")+"]"),!i&&s?n.add(u.name,u.value):"array"==a||!o&&"object"==a?t(n,u,o,r):n.add(r,u)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[];return this[0]&&t.each(this[0].elements,(function(o,i){n=i.type,(e=i.name)&&"fieldset"!=i.nodeName.toLowerCase()&&!i.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||i.checked)&&function t(n){if(n.forEach)return n.forEach(t);r.push({name:e,value:n})}(t(i).val())})),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach((function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))})),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(n){var e=getComputedStyle;t.getComputedStyle=function(t,n){try{return e(t,n)}catch(t){return null}}}}(),e}(o)}.call(e,n,e,t))||(t.exports=r)}).call(window)},function(t,e,n){(function(e){t.exports=e.moment=n(32)}).call(this,n(2))},function(t,e,n){(function(e){t.exports=e.dayjs=n(33)}).call(this,n(2))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",o="day",i="week",a="month",s="quarter",c="year",u=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,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,f=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},p={s:f,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+f(r,2,"0")+":"+f(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,a),o=e-r<0,i=t.clone().add(n+(o?-1:1),a);return Number(-(n+(e-r)/(o?r-i:i-r))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:a,y:c,w:i,d:o,h:r,m:n,s:e,ms:t,Q:s}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},d={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("_")},h="en",m={};m[h]=d;var v=function(t){return t instanceof w},g=function(t,e,n){var r;if(!t)return h;if("string"==typeof t)m[t]&&(r=t),e&&(m[t]=e,r=t);else{var o=t.name;m[o]=t,r=o}return n||(h=r),r},y=function(t,e,n){if(v(t))return t.clone();var r=e?"string"==typeof e?{format:e,pl:n}:e:{};return r.date=t,new w(r)},b=p;b.l=g,b.i=v,b.w=function(t,e){return y(t,{locale:e.$L,utc:e.$u})};var w=function(){function f(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var p=f.prototype;return p.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 r=e.match(u);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(e)}(t),this.init()},p.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()},p.$utils=function(){return b},p.isValid=function(){return!("Invalid Date"===this.$d.toString())},p.isSame=function(t,e){var n=y(t);return this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){return y(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<y(t)},p.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},p.year=function(t){return this.$g(t,"$y",c)},p.month=function(t){return this.$g(t,"$M",a)},p.day=function(t){return this.$g(t,"$W",o)},p.date=function(t){return this.$g(t,"$D","date")},p.hour=function(t){return this.$g(t,"$H",r)},p.minute=function(t){return this.$g(t,"$m",n)},p.second=function(t){return this.$g(t,"$s",e)},p.millisecond=function(e){return this.$g(e,"$ms",t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,s){var u=this,l=!!b.u(s)||s,f=b.p(t),p=function(t,e){var n=b.w(u.$u?Date.UTC(u.$y,e,t):new Date(u.$y,e,t),u);return l?n:n.endOf(o)},d=function(t,e){return b.w(u.toDate()[t].apply(u.toDate(),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),u)},h=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case c:return l?p(1,0):p(31,11);case a:return l?p(1,m):p(0,m+1);case i:var y=this.$locale().weekStart||0,w=(h<y?h+7:h)-y;return p(l?v-w:v+(6-w),m);case o:case"date":return d(g+"Hours",0);case r:return d(g+"Minutes",1);case n:return d(g+"Seconds",2);case e:return d(g+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(i,s){var u,l=b.p(i),f="set"+(this.$u?"UTC":""),p=(u={},u[o]=f+"Date",u.date=f+"Date",u[a]=f+"Month",u[c]=f+"FullYear",u[r]=f+"Hours",u[n]=f+"Minutes",u[e]=f+"Seconds",u[t]=f+"Milliseconds",u)[l],d=l===o?this.$D+(s-this.$W):s;if(l===a||l===c){var h=this.clone().set("date",1);h.$d[p](d),h.init(),this.$d=h.set("date",Math.min(this.$D,h.daysInMonth())).toDate()}else p&&this.$d[p](d);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[b.p(t)]()},p.add=function(t,s){var u,l=this;t=Number(t);var f=b.p(s),p=function(e){var n=y(l);return b.w(n.date(n.date()+Math.round(e*t)),l)};if(f===a)return this.set(a,this.$M+t);if(f===c)return this.set(c,this.$y+t);if(f===o)return p(1);if(f===i)return p(7);var d=(u={},u[n]=6e4,u[r]=36e5,u[e]=1e3,u)[f]||1,h=this.valueOf()+t*d;return b.w(h,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),o=this.$locale(),i=this.$H,a=this.$m,s=this.$M,c=o.weekdays,u=o.months,f=function(t,r,o,i){return t&&(t[r]||t(e,n))||o[r].substr(0,i)},p=function(t){return b.s(i%12||12,t,"0")},d=o.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:b.s(s+1,2,"0"),MMM:f(o.monthsShort,s,u,3),MMMM:u[s]||u(this,n),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:f(o.weekdaysMin,this.$W,c,2),ddd:f(o.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:b.s(i,2,"0"),h:p(1),hh:p(2),a:d(i,a,!0),A:d(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 n.replace(l,(function(t,e){return e||h[t]||r.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(t,u,l){var f,p=b.p(u),d=y(t),h=6e4*(d.utcOffset()-this.utcOffset()),m=this-d,v=b.m(this,d);return v=(f={},f[c]=v/12,f[a]=v,f[s]=v/3,f[i]=(m-h)/6048e5,f[o]=(m-h)/864e5,f[r]=m/36e5,f[n]=m/6e4,f[e]=m/1e3,f)[p]||m,l?v:b.a(v)},p.daysInMonth=function(){return this.endOf(a).$D},p.$locale=function(){return m[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var n=this.clone();return n.$L=g(t,e,!0),n},p.clone=function(){return b.w(this.toDate(),this)},p.toDate=function(){return new Date(this.$d)},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},f}();return y.prototype=w.prototype,y.extend=function(t,e){return t(e,w,y),y},y.locale=g,y.isDayjs=v,y.unix=function(t){return y(1e3*t)},y.en=m[h],y.Ls=m,y}()},function(t,e,n){(function(e){t.exports=e.m=n(35)}).call(this,n(2))},function(t,e,n){"use strict";var r=n(36),o=n(39),i=n(5),a=function(){return r.apply(this,arguments)};a.m=r,a.trust=r.trust,a.fragment=r.fragment,a.mount=i.mount,a.route=n(45),a.render=n(13),a.redraw=i.redraw,a.request=o.request,a.jsonp=o.jsonp,a.parseQueryString=n(16),a.buildQueryString=n(14),a.parsePathname=n(7),a.buildPathname=n(6),a.vnode=n(3),a.PromisePolyfill=n(11),t.exports=a},function(t,e,n){"use strict";var r=n(8);r.trust=n(37),r.fragment=n(38),t.exports=r},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},function(t,e,n){"use strict";var r=n(3),o=n(9);t.exports=function(){var t=o.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},function(t,e,n){"use strict";var r=n(10),o=n(5);t.exports=n(44)(window,r,o.redraw)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){i.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var o={callback:t,args:e};return u[c]=o,r(c),c++},p.clearImmediate=d}function d(t){delete u[t]}function h(t){if(l)setTimeout(h,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{d(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(2),n(41))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!l){var t=s(p);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f<e;)c&&c[f].run();f=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new h(t,e)),1!==u.length||l||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){var e,n=t&&t.document,o={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function i(t){return t.attrs&&t.attrs.xmlns||o[t.tag]}function a(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function s(t){var e=t.state;try{return this.apply(e,arguments)}finally{a(t,e)}}function c(){try{return n.activeElement}catch(t){return null}}function u(t,e,n,r,o,i,a){for(var s=n;s<r;s++){var c=e[s];null!=c&&l(t,c,o,a,i)}}function l(t,e,o,a,c){var f=e.tag;if("string"==typeof f)switch(e.state={},null!=e.attrs&&$(e.attrs,e,o),f){case"#":!function(t,e,r){e.dom=n.createTextNode(e.children),b(t,e.dom,r)}(t,e,c);break;case"<":p(t,e,a,c);break;case"[":!function(t,e,r,o,i){var a=n.createDocumentFragment();if(null!=e.children){var s=e.children;u(a,s,0,s.length,r,null,o)}e.dom=a.firstChild,e.domSize=a.childNodes.length,b(t,a,i)}(t,e,o,a,c);break;default:!function(t,e,o,a,s){var c=e.tag,l=e.attrs,f=l&&l.is,p=(a=i(e)||a)?f?n.createElementNS(a,c,{is:f}):n.createElementNS(a,c):f?n.createElement(c,{is:f}):n.createElement(c);e.dom=p,null!=l&&function(t,e,n){for(var r in e)T(t,r,null,e[r],n)}(e,l,a);if(b(t,p,s),!w(e)&&(null!=e.text&&(""!==e.text?p.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var d=e.children;u(p,d,0,d.length,o,null,a),"select"===e.tag&&null!=l&&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&&T(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,l)}}(t,e,o,a,c)}else!function(t,e,n,o,i){(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)}$(t.state,t,e),null!=t.attrs&&$(t.attrs,t,e);if(t.instance=r.normalize(s.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?(l(t,e.instance,n,o,i),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,o,a,c)}var f={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function p(t,e,r,o){var i=e.children.match(/^\s*?<(\w+)/im)||[],a=n.createElement(f[i[1]]||"div");"http://www.w3.org/2000/svg"===r?(a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",a=a.firstChild):a.innerHTML=e.children,e.dom=a.firstChild,e.domSize=a.childNodes.length,e.instance=[];for(var s,c=n.createDocumentFragment();s=a.firstChild;)e.instance.push(s),c.appendChild(s);b(t,c,o)}function d(t,e,n,r,o,i){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)u(t,n,0,n.length,r,o,i);else if(null==n||0===n.length)x(t,e,0,e.length);else{var a=null!=e[0]&&null!=e[0].key,s=null!=n[0]&&null!=n[0].key,c=0,f=0;if(!a)for(;f<e.length&&null==e[f];)f++;if(!s)for(;c<n.length&&null==n[c];)c++;if(null===s&&null==a)return;if(a!==s)x(t,e,f,e.length),u(t,n,c,n.length,r,o,i);else if(s){for(var p,d,b,w,N,E=e.length-1,C=n.length-1;E>=f&&C>=c&&(b=e[E],w=n[C],b.key===w.key);)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),E--,C--;for(;E>=f&&C>=c&&(p=e[f],d=n[c],p.key===d.key);)f++,c++,p!==d&&h(t,p,d,r,g(e,f,o),i);for(;E>=f&&C>=c&&c!==C&&p.key===w.key&&b.key===d.key;)y(t,b,N=g(e,f,o)),b!==d&&h(t,b,d,r,N,i),++c<=--C&&y(t,p,o),p!==w&&h(t,p,w,r,o,i),null!=w.dom&&(o=w.dom),f++,b=e[--E],w=n[C],p=e[f],d=n[c];for(;E>=f&&C>=c&&b.key===w.key;)b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),C--,b=e[--E],w=n[C];if(c>C)x(t,e,f,E+1);else if(f>E)u(t,n,c,C+1,r,o,i);else{var T,_,O=o,S=C-c+1,A=new Array(S),j=0,P=0,M=2147483647,D=0;for(P=0;P<S;P++)A[P]=-1;for(P=C;P>=c;P--){null==T&&(T=m(e,f,E+1));var L=T[(w=n[P]).key];null!=L&&(M=L<M?L:-1,A[P-c]=L,b=e[L],e[L]=null,b!==w&&h(t,b,w,r,o,i),null!=w.dom&&(o=w.dom),D++)}if(o=O,D!==E-f+1&&x(t,e,f,E+1),0===D)u(t,n,c,C+1,r,o,i);else if(-1===M)for(j=(_=function(t){var e=[0],n=0,r=0,o=0,i=v.length=t.length;for(o=0;o<i;o++)v[o]=t[o];for(o=0;o<i;++o)if(-1!==t[o]){var a=e[e.length-1];if(t[a]<t[o])v[o]=a,e.push(o);else{for(n=0,r=e.length-1;n<r;){var s=(n>>>1)+(r>>>1)+(n&r&1);t[e[s]]<t[o]?n=s+1:r=s}t[o]<t[e[n]]&&(n>0&&(v[o]=e[n-1]),e[n]=o)}}n=e.length,r=e[n-1];for(;n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(A)).length-1,P=C;P>=c;P--)d=n[P],-1===A[P-c]?l(t,d,r,i,o):_[j]===P-c?j--:y(t,d,o),null!=d.dom&&(o=n[P].dom);else for(P=C;P>=c;P--)d=n[P],-1===A[P-c]&&l(t,d,r,i,o),null!=d.dom&&(o=n[P].dom)}}else{var $=e.length<n.length?e.length:n.length;for(c=c<f?c:f;c<$;c++)(p=e[c])===(d=n[c])||null==p&&null==d||(null==p?l(t,d,r,i,g(e,c+1,o)):null==d?k(t,p):h(t,p,d,r,g(e,c+1,o),i));e.length>$&&x(t,e,c,e.length),n.length>$&&u(t,n,c,n.length,r,o,i)}}}function h(t,e,n,o,a,c){var u=e.tag;if(u===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)if(void 0!==(n=s.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate)if(void 0!==(n=s.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 u)switch(null!=n.attrs&&I(n.attrs,n,o),u){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,o){e.children!==n.children?(N(t,e),p(t,n,r,o)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,c,a);break;case"[":!function(t,e,n,r,o,i){d(t,e.children,n.children,r,o,i);var a=0,s=n.children;if(n.dom=null,null!=s){for(var c=0;c<s.length;c++){var u=s[c];null!=u&&null!=u.dom&&(null==n.dom&&(n.dom=u.dom),a+=u.domSize||1)}1!==a&&(n.domSize=a)}}(t,e,n,o,a,c);break;default:!function(t,e,n,o){var a=e.dom=t.dom;o=i(e)||o,"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 o in n)T(t,o,e&&e[o],n[o],r);var i;if(null!=e)for(var o in e)null==(i=e[o])||null!=n&&null!=n[o]||_(t,o,i,r)})(e,t.attrs,e.attrs,o),w(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)]),d(a,t.children,e.children,n,null,o)))}(e,n,o,c)}else!function(t,e,n,o,i,a){if(n.instance=r.normalize(s.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");I(n.state,n,o),null!=n.attrs&&I(n.attrs,n,o);null!=n.instance?(null==e.instance?l(t,n.instance,o,a,i):h(t,e.instance,n.instance,o,i,a),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(k(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,o,a,c)}else k(t,e),l(t,n,o,c,a)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var o=t[e];if(null!=o){var i=o.key;null!=i&&(r[i]=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 o=n.createDocumentFragment();!function t(e,n,r){for(;null!=r.dom&&r.dom.parentNode===e;){if("string"!=typeof r.tag){if(null!=(r=r.instance))continue}else if("<"===r.tag)for(var o=0;o<r.instance.length;o++)n.appendChild(r.instance[o]);else if("["!==r.tag)n.appendChild(r.dom);else if(1===r.children.length){if(null!=(r=r.children[0]))continue}else for(o=0;o<r.children.length;o++){var i=r.children[o];null!=i&&t(e,n,i)}break}}(t,o,e),b(t,o,r)}function b(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function w(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 o=n;o<r;o++){var i=e[o];null!=i&&k(t,i)}}function k(t,e){var n,r,o,i=0,c=e.state;"string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&(null!=(o=s.call(e.state.onbeforeremove,e))&&"function"==typeof o.then&&(i=1,n=o));e.attrs&&"function"==typeof e.attrs.onbeforeremove&&(null!=(o=s.call(e.attrs.onbeforeremove,e))&&"function"==typeof o.then&&(i|=2,r=o));if(a(e,c),i){if(null!=n){var u=function(){1&i&&((i&=2)||l())};n.then(u,u)}if(null!=r){u=function(){2&i&&((i&=1)||l())};r.then(u,u)}}else C(e),E(t,e);function l(){a(e,c),C(e),E(t,e)}}function N(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)N(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 C(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&s.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&s.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&C(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&&C(r)}}}function T(t,e,r,o,i){if("key"!==e&&"is"!==e&&null!=o&&!O(e)&&(r!==o||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===c()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof o)){if("o"===e[0]&&"n"===e[1])return L(t,e,o);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),o);else if("style"===e)M(t.dom,r,o);else if(S(t,e,i)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+o&&t.dom===c())return;if("select"===t.tag&&null!==r&&t.dom.value===""+o)return;if("option"===t.tag&&null!==r&&t.dom.value===""+o)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,o):t.dom[e]=o}else"boolean"==typeof o?o?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,o)}}function _(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!O(e))if("o"!==e[0]||"n"!==e[1]||O(e))if("style"===e)M(t.dom,n,null);else if(!S(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===c())||"input"===t.tag&&"type"===e){var o=e.indexOf(":");-1!==o&&(e=e.slice(o+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function O(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function S(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=/[A-Z]/g;function j(t){return"-"+t.toLowerCase()}function P(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(A,j)}function M(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!=(o=n[r])&&t.style.setProperty(P(r),String(o))}else{for(var r in n){var o;null!=(o=n[r])&&(o=String(o))!==String(e[r])&&t.style.setProperty(P(r),o)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(P(r))}}function D(){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 D,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function $(t,e,n){"function"==typeof t.oninit&&s.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(s.bind(t.oncreate,e))}function I(t,e,n){"function"==typeof t.onupdate&&n.push(s.bind(t.onupdate,e))}return D.prototype=Object.create(null),D.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,o){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var i=[],a=c(),s=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var u=e;try{e="function"==typeof o?o:void 0,d(t,t.vnodes,n,i,null,"http://www.w3.org/1999/xhtml"===s?void 0:s)}finally{e=u}t.vnodes=n,null!=a&&c()!==a&&"function"==typeof a.focus&&a.focus();for(var l=0;l<i.length;l++)i[l]()}}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e,n){var o=[],i=!1,a=!1;function s(){if(i)throw new Error("Nested m.redraw.sync() call");i=!0;for(var e=0;e<o.length;e+=2)try{t(o[e],r(o[e+1]),c)}catch(t){n.error(t)}i=!1}function c(){a||(a=!0,e((function(){a=!1,s()})))}return c.sync=s,{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 i=o.indexOf(e);i>=0&&(o.splice(i,2),t(e,[],c)),null!=n&&(o.push(e,n),t(e,r(n),c))},redraw:c}}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e,n){var o=0;function i(t){return new e(t)}function a(t){return function(o,a){"string"!=typeof o?(a=o,o=o.url):null==a&&(a={});var s=new e((function(e,n){t(r(o,a.params),a,(function(t){if("function"==typeof a.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new a.type(t[n]);else t=new a.type(t);e(t)}),n)}));if(!0===a.background)return s;var c=0;function u(){0==--c&&"function"==typeof n&&n()}return function t(e){var n=e.then;e.constructor=i;e.then=function(){c++;var r=n.apply(e,arguments);return r.then(u,(function(t){if(u(),0===c)throw t})),t(r)};return e}(s)}}function s(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return i.prototype=e.prototype,i.__proto__=e,{request:a((function(e,n,r,o){var i,a=null!=n.method?n.method.toUpperCase():"GET",c=n.body,u=!(null!=n.serialize&&n.serialize!==JSON.serialize||c instanceof t.FormData),l=n.responseType||("function"==typeof n.extract?"":"json"),f=new t.XMLHttpRequest,p=!1,d=f,h=f.abort;for(var m in f.abort=function(){p=!0,h.call(this)},f.open(a,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),u&&null!=c&&!s(n,/^content-type$/i)&&f.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||s(n,/^accept$/i)||f.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(f.withCredentials=n.withCredentials),n.timeout&&(f.timeout=n.timeout),f.responseType=l,n.headers)({}).hasOwnProperty.call(n.headers,m)&&f.setRequestHeader(m,n.headers[m]);f.onreadystatechange=function(t){if(!p&&4===t.target.readyState)try{var i,a=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),s=t.target.response;if("json"===l?t.target.responseType||"function"==typeof n.extract||(s=JSON.parse(t.target.responseText)):l&&"text"!==l||null==s&&(s=t.target.responseText),"function"==typeof n.extract?(s=n.extract(t.target,n),a=!0):"function"==typeof n.deserialize&&(s=n.deserialize(s)),a)r(s);else{try{i=t.target.responseText}catch(t){i=s}var c=new Error(i);c.code=t.target.status,c.response=s,o(c)}}catch(t){o(t)}},"function"==typeof n.config&&(f=n.config(f,n,e)||f)!==d&&(i=f.abort,f.abort=function(){p=!0,i.call(this)}),null==c?f.send():"function"==typeof n.serialize?f.send(n.serialize(c)):c instanceof t.FormData?f.send(c):f.send(JSON.stringify(c))})),jsonp:a((function(e,n,r,i){var a=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+o++,s=t.document.createElement("script");t[a]=function(e){delete t[a],s.parentNode.removeChild(s),r(e)},s.onerror=function(){delete t[a],s.parentNode.removeChild(s),i(new Error("JSONP request failed"))},s.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(a),t.document.documentElement.appendChild(s)}))}}},function(t,e,n){"use strict";var r=n(5);t.exports=n(46)(window,r)},function(t,e,n){"use strict";(function(e){var r=n(3),o=n(8),i=n(10),a=n(6),s=n(7),c=n(47),u=n(15),l={};t.exports=function(t,n){var f;function p(e,n,r){if(e=a(e,n),null!=f){f();var o=r?r.state:null,i=r?r.title:null;r&&r.replace?t.history.replaceState(o,i,b.prefix+e):t.history.pushState(o,i,b.prefix+e)}else t.location.href=b.prefix+e}var d,h,m,v,g=l,y=b.SKIP={};function b(o,a,w){if(null==o)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var x,k=0,N=Object.keys(w).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:w[t],check:c(t)}})),E="function"==typeof e?e:setTimeout,C=i.resolve(),T=!1;if(f=null,null!=a){var _=s(a);if(!N.some((function(t){return t.check(_)})))throw new ReferenceError("Default route doesn't match any known routes")}function O(){T=!1;var e=t.location.hash;"#"!==b.prefix[0]&&(e=t.location.search+e,"?"!==b.prefix[0]&&"/"!==(e=t.location.pathname+e)[0]&&(e="/"+e));var r=e.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(b.prefix.length),o=s(r);function i(){if(r===a)throw new Error("Could not resolve default route "+a);p(a,null,{replace:!0})}u(o.params,t.history.state),function t(e){for(;e<N.length;e++)if(N[e].check(o)){var a=N[e].component,s=N[e].route,c=a,u=v=function(i){if(u===v){if(i===y)return t(e+1);d=null==i||"function"!=typeof i.view&&"function"!=typeof i?"div":i,h=o.params,m=r,v=null,g=a.render?a:null,2===k?n.redraw():(k=2,n.redraw.sync())}};return void(a.view||"function"==typeof a?(a={},u(c)):a.onmatch?C.then((function(){return a.onmatch(o.params,r,s)})).then(u,i):u("div"))}i()}(0)}return f=function(){T||(T=!0,E(O))},"function"==typeof t.history.pushState?(x=function(){t.removeEventListener("popstate",f,!1)},t.addEventListener("popstate",f,!1)):"#"===b.prefix[0]&&(f=null,x=function(){t.removeEventListener("hashchange",O,!1)},t.addEventListener("hashchange",O,!1)),n.mount(o,{onbeforeupdate:function(){return!(!(k=k?2:1)||l===g)},oncreate:O,onremove:x,view:function(){if(k&&l!==g){var t=[r(d,h.key,h)];return g&&(t=g.render(t[0])),t}}})}return b.set=function(t,e,n){null!=v&&((n=n||{}).replace=!0),v=null,p(t,e,n)},b.get=function(){return m},b.prefix="#!",b.Link={view:function(t){var e,n,r=t.attrs.options,i={};u(i,t.attrs),i.selector=i.options=i.key=i.oninit=i.oncreate=i.onbeforeupdate=i.onupdate=i.onbeforeremove=i.onremove=null;var a=o(t.attrs.selector||"a",i,t.children);return(a.attrs.disabled=Boolean(a.attrs.disabled))?(a.attrs.href=null,a.attrs["aria-disabled"]="true",a.attrs.onclick=null):(e=a.attrs.onclick,n=a.attrs.href,a.attrs.href=b.prefix+n,a.attrs.onclick=function(t){var o;"function"==typeof e?o=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===o||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,b.set(n,null,r))}),a}},b.param=function(t){return h&&null!=t?h[t]:h},b}}).call(this,n(12).setImmediate)},function(t,e,n){"use strict";var r=n(7);t.exports=function(t){var e=r(t),n=Object.keys(e.params),o=[],i=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(o.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(!o.length)return i.test(t.path);var a=i.exec(t.path);if(null==a)return!1;for(r=0;r<o.length;r++)t.params[o[r].k]=o[r].r?a[r+1]:decodeURIComponent(a[r+1]);return!0}}},function(t,e,n){(function(e){e.m||(e.m={}),t.exports=e.m.bidi=n(49)}).call(this,n(2))},function(t,e,n){var r,o,i,a;a=function(t){function e(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}return e.view=function(t,n,r){return e(n,n.attrs.bidi)},t.attrs&&(t.attrs.bidi=e),t.bidi=e,e},o=[n(4)],void 0===(i="function"==typeof(r=a)?r.apply(e,o):r)||(t.exports=i)},function(t,e,n){(function(e){t.exports=e.Mousetrap=n(51)}).call(this,n(2))},function(t,e,n){var r;!function(o,i,a){if(o){for(var s,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},u={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();y.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},y.prototype.reset=function(){return this._callbacks={},this._directMap={},this},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==i&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},y.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},y.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);s=null},y.init=function(){var t=y(i);for(var e in t)"_"!==e.charAt(0)&&(y[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},y.init(),o.Mousetrap=y,t.exports&&(t.exports=y),void 0===(r=function(){return y}.call(e,n,e,t))||(t.exports=r)}function d(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function m(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!s)for(var t in s={},c)t>95&&t<112||c.hasOwnProperty(t)&&(s[c[t]]=t);return s}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,o,i=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<n.length;++o)r=n[o],f[r]&&(r=f[r]),e&&"keypress"!=e&&l[r]&&(r=l[r],i.push("shift")),m(r)&&i.push(r);return{key:r,modifiers:i,action:e=v(r,i,e)}}function y(t){var e=this;if(t=t||i,!(e instanceof y))return new y(t);e.target=t,e._callbacks={},e._directMap={};var n,r={},o=!1,a=!1,s=!1;function c(t){t=t||{};var e,n=!1;for(e in r)t[e]?n=!0:r[e]=0;n||(s=!1)}function u(t,n,o,i,a,s){var c,u,l,f,p=[],d=o.type;if(!e._callbacks[t])return[];for("keyup"==d&&m(t)&&(n=[t]),c=0;c<e._callbacks[t].length;++c)if(u=e._callbacks[t][c],(i||!u.seq||r[u.seq]==u.level)&&d==u.action&&("keypress"==d&&!o.metaKey&&!o.ctrlKey||(l=n,f=u.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&u.combo==a,v=i&&u.seq==i&&u.level==s;(h||v)&&e._callbacks[t].splice(c,1),p.push(u)}return p}function l(t,n,r,o){e.stopCallback(n,n.target||n.srcElement,r,o)||!1===t(n,r)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=h(t);n&&("keyup"!=t.type||o!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,e,i,a){function u(e){return function(){s=e,++r[t],clearTimeout(n),n=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=h(e)),setTimeout(c,10)}r[t]=0;for(var p=0;p<e.length;++p){var d=p+1===e.length?f:u(a||g(e[p+1]).action);v(e[p],d,a,t,p)}}function v(t,n,r,o,i){e._directMap[t+":"+r]=n;var a,s=(t=t.replace(/\s+/g," ")).split(" ");s.length>1?p(t,s,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],u(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,n){var r,o=u(t,e,n),i={},f=0,p=!1;for(r=0;r<o.length;++r)o[r].seq&&(f=Math.max(f,o[r].level));for(r=0;r<o.length;++r)if(o[r].seq){if(o[r].level!=f)continue;p=!0,i[o[r].seq]=1,l(o[r].callback,n,o[r].combo,o[r].seq)}else p||l(o[r].callback,n,o[r].combo);var d="keypress"==n.type&&a;n.type!=s||m(t)||d||c(i),a=p&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var r=0;r<t.length;++r)v(t[r],e,n)},d(t,"keypress",f),d(t,"keydown",f),d(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,n){(function(e){t.exports=e.classNames=n(53)}).call(this,n(2))},function(t,e,n){var r;
|
|
/*!
|
|
Copyright (c) 2017 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&t.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(t){var e=t.zepto,n=e.qsa,r=e.matches;function o(e){return!(!(e=t(e)).width()&&!e.height())&&"none"!==e.css("display")}var i=t.expr[":"]={visible:function(){if(o(this))return this},hidden:function(){if(!o(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(t){if(0===t)return this},last:function(t,e){if(t===e.length-1)return this},eq:function(t,e,n){if(t===n)return this},contains:function(e,n,r){if(t(this).text().indexOf(r)>-1)return this},has:function(t,n,r){if(e.qsa(this,r).length)return this}},a=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,c="Zepto"+ +new Date;function u(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,o=a.exec(t);if(o&&o[2]in i&&(n=i[o[2]],r=o[3],t=o[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return e(t,n,r)}e.qsa=function(r,o){return u(o,(function(i,a,u){try{var l;!i&&a?i="*":s.test(i)&&(l=t(r).addClass(c),i="."+c+" "+i);var f=n(r,i)}catch(t){throw console.error("error performing selector: %o",o),t}finally{l&&l.removeClass(c)}return a?e.uniq(t.map(f,(function(t,e){return a.call(t,e,f,u)}))):f}))},e.matches=function(t,e){return u(e,(function(e,n,o){return(!e||r(t,e))&&(!n||n.call(t,null,o)===t)}))}}(Zepto)},function(t,e){!function(t){var e={},n=t.fn.data,r=t.camelCase,o=t.expando="Zepto"+ +new Date,i=[];function a(n,a,s){var c=n[o]||(n[o]=++t.uuid),u=e[c]||(e[c]=function(e){var n={};return t.each(e.attributes||i,(function(e,o){0==o.name.indexOf("data-")&&(n[r(o.name.replace("data-",""))]=t.zepto.deserializeValue(o.value))})),n}(n));return void 0!==a&&(u[r(a)]=s),u}t.fn.data=function(i,s){return void 0===s?t.isPlainObject(i)?this.each((function(e,n){t.each(i,(function(t,e){a(n,t,e)}))})):0 in this?function(i,s){var c=i[o],u=c&&e[c];if(void 0===s)return u||a(i);if(u){if(s in u)return u[s];var l=r(s);if(l in u)return u[l]}return n.call(t(i),s)}(this[0],i):void 0:this.each((function(){a(this,i,s)}))},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(n){var r=n[o],i=r&&e[r];return!!i&&!t.isEmptyObject(i)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var i=this[o],a=i&&e[i];a&&t.each(n||a,(function(t){delete a[n?r(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(Zepto)},function(t,e){!function(t,e){var n,r,o,i,a,s,c,u,l,f,p="",d=document.createElement("div"),h=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,m={};function v(t){return n?n+t:t.toLowerCase()}void 0===d.style.transform&&t.each({Webkit:"webkit",Moz:"",O:"o"},(function(t,e){if(void 0!==d.style[t+"TransitionProperty"])return p="-"+t.toLowerCase()+"-",n=e,!1})),r=p+"transform",m[o=p+"transition-property"]=m[i=p+"transition-duration"]=m[s=p+"transition-delay"]=m[a=p+"transition-timing-function"]=m[c=p+"animation-name"]=m[u=p+"animation-duration"]=m[f=p+"animation-delay"]=m[l=p+"animation-timing-function"]="",t.fx={off:void 0===n&&void 0===d.style.transitionProperty,speeds:{_default:400,fast:200,slow:600},cssPrefix:p,transitionEnd:v("TransitionEnd"),animationEnd:v("AnimationEnd")},t.fn.animate=function(e,n,r,o,i){return t.isFunction(n)&&(o=n,r=void 0,n=void 0),t.isFunction(r)&&(o=r,r=void 0),t.isPlainObject(n)&&(r=n.easing,o=n.complete,i=n.delay,n=n.duration),n&&(n=("number"==typeof n?n:t.fx.speeds[n]||t.fx.speeds._default)/1e3),i&&(i=parseFloat(i)/1e3),this.anim(e,n,r,o,i)},t.fn.anim=function(e,n,p,d,v){var g,y,b,w={},x="",k=this,N=t.fx.transitionEnd,E=!1;if(void 0===n&&(n=t.fx.speeds._default/1e3),void 0===v&&(v=0),t.fx.off&&(n=0),"string"==typeof e)w[c]=e,w[u]=n+"s",w[f]=v+"s",w[l]=p||"linear",N=t.fx.animationEnd;else{for(g in y=[],e)h.test(g)?x+=g+"("+e[g]+") ":(w[g]=e[g],y.push(g.replace(/([A-Z])/g,"-$1").toLowerCase()));x&&(w[r]=x,y.push(r)),n>0&&"object"==typeof e&&(w[o]=y.join(", "),w[i]=n+"s",w[s]=v+"s",w[a]=p||"linear")}return b=function(e){if(void 0!==e){if(e.target!==e.currentTarget)return;t(e.target).unbind(N,b)}else t(this).unbind(N,b);E=!0,t(this).css(m),d&&d.call(this)},n>0&&(this.bind(N,b),setTimeout((function(){E||b.call(k)}),1e3*(n+v)+25)),this.size()&&this.get(0).clientLeft,this.css(w),n<=0&&setTimeout((function(){k.each((function(){b.call(this)}))}),0),this},d=null}(Zepto)},function(t,e){!function(t,e){window.document.documentElement;var n=t.fn.show,r=t.fn.hide,o=t.fn.toggle;function i(n,r,o,i,a){"function"!=typeof r||a||(a=r,r=e);var s={opacity:o};return i&&(s.scale=i,n.css(t.fx.cssPrefix+"transform-origin","0 0")),n.animate(s,r,null,a)}function a(e,n,o,a){return i(e,n,0,o,(function(){r.call(t(this)),a&&a.call(this)}))}t.fn.show=function(t,r){return n.call(this),t===e?t=0:this.css("opacity",0),i(this,t,1,"1,1",r)},t.fn.hide=function(t,n){return t===e?r.call(this):a(this,t,"0,0",n)},t.fn.toggle=function(n,r){return n===e||"boolean"==typeof n?o.call(this,n):this.each((function(){var e=t(this);e["none"==e.css("display")?"show":"hide"](n,r)}))},t.fn.fadeTo=function(t,e,n){return i(this,t,e,null,n)},t.fn.fadeIn=function(t,e){var r=this.css("opacity");return r>0?this.css("opacity",0):r=1,n.call(this).fadeTo(t,r,e)},t.fn.fadeOut=function(t,e){return a(this,t,null,e)},t.fn.fadeToggle=function(e,n){return this.each((function(){var r=t(this);r[0==r.css("opacity")||"none"==r.css("display")?"fadeIn":"fadeOut"](e,n)}))}}(Zepto)},function(t,e,n){"use strict";(function(t){var e=n(0);
|
|
/*!
|
|
* HC-Sticky
|
|
* =========
|
|
* Version: 2.2.3
|
|
* Author: Some Web Media
|
|
* Author URL: http://somewebmedia.com
|
|
* Plugin URL: https://github.com/somewebmedia/hc-sticky
|
|
* Description: Cross-browser plugin that makes any element on your page visible while you scroll
|
|
* License: MIT
|
|
*/!function(e,r){if("object"==typeof t.exports){if(!e.document)throw new Error("HC-Sticky requires a browser to run.");t.exports=r(e)}else"function"==typeof define&&n(60)?define("hcSticky",[],r(e)):r(e)}("undefined"!=typeof window?window:void 0,(function(t){var n={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},r=function(t,e,n){console.log("%c! HC Sticky:%c "+t+"%c "+n+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},o=t.document,i=function i(a,s){var c=this;if("string"==typeof a&&(a=o.querySelector(a)),!a)return!1;s.queries&&r("queries","responsive","option"),s.queryFlow&&r("queryFlow","mobileFirst","option");var u={},l=i.Helpers,f=a.parentNode;"static"===l.getStyle(f,"position")&&(f.style.position="relative");var p=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l.isEmptyObject(t)&&!l.isEmptyObject(u)||(u=Object(e.a)({},n,u,t))},d=function(){return u.disable},h=function(){var r,o=u.responsive||u.queries;if(o){var i=t.innerWidth;if(r=s,(u=Object(e.a)({},n,r||{})).mobileFirst)for(var a in o)a<=i&&!l.isEmptyObject(o[a])&&p(o[a]);else{var c=[];for(var f in o){var d={};d[f]=o[f],c.push(d)}for(var h=c.length-1;0<=h;h--){var m=c[h],v=Object.keys(m)[0];i<=v&&!l.isEmptyObject(m[v])&&p(m[v])}}}},m={css:{},position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};l.hasClass(a,u.stickyClass)||(!1===v.isAttached&&v.attach(),m.position="fixed",a.style.position="fixed",a.style.left=v.offsetLeft+"px",a.style.width=v.width,void 0===t.bottom?a.style.bottom="auto":a.style.bottom=t.bottom+"px",void 0===t.top?a.style.top="auto":a.style.top=t.top+"px",a.classList?a.classList.add(u.stickyClass):a.className+=" "+u.stickyClass,u.onStart&&u.onStart.call(a,Object(e.a)({},u)))},release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(t.stop=t.stop||!1,!0===t.stop||"fixed"===m.position||null===m.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(l.getStyle(a,"top"))||0)===t.top||void 0!==t.bottom&&(parseInt(l.getStyle(a,"bottom"))||0)===t.bottom)){!0===t.stop?!0===v.isAttached&&v.detach():!1===v.isAttached&&v.attach();var n=t.position||m.css.position;m.position=n,a.style.position=n,a.style.left=!0===t.stop?m.css.left:v.positionLeft+"px",a.style.width="absolute"!==n?m.css.width:v.width,void 0===t.bottom?a.style.bottom=!0===t.stop?"":"auto":a.style.bottom=t.bottom+"px",void 0===t.top?a.style.top=!0===t.stop?"":"auto":a.style.top=t.top+"px",a.classList?a.classList.remove(u.stickyClass):a.className=a.className.replace(new RegExp("(^|\\b)"+u.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),u.onStop&&u.onStop.call(a,Object(e.a)({},u))}}},v={el:o.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in v.el.className="sticky-spacer",m.css)v.el.style[t]=m.css[t];v.el.style["z-index"]="-1";var e=l.getStyle(a);v.offsetLeft=l.offset(a).left-(parseInt(e.marginLeft)||0),v.positionLeft=l.position(a).left,v.width=l.getStyle(a,"width")},attach:function(){f.insertBefore(v.el,a),v.isAttached=!0},detach:function(){v.el=f.removeChild(v.el),v.isAttached=!1}},g=void 0,y=void 0,b=void 0,w=void 0,x=void 0,k=void 0,N=void 0,E=void 0,C=void 0,T=void 0,_=void 0,O=void 0,S=void 0,A=void 0,j=void 0,P=void 0,M=void 0,D=void 0,L=t.pageYOffset||o.documentElement.scrollTop,$=0,I=void 0,B=function(){j=D(),w=M(),S=x+w-E-_,A=N<j;var e=t.pageYOffset||o.documentElement.scrollTop,n=l.offset(a).top,r=n-e,i=void 0;I=e<L?"up":"down",$=e-L,O<(L=e)?S+E+(A?C:0)-(u.followScroll&&A?0:E)<=e+j-T-(N-(O-T)<j-T&&u.followScroll&&0<(i=j-N-T)?i:0)?m.release({position:"absolute",bottom:k+f.offsetHeight-S-E}):A&&u.followScroll?"down"===I?r+j+C<=N+.9?m.stick({bottom:C}):"fixed"===m.position&&m.release({position:"absolute",top:n-E-O-$+T}):Math.ceil(r+T)<0&&"fixed"===m.position?m.release({position:"absolute",top:n-E-O+T-$}):e+E-T<=n&&m.stick({top:E-T}):m.stick({top:E-T}):m.release({stop:!0})},R=!1,U=!1,F=function(){R&&(l.event.unbind(t,"scroll",B),R=!1)},H=function(){null!==a.offsetParent&&"none"!==l.getStyle(a,"display")?(function(){var e,n,r,i;m.css=(e=a,n=l.getCascadedStyle(e),r=l.getStyle(e),i={height:e.offsetHeight+"px",left:n.left,right:n.right,top:n.top,bottom:n.bottom,position:r.position,display:r.display,verticalAlign:r.verticalAlign,boxSizing:r.boxSizing,marginLeft:n.marginLeft,marginRight:n.marginRight,marginTop:n.marginTop,marginBottom:n.marginBottom,paddingLeft:n.paddingLeft,paddingRight:n.paddingRight},n.float&&(i.float=n.float||"none"),n.cssFloat&&(i.cssFloat=n.cssFloat||"none"),r.MozBoxSizing&&(i.MozBoxSizing=r.MozBoxSizing),i.width="auto"!==n.width?n.width:"border-box"===i.boxSizing||"border-box"===i.MozBoxSizing?e.offsetWidth+"px":r.width,i),v.init(),g=!(!u.stickTo||!("document"===u.stickTo||u.stickTo.nodeType&&9===u.stickTo.nodeType||"object"==typeof u.stickTo&&u.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),y=u.stickTo?g?o:"string"==typeof u.stickTo?o.querySelector(u.stickTo):u.stickTo:f,j=(D=function(){var t=a.offsetHeight+(parseInt(m.css.marginTop)||0)+(parseInt(m.css.marginBottom)||0),e=(j||0)-t;return-1<=e&&e<=1?j:t})(),w=(M=function(){return g?Math.max(o.documentElement.clientHeight,o.body.scrollHeight,o.documentElement.scrollHeight,o.body.offsetHeight,o.documentElement.offsetHeight):y.offsetHeight})(),x=g?0:l.offset(y).top,k=u.stickTo?g?0:l.offset(f).top:x,N=t.innerHeight,P=a.offsetTop-(parseInt(m.css.marginTop)||0),b=u.innerSticker?"string"==typeof u.innerSticker?o.querySelector(u.innerSticker):u.innerSticker:null,E=isNaN(u.top)&&-1<u.top.indexOf("%")?parseFloat(u.top)/100*N:u.top,C=isNaN(u.bottom)&&-1<u.bottom.indexOf("%")?parseFloat(u.bottom)/100*N:u.bottom,T=b?b.offsetTop:u.innerTop?u.innerTop:0,_=isNaN(u.bottomEnd)&&-1<u.bottomEnd.indexOf("%")?parseFloat(u.bottomEnd)/100*N:u.bottomEnd,O=x-E+T+P}(),w<=j?F():(B(),R||(l.event.bind(t,"scroll",B),R=!0))):F()},z=function(){a.style.position="",a.style.left="",a.style.top="",a.style.bottom="",a.style.width="",a.classList?a.classList.remove(u.stickyClass):a.className=a.className.replace(new RegExp("(^|\\b)"+u.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),m.css={},!(m.position=null)===v.isAttached&&v.detach()},q=function(){z(),h(),d()?F():H()},Y=function(){u.onBeforeResize&&u.onBeforeResize.call(a,Object(e.a)({},u)),q(),u.onResize&&u.onResize.call(a,Object(e.a)({},u))},W=u.resizeDebounce?l.debounce(Y,u.resizeDebounce):Y,K=function(){U&&(l.event.unbind(t,"resize",W),U=!1),F()},V=function(){U||(l.event.bind(t,"resize",W),U=!0),h(),d()?F():H()};this.options=function(t){return t?u[t]:Object(e.a)({},u)},this.refresh=q,this.update=function(t){p(t),s=Object(e.a)({},s,t||{}),q()},this.attach=V,this.detach=K,this.destroy=function(){K(),z()},this.triggerMethod=function(t,e){"function"==typeof c[t]&&c[t](e)},this.reinit=function(){r("reinit","refresh","method"),q()},p(s),V(),l.event.bind(t,"load",q)};if(void 0!==t.jQuery){var a=t.jQuery,s="hcSticky";a.fn.extend({hcSticky:function(t,e){return this.length?"options"===t?a.data(this.get(0),s).options():this.each((function(){var n=a.data(this,s);n?n.triggerMethod(t,e):(n=new i(this,t),a.data(this,s,n))})):this}})}return t.hcSticky=t.hcSticky||i,i})),function(t){var e=t.hcSticky,n=t.document;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,n;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),o=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(e=arguments[1]),n=0;n<o;){var i;n in r&&(i=r[n],t.call(e,i,n,r)),n++}});var r=function(){var e=n.documentElement,r=function(){};function o(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}e.addEventListener?r=function(t,e,n){t.addEventListener(e,n,!1)}:e.attachEvent&&(r=function(t,e,n){t[e+n]=n.handleEvent?function(){var e=o(t);n.handleEvent.call(n,e)}:function(){var e=o(t);n.call(t,e)},t.attachEvent("on"+e,t[e+n])});var i=function(){};return e.removeEventListener?i=function(t,e,n){t.removeEventListener(e,n,!1)}:e.detachEvent&&(i=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(r){t[e+n]=void 0}}),{bind:r,unbind:i}}(),o=function(e,r){return t.getComputedStyle?r?n.defaultView.getComputedStyle(e,null).getPropertyValue(r):n.defaultView.getComputedStyle(e,null):e.currentStyle?r?e.currentStyle[r.replace(/-\w/g,(function(t){return t.toUpperCase().replace("-","")}))]:e.currentStyle:void 0},i=function(e){var r=e.getBoundingClientRect(),o=t.pageYOffset||n.documentElement.scrollTop,i=t.pageXOffset||n.documentElement.scrollLeft;return{top:r.top+o,left:r.left+i}};e.Helpers={isEmptyObject:function(t){for(var e in t)return!1;return!0},debounce:function(t,e,n){var r=void 0;return function(){var o=this,i=arguments,a=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||t.apply(o,i)}),e),a&&t.apply(o,i)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},offset:i,position:function(t){var e=t.offsetParent,n=i(e),r=i(t),a=o(e),s=o(t);return n.top+=parseInt(a.borderTopWidth)||0,n.left+=parseInt(a.borderLeftWidth)||0,{top:r.top-n.top-(parseInt(s.marginTop)||0),left:r.left-n.left-(parseInt(s.marginLeft)||0)}},getStyle:o,getCascadedStyle:function(e){var r=e.cloneNode(!0);r.style.display="none",Array.prototype.slice.call(r.querySelectorAll('input[type="radio"]')).forEach((function(t){t.removeAttribute("name")})),e.parentNode.insertBefore(r,e.nextSibling);var o=void 0;r.currentStyle?o=r.currentStyle:t.getComputedStyle&&(o=n.defaultView.getComputedStyle(r,null));var i={};for(var a in o)!isNaN(a)||"string"!=typeof o[a]&&"number"!=typeof o[a]||(i[a]=o[a]);if(Object.keys(i).length<3)for(var s in i={},o)isNaN(s)||(i[o[s].replace(/-\w/g,(function(t){return t.toUpperCase().replace("-","")}))]=o.getPropertyValue(o[s]));if(i.margin||"auto"!==i.marginLeft?i.margin||i.marginLeft!==i.marginRight||i.marginLeft!==i.marginTop||i.marginLeft!==i.marginBottom||(i.margin=i.marginLeft):i.margin="auto",!i.margin&&"0px"===i.marginLeft&&"0px"===i.marginRight){var c=e.offsetLeft-e.parentNode.offsetLeft,u=c-(parseInt(i.left)||0)-(parseInt(i.right)||0),l=e.parentNode.offsetWidth-e.offsetWidth-c-(parseInt(i.right)||0)+(parseInt(i.left)||0)-u;0!==l&&1!==l||(i.margin="auto")}return r.parentNode.removeChild(r),r=null,i},event:r}}(window)}).call(this,n(59)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e){!function(t){"use strict";var e=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};function o(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(r){r&&3===r.which||(t(e).remove(),t(n).each((function(){var e=t(this),n=o(e),i={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&t.contains(n[0],r.target)||(n.trigger(r=t.Event("hide.bs.dropdown",i)),r.isDefaultPrevented()||(e.attr("aria-expanded","false"),n.removeClass("open").trigger(t.Event("hidden.bs.dropdown",i)))))})))}r.VERSION="3.4.1",r.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var r=o(n),a=r.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var s={relatedTarget:this};if(r.trigger(e=t.Event("show.bs.dropdown",s)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},r.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var r=t(this);if(e.preventDefault(),e.stopPropagation(),!r.is(".disabled, :disabled")){var i=o(r),a=i.hasClass("open");if(!a&&27!=e.which||a&&27==e.which)return 27==e.which&&i.find(n).trigger("focus"),r.trigger("click");var s=i.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var c=s.index(e.target);38==e.which&&c>0&&c--,40==e.which&&c<s.length-1&&c++,~c||(c=0),s.eq(c).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new r(this)),"string"==typeof e&&o[e].call(n)}))},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,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",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery)},function(t,e){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return 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)},function(t,e,n){!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0];return o(Array.prototype.slice.call(arguments,1)).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,r){var o=r.map((function(r){var o=t(e,r);return o!==n.SKIP&&(e=o),o}));return o(e),o},n.merge=o,n.combine=r,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),o=r((function(){var r=arguments[arguments.length-1];return n.forEach((function(n,o){r.indexOf(n)>-1&&(e=t[o][1](e,n()))})),e}),n);return o(e),o},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,o=[],a=[];function s(e){return arguments.length&&e!==n.SKIP&&(t=e,i(s)&&(s._changing(),s._state="active",o.forEach((function(e,n){e(a[n](t))})))),t}return s.constructor=n,s._state=arguments.length&&t!==n.SKIP?"active":"pending",s._parents=[],s._changing=function(){i(s)&&(s._state="changing"),o.forEach((function(t){t._changing()}))},s._map=function(e,r){var i=r?n():n(e(t));return i._parents.push(s),o.push(i),a.push(e),i},s.map=function(t){return s._map(t,"active"!==s._state)},s.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},s["fantasy-land/map"]=s.map,s["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,s])},s._unregisterChild=function(t){var e=o.indexOf(t);-1!==e&&(o.splice(e,1),a.splice(e,1))},Object.defineProperty(s,"end",{get:function(){return e||((e=n()).map((function(t){return!0===t&&(s._parents.forEach((function(t){t._unregisterChild(s)})),s._state="ended",s._parents.length=o.length=a.length=0),t})),e)}}),s}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})),o=r?n(t.apply(null,e.concat([e]))):n(),i=[],a=e.map((function(n){return n._map((function(a){return i.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,o(t.apply(null,e.concat([i]))),i=[]),a}),!0)})),s=o.end.map((function(t){!0===t&&(a.forEach((function(t){t.end(!0)})),s.end(!0))}));return o}function o(t){return r((function(){return t.map((function(t){return t()}))}),t)}function i(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}()},function(t,e,n){var r=n(24).Symbol;t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23),o=n(25),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&r(t)==i}},function(t,e,n){var r=n(115),o=n(119);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(2))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?n:e)&&("number"==o||"symbol"!=o&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e,n){var r=n(73),o=n(71);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(23),o=n(65),i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!o(t))return!1;var e=r(t);return e==a||e==s||e==i||e==c}},function(t,e,n){var r=n(17),o=n(107),i=n(108),a=n(136);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(66),o=1/0;t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}},,function(t,e,n){var r=n(81),o=n(82),i=n(104),a=n(17);t.exports=function(t,e){return(a(t)?r:o)(t,i(e))}},function(t,e,n){var r=n(106);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(139);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(83),o=n(103)(r);t.exports=o},function(t,e,n){var r=n(84),o=n(86);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(85)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),s=a.length;s--;){var c=a[t?s:++o];if(!1===n(i[c],c,i))break}return e}}},function(t,e,n){var r=n(87),o=n(99),i=n(72);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e,n){var r=n(88),o=n(89),i=n(17),a=n(93),s=n(70),c=n(95),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),f=!n&&!l&&a(t),p=!n&&!l&&!f&&c(t),d=n||l||f||p,h=d?r(t.length,String):[],m=h.length;for(var v in t)!e&&!u.call(t,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,m))||h.push(v);return h}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(90),o=n(25),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(23),o=n(25),i="[object Arguments]";t.exports=function(t){return o(t)&&r(t)==i}},function(t,e,n){var r=n(64),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){(function(t){var r=n(24),o=n(94),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;t.exports=c}).call(this,n(69)(t))},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(96),o=n(97),i=n(98),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},function(t,e,n){var r=n(23),o=n(71),i=n(25),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(68),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(69)(t))},function(t,e,n){var r=n(100),o=n(101),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(102)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(72);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,s=Object(n);(e?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},function(t,e,n){var r=n(105);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(74),o=n(76);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(17),o=n(66),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||(a.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(109),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(110),o=500;t.exports=function(t){var e=r(t,(function(t){return n.size===o&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(111),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function n(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(112),o=n(131),i=n(133),a=n(134),s=n(135);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(113),o=n(124),i=n(130);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(114),o=n(120),i=n(121),a=n(122),s=n(123);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(26);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e,n){var r=n(73),o=n(116),i=n(65),a=n(118),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:s).test(a(t))}},function(t,e,n){var r,o=n(117),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(24)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(26),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return n===o?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(26),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(26),o="__lodash_hash_undefined__";t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?o:e,this}},function(t,e,n){var r=n(125),o=n(126),i=n(127),a=n(128),s=n(129);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(27),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():o.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(27);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(27);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(27);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(67)(n(24),"Map");t.exports=r},function(t,e,n){var r=n(28);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(28);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(28);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(28);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(137);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(64),o=n(138),i=n(17),a=n(66),s=1/0,c=r?r.prototype:void 0,u=c?c.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-s?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(140),o=n(74),i=n(70),a=n(65),s=n(76);t.exports=function(t,e,n,c){if(!a(t))return t;for(var u=-1,l=(e=o(e,t)).length,f=l-1,p=t;null!=p&&++u<l;){var d=s(e[u]),h=n;if(u!=f){var m=p[d];void 0===(h=c?c(m,d,p):void 0)&&(h=a(m)?m:i(e[u+1])?[]:{})}r(p,d,h),p=p[d]}return t}},function(t,e,n){var r=n(141),o=n(75),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(142);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(67),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},,function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"extend",(function(){return w})),n.d(r,"override",(function(){return x}));n(18);function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var i=n(0),a=n(78),s=n.n(a),c=n(79),u=n.n(c),l=n(80),f=n.n(l),p=function(){function t(){this.subscribers={}}var e=t.prototype;return e.subscribe=function(t,e){f()(this.subscribers,t+"[]",e)},e.dispatch=function(t,e){void 0===e&&(e=null),s()(u()(this.subscribers,t),(function(n){n(t,e)}))},t}();function d(t,e){var n=t[e];return delete t[e],n}function h(t){return t instanceof Array?t.map((function(t){return h(t)})).join(""):"object"==typeof t&&null!==t?t.text||h(t.children):t}function v(t){var e=t&&t.displayName()||app.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var g=function(){function t(){this.translations={},this.locale=null,this.translations={},this.locale=null}var e=t.prototype;return e.addTranslations=function(t){Object(i.a)(this.translations,t)},e.trans=function(t,e){void 0===e&&(e=null);var n=this.translations[t];return n?this.apply(n,e||{}):t},e.transText=function(t,e){return void 0===e&&(e=null),h(this.trans(t,e))},e.apply=function(t,e){if("user"in e){var n=d(e,"user");e.username||(e.username=v(n))}var r=t.split(new RegExp("({[a-z0-9_]+}|</?[a-z0-9_]+>)","gi")),o=[],i=[o];return r.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])i[0].push(e[n[1]]);else if(n[3])if(n[2])i.shift();else{var r=e[n[3]]||{tag:n[3],children:[]};i[0].push(r),i.unshift(r.children||r)}}else i[0].push({tag:"span",text:t})})),o.filter((function(t){return t}))},t}(),y=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={}),app.request(Object(i.a)({method:"POST",url:app.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),b=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){t.included&&t.included.map(this.pushObject.bind(this));var e=t.data instanceof Array?t.data.map(this.pushObject.bind(this)):this.pushObject(t.data);return e.payload=t,e},e.pushObject=function(t){if(!this.models[t.type])return null;var e=this.data[t.type]=this.data[t.type]||{};return e[t.id]?e[t.id].pushData(t):e[t.id]=this.createRecord(t.type,t),e[t.id].exists=!0,e[t.id]},e.find=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=n,a=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?a+="?filter[id]="+e.join(","):"object"==typeof e?o=e:e&&(a+="/"+e),app.request(Object(i.a)({method:"GET",url:a,params:o},r)).then(this.pushPayload.bind(this))},e.getById=function(t,e){return this.data[t]&&this.data[t][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.keys(e).map((function(t){return e[t]})):[]},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}();function w(t,e,n){var r=t[e];t[e]=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var a=r?r.apply(t,o):void 0;return n.apply(t,[a].concat(o)),a},Object(i.a)(t[e],r)}function x(t,e,n){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.apply(this,[r.bind(this)].concat(e))},Object(i.a)(t[e],r)}var k=function(){function t(){var t=this;this.$backdrop=void 0,$("#content").click((function(e){t.isOpen()&&(e.preventDefault(),t.hide())}))}var e=t.prototype;return e.isOpen=function(){return $("#app").hasClass("drawerOpen")},e.hide=function(){$("#app").removeClass("drawerOpen"),this.$backdrop&&this.$backdrop.remove()},e.show=function(){var t=this;$("#app").addClass("drawerOpen"),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").click((function(){return t.hide()})),setTimeout((function(){return t.$backdrop.addClass("in")}))},t}(),N=function(t,e,n,r){this.status=void 0,this.responseText=void 0,this.options=void 0,this.xhr=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(e)}catch(t){this.response=null}this.alert=null},E=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=void 0,this.freshness=void 0,this.exists=void 0,this.store=void 0,this.data=t,this.store=e,this.freshness=new Date,this.exists=!1}var e=t.prototype;return e.id=function(){return this.data.id},e.attribute=function(t){return this.data.attributes[t]},e.pushData=function(e){for(var n in e)if("object"==typeof e[n])for(var r in this.data[n]=this.data[n]||{},e[n])e[n][r]instanceof t&&(e[n][r]={data:t.getIdentifier(e[n][r])}),this.data[n][r]=e[n][r];else this.data[n]=e[n];this.freshness=new Date},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var o={type:this.data.type,id:this.data.id,attributes:e,relationships:void 0};if(e.relationships){for(var a in o.relationships={},e.relationships){var s=e.relationships[a];o.relationships[a]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)}}delete e.relationships}var c=this.copyData();this.pushData(o);var u={data:o};return n.meta&&(u.meta=n.meta),app.request(Object(i.a)({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.data[t.data.type]=r.store.data[t.data.type]||{},r.store.data[t.data.type][t.data.id]=r,r.store.pushPayload(t)}),(function(t){throw r.pushData(c),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?app.request(Object(i.a)({method:"DELETE",url:app.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+(this.exists?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},t.attribute=function(t,e){return function(){var n=this.data.attributes&&this.data.attributes[t];return e?e(n):n}},t.hasOne=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return app.store.getById(e.data.type,e.data.id)}return!1}},t.hasMany=function(t){return function(){if(this.data.relationships){var e=this.data.relationships[t];if(e)return e.data.map((function(t){return app.store.getById(t.type,t.id)}))}return!1}},t.transformDate=function(t){return t?new Date(t):null},t.getIdentifier=function(t){return{type:t.data.type,id:t.data.id}},t}(),C=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(E);function T(t,e){var n,r=Array.from(t),o={};return function(){var t=this,i=!1;return r.forEach((function(e){var n="function"==typeof t[e]?t[e]():t[e];o[e]!==n&&(i=!0,o[e]=n)})),i&&(n=e.apply(this,r.map((function(t){return o[t]})))),n}}var _=function(t,e){this.content=void 0,this.priority=void 0,this.key=0,this.content=t,this.priority=e},O=function(){function t(){this.items={}}var e=t.prototype;return e.isEmpty=function(){for(var t in this.items)if(this.items.hasOwnProperty(t))return!1;return!0},e.has=function(t){return!!this.items[t]},e.get=function(t){var e;return null===(e=this.items[t])||void 0===e?void 0:e.content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new _(e,n),this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&null!==this.items[e]&&this.items[e]instanceof _&&(this.items[e].content=Object(this.items[e].content),this.items[e].content.itemName=e,t.push(this.items[e]),this.items[e].key=t.length);return t.sort((function(t,e){return t.priority===e.priority?t.key-e.key:t.priority>e.priority?-1:1})).map((function(t){return t.content}))},t}(),S=n(1);function A(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}var j=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs,n=d(e,"type"),r=d(e,"icon");return e.className="Badge "+(n?"Badge--"+n:"")+" "+(e.className||""),e.title=d(e,"label")||"",m("span",e,r?A(r,{className:"Badge-icon"}):m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.props.label&&this.$().tooltip({container:"body"})},e}(S.a),P=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).title=E.attribute("title"),e.slug=E.attribute("slug"),e.createdAt=E.attribute("createdAt",E.transformDate),e.user=E.hasOne("user"),e.firstPost=E.hasOne("firstPost"),e.lastPostedAt=E.attribute("lastPostedAt",E.transformDate),e.lastPostedUser=E.hasOne("lastPostedUser"),e.lastPost=E.hasOne("lastPost"),e.lastPostNumber=E.attribute("lastPostNumber"),e.commentCount=E.attribute("commentCount"),e.replyCount=T("commentCount",(function(t){return Math.max(0,t-1)})),e.posts=E.hasMany("posts"),e.mostRelevantPost=E.hasOne("mostRelevantPost"),e.lastReadAt=E.attribute("lastReadAt",E.transformDate),e.lastReadPostNumber=E.attribute("lastReadPostNumber"),e.isUnread=T("unreadCount",(function(t){return!!t})),e.isRead=T("unreadCount",(function(t){return app.session.user&&!t})),e.hiddenAt=E.attribute("hiddenAt",E.transformDate),e.hiddenUser=E.hasOne("hiddenUser"),e.isHidden=T("hiddenAt",(function(t){return!!t})),e.canReply=E.attribute("canReply"),e.canRename=E.attribute("canRename"),e.canHide=E.attribute("canHide"),e.canDelete=E.attribute("canDelete"),e}o(e,t);var n=e.prototype;return n.removePost=function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some((function(e,r){if(t===e.id)return n.data.splice(r,1),!0}))},n.unreadCount=function(){var t=app.session.user;return t&&t.markedAllAsReadAt()<this.lastPostedAt()?Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0)):0},n.badges=function(){var t=new O;return this.isHidden()&&t.add("hidden",m(j,{type:"hidden",icon:"fas fa-trash",label:app.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]},e}(E);function M(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,o,i,a=Math.floor(6*t),s=6*t-a,c=n*(1-e),u=n*(1-s*e),l=n*(1-(1-s)*e);switch(a%6){case 0:r=n,o=l,i=c;break;case 1:r=u,o=n,i=c;break;case 2:r=c,o=n,i=l;break;case 3:r=c,o=u,i=n;break;case 4:r=l,o=c,i=n;break;case 5:r=n,o=c,i=u}return{r:Math.floor(255*r),g:Math.floor(255*o),b:Math.floor(255*i)}}(e%360/360,.3,.9);return""+r.r.toString(16)+r.g.toString(16)+r.b.toString(16)}var D=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.group&&(e.icon=e.group.icon(),e.style={backgroundColor:e.group.color()},e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(j),L=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).username=E.attribute("username"),e.displayName=E.attribute("displayName"),e.email=E.attribute("email"),e.isEmailConfirmed=E.attribute("isEmailConfirmed"),e.password=E.attribute("password"),e.avatarUrl=E.attribute("avatarUrl"),e.preferences=E.attribute("preferences"),e.groups=E.hasMany("groups"),e.joinTime=E.attribute("joinTime",E.transformDate),e.lastSeenAt=E.attribute("lastSeenAt",E.transformDate),e.markedAllAsReadAt=E.attribute("markedAllAsReadAt",E.transformDate),e.unreadNotificationCount=E.attribute("unreadNotificationCount"),e.newNotificationCount=E.attribute("newNotificationCount"),e.discussionCount=E.attribute("discussionCount"),e.commentCount=E.attribute("commentCount"),e.canEdit=E.attribute("canEdit"),e.canDelete=E.attribute("canDelete"),e.avatarColor=null,e.color=T(["username","avatarUrl","avatarColor"],(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+M(t)})),e}o(e,t);var n=e.prototype;return n.isOnline=function(){return this.lastSeenAt()>dayjs().subtract(5,"minutes").toDate()},n.badges=function(){var t=new O,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),D.component({group:e}))})),t},n.calculateAvatarColor=function(){var t=new Image,e=this;t.onload=function(){var t=new ColorThief;e.avatarColor=t.getColor(this),e.freshness=new Date,m.redraw()},t.crossOrigin="anonymous",t.src=this.avatarUrl()},n.savePreferences=function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})},e}(E);function I(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(I.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}I.removeSelectors=["blockquote","script"];var B=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).number=E.attribute("number"),e.discussion=E.hasOne("discussion"),e.createdAt=E.attribute("createdAt",E.transformDate),e.user=E.hasOne("user"),e.contentType=E.attribute("contentType"),e.content=E.attribute("content"),e.contentHtml=E.attribute("contentHtml"),e.contentPlain=T("contentHtml",I),e.editedAt=E.attribute("editedAt",E.transformDate),e.editedUser=E.hasOne("editedUser"),e.isEdited=T("editedAt",(function(t){return!!t})),e.hiddenAt=E.attribute("hiddenAt",E.transformDate),e.hiddenUser=E.hasOne("hiddenUser"),e.isHidden=T("hiddenAt",(function(t){return!!t})),e.canEdit=E.attribute("canEdit"),e.canHide=E.attribute("canHide"),e.canDelete=E.attribute("canDelete"),e}return o(e,t),e}(E),R=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).nameSingular=E.attribute("nameSingular"),e.namePlural=E.attribute("namePlural"),e.color=E.attribute("color"),e.icon=E.attribute("icon"),e}return o(e,t),e}(E);R.ADMINISTRATOR_ID="1",R.GUEST_ID="2",R.MEMBER_ID="3";var U=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).contentType=E.attribute("contentType"),e.content=E.attribute("content"),e.createdAt=E.attribute("createdAt",E.transformDate),e.isRead=E.attribute("isRead"),e.user=E.hasOne("user"),e.fromUser=E.hasOne("fromUser"),e.subject=E.hasOne("subhect"),e}return o(e,t),e}(E);U.ADMINISTRATOR_ID="1",U.GUEST_ID="2",U.MEMBER_ID="3";var F=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},H={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},z=function(){function t(t){void 0===t&&(t={}),this.opts=F({},H,t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),q(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",r="none";!0===e.shadow?r="0 2px 4px #000":"string"==typeof e.shadow&&(r=e.shadow);for(var o=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],r=0,o=t.split(",");r<o.length;r++){var i=o[r].match(e);if(null!==i){var a=+i[2],s=+i[5],c=i[4],u=i[7];0!==a||c||(c=u),0!==s||u||(u=c),c===u&&n.push({prefix:i[1]||"",x:a,y:s,xUnits:c,yUnits:u,end:i[8]})}}return n}(r),i=0;i<e.lines;i++){var a=~~(360/e.lines*i+e.rotate),s=q(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:Y(e.fadeColor,i),borderRadius:n,transformOrigin:"left",transform:"rotate("+a+"deg) translateX("+e.radius+"px)"}),c=i*e.direction/e.lines/e.speed;c-=1/e.speed;var u=q(document.createElement("div"),{width:"100%",height:"100%",background:Y(e.color,i),borderRadius:n,boxShadow:W(o,a),animation:1/e.speed+"s linear "+c+"s infinite "+e.animation});s.appendChild(u),t.appendChild(s)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function q(t,e){for(var n in e)t.style[n]=e[n];return t}function Y(t,e){return"string"==typeof t?t:t[e%t.length]}function W(t,e){for(var n=[],r=0,o=t;r<o.length;r++){var i=o[r],a=K(i.x,i.y,e);n.push(i.prefix+a[0]+i.xUnits+" "+a[1]+i.yUnits+i.end)}return n.join(", ")}function K(t,e,n){var r=n*Math.PI/180,o=Math.sin(r),i=Math.cos(r);return[Math.round(1e3*(t*i+e*o))/1e3,Math.round(1e3*(-t*o+e*i))/1e3]}var V=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(t){var e=t.attrs;return e.className="LoadingIndicator "+(e.className||""),delete e.size,m("div",e,m.trust(" "))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n={zIndex:"auto",color:this.$().css("color")},r={};switch(e.attrs.size){case"large":r={lines:10,length:8,width:4,radius:8};break;case"tiny":r={lines:8,length:2,width:2,radius:3};break;default:r={lines:8,length:4,width:3,radius:5}}new z(Object(i.a)({},n,{},r)).spin(this.element)},e}(S.a),Z=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){var t=this.props,e=t.children,n=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,["children"]);n.className=n.className||"",n.type=n.type||"button",n.title&&!this.props.children&&(n["aria-label"]=n.title),!n.title&&this.props.children&&(n.title=h(this.props.children));var r=d(n,"icon");r&&(n.className+=" hasIcon");var o=d(n,"loading");return(n.disabled||o)&&(n.className+=" "+classNames("disabled",o&&"loading"),delete n.onclick),m("button",n,this.getButtonContent(r,n.loading,e))},n.getButtonContent=function(t,e,n){return[t&&!0!==t?A(t,{className:"Button-icon"}):"",n?m("span",{className:"Button-label"},n):"",e?V.component({size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(S.a),G=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(S.a);function J(t){return(null==t?void 0:t.tag)===G}function X(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.forEach((function(r,o){(!J(r)||e&&!J(e)&&o!==t.length-1)&&(e=r,n.push(r))})),n}(t).map((function(t){var e,n,r,o,i=null===(e=t.tag)||void 0===e?void 0:e.isListItem,a=(null===(n=t.tag)||void 0===n?void 0:n.isActive)&&t.tag.isActive(t.attrs),s=(null===(r=t.attrs)||void 0===r?void 0:r.itemClassName)||t.itemClassName;i&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key);var c=i?t:m("li",{className:classNames(s,[t.itemName&&"item-"+t.itemName,a&&"active"]),key:(null===(o=t.attrs)||void 0===o?void 0:o.key)||t.itemName},t);return c.state=c.state||{},c}))}G.isListItem=!0;var Q,tt,et,nt,rt,ot=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.view=function(){var t=Object(i.a)({},this.props),e=d(t,"type");t.className="Alert Alert--"+e+" "+(t.className||"");var n=d(t,"children"),r=d(t,"controls")||[],o=d(t,"dismissible"),a=d(t,"ondismiss"),s=[];return(o||void 0===o)&&s.push(m(Z,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:a})),m("div",t,m("span",{className:"Alert-body"},n),m("ul",{className:"Alert-controls"},X(r.concat(s))))},e}(S.a),it=(Q=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],tt=function(){function t(t){var e=t.targetModal,n=t.triggers,r=void 0===n?[]:n,o=t.onShow,i=void 0===o?function(){}:o,a=t.onClose,s=void 0===a?function(){}:a,c=t.openTrigger,u=void 0===c?"data-micromodal-trigger":c,l=t.closeTrigger,f=void 0===l?"data-micromodal-close":l,p=t.disableScroll,d=void 0!==p&&p,h=t.disableFocus,m=void 0!==h&&h,v=t.awaitCloseAnimation,g=void 0!==v&&v,y=t.awaitOpenAnimation,b=void 0!==y&&y,w=t.debugMode,x=void 0!==w&&w;this.modal=document.getElementById(e),this.config={debugMode:x,disableScroll:d,openTrigger:u,closeTrigger:f,onShow:i,onClose:s,awaitCloseAnimation:g,awaitOpenAnimation:b,disableFocus:m},r.length>0&&this.registerTriggers.apply(this,r),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var e=t.prototype;return e.registerTriggers=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.filter(Boolean).forEach((function(e){e.addEventListener("click",(function(e){return t.showModal(e)}))}))},e.showModal=function(){var t=this;this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add("is-open"),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation?this.modal.addEventListener("animationend",(function e(){t.modal.removeEventListener("animationend",e,!1),t.setFocusToFirstNode()}),!1):this.setFocusToFirstNode(),this.config.onShow(this.modal,this.activeElement)},e.closeModal=function(){var t=this.modal;this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus(),this.config.onClose(this.modal),this.config.awaitCloseAnimation?this.modal.addEventListener("animationend",(function e(){t.classList.remove("is-open"),t.removeEventListener("animationend",e,!1)}),!1):t.classList.remove("is-open")},e.closeModalById=function(t){this.modal=document.getElementById(t),this.modal&&this.closeModal()},e.scrollBehaviour=function(t){if(this.config.disableScroll){var e=document.querySelector("body");switch(t){case"enable":Object(i.a)(e.style,{overflow:"",height:""});break;case"disable":Object(i.a)(e.style,{overflow:"hidden",height:"100vh"})}}},e.addEventListeners=function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)},e.removeEventListeners=function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)},e.onClick=function(t){t.target.hasAttribute(this.config.closeTrigger)&&(this.closeModal(),t.preventDefault())},e.onKeydown=function(t){27===t.keyCode&&this.closeModal(t),9===t.keyCode&&this.maintainFocus(t)},e.getFocusableNodes=function(){var t=this.modal.querySelectorAll(Q);return Array.apply(void 0,t)},e.setFocusToFirstNode=function(){if(!this.config.disableFocus){var t=this.getFocusableNodes();t.length&&t[0].focus()}},e.maintainFocus=function(t){var e=this.getFocusableNodes();if(this.modal.contains(document.activeElement)){var n=e.indexOf(document.activeElement);t.shiftKey&&0===n&&(e[e.length-1].focus(),t.preventDefault()),t.shiftKey||n!==e.length-1||(e[0].focus(),t.preventDefault())}else e[0].focus()},t}(),et=null,nt=function(t){if(!document.getElementById(t))return console.warn("MicroModal: ❗Seems like you have missed %c'"+t+"'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'+t+'"></div>'),!1},rt=function(t,e){if(function(t){t.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(t),!e)return!0;for(var n in e)nt(n);return!0},{init:function(t){var e=Object(i.a)({},{openTrigger:"data-micromodal-trigger"},t),n=[].concat(document.querySelectorAll("["+e.openTrigger+"]")),r=function(t,e){var n=[];return t.forEach((function(t){var r=t.attributes[e].value;void 0===n[r]&&(n[r]=[]),n[r].push(t)})),n}(n,e.openTrigger);if(!0!==e.debugMode||!1!==rt(n,r))for(var o in r){var a=r[o];e.targetModal=o,e.triggers=[].concat(a),et=new tt(e)}},show:function(t,e){var n=e||{};n.targetModal=t,!0===n.debugMode&&!1===nt(t)||(et=new tt(n)).showModal()},close:function(t){t?et.closeModalById(t):et.closeModal()}}),at=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).alert=void 0,e.loading=void 0,e}o(e,t);var n=e.prototype;return n.view=function(){return this.alert&&(this.alert.attrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.isDismissible()?m("div",{className:"Modal-close App-backControl"},Z.component({icon:"fas fa-times",onclick:this.hide.bind(this),className:"Button Button--icon Button--link"})):"",m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),this.alert&&m("div",{className:"Modal-alert"},this.alert),this.content())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.modal.component=this},n.isDismissible=function(){return!0},n.onsubmit=function(t){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.onhide=function(){},n.hide=function(){app.modal.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alert=t.alert,m.redraw(),422===t.status&&t.response.errors?this.$('form [name="'+t.response.errors[0].source.pointer.replace("/data/attributes/","")+'"]').select():this.onready()},e}(S.a),st=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).node=void 0,e.showing=void 0,e.hideTimeout=void 0,e.component=void 0,e}o(e,t);var n=e.prototype;return n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.modal=this},n.view=function(){return m("div",{className:"ModalManager modal",id:"Modal",onclick:this.onclick.bind(this),key:"modal"},this.node)},n.show=function(t){var e,n=this;if(!(t instanceof at||(null===(e=t.tag)||void 0===e?void 0:e.prototype)instanceof at))throw new Error("The ModalManager component can only show Modal components");clearTimeout(this.hideTimeout),this.showing=!0,this.node=t.tag?t:m(t),m.redraw(),$(".modal-backdrop").length||$("<div />").addClass("modal-backdrop").appendTo("body"),it.show("Modal",{awaitCloseAnimation:!0,onClose:function(){$(".modal-backdrop").fadeOut(200,(function(){this.remove()})),n.showing=!1}}),this.onready()},n.onclick=function(t){t.target===this.element&&this.close()},n.close=function(){this.showing&&(this.hideTimeout=setTimeout((function(){return it.close("Modal")})))},n.clear=function(){this.component&&this.component.onhide(),this.component=null,m.redraw()},n.onready=function(){var t;(null===(t=this.component)||void 0===t?void 0:t.onready)&&this.component.onready()},e}(S.a),ct=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.props.error.xhr?this.props.error.xhr.status+" "+this.props.error.xhr.statusText:""},n.content=function(){var t;try{t=JSON.stringify(JSON.parse(this.props.error.responseText),null,2)}catch(e){t=this.props.error.responseText}return m("div",{className:"Modal-body"},m("pre",null,this.props.error.options.method," ",this.props.error.options.url,m("br",null),m("br",null),t))},e}(at),ut=function(){function t(){this.forum=void 0,this.data=void 0,this.translator=new g,this.bus=new p,this.session=void 0,this.store=new b({forums:C,users:L,discussions:P,posts:B,groups:R,notifications:U}),this.drawer=new k,this.modal=void 0,this.cache={notifications:null},this.routes={},this.title="",this.titleCount=0,this.requestError=null}var e=t.prototype;return e.mount=function(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),new st),m.route(document.getElementById("content"),t+"/",function(t,e){void 0===e&&(e="");var n={};for(var r in t){var o=t[r];o.component&&(o.component.attrs||(o.component.attrs={}),o.component.attrs.routeName=r),n[e+o.path]=o.component}return n}(this.routes,t))},e.boot=function(t){this.data=t,this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new y(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.locale(),this.plugins(),this.setupRoutes(),this.mount(),this.bus.dispatch("app.booting")},e.locale=function(){this.translator.locale=this.data.locale,this.bus.dispatch("app.locale")},e.plugins=function(){this.bus.dispatch("app.plugins")},e.setupRoutes=function(){this.bus.dispatch("app.routes")},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){document.title=(this.titleCount?"("+this.titleCount+") ":"")+(this.title?this.title+" - ":"")+this.forum.attribute("title")},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 d(e,n)})),o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,w(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var r=n.method;w(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",r)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var o=n.extract;return n.extract=function(t){var e;e=o?o(t.responseText):t.responseText||null;var r=t.status;if(r<200||r>299)throw new N(r,e,n,t);if(t.getResponseHeader){var i=t.getResponseHeader("X-CSRF-Token");i&&(app.session.csrfToken=i)}try{return JSON.parse(e)}catch(r){throw new N(500,e,n,t)}},m.request(n).then((function(t){return t}),(function(t){var r;switch(e.requestError=t,t.status){case 422:r=t.response.errors.map((function(t){return[t.detail,m("br")]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:r=e.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:r=e.translator.trans("core.lib.error.not_found_message");break;case 429:r=e.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:r=e.translator.trans("core.lib.error.generic_message")}var o=app.forum.attribute("debug");t.alert=ot.component({type:"error",children:r,controls:o&&[Z.component({className:"Button Button--link",onclick:e.showDebug.bind(e,t),children:"DEBUG"})]});try{n.errorHandler(t)}catch(t){console.error(t)}return Promise.reject(t)}))},e.showDebug=function(t){this.modal.show(ct.component({error:t}))},t}(),lt=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 o=this.getCurrent();o&&o.name===t?Object(i.a)(o,{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),m.route.set("/")},t}(),ft=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){return new O},e}(S.a),pt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new O},e}(S.a),dt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).identification=void 0,e.password=void 0,e.remember=void 0,e}o(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=m.prop(this.props.identification||""),this.password=m.prop(this.props.password||""),this.remember=m.prop(!!this.props.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return app.translator.transText("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(pt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new O;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:app.translator.transText("core.forum.log_in.username_or_email_placeholder"),bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:app.translator.transText("core.forum.log_in.password_placeholder"),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}),app.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},Z.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.log_in.submit_button")})),-10),t},n.footer=function(){return[m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},app.translator.trans("core.forum.log_in.forgot_password_link"))),app.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},app.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=-1!==t.indexOf("@")?{email:t}:void 0;app.modal.show(new ForgotPasswordModal(e))},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$('[name="'+(this.identification()?"password":"identification")+'"]').select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),r=this.remember();app.session.login({identification:e,password:n,remember:r},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.attrs.children=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(at);function ht(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var o=t.displayName()||"?",a=t.avatarUrl();if(r&&(e.title=e.title||o),a)return m("img",Object(i.a)({},e,{src:a}));n=o.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}var mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).showing=void 0,e}o(e,t),e.initProps=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down"};var n=e.prototype;return n.view=function(){var t=this.props.children?X(this.props.children):[];return m("div",{className:"ButtonGroup Dropdown dropdown "+this.props.className+" itemCount"+t.length+(this.showing?" open":"")},this.getButton(),this.getMenu(t))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$("> .Dropdown-toggle").dropdown(),this.element.addEventListener("shown.bs.dropdown",(function(){n.showing=!0,n.props.onshow&&n.props.onshow(),m.redraw();var t=n.$(".Dropdown-menu"),e=t.hasClass("Dropdown-menu--right");t.removeClass("Dropdown-menu--top Dropdown-menu--right"),t.toggleClass("Dropdown-menu--top",t.offset().top+t.height()>$(window).scrollTop()+$(window).height()),t.offset().top<0&&t.removeClass("Dropdown-menu--top"),t.toggleClass("Dropdown-menu--right",e||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.element.addEventListener("hidden.bs.dropdown",(function(){n.showing=!1,n.props.onhide&&n.props.onhide(),m.redraw()}))},n.getButton=function(){return m("button",{className:"Dropdown-toggle "+this.props.buttonClassName,"data-toggle":"dropdown",onclick:this.props.onclick},this.getButtonContent())},n.getButtonContent=function(){var t=this.props;return[t.icon?A(t.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},t.label),t.caretIcon?A(t.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(S.a),vt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(t){t.active=this.isActive(t)},e.prototype.view=function(){var e=t.prototype.view.call(this);return e.tag=m.route.Link,e.attrs.active=String(e.attrs.active),e},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(Z),gt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right"};var n=e.prototype;return n.view=function(){return this.props.children=this.items().toArray(),t.prototype.view.call(this)},n.getButtonContent=function(){var t=app.session.user;return[ht(t)," ",m("span",{className:"Button-label"},v(t))]},n.items=function(){var t=new O,e=app.session.user;return t.add("profile",vt.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),t.add("settings",vt.component({icon:"fas fa-cog",children:app.translator.trans("core.forum.header.settings_button"),href:app.route("settings")}),50),app.forum.attribute("adminUrl")&&t.add("administration",vt.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank"}),0),t.add("separator",G.component(),-90),t.add("logOut",Z.component({icon:"fas fa-sign-out-alt",children:app.translator.trans("core.forum.header.log_out_button"),onclick:app.session.logout.bind(app.session)}),-100),t},e}(mt),yt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initProps.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(){var t=this.props.children.filter((function(t){return t.attrs.active}))[0],e=t&&t.attrs.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),A(this.props.caretIcon,{className:"Button-caret"})]},e}(mt),bt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.moreResults=!1,e.$scrollParent=void 0,e.scrollHandler=void 0,e}o(e,t);var n=e.prototype;return n.view=function(){var t=app.cache.notifications||[];return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},Z.component({className:"Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.transText("core.forum.notifications.mark_all_as_read_tooltip"),onclick:this.markAllAsRead.bind(this)})),m("h4",{className:"App-titleControl App-titleControl--text"},app.translator.trans("core.forum.notifications.title"))),m("div",{className:"NotificationList-content"},t.length?t.map((function(t){var e=[],n={};return t.forEach((function(t){var r=t.subject();if(void 0!==r){var o=!1;r instanceof P?o=r:r&&r.discussion&&(o=r.discussion());var i=o?o.id():0;n[i]=n[i]||{discussion:o,notifications:[]},n[i].notifications.push(t),-1===e.indexOf(n[i])&&e.push(n[i])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(m.route.Link,{className:"NotificationGroup-header",href:app.route.discussion(t.discussion)},e&&e.length?m("ul",{className:"NotificationGroup-badges badges"},X(e)):"",t.discussion.title()):m("div",{className:"NotificationGroup-header"},app.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=app.notificationComponents[t.contentType()];return e?m("li",null,e.component({notification:t})):""}))))}))})):"",this.loading?m(V,{className:"LoadingIndicator--block"}):t.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e);var r=this.$(".NotificationList-content"),o=this.$scrollParent="auto"===r.css("overflow")?r:$(window);this.scrollHandler=function(){var t=o.scrollTop(),e=o.height(),i=o===r?0:r.offset().top,a=r[0].scrollHeight;n.moreResults&&!n.loading&&t+e>=i+a&&n.loadMore()},o.on("scroll",this.scrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.scrollHandler)},n.load=function(){app.session.user.newNotificationCount()&&delete app.cache.notifications,app.cache.notifications||(app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},n.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=app.cache.notifications?{page:{offset:10*app.cache.notifications.length}}:null;return app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},n.parseResults=function(t){return app.cache.notifications=app.cache.notifications||[],t.length&&app.cache.notifications.push(t),this.moreResults=!!t.payload.links.next,t},n.markAllAsRead=function(){app.cache.notifications&&(app.session.user.pushAttributes({unreadNotificationCount:0}),app.cache.notifications.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),app.request({url:app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},e}(S.a),wt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).list=new bt,e}o(e,t),e.initProps=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||app.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",t.initProps.call(this,e)};var n=e.prototype;return n.getButton=function(){var e=this.getNewCount(),n=t.prototype.getButton.call(this);return n.attrs.title=this.props.label,n.attrs.className+=e?" new":"",n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[A(this.props.icon,{className:"Button-icon"}),t?m("span",{className:"NotificationsDropdown-unread"},t):"",m("span",{className:"Button-label"},this.props.label)]},n.getMenu=function(){return m("div",{className:"Dropdown-menu "+this.props.menuClassName,onclick:this.menuClick.bind(this)},this.showing?m(this.list):"")},n.onclick=function(){app.drawer.isOpen()?this.goToRoute():this.list.load()},n.goToRoute=function(){m.route.set(app.route("notifications"))},n.getUnreadCount=function(){return app.session.user.unreadNotificationCount()},n.getNewCount=function(){return app.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||2===t.which)&&t.stopPropagation()},e}(mt),xt=function(){function t(){this.callbacks={},this.whenCallback=function(){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks[38]=function(e){e.preventDefault(),t(e)},this},e.onDown=function(t){return this.callbacks[40]=function(e){e.preventDefault(),t(e)},this},e.onSelect=function(t){return this.callbacks[9]=this.callbacks[13]=function(e){e.preventDefault(),t(e)},this},e.onCancel=function(t){return this.callbacks[27]=function(e){e.stopPropagation(),e.preventDefault(),t(e)},this},e.onRemove=function(t){return this.callbacks[8]=function(e){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.on("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks[t.which];e&&e(t)}},t}();function kt(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),o=t,i=0;return n&&(e&&(i=Math.max(0,t.search(r)-n/2)),o=function(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}(o,n,i)),o=$("<div/>").text(o).html(),e&&(o=o.replace(r,"<mark>$&</mark>")),m.trust(o)}var Nt=function(){},Et=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).results={},e}o(e,t);var n=e.prototype;return n.search=function(t){var e=this;t=t.toLowerCase(),this.results[t]=[];var n={filter:{q:t},page:{limit:3},include:"mostRelevantPost"};return app.store.find("discussions",n).then((function(n){return e.results[t]=n}))},n.view=function(t){t=t.toLowerCase();var e=this.results[t]||[];return[m("li",{className:"Dropdown-header"},app.translator.trans("core.forum.search.discussions_heading")),m("li",null,vt.component({icon:"fas fa-search",children:app.translator.trans("core.forum.search.all_discussions_button",{query:t}),href:app.route("index",{q:t})})),e.map((function(e){var n=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(m.route.Link,{href:app.route.discussion(e,n&&n.number())},m("div",{className:"DiscussionSearchResult-title"},kt(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},kt(n.contentPlain(),t,100)):""))}))]},e}(Nt),Ct=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).results={},e}o(e,t);var n=e.prototype;return n.search=function(t){var e=this;return app.store.find("users",{filter:{q:t},page:{limit:5}}).then((function(n){e.results[t]=n,m.redraw()}))},n.view=function(t){t=t.toLowerCase();var e=(this.results[t]||[]).concat(app.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"},app.translator.trans("core.forum.search.users_heading")),e.map((function(e){var n=v(e);return n.children||(n.children=[n.text],delete n.text),n.children[0]=kt(n.children[0],t),m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(m.route.Link,{href:app.route.user(e)},ht(e),n))}))]:""},e}(Nt),Tt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).value=m.prop(""),e.hasFocus=!1,e.sources=null,e.loadingSources=0,e.searched=[],e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e}o(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.getCurrentSearch();return void 0===this.value()&&this.value(e||""),this.sources||(this.sources=this.sourceItems().toArray()),this.sources.length?m("div",{className:"Search "+classNames({open:this.value()&&this.hasFocus,focused:this.hasFocus,active:!!e,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{className:"FormControl",type:"search",placeholder:app.translator.transText("core.forum.header.search_placeholder"),value:this.value(),oninput:m.withAttr("value",this.value),onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?V.component({size:"tiny",className:"Button Button--icon Button--link"}):e?m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this)},A("fas fa-times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.value()&&this.hasFocus?this.sources.map((function(e){return e.view(t.value())})):"")):m("div",null)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.setIndex(this.getCurrentNumericIndex());var r=this;this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return n.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){r.setIndex(r.selectableItems().index(this))}));var o=this.$("input");this.navigator=new xt,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this)).onCancel(this.clear.bind(this)).bindTo(o),o.on("input focus",(function(){var t=this.value.toLowerCase();t&&(clearTimeout(r.searchTimeout),r.searchTimeout=setTimeout((function(){-1===r.searched.indexOf(t)&&(t.length>=3&&r.sources.map((function(e){e.search&&(r.loadingSources++,e.search(t).then((function(){r.loadingSources=Math.max(0,r.loadingSources-1),m.redraw()})))})),r.searched.push(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))},n.getCurrentSearch=function(){return app.current&&"function"==typeof app.current.searching&&app.current.searching()},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.value()?m.route.set(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.value(""),this.getCurrentSearch()?app.current.clearSearch():m.redraw()},n.sourceItems=function(){var t=new O;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new Et),app.forum.attribute("canViewUserList")&&t.add("users",new Ct),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return 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){var n=this.selectableItems(),r=n.parent(),o=t;t<0?o=n.length-1:t>=n.length&&(o=0);var i=n.removeClass("active").eq(o).addClass("active");if(this.index=i.attr("data-index")||o,e){var a,s=r.scrollTop(),c=r.offset().top,u=c+r.outerHeight(),l=i.offset().top,f=l+i.outerHeight();l<c?a=s-c+l-parseInt(r.css("padding-top"),10):f>u&&(a=s-u+f+parseInt(r.css("padding-bottom"),10)),void 0!==a&&r.animate({scrollTop:a},100)}},e}(S.a),_t=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},X(this.items().toArray()))},n.items=function(){var t=new O;if(t.add("search",Tt.component(),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(Z.component({active:app.data.locale===t,children:app.data.locales[t],icon:app.data.locale!==t||"fas fa-check",onclick:function(){app.session.user?app.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())}}))};for(var r in app.data.locales)n(r);t.add("locale",yt.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",wt.component(),10),t.add("session",gt.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",Z.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new SignUpModal)}}),10),t.add("logIn",Z.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(new dt)}}),0)),t},e}(S.a),Ot=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.oninit=function(){console.log("IndexPage#oninit")},n.view=function(){return m("div",{class:"container"},m("h1",null,"hi"))},e}(S.a),St=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).bodyClass="",e}o(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.previous=app.current,app.current=this,app.drawer.hide(),app.modal.close()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").removeClass(this.bodyClass)},e}(S.a);function At(t){var e=t.dom,n=$(e),r=$("#header"),o=n.find("> ul")[0];$(window).off(".affix"),new hcSticky(o,{stickTo:e,top:r.outerHeight(!0)+parseInt(n.css("margin-top"),10)})}function jt(t){var e=dayjs(t),n=dayjs();e.isAfter(n)&&(e=n);return e.diff(dayjs())<-2592e6?e.year()===dayjs().year()?e.format("D MMM"):e.format("MMM 'YY"):e.fromNow()}var Pt={controls:function(t,e){var n=this,r=new O;return["user","moderation","destructive"].forEach((function(o){var i=n[o+"Controls"](t,e).toArray();i.length&&(i.forEach((function(t){return r.add(t.itemName,t)})),r.add(o+"Separator",G.component()))})),r},userControls:function(){return new O},moderationControls:function(t){var e=new O;return t.canEdit()&&e.add("edit",Z.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.user_controls.edit_button"),onclick:this.editAction.bind(this,t)})),e},destructiveControls:function(t){var e=new O;return"1"!==t.id()&&t.canDelete()&&e.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user_controls.delete_button"),onclick:this.deleteAction.bind(this,t)})),e},deleteAction:function(t){var e=this;confirm(app.translator.transText("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current instanceof Lt&&app.current.user===t?app.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n=t.data.attributes,r=n.username,o=n.email,i="core.forum.user_controls.delete_"+e+"_message";app.alerts.show(ot.component({type:e,children:app.translator.trans(i,{username:r,email:o})}))},editAction:function(t){app.modal.show(new EditUserModal({user:t}))}},Mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.isDraggedOver=!1,e}o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||""};var n=e.prototype;return n.view=function(){var t=this.props.user;return m("div",{className:"AvatarEditor Dropdown "+this.props.className+(this.loading?" loading":"")+(this.isDraggedOver?" dragover":"")},ht(t),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:app.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?V.component():t.avatarUrl()?A("fas fa-pencil-alt"):A("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},X(this.controlItems().toArray())))},n.controlItems=function(){var t=new O;return t.add("upload",Z.component({icon:"fas fa-upload",children:app.translator.trans("core.forum.user.avatar_upload_button"),onclick:this.openPicker.bind(this)})),t.add("remove",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.user.avatar_remove_button"),onclick:this.remove.bind(this)})),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.props.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;if(!this.loading){this.props.user;$('<input type="file">').appendTo("body").hide().click().on("change",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.user,n=new FormData;data.append("avatar",t),this.loading=!0,m.redraw(),app.request({method:"POST",url:app.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.props.user;this.loading=!0,m.redraw(),app.request({method:"DELETE",url:app.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){app.store.pushPayload(t),delete this.props.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(S.a),Dt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.view=function(){var t=this.props.user,e=Pt.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:"UserCard "+(this.props.className||""),style:n?{backgroundColor:n}:""},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?mt.component({children:e,className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.props.controlsButtonClassName,label:app.translator.trans("core.forum.user_controls.button"),icon:"fas fa-ellipsis-v"}):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.props.editable?[Mt.component({user:t,className:"UserCard-avatar"}),v(t)]:m(m.route.Link,{href:app.route.user(t)},m("div",{className:"UserCard-avatar"},ht(t)),v(t))),r.length?m("ul",{className:"UserCard-badges badges"},X(r)):"",m("ul",{className:"UserCard-info"},X(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new O,e=this.props.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(r?" online":"")},r?[A("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[A("far fa-clock")," ",jt(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:jt(e.joinTime())})),t},e}(S.a),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).user=void 0,e.bodyClass="App--user",e.username=void 0,e}o(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"UserPage"},this.user?[Dt.component({user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===app.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"sideNav UserPage-nav",config:At},m("ul",null,X(this.sidebarItems().toArray()))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[V.component({lassName:"LoadingIndicator--block"})])},n.show=function(t){this.user=t,app.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();app.preloadedApiDocument(),n!=this.username&&(this.username=n,app.store.all("users").some((function(r){if((r.username().toLowerCase()===n||r.id()===t)&&r.joinTime())return e.show(r),!0})),this.user||app.store.find("users",t).then(this.show.bind(this)))},n.sidebarItems=function(){var t=new O;return t.add("nav",yt.component({children:this.navItems().toArray(),className:"App-titleControl",buttonClassName:"Button"})),t},n.navItems=function(){var t=new O,e=this.user;return t.add("posts",vt.component({href:app.route("user.posts",{username:e.username()}),children:[app.translator.trans("core.forum.user.posts_link"),m("span",{className:"Button-badge"},e.commentCount())],icon:"far fa-comment"}),100),t.add("discussions",vt.component({href:app.route("user.discussions",{username:e.username()}),children:[app.translator.trans("core.forum.user.discussions_link"),m("span",{className:"Button-badge"},e.discussionCount())],icon:"fas fa-bars"}),90),app.session.user===e&&(t.add("separator",G.component(),-90),t.add("settings",vt.component({href:app.route("settings"),children:app.translator.trans("core.forum.user.settings_link"),icon:"fas fa-cog"}),-100)),t},e}(St),$t=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))},e}(S.a),It={controls:function(t,e){var n=this,r=new O;return["user","moderation","destructive"].forEach((function(o){var i=n[o+"Controls"](t,e).toArray();i.length&&(i.forEach((function(t){return r.add(t.itemName,t)})),r.add(o+"Separator",G.component()))})),r},userControls:function(t,e){return new O},moderationControls:function(t,e){var n=new O;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",Z.component({icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},app.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new O;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",Z.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.post_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&n.add("delete",Z.component({icon:"fas fa-times",children:app.translator.trans("core.forum.post_controls.delete_forever_button"),onclick:this.deleteAction.bind(t,e)}))):t.canHide()&&n.add("hide",Z.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.post_controls.delete_button"),onclick:this.hideAction.bind(t)})),n},editAction:function(){var t=this;return new Promise((function(e){var n=new EditPostComposer({post:t});app.composer.load(n),app.composer.show(),e(n)}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.session.user}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(app.cache.discussionList&&app.cache.discussionList.removeDiscussion(t),app.viewingDiscussion(t)&&app.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},Bt=function(){function t(){this.callbacks=void 0,this.data={};for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e}var e=t.prototype;return e.check=function(){var t;(t=this.callbacks).concat.apply(t,arguments)},e.update=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,r){var o=n();o!==t.data[r]&&(t.data[r]=o,e=!0)})),e},t}(),Rt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.controlsOpen=!1,e.subtree=void 0,e}o(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new Bt((function(){return n.props.post.freshness}),(function(){var t=n.props.post.user();return null==t?void 0:t.freshness}),(function(){return n.controlsOpen}))},n.view=function(){var t=this,e=It.controls(this.props.post,this).toArray(),n=this.attrs();return n.className=classNames(this.classes(n.className)),m("article",n,m("div",null,this.content(),m("aside",{className:"Post-actions"},m("ul",null,X(this.actionItems().toArray()),e.length?m("li",null,m(mt,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return t.$(".Post-actions").addClass("open")},onhide:function(){return t.$(".Post-actions").removeClass("open")}},e)):"")),m("footer",{className:"Post-footer"},m("ul",null,X(this.footerItems().toArray())))),");")},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.update()},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("open",r.hasClass("open"))},n.attrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]);return this.loading&&e.push("Post--loading"),this.props.post.user()===app.session.user&&e.push("Post--by-actor"),e},n.actionItems=function(){return new O},n.footerItems=function(){return new O},e}(S.a);var Ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).cardVisible=!1,e}o(e,t);var n=e.prototype;return n.view=function(){var t=this.props.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,ht(e,{className:"PostUser-avatar"})," ",v(e)));var n="";return!t.isHidden()&&this.cardVisible&&(n=Dt.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(vt,{href:app.route.user(e)},ht(e,{className:"PostUser-avatar"}),function(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},A("fas fa-circle"))}(e),v(e))),m("ul",{className:"PostUser-badges badges"},X(e.badges().toArray())),n)},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.cardVisible=!0,m.redraw(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.cardVisible=!1,m.redraw()}))},e}(S.a),Ft=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).revealContent=!1,e.postUser=void 0,e}o(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.postUser=Ut.component({post:this.props.post}),this.subtree.check((function(){return n.postUser.cardVisible}),(function(){return n.isEditing()}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",X(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m("div",{className:"Post-preview",config:this.configPreview.bind(this)}):m.trust(this.props.post.contentHtml()))])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.isEditing()?"":this.props.post.contentHtml();e.contentHtml!==n&&this.$(".Post-body script").each((function(){eval.call(window,$(this).text())})),e.contentHtml=n},n.isEditing=function(){return!1},n.attrs=function(){var e=this.props.post,n=t.prototype.attrs.call(this);return n.className=(n.className||"")+" "+classNames({CommentPost:!0,"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.configPreview=function(t,e,n){if(!e){var r,o=function(){var e=app.composer.component.content();r!==e&&(r=e,s9e.TextFormatter.preview(r||"",t))};o();var i=setInterval(o,50);n.onunload=function(){return clearInterval(i)}}},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=new O,e=this.props.post,n={post:e};return t.add("user",this.postUser,100),e.isEdited()&&!e.isHidden()&&t.add("edited",PostEdited.component(n)),e.isHidden()&&t.add("toggle",Z.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),t},e}(Rt),Ht=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}o(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(e.attrs.username)},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.loadUser(e.attrs.username)},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=V.component():this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},Z.component({children:app.translator.trans("core.forum.user.posts_load_more_button"),className:"Button",onclick:this.loadMore.bind(this)}))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},app.translator.trans("core.forum.user.in_discussion_text",{discussion:m(m.route.Link,{href:app.route.post(t)},t.discussion().title())})),Ft.component({post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m($t,{text:app.translator.trans("core.forum.user.posts_empty_text")}));var t},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 app.store.find("posts",{filter:{user:this.user.id(),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){return this.loading=!1,[].push.apply(this.posts,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},e}(Lt),zt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.view=function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,X(this.props.children)))},e}(S.a),qt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e}o(e,t);var n=e.prototype;return n.view=function(){var t=classNames("Checkbox",this.props.className,this.props.state?"on":"off",this.loading&&"loading",this.props.disabled&&"disabled");return m("label",{className:t},m("input",{type:"checkbox",checked:this.props.state,disabled:this.props.disabled,onchange:m.withAttr("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display"},this.getDisplay()),this.props.children)},n.getDisplay=function(){return this.loading?V.component({size:"tiny"}):A(this.props.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.props.onchange&&this.props.onchange(t,this)},e}(S.a),Yt=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.loading?t.prototype.getDisplay.call(this):""},e}(qt),Wt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).methods=e.notificationMethods().toArray(),e.inputs={},e.types=e.notificationTypes().toArray(),e}o(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.types.forEach((function(t){return n.methods.forEach((function(e){var r=n.preferenceKey(t.name,e.name),o=n.props.user.preferences()[r];n.inputs[r]=new qt({state:!!o,disabled:void 0===o,onchange:function(){return n.toggle([r])}})}))}))},n.view=function(){var t=this;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)},A(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(e){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,e.name)},A(e.icon)," ",e.label),t.methods.map((function(n){return m("td",{className:"NotificationGrid-checkbox"},t.inputs[t.preferenceKey(e.name,n.name)].render())})))}))))},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.props.user,r=n.preferences(),o=!r[t[0]];t.forEach((function(t){var n=e.inputs[t];n.loading=!0,n.props.state=o,r[t]=n.props.state=o})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.inputs[t].loading=!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!e.inputs[t].props.disabled}));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!e.inputs[t].props.disabled}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new O;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:app.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:app.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new O;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:app.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(S.a),Kt=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(app.session.user),app.setTitle(app.translator.transText("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,X(this.settingsItems().toArray())))},n.settingsItems=function(){var t=new O;return t.add("account",zt.component({label:app.translator.trans("core.forum.settings.account_heading"),className:"Settings-account",children:this.accountItems().toArray()})),t.add("notifications",zt.component({label:app.translator.trans("core.forum.settings.notifications_heading"),className:"Settings-notifications",children:this.notificationsItems().toArray()})),t.add("privacy",zt.component({label:app.translator.trans("core.forum.settings.privacy_heading"),className:"Settings-privacy",children:this.privacyItems().toArray()})),t},n.accountItems=function(){var t=new O;return t.add("changePassword",Z.component({children:app.translator.trans("core.forum.settings.change_password_button"),className:"Button",onclick:function(){return app.modal.show(new ChangePasswordModal)}})),t.add("changeEmail",Z.component({children:app.translator.trans("core.forum.settings.change_email_button"),className:"Button",onclick:function(){return app.modal.show(new ChangeEmailModal)}})),t},n.notificationsItems=function(){var t=new O;return t.add("notificationGrid",Wt.component({user:this.user})),t},n.preferenceSaver=function(t){var e=this;return function(n,r){var o;r&&(r.loading=!0),m.redraw(),e.user.savePreferences((o={},o[t]=n,o)).then((function(){r&&(r.loading=!1),m.redraw()}))}},n.privacyItems=function(){var t=this,e=new O;return e.add("discloseOnline",Yt.component({children:app.translator.trans("core.forum.settings.privacy_disclose_online_label"),state:this.user.preferences().discloseOnline,onchange:function(e,n){t.user.pushAttributes({lastSeenAt:null}),t.preferenceSaver("discloseOnline")(e,n)}})),e},e}(Lt),Vt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).routes={index:{path:"/all",component:Ot},discussion:{path:"/d/:id",component:Ot},"discussion.near":{path:"/d/:id/:near",component:Ot},user:{path:"/u/:username",component:Ht},"user.posts":{path:"/u/:username",component:Ht},"user.discussions":{path:"/u/:username/discussions",component:Ht},settings:{path:"/settings",component:Kt},"index.filter":{path:"/:filter",component:Ot}},e.history=new lt,e.previous=void 0,e.current=void 0,e}o(e,t);var n=e.prototype;return n.mount=function(){var e=this.forum.attribute("defaultRoute"),n="index";for(var r in this.routes)this.routes[r].path===e&&(n=r);this.routes[n].path="/",this.history.push(n,this.translator.transText("core.forum.header.back_to_index_tooltip"),"/"),m.mount(document.getElementById("header-primary"),new ft),m.mount(document.getElementById("header-secondary"),new _t),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),$("#home-link").click((function(t){t.ctrlKey||t.metaKey||2===t.which||(t.preventDefault(),app.history.home(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw()))}))},n.setupRoutes=function(){var e=this;t.prototype.setupRoutes.call(this),this.route.discussion=function(t,n){var r=t.slug();return e.route(n&&1!==n?"discussion.near":"discussion",{id:t.id()+(r.trim()?"-"+r:""),near:n&&1!==n?n:void 0})},this.route.post=function(t){return e.route.discussion(t.discussion(),t.number())},this.route.user=function(t){return e.route("user",{username:t.username()})}},e}(ut),Zt={extend:r,"components/Modal":at},Gt=Object(i.a)(Zt,{"components/IndexPage":Ot,Forum:Vt}),Jt=new Vt;window.app=Jt,Jt.bus.subscribe("app.plugins",(function(){var t=flarum.extensions;Object.keys(t).forEach((function(e){t[e]}))})),Gt.app=Jt,n.d(e,"app",(function(){return Jt})),n.d(e,"compat",(function(){return Gt}))}]);
|
|
//# sourceMappingURL=forum.js.map
|