mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 09:32:45 +08:00
53 lines
324 KiB
JavaScript
53 lines
324 KiB
JavaScript
flarum.core=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},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="",n(n.s=98)}([function(t,e,n){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),o=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),this.data=t,this.freshness=new Date,this.exists=!1,this.store=e}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 i in this.data[n]=this.data[n]||{},e[n])e[n][i]instanceof t&&(e[n][i]={data:t.getIdentifier(e[n][i])}),this.data[n][i]=e[n][i];else this.data[n]=e[n];this.freshness=new Date},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var o=this;void 0===n&&(n={});var r={type:this.data.type,id:this.data.id,attributes:e};if(e.relationships){for(var s in r.relationships={},e.relationships){var a=e.relationships[s];r.relationships[s]={data:a instanceof Array?a.map(t.getIdentifier):t.getIdentifier(a)}}delete e.relationships}var c=this.copyData();this.pushData(r);var u={data:r};return n.meta&&(u.meta=n.meta),app.request(Object(i.a)({method:this.exists?"PATCH":"POST",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:u},n)).then((function(t){return o.store.data[t.data.type]=o.store.data[t.data.type]||{},o.store.data[t.data.type][t.data.id]=o,o.store.pushPayload(t)}),(function(t){throw o.pushData(c),m.lazyRedraw(),t}))},e.delete=function(t,e){var n=this;return void 0===e&&(e={}),this.exists?app.request(Object(i.a)({method:"DELETE",url:app.forum.attribute("apiUrl")+this.apiEndpoint(),data:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):m.deferred().resolve().promise},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}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(4),o=n(0),r=n(3),s=n(7),a=n(10),c=n(9),u=n(14),l=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.props);delete t.children,t.className=t.className||"",t.type=t.type||"button",t.title&&!this.props.children&&(t["aria-label"]=t.title),!t.title&&this.props.children&&(t.title=Object(c.a)(this.props.children)),Object(a.a)(t,"icon")&&(t.className+=" hasIcon");var e=Object(a.a)(t,"loading");return(t.disabled||e)&&(t.className+=" disabled"+(e?" loading":""),delete t.onclick),m("button",t,this.getButtonContent())},n.getButtonContent=function(){var t=this.props.icon;return[t&&!0!==t?Object(s.a)(t,{className:"Button-icon"}):"",this.props.children?m("span",{className:"Button-label"},this.props.children):"",this.props.loading?u.a.component({size:"tiny",className:"LoadingIndicator--inline"}):""]},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),o=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=null),e&&(t.children=e),this.constructor.initProps(t),this.props=t,this.element=null,this.retain=!1,this.init()}var e=t.prototype;return e.init=function(){},e.onunload=function(){},e.render=function(){var t=this,e=this.retain?{subtree:"retain"}:this.view();e.attrs=e.attrs||{};var n=e.attrs.config;return e.attrs.config=function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];t.element=i[0],t.config.apply(t,i.slice(1)),n&&n.apply(t,i)},e},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.config=function(){},e.view=function(){throw new Error("Component#view must be implemented by subclass")},t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Object(i.a)({},t);e&&(n.children=e),this.initProps(n);var o=function(t){return t.props=n,t.render()};o.$original=this.prototype.view;var r={controller:this.bind(void 0,n),view:o,props:n,component:this};return n.key&&(r.attrs={key:n.key}),r},t.initProps=function(t){},t}()},function(t,e,n){"use strict";function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(6),o=function(t,e){Object(i.a)(this,"content",void 0),Object(i.a)(this,"priority",void 0),Object(i.a)(this,"key",void 0),this.content=t,this.priority=e},r=function(){function t(){Object(i.a)(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){return this.items[t].content},e.add=function(t,e,n){return void 0===n&&(n=0),this.items[t]=new o(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.items[t]&&(null!==e&&(this.items[t].content=e),null!==n&&(this.items[t].priority=n)),this},e.remove=function(t){return delete this.items[t],this},e.merge=function(t){for(var e in t.items)t.items.hasOwnProperty(e)&&t.items[e]instanceof o&&(this.items[e]=t.items[e]);return this},e.toArray=function(){var t=[];for(var e in this.items)this.items.hasOwnProperty(e)&&this.items[e]instanceof o&&(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}()},function(t,e,n){"use strict";function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(23),o=n(27);function r(t){return t&&t.component===i.a}function s(t){return t instanceof Array||(t=[t]),function(t){var e,n=[];return t.forEach((function(i,o){(!r(i)||e&&!r(e)&&o!==t.length-1)&&(e=i,n.push(i))})),n}(t).map((function(t){var e=t.component&&t.component.isListItem,n=t.component&&t.component.isActive&&t.component.isActive(t.props),i=t.props?t.props.itemClassName:t.itemClassName;return e&&(t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName),e?t:m("li",{className:Object(o.a)([t.itemName?"item-"+t.itemName:"",i,n?"active":""]),key:t.itemName},t)}))}},function(t,e,n){"use strict";function i(t){return t instanceof Array?t.map((function(t){return i(t)})).join(""):"object"==typeof t&&null!==t?i(t.children):t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){var n=t[e];return delete t[e],n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(4),o=n(0),r=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(s.prototype,{nameSingular:r.a.attribute("nameSingular"),namePlural:r.a.attribute("namePlural"),color:r.a.attribute("color"),icon:r.a.attribute("icon"),isHidden:r.a.attribute("isHidden")}),s.ADMINISTRATOR_ID="1",s.GUEST_ID="2",s.MEMBER_ID="3",e.a=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(0),o=n(6),r=n(3),s=n(18),a=n(2),c=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){this.alertAttrs=null},n.config=function(t,e){var n=this;t||(this.props.onshow((function(){return n.onready()})),e.onunload=function(){n.props.onhide()})},n.view=function(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:"Modal modal-dialog "+this.className()},m("div",{className:"Modal-content"},this.constructor.isDismissible?m("div",{className:"Modal-close App-backControl"},a.a.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.alertAttrs?m("div",{className:"Modal-alert"},s.a.component(this.alertAttrs)):"",this.content())))},n.className=function(){},n.title=function(){},n.content=function(){},n.onsubmit=function(){},n.onready=function(){this.$("form").find("input, select, textarea").first().focus().select()},n.hide=function(){this.props.onhide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){this.alertAttrs=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}(r.a);Object(o.a)(c,"isDismissible",!0)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),o=n(3),r=n(7),s=n(8),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"",e.buttonClassName=e.buttonClassName||"",e.menuClassName=e.menuClassName||"",e.label=e.label||"",e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-caret-down"};var n=e.prototype;return n.init=function(){this.showing=!1},n.view=function(){var t=this.props.children?Object(s.a)(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.config=function(t){var e=this;t||(this.$().on("shown.bs.dropdown",(function(){e.showing=!0,e.props.onshow&&e.props.onshow(),m.redraw();var t=e.$(".Dropdown-menu"),n=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",n||t.offset().left+t.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){e.showing=!1,e.props.onhide&&e.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(){return[this.props.icon?Object(r.a)(this.props.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.props.label),this.props.caretIcon?Object(r.a)(this.props.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.props.menuClassName},t)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=n(4),o=n(0),r=n(3),s=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"none",position:"absolute"},c=function(){function t(t){void 0===t&&(t={}),this.opts=s({},a,t)}return t.prototype.spin=function(t){var e,n,i,o=this;this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),p(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),"undefined"!=typeof requestAnimationFrame?(e=requestAnimationFrame,n=function(){return performance.now()}):(e=function(t){return setTimeout(t,1e3/o.opts.fps)},n=function(){return Date.now()});var r=0,s=function(){var t,a,c=n();if(void 0===i&&(i=c-1),r+=(t=c-i,a=o.opts.speed,t/1e3*a),i=c,r>1&&(r-=Math.floor(r)),o.el.childNodes.length===o.opts.lines)for(var l=0;l<o.opts.lines;l++){var p=u(l,r,o.opts);o.el.childNodes[l].childNodes[0].style.opacity=p.toString()}o.animateId=o.el?e(s):void 0};return function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",i="none";!0===e.shadow?i="0 2px 4px #000":"string"==typeof e.shadow&&(i=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=[],i=0,o=t.split(",");i<o.length;i++){var r=o[i].match(e);if(null!==r){var s=+r[2],a=+r[5],c=r[4],u=r[7];0!==s||c||(c=u),0!==a||u||(u=c),c===u&&n.push({prefix:r[1]||"",x:s,y:a,xUnits:c,yUnits:u,end:r[8]})}}return n}(i),r=0;r<e.lines;r++){var s=~~(360/e.lines*r+e.rotate),a=p(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:d(e.fadeColor,r),borderRadius:n,transformOrigin:"left",transform:"rotate("+s+"deg) translateX("+e.radius+"px)"}),c=p(document.createElement("div"),{width:"100%",height:"100%",background:d(e.color,r),borderRadius:n,boxShadow:h(o,s),opacity:e.opacity});a.appendChild(c),t.appendChild(a)}}(this.el,this.opts),s(),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 u(t,e,n){var i=e-(t+1)/n.lines*n.direction;(i<0||i>1)&&(i+=n.direction);var o=1-i/(n.trail/100);return o<0?n.opacity:o*(1-n.opacity)+n.opacity}function l(t,e){if(void 0!==t.style[e])return e;var n="ms"+e.charAt(0).toUpperCase()+e.slice(1);return void 0!==t.style[n]?n:""}function p(t,e){for(var n in e)t.style[l(t,n)||n]=e[n];return t}function d(t,e){return"string"==typeof t?t:t[e%t.length]}function h(t,e){for(var n=[],i=0,o=t;i<o.length;i++){var r=o[i],s=f(r.x,r.y,e);n.push(r.prefix+s[0]+r.xUnits+" "+s[1]+r.yUnits+r.end)}return n.join(", ")}function f(t,e,n){var i=n*Math.PI/180,o=Math.sin(i),r=Math.cos(i);return[Math.round(1e3*(t*r+e*o))/1e3,Math.round(1e3*(-t*o+e*r))/1e3]}var v=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.props);return t.className="LoadingIndicator "+(t.className||""),delete t.size,m("div",t,m.trust(" "))},n.config=function(t){if(!t){var e={zIndex:"auto",color:this.$().css("color")};switch(this.props.size){case"large":Object(i.a)(e,{lines:10,length:8,width:4,radius:8});break;case"tiny":Object(i.a)(e,{lines:8,length:2,width:2,radius:3});break;default:Object(i.a)(e,{lines:8,length:4,width:3,radius:5})}new c(e).spin(this.element)}},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4);function o(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",o="undefined"===e.title||e.title;if(o||delete e.title,t){var r=t.displayName()||"?",s=t.avatarUrl();if(o&&(e.title=e.title||r),s)return m("img",Object(i.a)({},e,{src:s,alt:""}));n=r.charAt(0).toUpperCase(),e.style={background:t.color()}}return m("span",e,n)}},function(t,e,n){"use strict";function i(t){var e=t&&t.displayName()||app.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i,o=e.slice(0,-1),r=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return o.forEach((function(n){var i="function"==typeof t[n]?t[n]():t[n];s[n]!==i&&(e=!0,s[n]=i)})),e&&(i=r.apply(this,o.map((function(t){return s[t]})))),i}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(4),o=n(0),r=n(3),s=n(2),a=n(8),c=n(10),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e.prototype.view=function(){var t=Object(i.a)({},this.props),e=Object(c.a)(t,"type");t.className="Alert Alert--"+e+" "+(t.className||"");var n=Object(c.a)(t,"children"),o=Object(c.a)(t,"controls")||[],r=Object(c.a)(t,"dismissible"),u=Object(c.a)(t,"ondismiss"),l=[];return(r||void 0===r)&&l.push(m(s.a,{icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",t,m("span",{className:"Alert-body"},n),m("ul",{className:"Alert-controls"},Object(a.a)(o.concat(l))))},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(41),s=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.init=function(){app.previous=app.current,app.current=new r.a(this.constructor),app.drawer.hide(),app.modal.close(),this.bodyClass=""},n.config=function(t,e){var n=this;t||this.bodyClass&&($("#app").addClass(this.bodyClass),e.onunload=function(){return $("#app").removeClass(n.bodyClass)})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(t){t.active=this.isActive(t),t.config=t.config||m.route},e.prototype.view=function(){var e=t.prototype.view.call(this);return e.tag="a",e},e.isActive=function(t){return void 0!==t.active?t.active:m.route()===t.href},e}(n(2).a)},function(t,e,n){"use strict";var i=n(75),o="object"==typeof self&&self&&self.Object===Object&&self,r=(i.a||o||Function("return this")()).Symbol;e.a=r},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(8),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("fieldset",{className:this.props.className},m("legend",null,this.props.label),m("ul",null,Object(r.a)(this.props.children)))},e}(o.a)},function(t,e,n){"use strict";var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(n(3).a);o.isListItem=!0,e.a=o},function(t,e,n){"use strict";function i(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("ll"):e.fromNow()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(4),o=n(0),r=n(3),s=n(7),a=n(10),c=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.view=function(){var t=Object(i.a)({},this.props),e=Object(a.a)(t,"type"),n=Object(a.a)(t,"icon");return t.className="Badge "+(e?"Badge--"+e:"")+" "+(t.className||""),t.title=Object(a.a)(t,"label")||"",m("span",t,n?Object(s.a)(n,{className:"Badge-icon"}):m.trust(" "))},n.config=function(t){t||this.props.label&&this.$().tooltip()},e}(r.a)},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 i(t){var e;if(t instanceof Array)e=t.filter((function(t){return t}));else for(var n in e=[],t)t[n]&&e.push(n);return e.join(" ")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function o(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function r(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=$("<div/>").html(e);return n.find(r.removeSelectors.join(",")).remove(),n.text().replace(/\s+/g," ").trim()}function s(t){return t.substr(0,1).toUpperCase()+t.substr(1)}n.r(e),n.d(e,"truncate",(function(){return i})),n.d(e,"slug",(function(){return o})),n.d(e,"getPlainContent",(function(){return r})),n.d(e,"ucfirst",(function(){return s})),r.removeSelectors=["blockquote","script"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(13),r=n(7),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(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.props.active}))[0],e=t&&t.props.children||this.props.defaultLabel;return e instanceof Array&&(e=e[0]),[m("span",{className:"Button-label"},e),Object(r.a)(this.props.caretIcon,{className:"Button-caret"})]},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(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}(n(25).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(29);function o(t,e,n){if(!e&&!n)return t;var o=e instanceof RegExp?e:new RegExp(e,"gi"),r=t,s=0;return n&&(e&&(s=Math.max(0,t.search(o)-n/2)),r=Object(i.truncate)(r,n,s)),r=$("<div/>").text(r).html(),e&&(r=r.replace(o,"<mark>$&</mark>")),m.trust(r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.props.loading?t.prototype.getDisplay.call(this):""},e}(n(40).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(i((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this))},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"extend",(function(){return o})),n.d(e,"override",(function(){return r}));var i=n(4);function o(t,e,n){var o=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r=o?o.apply(this,e):void 0;return n.apply(this,[r].concat(e)),r},Object(i.a)(t[e],o)}function r(t,e,n){var o=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[o.bind(this)].concat(e))},Object(i.a)(t[e],o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n(4),o=n(0),r=n(1),s=n(52),a=n(5),c=n(17),u=n(31),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(l.prototype,{username:r.a.attribute("username"),displayName:r.a.attribute("displayName"),email:r.a.attribute("email"),isEmailConfirmed:r.a.attribute("isEmailConfirmed"),password:r.a.attribute("password"),avatarUrl:r.a.attribute("avatarUrl"),preferences:r.a.attribute("preferences"),groups:r.a.hasMany("groups"),joinTime:r.a.attribute("joinTime",r.a.transformDate),lastSeenAt:r.a.attribute("lastSeenAt",r.a.transformDate),markedAllAsReadAt:r.a.attribute("markedAllAsReadAt",r.a.transformDate),unreadNotificationCount:r.a.attribute("unreadNotificationCount"),newNotificationCount:r.a.attribute("newNotificationCount"),discussionCount:r.a.attribute("discussionCount"),commentCount:r.a.attribute("commentCount"),canEdit:r.a.attribute("canEdit"),canDelete:r.a.attribute("canDelete"),avatarColor:null,color:Object(c.a)("username","avatarUrl","avatarColor",(function(t,e,n){return n?"rgb("+n.join(", ")+")":e?(this.calculateAvatarColor(),""):"#"+Object(s.a)(t)})),isOnline:function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},badges:function(){var t=new a.a,e=this.groups();return e&&e.forEach((function(e){t.add("group"+e.id(),u.a.component({group:e}))})),t},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()},savePreferences:function(t){var e=this.preferences();return Object(i.a)(e,t),this.save({preferences:e})}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(24);function o(t){var e=dayjs(t),n=e.format(),o=e.format("LLLL"),r=Object(i.a)(t);return m("time",{pubdate:!0,datetime:n,title:o,"data-humantime":!0},r)}},function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(4),o=n(0),r=n(1),s=n(17),a=n(5),c=n(25),u=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(u.prototype,{title:r.a.attribute("title"),slug:r.a.attribute("slug"),createdAt:r.a.attribute("createdAt",r.a.transformDate),user:r.a.hasOne("user"),firstPost:r.a.hasOne("firstPost"),lastPostedAt:r.a.attribute("lastPostedAt",r.a.transformDate),lastPostedUser:r.a.hasOne("lastPostedUser"),lastPost:r.a.hasOne("lastPost"),lastPostNumber:r.a.attribute("lastPostNumber"),commentCount:r.a.attribute("commentCount"),replyCount:Object(s.a)("commentCount",(function(t){return Math.max(0,t-1)})),posts:r.a.hasMany("posts"),mostRelevantPost:r.a.hasOne("mostRelevantPost"),lastReadAt:r.a.attribute("lastReadAt",r.a.transformDate),lastReadPostNumber:r.a.attribute("lastReadPostNumber"),isUnread:Object(s.a)("unreadCount",(function(t){return!!t})),isRead:Object(s.a)("unreadCount",(function(t){return app.session.user&&!t})),hiddenAt:r.a.attribute("hiddenAt",r.a.transformDate),hiddenUser:r.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canReply:r.a.attribute("canReply"),canRename:r.a.attribute("canRename"),canHide:r.a.attribute("canHide"),canDelete:r.a.attribute("canDelete"),removePost:function(t){var e=this.data.relationships,n=e&&e.posts;n&&n.data.some((function(e,i){if(t===e.id)return n.data.splice(i,1),!0}))},unreadCount:function(){var t=app.session.user;if(t&&t.markedAllAsReadAt()<this.lastPostedAt()){var e=Math.max(0,this.lastPostNumber()-(this.lastReadPostNumber()||0));return Math.min(e,this.commentCount())}return 0},badges:function(){var t=new a.a;return this.isHidden()&&t.add("hidden",m(c.a,{type:"hidden",icon:"fas fa-trash",label:app.translator.trans("core.lib.badge.hidden_tooltip")})),t},postIds:function(){var t=this.data.relationships.posts;return t?t.data.map((function(t){return t.id})):[]}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),o=n(3),r=n(14),s=n(7),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){"0"===this.props.state&&(this.props.state=!1);var t="Checkbox "+(this.props.state?"on":"off")+" "+(this.props.className||"");return this.props.loading&&(t+=" loading"),this.props.disabled&&(t+=" disabled"),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.props.loading?r.a.component({size:"tiny"}):Object(s.a)(this.props.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.props.onchange&&this.props.onchange(t,this)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(63),o=function(){function t(t,e){void 0===e&&(e={}),this.type=t,this.data=e}var e=t.prototype;return e.matches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(i.a)(this.type,t)&&Object.keys(e).every((function(t){return n.data[t]===e[t]}))},e.get=function(t){return this.data[t]},e.set=function(t,e){this.data[t]=e},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(6),o=function(t,e,n,o){Object(i.a)(this,"status",void 0),Object(i.a)(this,"options",void 0),Object(i.a)(this,"xhr",void 0),Object(i.a)(this,"responseText",void 0),Object(i.a)(this,"response",void 0),Object(i.a)(this,"alert",void 0),this.status=t,this.responseText=e,this.options=n,this.xhr=o;try{this.response=JSON.parse(e)}catch(t){this.response=null}this.alert=null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(0),o=n(3),r=n(2),s=n(20),a=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(e,t);var n=e.prototype;return n.view=function(){var t=app,e=t.history,n=t.pane;return m("div",{className:"Navigation ButtonGroup "+(this.props.className||""),onmouseenter:n&&n.show.bind(n),onmouseleave:n&&n.onmouseleave.bind(n)},e.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.config=function(t,e){e.retain=!0},n.getBackButton=function(){var t=app.history,e=t.getPrevious()||{};return s.a.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left",title:e.title,config:function(){},onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=app.pane;return t&&t.active?r.a.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.props.drawer)return"";var t=app.drawer,e=app.session.user;return r.a.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars"})},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(0),o=n(3),r=n(7),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){var t=this.props,e=t.options,n=t.onchange,i=t.value,o=t.disabled;return m("span",{className:"Select"},m("select",{className:"Select-input FormControl",onchange:n?m.withAttr("value",n.bind(this)):void 0,value:i,disabled:o},Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),Object(r.a)("fas fa-sort",{className:"Select-caret"}))},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(3);function o(t){var e=t.m,n=function t(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),s=1;s<o;s++)r[s-1]=arguments[s];if(n.prototype&&n.prototype instanceof i.a){var a=r.slice(1);return 1===a.length&&Array.isArray(a[0])&&(a=a[0]),n.component(r[0],a)}var c=e.apply(this,arguments);return c.attrs.bidi&&t.bidi(c,c.attrs.bidi),c.attrs.route&&(c.attrs.href=c.attrs.route,c.attrs.config=t.route,delete c.attrs.route),c};Object.keys(e).forEach((function(t){return n[t]=e[t]})),n.lazyRedraw=function(){n.startComputation(),n.endComputation()},t.m=n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={}}var e=t.prototype;return e.retain=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,i){var o=n();o!==t.data[i]&&(t.data[i]=o,e=!0)})),!e&&{subtree:"retain"}},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e)},e.invalidate=function(){this.data={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.props.text))},e}(n(3).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(4),o=n(0),r=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t=this.state.modal;return m("div",{className:"ModalManager modal fade"},t?t.componentClass.component(Object(i.a)({},t.attrs,{onshow:this.animateShow.bind(this),onhide:this.animateHide.bind(this)})):"")},n.config=function(t,e){t||(e.retain=!0,this.$().on("hidden.bs.modal",this.state.close.bind(this.state)))},n.animateShow=function(t){var e=!!this.state.modal.componentClass.isDismissible;this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")},n.animateHide=function(){this.$().modal("hide")},e}(n(3).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(4),o=n(0),r=n(3),s=n(18),a=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t=this;return m("div",{className:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],o=e[1];return m("div",{className:"AlertManager-alert"},(o.componentClass||s.a).component(Object(i.a)({},o.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)})))})))},n.config=function(t,e){e.retain=!0},e}(r.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}Object(i.a)(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,e=this.props,n=e.error,i=e.formattedError;if(i)t=i.join("\n\n");else try{var o=n.response||JSON.parse(n.responseText);t=JSON.stringify(o,null,2)}catch(e){t=n.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}(n(12).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(4),o=(n(36),n(16)),r=n(10),s=function(){function t(){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){var n=this.translations[t];return n?this.apply(n,e||{}):t},e.transChoice=function(t,e,n){var i=this.translations[t];return i?(e=parseInt(e,10),i=this.pluralize(i,e),this.apply(i,n||{})):t},e.apply=function(t,e){if("user"in e){var n=Object(r.a)(e,"user");e.username||(e.username=Object(o.a)(n))}t=t.split(new RegExp("({[a-z0-9_]+}|</?[a-z0-9_]+>)","gi"));var i=[],s=[i];return t.forEach((function(t){var n=t.match(new RegExp("{([a-z0-9_]+)}|<(/?)([a-z0-9_]+)>","i"));if(n){if(n[1])s[0].push(e[n[1]]);else if(n[3])if(n[2])s.shift();else{var i=e[n[3]]||{tag:n[3],children:[]};s[0].push(i),s.unshift(i.children||i)}}else s[0].push(t)})),i.filter((function(t){return t}))},e.pluralize=function(t,e){var n=this,i=new RegExp(/^\w+\: +(.+)$/),o=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),r=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),s=[],a=[];return t.split("|").forEach((function(t){if(o.test(t)){var e=t.match(o);a[e[0]]=e[e.length-1]}else if(i.test(t)){var n=t.match(i);s.push(n[1])}else s.push(t)})),a.forEach((function(t,i){if(r.test(i)){var o=i.match(r);if(o[1]){var s=o[2].split(",");for(var c in s)if(e==s[c])return a[i]}else{var u=n.convertNumber(o[4]),l=n.convertNumber(o[5]);if(("["===o[3]?e>=u:e>u)&&("]"===o[6]?e<=l:e<l))return a[i]}}})),s[this.pluralPosition(e,this.locale)]||s[0]||void 0},e.convertNumber=function(t){return"-Inf"===t?Number.NEGATIVE_INFINITY:"+Inf"===t||"Inf"===t?Number.POSITIVE_INFINITY:parseInt(t,10)},e.pluralPosition=function(t,e){switch("pt_BR"===e&&(e="xbr"),e.length>3&&(e=e.split("_")[0]),e){case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"vi":case"zh":return 0;case"af":case"az":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"tr":case"ur":case"zu":return 1==t?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return 0===t||1==t?0:1;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&t<=4?1:2;case"ga":return 1==t?0:2==t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2;case"sl":return t%100==1?0:t%100==2?1:t%100==3||t%100==4?2:3;case"mk":return t%10==1?0:1;case"mt":return 1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3;case"lv":return 0===t?0:t%10==1&&t%100!=11?1:2;case"pl":return 1==t?0:t%10>=2&&t%10<=4&&(t%100<12||t%100>14)?1:2;case"cy":return 1==t?0:2==t?1:8==t||11==t?2:3;case"ro":return 1==t?0:0===t||t%100>0&&t%100<20?1:2;case"ar":return 0===t?0:1==t?1:2==t?2:t>=3&&t<=10?3:t>=11&&t<=99?4:5;default:return 0}},t}()},function(t,e,n){"use strict";function i(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var i=function(t,e,n){var i,o,r,s=Math.floor(6*t),a=6*t-s,c=n*(1-e),u=n*(1-a*e),l=n*(1-(1-a)*e);switch(s%6){case 0:i=n,o=l,r=c;break;case 1:i=u,o=n,r=c;break;case 2:i=c,o=n,r=l;break;case 3:i=c,o=u,r=n;break;case 4:i=l,o=c,r=n;break;case 5:i=n,o=c,r=u}return{r:Math.floor(255*i),g:Math.floor(255*o),b:Math.floor(255*r)}}(e%360/360,.3,.9);return""+i.r.toString(16)+i.g.toString(16)+i.b.toString(16)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),o=function(){function t(t){this.data={},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,o){void 0===n&&(n={}),void 0===o&&(o={});var r=n,s=app.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?s+="?filter[id]="+e.join(","):"object"==typeof e?r=e:e&&(s+="/"+e),app.request(Object(i.a)({method:"GET",url:s,data:r},o)).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(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(4),o=function(){function t(t,e){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",data:t},e))},e.logout=function(){window.location=app.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){var t=this;$("#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}()},function(t,e,n){"use strict";function i(t,e){void 0===e&&(e="");var n={};for(var i in t){var o=t[i];o.component&&(o.component.props.routeName=i),n[e+o.path]=o.component}return n}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(24);function o(){$("[data-humantime]").each((function(){var t=$(this),e=Object(i.a)(t.attr("datetime"));t.html(e)}))}function r(){setInterval(o,1e4)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(0),o=function(t){function e(){return t.apply(this,arguments)||this}return Object(i.a)(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(n(1).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(4),o=n(0),r=n(1),s=n(17),a=n(29),c=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(c.prototype,{number:r.a.attribute("number"),discussion:r.a.hasOne("discussion"),createdAt:r.a.attribute("createdAt",r.a.transformDate),user:r.a.hasOne("user"),contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),contentHtml:r.a.attribute("contentHtml"),contentPlain:Object(s.a)("contentHtml",a.getPlainContent),editedAt:r.a.attribute("editedAt",r.a.transformDate),editedUser:r.a.hasOne("editedUser"),isEdited:Object(s.a)("editedAt",(function(t){return!!t})),hiddenAt:r.a.attribute("hiddenAt",r.a.transformDate),hiddenUser:r.a.hasOne("hiddenUser"),isHidden:Object(s.a)("hiddenAt",(function(t){return!!t})),canEdit:r.a.attribute("canEdit"),canHide:r.a.attribute("canHide"),canDelete:r.a.attribute("canDelete")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(4),o=n(0),r=n(1),s=function(t){function e(){return t.apply(this,arguments)||this}return Object(o.a)(e,t),e}(r.a);Object(i.a)(s.prototype,{contentType:r.a.attribute("contentType"),content:r.a.attribute("content"),createdAt:r.a.attribute("createdAt",r.a.transformDate),isRead:r.a.attribute("isRead"),user:r.a.hasOne("user"),fromUser:r.a.hasOne("fromUser"),subject:r.a.hasOne("subject")})},function(t,e,n){"use strict";n.d(e,"a",(function(){return Y}));var i=n(4),o=n(6),r=n(5),s=n(2),a=n(48),c=n(49),u=n(50),l=n(51),p=n(53),d=n(54),h=n(10),f=n(55),v=n(56),g=n(42),b=n(34),y=n(57),w=n(35),x=n(58),N=n(36),C=n(39),O=n(59),T=n(11),k=n(60);var j=function(t,e){for(var n=-1,i=e.length,o=t.length;++n<i;)t[o+n]=e[n];return t},S=n(21),A=n(70),P=n(38);var E=function(t){return Object(P.a)(t)&&"[object Arguments]"==Object(A.a)(t)},D=Object.prototype,_=D.hasOwnProperty,I=D.propertyIsEnumerable,M=E(function(){return arguments}())?E:function(t){return Object(P.a)(t)&&_.call(t,"callee")&&!I.call(t,"callee")},R=n(66),L=S.a?S.a.isConcatSpreadable:void 0;var B=function(t){return Object(R.a)(t)||M(t)||!!(L&&t&&t[L])};var H=function t(e,n,i,o,r){var s=-1,a=e.length;for(i||(i=B),r||(r=[]);++s<a;){var c=e[s];n>0&&i(c)?n>1?t(c,n-1,i,o,r):j(r,c):o||(r[r.length]=c)}return r};var U=function(t){return(null==t?0:t.length)?H(t,1/0):[]},F=n(41),q=n(12),z=function(){function t(){this.modal=null}var e=t.prototype;return e.show=function(t,e){if(!(t.prototype instanceof q.a))throw console.error("The ModalManager can only show Modals"),new Error("The ModalManager can only show Modals");if(t.init)throw console.error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14."),new Error("The componentClass parameter must be a modal class, not a modal instance. Whichever extension triggered this modal should be updated to comply with beta 14.");clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e},m.redraw(!0)},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.lazyRedraw()})))},t}(),W=n(18),V=function(){function t(){this.activeAlerts={},this.alertId=0}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e){if(void 0===e&&(e=W.a),t===W.a||t instanceof W.a)throw console.error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14."),new Error("The AlertManager can only show Alerts. Whichever extension triggered this alert should be updated to comply with beta 14.");return this.activeAlerts[++this.alertId]={attrs:t,componentClass:e},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}(),Y=function(){function t(){Object(o.a)(this,"forum",null),Object(o.a)(this,"routes",{}),Object(o.a)(this,"initializers",new r.a),Object(o.a)(this,"session",null),Object(o.a)(this,"translator",new l.a),Object(o.a)(this,"store",new p.a({forums:x.a,users:N.a,discussions:C.a,posts:O.a,groups:T.a,notifications:k.a})),Object(o.a)(this,"cache",{}),Object(o.a)(this,"booted",!1),Object(o.a)(this,"requestErrorAlert",null),Object(o.a)(this,"current",new F.a(null)),Object(o.a)(this,"previous",new F.a(null)),Object(o.a)(this,"modal",new z),Object(o.a)(this,"alerts",new V),Object(o.a)(this,"data",void 0),Object(o.a)(this,"title",""),Object(o.a)(this,"titleCount",0)}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.locale=t.locale},e.boot=function(){var t=this;this.initializers.toArray().forEach((function(e){return e(t)})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums",1),this.session=new d.a(this.store.getById("users",this.data.session.userId),this.data.session.csrfToken),this.mount()},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var i=t[n],o=U(i.extend),r=Array.isArray(o),s=0;for(o=r?o:o[Symbol.iterator]();;){var a;if(r){if(s>=o.length)break;a=o[s++]}else{if((s=o.next()).done)break;a=s.value}a.extend(e,{name:n,exports:i})}}))},e.mount=function(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),m(a.a,{state:this.modal})),m.mount(document.getElementById("alerts"),m(c.a,{state:this.alerts})),this.drawer=new f.a,m.route(document.getElementById("content"),t+"/",Object(v.a)(this.routes,t)),new b.a((function(t){var e=$("#app"),n=e.offset().top;e.toggleClass("affix",t>=n).toggleClass("scrolled",t>n)})).start(),$((function(){$("body").addClass("ontouchstart"in window?"touch":"no-touch")})),Object(y.a)()},e.preloadedApiDocument=function(){if(this.data.apiDocument){var t=this.store.pushPayload(this.data.apiDocument);return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=this.title&&"/"!==m.route()?this.title+" - ":"",n=this.forum.attribute("title");document.title=t+e+n},e.request=function(t){var e=this,n=Object(i.a)({},t);if(n.background=n.background||!0,Object(w.extend)(n,"config",(function(t,n){return n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),"GET"!==n.method&&"POST"!==n.method){var o=n.method;Object(w.extend)(n,"config",(function(t,e){return e.setRequestHeader("X-HTTP-Method-Override",o)})),n.method="POST"}n.deserialize=n.deserialize||function(t){return t},n.errorHandler=n.errorHandler||function(t){throw t};var r=n.extract;n.extract=function(t){var e;e=r?r(t.responseText):t.responseText||null;var i=t.status;if(i<200||i>299)throw new g.a(i,e,n,t);if(t.getResponseHeader){var o=t.getResponseHeader("X-CSRF-Token");o&&(app.session.csrfToken=o)}try{return JSON.parse(e)}catch(i){throw new g.a(500,e,n,t)}},this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert);var a=m.deferred();return m.request(n).then((function(t){return a.resolve(t)}),(function(t){var i;switch(t.status){case 422:i=t.response.errors.map((function(t){return[t.detail,m("br",null)]})).reduce((function(t,e){return t.concat(e)}),[]).slice(0,-1);break;case 401:case 403:i=app.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:i=app.translator.trans("core.lib.error.not_found_message");break;case 429:i=app.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:i=app.translator.trans("core.lib.error.generic_message")}var o=app.forum.attribute("debug"),r=t.response&&Array.isArray(t.response.errors)&&t.response.errors.map((function(t){return decodeURI(t.detail)}));t.alert={type:"error",children:i,controls:o&&[m(s.a,{className:"Button Button--link",onclick:e.showDebug.bind(e,t,r)},"Debug")]};try{n.errorHandler(t)}catch(t){if(o&&t.xhr){var c,u=t.options,l=u.method,p=u.url,d=t.xhr.status,h=void 0===d?"":d;console.group(l+" "+p+" "+h),(c=console).error.apply(c,r||[t]),console.groupEnd()}e.requestErrorAlert=e.alerts.show(t.alert)}a.reject(t)})),a.promise},e.showDebug=function(t,e){this.alerts.dismiss(this.requestErrorAlert),this.modal.show(u.a,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t].path.replace(/:([^\/]+)/g,(function(t,n){return Object(h.a)(e,n)})),i=m.route.buildQueryString(e);return("pathname"===m.route.mode?app.forum.attribute("basePath"):"")+n+(i?"?"+i:"")},t}()},function(t,e,n){"use strict";function i(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function i(t,e){return t&&(t===e||t.prototype instanceof e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(4),o=n(0),r=n(13),s=n(2),a=n(7),c=function(t){function e(){return t.apply(this,arguments)||this}Object(o.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(){var t=this.getFirstChild(),e=Object(i.a)({},t.props);return e.className=(e.className||"")+" SplitDropdown-button Button "+this.props.buttonClassName,[s.a.component(e),m("button",{className:"Dropdown-toggle Button Button--icon "+this.props.buttonClassName,"data-toggle":"dropdown"},Object(a.a)(this.props.icon,{className:"Button-icon"}),Object(a.a)("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(){for(var t=this.props.children;t instanceof Array;)t=t[0];return t},e}(r.a)},function(t,e,n){"use strict";function i(t){return t>=1e6?Math.floor(t/1e6)+app.translator.trans("core.lib.number_suffix.mega_text"):t>=1e3?(t/1e3).toFixed(1)+app.translator.trans("core.lib.number_suffix.kilo_text"):t.toString()}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=Array.isArray;e.a=i},function(t,e,n){"use strict";function i(t,e){var n=$(window),i=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-i)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(7);function o(t){if(t.lastSeenAt()&&t.isOnline())return m("span",{className:"UserOnline"},Object(i.a)("fas fa-circle"))}},function(t,e,n){"use strict";function i(t){var e=dayjs(t),n=e.format(),i=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},i)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=n(21),o=Object.prototype,r=o.hasOwnProperty,s=o.toString,a=i.a?i.a.toStringTag:void 0;var c=function(t){var e=r.call(t,a),n=t[a];try{t[a]=void 0;var i=!0}catch(t){}var o=s.call(t);return i&&(e?t[a]=n:delete t[a]),o},u=Object.prototype.toString;var l=function(t){return u.call(t)},p=i.a?i.a.toStringTag:void 0;e.a=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":p&&p in Object(t)?c(t):l(t)}},function(t,e,n){(function(t){var i;!function(o,r){"use strict";var s=function t(e,n){b.version=function(){return"v0.2.8"};var i={}.hasOwnProperty,o={}.toString;function r(t){return"function"==typeof t}function s(t){return"[object Object]"===o.call(t)}function a(t){return"[object String]"===o.call(t)}var c=Array.isArray||function(t){return"[object Array]"===o.call(t)};function u(){}var l,p,d,h,f={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};function m(t,e){for(var n,i=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g;n=o.exec(e);)if(""===n[1]&&n[2])t.tag=n[2];else if("#"===n[1])t.attrs.id=n[2];else if("."===n[1])i.push(n[2]);else if("["===n[3].charAt(0)){var r=n[6];r&&(r=r.replace(/\\(["'])/g,"$1")),"class"===n[4]?i.push(r):t.attrs[n[4]]=r||!0}return i}function v(t,e){var n=e?t.slice(1):t;return 1===n.length&&c(n[0])?n[0]:n}function g(t,e,n){var o="class"in e?"class":"className";for(var r in e)i.call(e,r)&&(r===o&&null!=e[r]&&""!==e[r]?(n.push(e[r]),t[r]=""):t[r]=e[r]);n.length&&(t[o]=n.join(" "))}function b(t,e){for(var n=[],i=1,o=arguments.length;i<o;i++)n[i-1]=arguments[i];if(t&&r(t.view))return rt(t,n);if(!a(t))throw new Error("selector in m(selector, attrs, children) should be a string");var c=null!=e&&s(e)&&!("tag"in e||"view"in e||"subtree"in e),u=c?e:{},l={tag:"div",attrs:{},children:v(n,c)};return g(l.attrs,u,m(l,t)),l}function y(t,e){for(var n=0;n<t.length&&!e(t[n],n++););}function w(t,e){y(t,(function(t,n){return(t=t&&t.attrs)&&null!=t.key&&e(t,n)}))}function x(t,e,n){t.insertBefore(e,t.childNodes[n]||null)}b.deps=function(t){return function(t){l=t.document,p=t.location,h=t.cancelAnimationFrame||t.clearTimeout,d=t.requestAnimationFrame||t.setTimeout}(e=t||window),e},b.deps.factory=b.factory=t,b.deps(e);function N(t,e,n,o){var r=t.length!==e.length;return r||w(t,(function(t,n){var i=e[n];return r=i&&i.attrs&&i.attrs.key!==t.key})),r?function(t,e,n,o){w(t,(function(t,i){e[t=t.key]=e[t]?{action:3,index:i,from:e[t].index,element:n.nodes[e[t].index]||l.createElement("div")}:{action:2,index:i}}));var r=[];for(var s in e)i.call(e,s)&&r.push(e[s]);var a=r.sort(I),c=new Array(n.length);return c.nodes=n.nodes.slice(),y(a,(function(e){var i=e.index;if(1===e.action&&(U(n[i].nodes,n[i]),c.splice(i,1)),2===e.action){var r=l.createElement("div");r.key=t[i].attrs.key,x(o,r,i),c.splice(i,0,{attrs:{key:t[i].attrs.key},nodes:[r]}),c.nodes[i]=r}if(3===e.action){var s=e.element,a=o.childNodes[i];a!==s&&null!==s&&o.insertBefore(s,a||null),c[i]=n[e.from],c.nodes[i]=s}})),c}(t,n,e,o):e}function C(t,e,n){(function(t,e,n){return t.tag!==e.tag||(n.sort().join()!==Object.keys(e.attrs).sort().join()||(t.attrs.id!==e.attrs.id||(t.attrs.key!==e.attrs.key||("all"===b.redraw.strategy()?!e.configContext||!0!==e.configContext.retain:"diff"===b.redraw.strategy()&&(e.configContext&&!1===e.configContext.retain)))))})(t,e,n)&&(e.nodes.length&&U(e.nodes),e.configContext&&r(e.configContext.onunload)&&e.configContext.onunload(),e.controllers&&y(e.controllers,(function(t){t.onunload&&t.onunload({preventDefault:u})})))}var O=0;function T(t,e,n,i,o,r){var s=e.nodes;return i&&i===l.activeElement&&t===e||(t.$trusted?(U(s,e),s=z(n,o,t)):"textarea"===r?n.value=t:i?(i.innerHTML=t,s=[].slice.call(i.childNodes)):((1===s[0].nodeType||s.length>1||s[0].nodeValue.trim&&!s[0].nodeValue.trim())&&(U(e.nodes,e),s=[l.createTextNode(t)]),function(t,e,n,i){try{x(t,e,n),e.nodeValue=i}catch(t){}}(n,s[0],o,t))),(e=new t.constructor(t)).nodes=s,e.$trusted=t.$trusted,e}function k(t,e,n,i,o,r,s){return t.nodes.length?t.valueOf()!==e.valueOf()||o?T(e,t,i,r,n,s):(t.nodes.intact=!0,t):function(t,e,n){var i,o;return t.$trusted?i=z(e,n,t):(i=[l.createTextNode(t)],e.nodeName in f||x(e,i[0],n)),(o="string"==typeof t||"number"==typeof t||"boolean"==typeof t?new t.constructor(t):t).nodes=i,o}(e,i,n)}function j(t){return t.$trusted?t.nodes.length:c(t)?t.length:1}function S(t,e,i,o,r,s,a,u,l){t=function(t){for(var e=0;e<t.length;e++)c(t[e])&&(t=t.concat.apply([],t),e--);return t}(t);var p=e.length===t.length,d=0,h={},f=!1;w(e,(function(t,n){f=!0,h[e[n].attrs.key]={action:1,index:n}})),function(t){var e=0;w(t,(function(){return y(t,(function(t){(t=t&&t.attrs)&&null==t.key&&(t.key="__mithril__"+e++)})),1}))}(t),f&&(e=N(t,e,h,i));for(var m=0,v=0,g=t.length;v<g;v++){var b=_(i,r,e,o,t[v],e[m],s,o+d||d,a,u,l);b!==n&&(p=p&&b.nodes.intact,d+=j(b),e[m++]=b)}return p||function(t,e,n){y(t,(function(t,i){null!=e[i]&&n.push.apply(n,e[i].nodes)})),y(e.nodes,(function(t,i){null!=t.parentNode&&n.indexOf(t)<0&&U([t],[e[i]])})),t.length<e.length&&(e.length=t.length),e.nodes=n}(t,e,[]),e}function A(t,e,n,i,o,r,s){var a={tag:t.tag,attrs:e,children:n,nodes:[i]};return function(t,e,n){n.length&&(t.views=e,t.controllers=n,y(n,(function(t){if(t.onunload&&t.onunload.$old&&(t.onunload=t.onunload.$old),O&&t.onunload){var e=t.onunload;t.onunload=function(){},t.onunload.$old=e}})))}(a,r,s),a.children&&!a.children.nodes&&(a.children.nodes=[]),a}b.startComputation=function(){O++},b.endComputation=function(){O>1?O--:(O=0,b.redraw())};var P=[];var E=!1;function D(t,e,n,i,o,s){var a=function(t,e,n,i){var o;return(o="diff"===b.redraw.strategy()&&t?t.indexOf(e):-1)>-1?n[o]:r(i)?new i:{}}(n.views,e,i,t.controller),c=t&&t.attrs&&t.attrs.key;return"retain"===(t=0===O||E||i&&i.indexOf(a)>-1?t.view(a):{tag:"placeholder"}).subtree||(t.attrs=t.attrs||{},t.attrs.key=c,function(t,e,n,i){null!=i.onunload&&P.map((function(t){return t.handler})).indexOf(i.onunload)<0&&P.push({controller:i,handler:i.onunload}),t.push(n),e.push(i)}(s,o,e,a)),t}function $(t,e,i,o,s,c,u,p){var d=[],h=[];if("retain"===(t=function(t,e,n,i){for(var o=e&&e.controllers;null!=t.view;)t=D(t,t.view.$original||t.view,e,o,i,n);return t}(t,e,d,h)).subtree)return e;if(!t.tag&&h.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");t.attrs=t.attrs||{},e.attrs=e.attrs||{};var f=Object.keys(t.attrs),m=f.length>("key"in t.attrs?1:0);if(C(t,e,f),a(t.tag)){var v,g=0===e.nodes.length;if(u=function(t,e){return t.attrs.xmlns?t.attrs.xmlns:"svg"===t.tag?"http://www.w3.org/2000/svg":"math"===t.tag?"http://www.w3.org/1998/Math/MathML":e}(t,u),g){var b=function(t,e,n,i){return i?H(e,t.tag,t.attrs,{},n):t.attrs}(t,v=function(t,e){return t.attrs.is?null==e?l.createElement(t.tag,t.attrs.is):l.createElementNS(e,t.tag,t.attrs.is):null==e?l.createElement(t.tag):l.createElementNS(e,t.tag)}(t,u),u,m);x(o,v,s),e=A(t,b,function(t,e,i,o,r,s){return null!=t.children&&t.children.length>0?_(e,t.tag,n,n,t.children,i.children,!0,0,t.attrs.contenteditable?e:o,r,s):t.children}(t,v,e,i,u,p),v,0,d,h)}else v=function(t,e,i,o,r,s,a,c){var u=t.nodes[0];return o&&H(u,e.tag,e.attrs,t.attrs,r),t.children=_(u,e.tag,n,n,e.children,t.children,!1,0,e.attrs.contenteditable?u:i,r,a),t.nodes.intact=!0,c.length&&(t.views=s,t.controllers=c),u}(e,t,i,m,u,d,p,h);return"select"===t.tag&&"value"in t.attrs&&H(v,t.tag,{value:t.attrs.value},{},u),g||!0!==c||null==v||x(o,v,s),function(t,e,n,i,o){if(r(e.attrs.config)){var s=o.configContext=o.configContext||{};t.push((function(){return e.attrs.config.call(e,n,!i,s,o)}))}}(p,t,v,g,e),e}}function _(t,e,n,i,a,u,l,p,d,h,f){return"retain"===(a=function(t){try{if("boolean"!=typeof t&&null!=t&&null!=t.toString())return t}catch(t){}return""}(a)).subtree?u:(u=function(t,e,n,i,r){if(null!=e){if(o.call(e)===o.call(t))return e;if(r&&r.nodes){var s=n-i,a=s+(c(t)?t:e.nodes).length;U(r.nodes.slice(s,a),r.slice(s,a))}else e.nodes&&U(e.nodes,e)}return(e=new t.constructor).tag&&(e={}),e.nodes=[],e}(a,u,p,i,n),c(a)?S(a,u,t,p,e,l,d,h,f):null!=a&&s(a)?$(a,u,d,t,p,l,h,f):r(a)?u:k(u,a,p,t,l,d,e))}function I(t,e){return t.action-e.action||t.index-e.index}var M,R={list:1,style:1,form:1,type:1,width:1,height:1};function L(t,e,n,o,a,c){if("config"===e||"key"===e)return!0;if(r(n)&&"on"===e.slice(0,2))t[e]=(u=n,l=t,function(t){t=t||event,b.redraw.strategy("diff"),b.startComputation();try{return u.call(l,t)}finally{ut()}});else if("style"===e&&null!=n&&s(n))!function(t,e,n){for(var o in n===e&&(t.style="",n={}),e)i.call(e,o)&&(null!=n&&n[o]===e[o]||(t.style[o]=e[o]));for(o in n)i.call(n,o)&&(i.call(e,o)||(t.style[o]=""))}(t,n,o);else if(null!=c)"href"===e?t.setAttributeNS("http://www.w3.org/1999/xlink","href",n):t.setAttribute("className"===e?"class":e,n);else if(e in t&&!R[e])try{("input"!==a&&!t.isContentEditable||t[e]!=n)&&(t[e]=n)}catch(i){t.setAttribute(e,n)}else try{t.setAttribute(e,n)}catch(t){}var u,l}function B(t,e,n,i,o,r,s){if(e in o&&i===n&&"object"!=typeof n&&l.activeElement!==t)"value"===e&&"input"===r&&t.value!=n&&(t.value=n);else{o[e]=n;try{return L(t,e,n,i,r,s)}catch(t){if(t.message.indexOf("Invalid argument")<0)throw t}}}function H(t,e,n,o,r){for(var s in n)!i.call(n,s)||B(t,s,n[s],o[s],o,e,r);return o}function U(t,e){for(var n=t.length-1;n>-1;n--)if(t[n]&&t[n].parentNode){try{t[n].parentNode.removeChild(t[n])}catch(t){}(e=[].concat(e))[n]&&F(e[n])}t.length&&(t.length=0)}function F(t){t.configContext&&r(t.configContext.onunload)&&(t.configContext.onunload(),t.configContext.onunload=null),t.controllers&&y(t.controllers,(function(t){r(t.onunload)&&t.onunload({preventDefault:u})})),t.children&&(c(t.children)?y(t.children,F):t.children.tag&&F(t.children))}function q(t,e){try{t.appendChild(l.createRange().createContextualFragment(e))}catch(n){t.insertAdjacentHTML("beforeend",e),function t(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(function(t){for(var e=document.createElement("script"),n=t.attributes,i=0;i<n.length;i++)e.setAttribute(n[i].name,n[i].value);return e.text=t.innerHTML,e}(e),e);else{var n=e.childNodes;if(n&&n.length)for(var i=0;i<n.length;i++)t(n[i])}return e}(t)}}function z(t,e,n){var i=t.childNodes[e];if(i){var o=1!==i.nodeType,r=l.createElement("span");o?(t.insertBefore(r,i||null),r.insertAdjacentHTML("beforebegin",n),t.removeChild(r)):i.insertAdjacentHTML("beforebegin",n)}else q(t,n);for(var s=[];t.childNodes[e]!==i;)s.push(t.childNodes[e]),e++;return s}var W={appendChild:function(t){M===n&&(M=l.createElement("html")),l.documentElement&&l.documentElement!==t?l.replaceChild(t,l.documentElement):l.appendChild(t),this.childNodes=l.childNodes},insertBefore:function(t){this.appendChild(t)},childNodes:[]},V=[],Y={};function G(t){var e=V.indexOf(t);return e<0?V.push(t)-1:e}b.render=function(t,e,i){if(!t)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,r=[],s=G(t),a=t===l;o=a||t===l.documentElement?W:t,a&&"html"!==e.tag&&(e={tag:"html",attrs:{},children:e}),Y[s]===n&&U(o.childNodes),!0===i&&wt(t),Y[s]=_(o,null,n,n,e,Y[s],!1,0,null,n,r),y(r,(function(t){t()}))},b.trust=function(t){return(t=new String(t)).$trusted=!0,t},b.prop=function(t){return(null!=t&&(s(t)||r(t))||"undefined"!=typeof Promise&&t instanceof Promise)&&r(t.then)?xt(t):function(t){function e(){return arguments.length&&(t=arguments[0]),t}return e.toJSON=function(){return t&&r(t.toJSON)?t.toJSON():t},e}(t)};var K,X,J,Q=[],Z=[],tt=[],et=null,nt=0,it=null,ot=null;function rt(t,e){function n(){return(t.controller||u).apply(this,e)||this}function i(n){for(var i=[n].concat(e),o=1;o<arguments.length;o++)i.push(arguments[o]);return t.view.apply(t,i)}t.controller&&(n.prototype=t.controller.prototype),i.$original=t.view;var o={controller:n,view:i};return e[0]&&null!=e[0].key&&(o.attrs={key:e[0].key}),o}function st(t,e){Q.splice(e,1),tt.splice(e,1),Z.splice(e,1),wt(t),V.splice(G(t),1),P=[]}b.component=function(t){for(var e=new Array(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];return rt(t,e)},b.mount=b.module=function(t,e){if(!t)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var n=Q.indexOf(t);n<0&&(n=Q.length);var i=!1,o={preventDefault:function(){i=!0,it=ot=null}};return y(P,(function(t){t.handler.call(t.controller,o),t.controller.onunload=null})),i?y(P,(function(t){t.controller.onunload=t.handler})):P=[],tt[n]&&r(tt[n].onunload)&&tt[n].onunload(o),function(t,e,n,i){if(!i){var o;b.redraw.strategy("all"),b.startComputation(),Q[n]=e,o=K=t||(t={controller:u});var r=new(t.controller||u);return o===K&&(tt[n]=r,Z[n]=t),ut(),null===t&&st(e,n),tt[n]}null==t&&st(e,n),J&&(X=J)}(e,t,n,i)};var at=!1;function ct(){it&&(it(),it=null),y(Q,(function(t,e){var n=Z[e];if(tt[e]){var i=[tt[e]];b.render(t,n.view?n.view(tt[e],i):"")}})),ot&&(ot(),ot=null),et=null,nt=new Date,b.redraw.strategy("diff")}function ut(){"none"===b.redraw.strategy()?(O--,b.redraw.strategy("diff")):b.endComputation()}b.redraw=function(t){if(!at){at=!0,t&&(E=!0);try{et&&!t?(d===e.requestAnimationFrame||new Date-nt>16)&&(et>0&&h(et),et=d(ct,16)):(ct(),et=d((function(){et=null}),16))}finally{at=E=!1}}},b.redraw.strategy=b.prop(),b.withAttr=function(t,e,n){return function(i){var o=(i=i||window.event).currentTarget||this,r=n||this,s=t in o?o[t]:o.getAttribute(t);e.call(r,s)}};var lt,pt={pathname:"",hash:"#",search:"?"},dt=u,ht=!1;function ft(t){return t.slice(pt[b.route.mode].length)}function mt(t,e,n){lt={};var o=n.indexOf("?");-1!==o&&(lt=yt(n.substr(o+1,n.length)),n=n.substr(0,o));var r=Object.keys(e),s=r.indexOf(n);if(-1!==s)return b.mount(t,e[r[s]]),!0;for(var a in e)if(i.call(e,a)){if(a===n)return b.mount(t,e[a]),!0;var c=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(c.test(n))return n.replace(c,(function(){var n=a.match(/:[^\/]+/g)||[],i=[].slice.call(arguments,1,-2);y(n,(function(t,e){lt[t.replace(/:|\./g,"")]=decodeURIComponent(i[e])})),b.mount(t,e[a])})),!0}}function vt(t){if(!((t=t||event).ctrlKey||t.metaKey||t.shiftKey||2===t.which)){t.preventDefault?t.preventDefault():t.returnValue=!1;var e,n=t.currentTarget||t.srcElement;for(e="pathname"===b.route.mode&&n.search?yt(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;O=0,b.route(n[b.route.mode].slice(pt[b.route.mode].length),e)}}function gt(){"hash"!==b.route.mode&&p.hash?p.hash=p.hash:e.scrollTo(0,0)}function bt(t,e){var o={},r=[];for(var a in t)if(i.call(t,a)){var u=e?e+"["+a+"]":a,l=t[a];if(null===l)r.push(encodeURIComponent(u));else if(s(l))r.push(bt(l,u));else if(c(l)){var p=[];o[u]=o[u]||{},y(l,(function(t){o[u][t]||(o[u][t]=!0,p.push(encodeURIComponent(u)+"="+encodeURIComponent(t)))})),r.push(p.join("&"))}else l!==n&&r.push(encodeURIComponent(u)+"="+encodeURIComponent(l))}return r.join("&")}function yt(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));var e=t.split("&"),n={};return y(e,(function(t){var e=t.split("="),i=decodeURIComponent(e[0]),o=2===e.length?decodeURIComponent(e[1]):null;null!=n[i]?(c(n[i])||(n[i]=[n[i]]),n[i].push(o)):n[i]=o})),n}function wt(t){var e=G(t);U(t.childNodes,Y[e]),Y[e]=n}function xt(t,e){var n=b.prop(e);return t.then(n),n.then=function(n,i){return xt(t.then(n,i),e)},n.catch=n.then.bind(null,null),n}b.route=function(t,n,o,r){if(0===arguments.length)return X;if(3===arguments.length&&a(n)){dt=function(e){var i=X=ft(e);if(!mt(t,o,i)){if(ht)throw new Error("Ensure the default route matches one of the routes defined in m.route");ht=!0,b.route(n,!0),ht=!1}};var s="hash"===b.route.mode?"onhashchange":"onpopstate";return e[s]=function(){var t=p[b.route.mode];"pathname"===b.route.mode&&(t+=p.search),X!==ft(t)&&dt(t)},it=gt,void e[s]()}if(t.addEventListener||t.attachEvent){var c="pathname"!==b.route.mode?p.pathname:"";return t.href=c+pt[b.route.mode]+r.attrs.href,void(t.addEventListener?(t.removeEventListener("click",vt),t.addEventListener("click",vt)):(t.detachEvent("onclick",vt),t.attachEvent("onclick",vt)))}if(a(t)){J=X;var u,d=n||{},h=(X=t).indexOf("?");for(var f in u=h>-1?yt(X.slice(h+1)):{},d)i.call(d,f)&&(u[f]=d[f]);var m,v=bt(u);m=h>-1?X.slice(0,h):X,v&&(X=m+(-1===m.indexOf("?")?"?":"&")+v);var g=!0===(3===arguments.length?o:n)||J===X;if(e.history.pushState){var y=g?"replaceState":"pushState";it=gt,ot=function(){try{e.history[y](null,l.title,pt[b.route.mode]+X)}catch(t){p[b.route.mode]=X}},dt(pt[b.route.mode]+X)}else p[b.route.mode]=X,dt(pt[b.route.mode]+X);J=null}},b.route.param=function(t){if(!lt)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return t?lt[t]:lt},b.route.mode="search",b.route.buildQueryString=bt,b.route.parseQueryString=yt,b.deferred=function(){var t=new Nt;return t.promise=xt(t.promise),t};function Nt(t,e){var n=this,i=0,o=0,a=[];function c(t){i=t||4,a.map((function(t){3===i?t.resolve(o):t.reject(o)}))}function u(t,e,n,i){if((null!=o&&s(o)||r(o))&&r(t))try{var a=0;t.call(o,(function(t){a++||(o=t,e())}),(function(t){a++||(o=t,n())}))}catch(t){b.deferred.onerror(t),o=t,n()}else i()}function l(){var s;try{s=o&&o.then}catch(t){return b.deferred.onerror(t),o=t,i=2,l()}2===i&&b.deferred.onerror(o),u(s,(function(){i=1,l()}),(function(){i=2,l()}),(function(){try{1===i&&r(t)?o=t(o):2===i&&r(e)&&(o=e(o),i=1)}catch(t){return b.deferred.onerror(t),o=t,c()}o===n?(o=TypeError(),c()):u(s,(function(){c(3)}),c,(function(){c(1===i&&3)}))}))}n.promise={},n.resolve=function(t){return i||(o=t,i=1,l()),n},n.reject=function(t){return i||(o=t,i=2,l()),n},n.promise.then=function(t,e){var n=new Nt(t,e);return 3===i?n.resolve(o):4===i?n.reject(o):a.push(n),n.promise}}function Ct(t){return t}return b.deferred.onerror=function(t){if("[object Error]"===o.call(t)&&!/ Error/.test(t.constructor.toString()))throw O=0,t},b.sync=function(t){var e=b.deferred(),n=t.length,i=[],o="resolve";function r(t,r){return function(s){return i[t]=s,r||(o="reject"),0==--n&&(e.promise(i),e[o](i)),s}}return t.length>0?y(t,(function(t,e){t.then(r(e,!0),r(e,!1))})):e.resolve([]),e.promise},b.request=function(t){!0!==t.background&&b.startComputation();var o,u,p,d=new Nt;return t.dataType&&"jsonp"===t.dataType.toLowerCase()?(o=t.serialize=u=t.deserialize=Ct,p=function(t){return t.responseText}):(o=t.serialize=t.serialize||JSON.stringify,u=t.deserialize=t.deserialize||JSON.parse,p=t.extract||function(t){return t.responseText.length||u!==JSON.parse?t.responseText:null}),t.method=(t.method||"GET").toUpperCase(),t.url=function(t,e){e&&(t=t.replace(/:[a-z]\w+/gi,(function(t){var n=t.slice(1),i=e[n]||t;return delete e[n],i})));return t}(t.url,t.data),function(t,e,n){if("GET"===t.method&&"jsonp"!==t.dataType){var i=t.url.indexOf("?")<0?"?":"&",o=bt(e);t.url+=o?i+o:""}else t.data=n(e)}(t,t.data,o),t.onload=t.onerror=function(e){try{e=e||event;var n=u(p(e.target,t));"load"===e.type?(t.unwrapSuccess&&(n=t.unwrapSuccess(n,e.target)),c(n)&&t.type?y(n,(function(e,i){n[i]=new t.type(e)})):t.type&&(n=new t.type(n)),d.resolve(n)):(t.unwrapError&&(n=t.unwrapError(n,e.target)),d.reject(n))}catch(t){d.reject(t),b.deferred.onerror(t)}finally{!0!==t.background&&b.endComputation()}},function(t){t.dataType&&"jsonp"===t.dataType.toLowerCase()?function(t){var i=t.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=l.createElement("script");e[i]=function(r){o.parentNode.removeChild(o),t.onload({type:"load",target:{responseText:r}}),e[i]=n},o.onerror=function(){return o.parentNode.removeChild(o),t.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[i]=n,!1},o.onload=function(){return!1},o.src=t.url+(t.url.indexOf("?")>0?"&":"?")+(t.callbackKey?t.callbackKey:"callback")+"="+i+"&"+bt(t.data||{}),l.body.appendChild(o)}(t):function(t){var n=new e.XMLHttpRequest;n.open(t.method,t.url,!0,t.user,t.password),n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300?t.onload({type:"load",target:n}):t.onerror({type:"error",target:n}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&n.setRequestHeader("Content-Type","application/json; charset=utf-8");t.deserialize===JSON.parse&&n.setRequestHeader("Accept","application/json, text/*");if(s(t.headers))for(var o in t.headers)i.call(t.headers,o)&&n.setRequestHeader(o,t.headers[o]);if(r(t.config)){var c=t.config(n,t);null!=c&&(n=c)}var u="GET"!==t.method&&t.data?t.data:"";if(u&&!a(u)&&u.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");n.send(u)}(t)}(t),d.promise=xt(d.promise,t.initialValue),d.promise},b}(o);"undefined"==typeof window&&s.deps({document:"undefined"!=typeof document?document:{},location:"undefined"!=typeof location?location:{},clearTimeout:clearTimeout,setTimeout:setTimeout}),null!=t&&t.exports?t.exports=s:void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}("undefined"!=typeof window?window:this)}).call(this,n(77)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={};n.r(i),n.d(i,"Model",(function(){return l})),n.d(i,"PostTypes",(function(){return d})),n.d(i,"Routes",(function(){return h}));n(78),n(81),n(82),n(85),n(87),n(88),n(89),n(90),n(91),n(92);var o=n(73),r=n.n(o),s=n(74),a=n.n(s),c=n(45),u=n(6),l=function(){function t(t,e){void 0===e&&(e=null),Object(u.a)(this,"type",void 0),Object(u.a)(this,"attributes",[]),Object(u.a)(this,"hasOnes",[]),Object(u.a)(this,"hasManys",[]),this.type=t,this.model=e}var e=t.prototype;return e.attribute=function(t){return this.attributes.push(t),this},e.hasOne=function(t){return this.hasOnes.push(t),this},e.hasMany=function(t){return this.hasManys.push(t),this},e.extend=function(t,e){this.model&&(t.store.models[this.type]=this.model);var n=t.store.models[this.type];this.attributes.forEach((function(t){return n.prototype[t]=n.attribute(t)})),this.hasOnes.forEach((function(t){return n.prototype[t]=n.hasOne(t)})),this.hasManys.forEach((function(t){return n.prototype[t]=n.hasMany(t)}))},t}(),p=n(4),d=function(){function t(){Object(u.a)(this,"postComponents",{})}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object(p.a)(t.postComponents,this.postComponents)},t}(),h=function(){function t(){Object(u.a)(this,"routes",{})}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.extend=function(t,e){Object(p.a)(t.routes,this.routes)},t}();dayjs.extend(r.a),dayjs.extend(a.a),Object(c.a)(window)},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var i=e.prototype,o={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"};n.en.relativeTime=o;var r=function(e,i,r,s){for(var a,c,u,l=r.$locale().relativeTime||o,p=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],d=p.length,h=0;h<d;h+=1){var f=p[h];f.d&&(a=s?n(e).diff(r,f.d,!0):r.diff(e,f.d,!0));var m=(t.rounding||Math.round)(Math.abs(a));if(u=a>0,m<=f.r||!f.r){m<=1&&h>0&&(f=p[h-1]);var v=l[f.l];c="string"==typeof v?v.replace("%d",m):v(m,i,f.l,u);break}}return i?c:(u?l.future:l.past).replace("%s",c)};i.to=function(t,e){return r(t,e,this,!0)},i.from=function(t,e){return r(t,e,this)};var s=function(t){return t.$u?n.utc():n()};i.toNow=function(t){return this.to(s(this),t)},i.fromNow=function(t){return this.from(s(this),t)}}}()},function(t,e,n){t.exports=function(){"use strict";return function(t,e,n){var i=e.prototype,o=i.format,r={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=r,i.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var e=this.$locale().formats,n=void 0===e?{}:e,i=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,e,i){var o=i&&i.toUpperCase();return e||n[i]||r[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}));return o.call(this,i)}}}()},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(26))},function(t,e,n){"use strict";var i=n(35),o=n(54),r=n(53),s={handlers:null,getHandlers:function(t){return this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.getHandlers(t).forEach((function(t){return t.apply(e,i)}))},on:function(t,e){this.getHandlers(t).push(e)},one:function(t,e){this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){var n=this.getHandlers(t),i=n.indexOf(e);-1!==i&&n.splice(i,1)}},a=n(57),c=n(5),u=n(4),l=n(0);var p=n(24),d=n(17),h=n(55),f=n(67),m=n(42),v=n(65),g=n(29),b=n(46),y=n(10),w=n(34),x=n(52),N=n(45),C=n(27),O=n(9),T=n(62),k=n(56),j=n(60),S=n(36),A=n(59),P=n(39),E=n(11),D=n(58),$=n(3),_=n(51),I=n(49),M=n(19),R=n(33),L=n(25),B=n(14),H=n(47),U=n(23),F=n(13),q=n(64),z=n(50),W=n(22),V=n(44),Y=n(43),G=n(18),K=n(20),X=n(40),J=n(30),Q=n(48),Z=n(2),tt=n(12),et=n(31),nt=n(1),it=n(61),ot=n(69),rt=n(15),st=n(7),at=n(37);var ct=n(32),ut=n(16),lt=n(68),pt=n(8);e.a={extend:i,Session:o.a,Store:r.a,"utils/evented":s,"utils/liveHumanTimes":a.a,"utils/ItemList":c.a,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(e,t),e}(t),n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.forEach((function(t){Object(u.a)(e.prototype,t)})),e},"utils/humanTime":p.a,"utils/computed":d.a,"utils/Drawer":h.a,"utils/anchorScroll":f.a,"utils/RequestError":m.a,"utils/abbreviateNumber":v.a,"utils/string":g,"utils/SubtreeRetainer":b.a,"utils/extract":y.a,"utils/ScrollListener":w.a,"utils/stringToColor":x.a,"utils/patchMithril":N.a,"utils/classList":C.a,"utils/extractText":O.a,"utils/formatNumber":T.a,"utils/mapRoutes":k.a,"models/Notification":j.a,"models/User":S.a,"models/Post":A.a,"models/Discussion":P.a,"models/Group":E.a,"models/Forum":D.a,Component:$.a,Translator:_.a,"components/AlertManager":I.a,"components/Page":M.a,"components/Switch":R.a,"components/Badge":L.a,"components/LoadingIndicator":B.a,"components/Placeholder":H.a,"components/Separator":U.a,"components/Dropdown":F.a,"components/SplitDropdown":q.a,"components/RequestErrorModal":z.a,"components/FieldSet":W.a,"components/Select":V.a,"components/Navigation":Y.a,"components/Alert":G.a,"components/LinkButton":K.a,"components/Checkbox":X.a,"components/SelectDropdown":J.a,"components/ModalManager":Q.a,"components/Button":Z.a,"components/Modal":tt.a,"components/GroupBadge":et.a,Model:nt.a,Application:it.a,"helpers/fullTime":ot.a,"helpers/avatar":rt.a,"helpers/icon":st.a,"helpers/humanTime":at.a,"helpers/punctuateSeries":function(t){if(2===t.length)return app.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,app.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return app.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":ct.a,"helpers/username":ut.a,"helpers/userOnline":lt.a,"helpers/listItems":pt.a}},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,n){(function(e){t.exports=e.$=n(79)}).call(this,n(26))},function(t,e,n){(function(e){t.exports=e.jQuery=n(80)}).call(this,n(26))},function(t,e,n){var i;
|
||
/*!
|
||
* jQuery JavaScript Library v3.4.1
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2019-05-01T21:04Z
|
||
*/!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var r=[],s=n.document,a=Object.getPrototypeOf,c=r.slice,u=r.concat,l=r.push,p=r.indexOf,d={},h=d.toString,f=d.hasOwnProperty,m=f.toString,v=m.call(Object),g={},b=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function(t){return null!=t&&t===t.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,o,r=(n=n||s).createElement("script");if(r.text=t,e)for(i in w)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C=function(t,e){return new C.fn.init(t,e)},O=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function T(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!b(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:"3.4.1",constructor:C,length:0,toArray:function(){return c.call(this)},get:function(t){return null==t?c.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:r.sort,splice:r.splice},C.extend=C.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||b(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(u&&i&&(C.isPlainObject(i)||(o=Array.isArray(i)))?(n=s[e],r=o&&!Array.isArray(n)?[]:o||C.isPlainObject(n)?n:{},o=!1,s[e]=C.extend(u,r,i)):void 0!==i&&(s[e]=i));return s},C.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t))&&(!(e=a(t))||"function"==typeof(n=f.call(e,"constructor")&&e.constructor)&&m.call(n)===v)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){x(t,{nonce:e&&e.nonce})},each:function(t,e){var n,i=0;if(T(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(O,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(T(Object(t))?C.merge(n,"string"==typeof t?[t]:t):l.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:p.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,s=[];if(T(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&s.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&s.push(o);return u.apply([],s)},guid:1,support:g}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=r[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var k=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.4
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://js.foundation/
|
||
*
|
||
* Date: 2019-04-08
|
||
*/
|
||
function(t){var e,n,i,o,r,s,a,c,u,l,p,d,h,f,m,v,g,b,y,w="sizzle"+1*new Date,x=t.document,N=0,C=0,O=ct(),T=ct(),k=ct(),j=ct(),S=function(t,e){return t===e&&(p=!0),0},A={}.hasOwnProperty,P=[],E=P.pop,D=P.push,$=P.push,_=P.slice,I=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",B="\\["+R+"*("+L+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+R+"*\\]",H=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",U=new RegExp(R+"+","g"),F=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),q=new RegExp("^"+R+"*,"+R+"*"),z=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),W=new RegExp(R+"|>"),V=new RegExp(H),Y=new RegExp("^"+L+"$"),G={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),nt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){d()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{$.apply(P=_.call(x.childNodes),x.childNodes),P[x.childNodes.length].nodeType}catch(t){$={apply:P.length?function(t,e){D.apply(t,_.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(t,e,i,o){var r,a,u,l,p,f,g,b=e&&e.ownerDocument,N=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==N&&9!==N&&11!==N)return i;if(!o&&((e?e.ownerDocument||e:x)!==h&&d(e),e=e||h,m)){if(11!==N&&(p=Z.exec(t)))if(r=p[1]){if(9===N){if(!(u=e.getElementById(r)))return i;if(u.id===r)return i.push(u),i}else if(b&&(u=b.getElementById(r))&&y(e,u)&&u.id===r)return i.push(u),i}else{if(p[2])return $.apply(i,e.getElementsByTagName(t)),i;if((r=p[3])&&n.getElementsByClassName&&e.getElementsByClassName)return $.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!j[t+" "]&&(!v||!v.test(t))&&(1!==N||"object"!==e.nodeName.toLowerCase())){if(g=t,b=e,1===N&&W.test(t)){for((l=e.getAttribute("id"))?l=l.replace(it,ot):e.setAttribute("id",l=w),a=(f=s(t)).length;a--;)f[a]="#"+l+" "+yt(f[a]);g=f.join(","),b=tt.test(t)&>(e.parentNode)||e}try{return $.apply(i,b.querySelectorAll(g)),i}catch(e){j(t,!0)}finally{l===w&&e.removeAttribute("id")}}}return c(t.replace(F,"$1"),e,i,o)}function ct(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function ut(t){return t[w]=!0,t}function lt(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function pt(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function dt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ut((function(e){return e=+e,ut((function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},r=at.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!K.test(e||n&&n.nodeName||"HTML")},d=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:x;return s!==h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!r(h),x!==h&&(o=h.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=lt((function(t){return f.appendChild(t).id=w,!h.getElementsByName||!h.getElementsByName(w).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(h.querySelectorAll))&&(lt((function(t){f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(b=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),g.push("!=",H)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(f.compareDocumentPosition),y=e||Q.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S=e?function(t,e){if(t===e)return p=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===h||t.ownerDocument===x&&y(x,t)?-1:e===h||e.ownerDocument===x&&y(x,e)?1:l?I(l,t)-I(l,e):0:4&i?-1:1)}:function(t,e){if(t===e)return p=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t===h?-1:e===h?1:o?-1:r?1:l?I(l,t)-I(l,e):0;if(o===r)return dt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?dt(s[i],a[i]):s[i]===x?-1:a[i]===x?1:0},h):h},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if((t.ownerDocument||t)!==h&&d(t),n.matchesSelector&&m&&!j[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var i=b.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){j(e,!0)}return at(e,h,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!==h&&d(t),y(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!==h&&d(t);var o=i.attrHandle[e.toLowerCase()],r=o&&A.call(i.attrHandle,e.toLowerCase())?o(t,e,!m):void 0;return void 0!==r?r:n.attributes||!m?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},at.escape=function(t){return(t+"").replace(it,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],o=0,r=0;if(p=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(S),p){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return l=null,t},o=at.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=at.selectors={cacheLength:50,createPseudo:ut,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&V.test(n)&&(e=s(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=O[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&O(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var o=at.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var u,l,p,d,h,f,m=r!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),b=!c&&!a,y=!1;if(v){if(r){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?v.firstChild:v.lastChild],s&&b){for(y=(h=(u=(l=(p=(d=v)[w]||(d[w]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]||[])[0]===N&&u[1])&&u[2],d=h&&v.childNodes[h];d=++h&&d&&d[m]||(y=h=0)||f.pop();)if(1===d.nodeType&&++y&&d===e){l[t]=[N,h,y];break}}else if(b&&(y=h=(u=(l=(p=(d=e)[w]||(d[w]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]||[])[0]===N&&u[1]),!1===y)for(;(d=++h&&d&&d[m]||(y=h=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++y||(b&&((l=(p=d[w]||(d[w]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]=[N,y]),d!==e)););return(y-=o)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ut((function(t,n){for(var i,r=o(t,e),s=r.length;s--;)t[i=I(t,r[s])]=!(n[i]=r[s])})):function(t){return o(t,0,n)}):o}},pseudos:{not:ut((function(t){var e=[],n=[],i=a(t.replace(F,"$1"));return i[w]?ut((function(t,e,n,o){for(var r,s=i(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}})),has:ut((function(t){return function(e){return at(t,e).length>0}})),contains:ut((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||o(e)).indexOf(t)>-1}})),lang:ut((function(t){return Y.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return J.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:vt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ft(e);function bt(){}function yt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function wt(t,e,n){var i=e.dir,o=e.next,r=o||i,s=n&&"parentNode"===r,a=C++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,c){var u,l,p,d=[N,a];if(c){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,c))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(l=(p=e[w]||(e[w]={}))[e.uniqueID]||(p[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((u=l[r])&&u[0]===N&&u[1]===a)return d[2]=u[2];if(l[r]=d,d[2]=t(e,n,c))return!0}return!1}}function xt(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function Nt(t,e,n,i,o){for(var r,s=[],a=0,c=t.length,u=null!=e;a<c;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),u&&e.push(a)));return s}function Ct(t,e,n,i,o,r){return i&&!i[w]&&(i=Ct(i)),o&&!o[w]&&(o=Ct(o,r)),ut((function(r,s,a,c){var u,l,p,d=[],h=[],f=s.length,m=r||function(t,e,n){for(var i=0,o=e.length;i<o;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!r&&e?m:Nt(m,d,t,a,c),g=n?o||(r?t:f||i)?[]:s:v;if(n&&n(v,g,a,c),i)for(u=Nt(g,h),i(u,[],a,c),l=u.length;l--;)(p=u[l])&&(g[h[l]]=!(v[h[l]]=p));if(r){if(o||t){if(o){for(u=[],l=g.length;l--;)(p=g[l])&&u.push(v[l]=p);o(null,g=[],u,c)}for(l=g.length;l--;)(p=g[l])&&(u=o?I(r,p):d[l])>-1&&(r[u]=!(s[u]=p))}}else g=Nt(g===s?g.splice(f,g.length):g),o?o(null,s,g,c):$.apply(s,g)}))}function Ot(t){for(var e,n,o,r=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],c=s?1:0,l=wt((function(t){return t===e}),a,!0),p=wt((function(t){return I(e,t)>-1}),a,!0),d=[function(t,n,i){var o=!s&&(i||n!==u)||((e=n).nodeType?l(t,n,i):p(t,n,i));return e=null,o}];c<r;c++)if(n=i.relative[t[c].type])d=[wt(xt(d),n)];else{if((n=i.filter[t[c].type].apply(null,t[c].matches))[w]){for(o=++c;o<r&&!i.relative[t[o].type];o++);return Ct(c>1&&xt(d),c>1&&yt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(F,"$1"),n,c<o&&Ot(t.slice(c,o)),o<r&&Ot(t=t.slice(o)),o<r&&yt(t))}d.push(n)}return xt(d)}return bt.prototype=i.filters=i.pseudos,i.setFilters=new bt,s=at.tokenize=function(t,e){var n,o,r,s,a,c,u,l=T[t+" "];if(l)return e?0:l.slice(0);for(a=t,c=[],u=i.preFilter;a;){for(s in n&&!(o=q.exec(a))||(o&&(a=a.slice(o[0].length)||a),c.push(r=[])),n=!1,(o=z.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(F," ")}),a=a.slice(n.length)),i.filter)!(o=G[s].exec(a))||u[s]&&!(o=u[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):T(t,c).slice(0)},a=at.compile=function(t,e){var n,o=[],r=[],a=k[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ot(e[n]))[w]?o.push(a):r.push(a);(a=k(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,s,a,c,l){var p,f,v,g=0,b="0",y=r&&[],w=[],x=u,C=r||o&&i.find.TAG("*",l),O=N+=null==x?1:Math.random()||.1,T=C.length;for(l&&(u=s===h||s||l);b!==T&&null!=(p=C[b]);b++){if(o&&p){for(f=0,s||p.ownerDocument===h||(d(p),a=!m);v=t[f++];)if(v(p,s||h,a)){c.push(p);break}l&&(N=O)}n&&((p=!v&&p)&&g--,r&&y.push(p))}if(g+=b,n&&b!==g){for(f=0;v=e[f++];)v(y,w,s,a);if(r){if(g>0)for(;b--;)y[b]||w[b]||(w[b]=E.call(c));w=Nt(w)}$.apply(c,w),l&&!r&&w.length>0&&g+e.length>1&&at.uniqueSort(c)}return l&&(N=O,u=x),y};return n?ut(r):r}(r,o))).selector=t}return a},c=at.select=function(t,e,n,o){var r,c,u,l,p,d="function"==typeof t&&t,h=!o&&s(t=d.selector||t);if(n=n||[],1===h.length){if((c=h[0]=h[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===e.nodeType&&m&&i.relative[c[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(et,nt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(r=G.needsContext.test(t)?0:c.length;r--&&(u=c[r],!i.relative[l=u.type]);)if((p=i.find[l])&&(o=p(u.matches[0].replace(et,nt),tt.test(c[0].type)&>(e.parentNode)||e))){if(c.splice(r,1),!(t=o.length&&yt(c)))return $.apply(n,o),n;break}}return(d||a(t,h))(o,e,!m,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!p,d(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||pt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&<((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||pt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||pt(M,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(n);C.find=k,C.expr=k.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=k.uniqueSort,C.text=k.getText,C.isXMLDoc=k.isXML,C.contains=k.contains,C.escapeSelector=k.escape;var j=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&C(t).is(n))break;i.push(t)}return i},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},A=C.expr.match.needsContext;function P(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(t,e,n){return b(e)?C.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return p.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?C.find.matchesSelector(i,t)?[i]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<i;e++)if(C.contains(o[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)C.find(t,o[e],n);return i>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(D(this,t||[],!1))},not:function(t){return this.pushStack(D(this,t||[],!0))},is:function(t){return!!D(this,"string"==typeof t&&A.test(t)?C(t):t||[],!1).length}});var $,_=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||$,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:_.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:s,!0)),E.test(i[1])&&C.isPlainObject(e))for(i in e)b(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=s.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):b(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,$=C(s);var I=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&C(t);if(!A.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?C.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?p.call(C(t),this[0]):p.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return j(t,"parentNode")},parentsUntil:function(t,e,n){return j(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return j(t,"nextSibling")},prevAll:function(t){return j(t,"previousSibling")},nextUntil:function(t,e,n){return j(t,"nextSibling",n)},prevUntil:function(t,e,n){return j(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(P(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,i){var o=C.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=C.filter(i,o)),this.length>1&&(M[t]||C.uniqueSort(o),I.test(t)&&o.reverse()),this.pushStack(o)}}));var L=/[^\x20\t\r\n\f]+/g;function B(t){return t}function H(t){throw t}function U(t,e,n,i){var o;try{t&&b(o=t.promise)?o.call(t).done(e).fail(n):t&&b(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,i,o,r=[],s=[],a=-1,c=function(){for(o=o||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=r.length,n=!1);t.memory||(n=!1),e=!1,o&&(r=n?[]:"")},u={add:function(){return r&&(n&&!e&&(a=r.length-1,s.push(n)),function e(n){C.each(n,(function(n,i){b(i)?t.unique&&u.has(i)||r.push(i):i&&i.length&&"string"!==N(i)&&e(i)}))}(arguments),n&&!e&&c()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,i){var o=b(t[i[4]])&&t[i[4]];r[i[1]]((function(){var t=o&&o.apply(this,arguments);t&&b(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,o){var r=0;function s(t,e,i,o){return function(){var a=this,c=arguments,u=function(){var n,u;if(!(t<r)){if((n=i.apply(a,c))===e.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,b(u)?o?u.call(n,s(r,e,B,o),s(r,e,H,o)):(r++,u.call(n,s(r,e,B,o),s(r,e,H,o),s(r,e,B,e.notifyWith))):(i!==B&&(a=void 0,c=[n]),(o||e.resolveWith)(a,c))}},l=o?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,l.stackTrace),t+1>=r&&(i!==H&&(a=void 0,c=[n]),e.rejectWith(a,c))}};t?l():(C.Deferred.getStackHook&&(l.stackTrace=C.Deferred.getStackHook()),n.setTimeout(l))}}return C.Deferred((function(n){e[0][3].add(s(0,n,b(o)?o:B,n.notifyWith)),e[1][3].add(s(0,n,b(t)?t:B)),e[2][3].add(s(0,n,b(i)?i:H))})).promise()},promise:function(t){return null!=t?C.extend(t,o):o}},r={};return C.each(e,(function(t,n){var s=n[2],a=n[5];o[n[1]]=s.add,a&&s.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=s.fireWith})),o.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=c.call(arguments),r=C.Deferred(),s=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?c.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(U(t,r.done(s(n)).resolve,r.reject,!e),"pending"===r.state()||b(o[n]&&o[n].then)))return r.then();for(;n--;)U(o[n],s(n),r.reject);return r.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&F.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){n.setTimeout((function(){throw t}))};var q=C.Deferred();function z(){s.removeEventListener("DOMContentLoaded",z),n.removeEventListener("load",z),C.ready()}C.fn.ready=function(t){return q.then(t).catch((function(t){C.readyException(t)})),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||q.resolveWith(s,[C]))}}),C.ready.then=q.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(C.ready):(s.addEventListener("DOMContentLoaded",z),n.addEventListener("load",z));var W=function(t,e,n,i,o,r,s){var a=0,c=t.length,u=null==n;if("object"===N(n))for(a in o=!0,n)W(t,e,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,b(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(C(t),n)})),e))for(;a<c;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:u?e.call(t):c?e(t[0],n):r},V=/^-ms-/,Y=/-([a-z])/g;function G(t,e){return e.toUpperCase()}function K(t){return t.replace(V,"ms-").replace(Y,G)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=C.expando+J.uid++}J.uid=1,J.prototype={cache:function(t){var e=t[this.expando];return e||(e={},X(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[K(e)]=n;else for(i in e)o[K(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][K(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in i?[e]:e.match(L)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||C.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var Q=new J,Z=new J,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}Z.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return Z.hasData(t)||Q.hasData(t)},data:function(t,e,n){return Z.access(t,e,n)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,n){return Q.access(t,e,n)},_removeData:function(t,e){Q.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=Z.get(r),1===r.nodeType&&!Q.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=K(i.slice(5)),nt(r,i,o[i]));Q.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each((function(){Z.set(this,t)})):W(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=Z.get(r,t))||void 0!==(n=nt(r,t))?n:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),C.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Q.get(t,e),n&&(!i||Array.isArray(n)?i=Q.access(t,e,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=C.queue(t,e),i=n.length,o=n.shift(),r=C._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,(function(){C.dequeue(t,e)}),r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:C.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each((function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){C.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=C.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=Q.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],st=s.documentElement,at=function(t){return C.contains(t.ownerDocument,t)},ct={composed:!0};st.getRootNode&&(at=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(ct)===t.ownerDocument});var ut=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===C.css(t,"display")},lt=function(t,e,n,i){var o,r,s={};for(r in e)s[r]=t.style[r],t.style[r]=e[r];for(r in o=n.apply(t,i||[]),e)t.style[r]=s[r];return o};function pt(t,e,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return C.css(t,e,"")},c=a(),u=n&&n[3]||(C.cssNumber[e]?"":"px"),l=t.nodeType&&(C.cssNumber[e]||"px"!==u&&+c)&&ot.exec(C.css(t,e));if(l&&l[3]!==u){for(c/=2,u=u||l[3],l=+c||1;s--;)C.style(t,e,l+u),(1-r)*(1-(r=a()/c||.5))<=0&&(s=0),l/=r;l*=2,C.style(t,e,l+u),n=n||[]}return n&&(l=+l||+c||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=l,i.end=o)),o}var dt={};function ht(t){var e,n=t.ownerDocument,i=t.nodeName,o=dt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=C.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),dt[i]=o,o)}function ft(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=Q.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&ut(i)&&(o[r]=ht(i))):"none"!==n&&(o[r]="none",Q.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}C.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ut(this)?C(this).show():C(this).hide()}))}});var mt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i,bt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&P(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,i=t.length;n<i;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}bt.optgroup=bt.option,bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td;var xt,Nt,Ct=/<|&#?\w+;/;function Ot(t,e,n,i,o){for(var r,s,a,c,u,l,p=e.createDocumentFragment(),d=[],h=0,f=t.length;h<f;h++)if((r=t[h])||0===r)if("object"===N(r))C.merge(d,r.nodeType?[r]:r);else if(Ct.test(r)){for(s=s||p.appendChild(e.createElement("div")),a=(vt.exec(r)||["",""])[1].toLowerCase(),c=bt[a]||bt._default,s.innerHTML=c[1]+C.htmlPrefilter(r)+c[2],l=c[0];l--;)s=s.lastChild;C.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(e.createTextNode(r));for(p.textContent="",h=0;r=d[h++];)if(i&&C.inArray(r,i)>-1)o&&o.push(r);else if(u=at(r),s=yt(p.appendChild(r),"script"),u&&wt(s),n)for(l=0;r=s[l++];)gt.test(r.type||"")&&n.push(r);return p}xt=s.createDocumentFragment().appendChild(s.createElement("div")),(Nt=s.createElement("input")).setAttribute("type","radio"),Nt.setAttribute("checked","checked"),Nt.setAttribute("name","t"),xt.appendChild(Nt),g.checkClone=xt.cloneNode(!0).cloneNode(!0).lastChild.checked,xt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!xt.cloneNode(!0).lastChild.defaultValue;var Tt=/^key/,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,jt=/^([^.]*)(?:\.(.+)|)/;function St(){return!0}function At(){return!1}function Pt(t,e){return t===function(){try{return s.activeElement}catch(t){}}()==("focus"===e)}function Et(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Et(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=At;else if(!o)return t;return 1===r&&(s=o,(o=function(t){return C().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,o,i,n)}))}function Dt(t,e,n){n?(Q.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,o,r=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=c.call(arguments),Q.set(this,e,r),i=n(this,e),this[e](),r!==(o=Q.get(this,e))||i?Q.set(this,e,!1):o={},r!==o)return t.stopImmediatePropagation(),t.preventDefault(),o.value}else r.length&&(Q.set(this,e,{value:C.event.trigger(C.extend(r[0],C.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&C.event.add(t,e,St)}C.event={global:{},add:function(t,e,n,i,o){var r,s,a,c,u,l,p,d,h,f,m,v=Q.get(t);if(v)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&C.find.matchesSelector(st,o),n.guid||(n.guid=C.guid++),(c=v.events)||(c=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)h=m=(a=jt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h&&(p=C.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=C.event.special[h]||{},l=C.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&C.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=c[h])||((d=c[h]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(h,s)),p.add&&(p.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,l):d.push(l),C.event.global[h]=!0)},remove:function(t,e,n,i,o){var r,s,a,c,u,l,p,d,h,f,m,v=Q.hasData(t)&&Q.get(t);if(v&&(c=v.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(h=m=(a=jt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),h){for(p=C.event.special[h]||{},d=c[h=(i?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)l=d[r],!o&&m!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(d.splice(r,1),l.selector&&d.delegateCount--,p.remove&&p.remove.call(t,l));s&&!d.length&&(p.teardown&&!1!==p.teardown.call(t,f,v.handle)||C.removeEvent(t,h,v.handle),delete c[h])}else for(h in c)C.event.remove(t,h+e[u],n,i,!0);C.isEmptyObject(c)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=C.event.fix(t),c=new Array(arguments.length),u=(Q.get(this,"events")||{})[a.type]||[],l=C.event.special[a.type]||{};for(c[0]=a,e=1;e<arguments.length;e++)c[e]=arguments[e];if(a.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,a)){for(s=C.event.handlers.call(this,a,u),e=0;(o=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==r.namespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(i=((C.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,c))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,a),a.result}},handlers:function(t,e){var n,i,o,r,s,a=[],c=e.delegateCount,u=t.target;if(c&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(r=[],s={},n=0;n<c;n++)void 0===s[o=(i=e[n]).selector+" "]&&(s[o]=i.needsContext?C(o,this).index(u)>-1:C.find(o,this,null,[u]).length),s[o]&&r.push(i);r.length&&a.push({elem:u,handlers:r})}return u=this,c<e.length&&a.push({elem:u,handlers:e.slice(c)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:b(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&P(e,"input")&&Dt(e,"click",St),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&P(e,"input")&&Dt(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&P(e,"input")&&Q.get(e,"click")||P(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?St:At,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:At,isPropagationStopped:At,isImmediatePropagationStopped:At,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=St,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=St,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=St,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&Tt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&kt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return Dt(this,t,Pt),!1},trigger:function(){return Dt(this,t),!0},delegateType:e}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||C.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,i){return Et(this,t,e,n,i)},one:function(t,e,n,i){return Et(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,C(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=At),this.each((function(){C.event.remove(this,t,n,e)}))}});var $t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,_t=/<script|<style|<link/i,It=/checked\s*(?:[^=]|=\s*.checked.)/i,Mt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Rt(t,e){return P(t,"table")&&P(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function Lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Bt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ht(t,e){var n,i,o,r,s,a,c,u;if(1===e.nodeType){if(Q.hasData(t)&&(r=Q.access(t),s=Q.set(e,r),u=r.events))for(o in delete s.handle,s.events={},u)for(n=0,i=u[o].length;n<i;n++)C.event.add(e,o,u[o][n]);Z.hasData(t)&&(a=Z.access(t),c=C.extend({},a),Z.set(e,c))}}function Ut(t,e){var n=e.nodeName.toLowerCase();"input"===n&&mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Ft(t,e,n,i){e=u.apply([],e);var o,r,s,a,c,l,p=0,d=t.length,h=d-1,f=e[0],m=b(f);if(m||d>1&&"string"==typeof f&&!g.checkClone&&It.test(f))return t.each((function(o){var r=t.eq(o);m&&(e[0]=f.call(this,o,r.html())),Ft(r,e,n,i)}));if(d&&(r=(o=Ot(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(a=(s=C.map(yt(o,"script"),Lt)).length;p<d;p++)c=o,p!==h&&(c=C.clone(c,!0,!0),a&&C.merge(s,yt(c,"script"))),n.call(t[p],c,p);if(a)for(l=s[s.length-1].ownerDocument,C.map(s,Bt),p=0;p<a;p++)c=s[p],gt.test(c.type||"")&&!Q.access(c,"globalEval")&&C.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?C._evalUrl&&!c.noModule&&C._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")}):x(c.textContent.replace(Mt,""),c,l))}return t}function qt(t,e,n){for(var i,o=e?C.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||C.cleanData(yt(i)),i.parentNode&&(n&&at(i)&&wt(yt(i,"script")),i.parentNode.removeChild(i));return t}C.extend({htmlPrefilter:function(t){return t.replace($t,"<$1></$2>")},clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),c=at(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=yt(a),i=0,o=(r=yt(t)).length;i<o;i++)Ut(r[i],s[i]);if(e)if(n)for(r=r||yt(t),s=s||yt(a),i=0,o=r.length;i<o;i++)Ht(r[i],s[i]);else Ht(t,a);return(s=yt(a,"script")).length>0&&wt(s,!c&&yt(t,"script")),a},cleanData:function(t){for(var e,n,i,o=C.event.special,r=0;void 0!==(n=t[r]);r++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(i in e.events)o[i]?C.event.remove(n,i):C.removeEvent(n,i,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(t){return qt(this,t,!0)},remove:function(t){return qt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ft(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,t).appendChild(t)}))},prepend:function(){return Ft(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Rt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ft(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ft(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return W(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!_t.test(t)&&!bt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(yt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ft(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(yt(this)),n&&n.replaceChild(e,this))}),t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){C.fn[t]=function(t){for(var n,i=[],o=C(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),C(o[s])[e](n),l.apply(i,n.get());return this.pushStack(i)}}));var zt=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),Wt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Vt=new RegExp(rt.join("|"),"i");function Yt(t,e,n){var i,o,r,s,a=t.style;return(n=n||Wt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||at(t)||(s=C.style(t,e)),!g.pixelBoxStyles()&&zt.test(s)&&Vt.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(u).appendChild(l);var t=n.getComputedStyle(l);i="1%"!==t.top,c=12===e(t.marginLeft),l.style.right="60%",a=36===e(t.right),o=36===e(t.width),l.style.position="absolute",r=12===e(l.offsetWidth/3),st.removeChild(u),l=null}}function e(t){return Math.round(parseFloat(t))}var i,o,r,a,c,u=s.createElement("div"),l=s.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===l.style.backgroundClip,C.extend(g,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),c},scrollboxSize:function(){return t(),r}}))}();var Kt=["Webkit","Moz","ms"],Xt=s.createElement("div").style,Jt={};function Qt(t){var e=C.cssProps[t]||Jt[t];return e||(t in Xt?t:Jt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Kt.length;n--;)if((t=Kt[n]+e)in Xt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,te=/^--/,ee={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function ie(t,e,n){var i=ot.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function oe(t,e,n,i,o,r){var s="width"===e?1:0,a=0,c=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=C.css(t,n+rt[s],!0,o)),i?("content"===n&&(c-=C.css(t,"padding"+rt[s],!0,o)),"margin"!==n&&(c-=C.css(t,"border"+rt[s]+"Width",!0,o))):(c+=C.css(t,"padding"+rt[s],!0,o),"padding"!==n?c+=C.css(t,"border"+rt[s]+"Width",!0,o):a+=C.css(t,"border"+rt[s]+"Width",!0,o));return!i&&r>=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-c-a-.5))||0),c}function re(t,e,n){var i=Wt(t),o=(!g.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,i),r=o,s=Yt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(zt.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&o||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===C.css(t,"boxSizing",!1,i),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+oe(t,e,n||(o?"border":"content"),r,i,s)+"px"}function se(t,e,n,i,o){return new se.prototype.init(t,e,n,i,o)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Yt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=K(e),c=te.test(e),u=t.style;if(c||(e=Qt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:u[e];"string"===(r=typeof n)&&(o=ot.exec(n))&&o[1]&&(n=pt(t,e,o),r="number"),null!=n&&n==n&&("number"!==r||c||(n+=o&&o[3]||(C.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(c?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var o,r,s,a=K(e);return te.test(e)||(e=Qt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Yt(t,e,i)),"normal"===o&&e in ne&&(o=ne[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,i){if(n)return!Zt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,i):lt(t,ee,(function(){return re(t,e,i)}))},set:function(t,n,i){var o,r=Wt(t),s=!g.scrollboxSize()&&"absolute"===r.position,a=(s||i)&&"border-box"===C.css(t,"boxSizing",!1,r),c=i?oe(t,e,i,a,r):0;return a&&s&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-oe(t,e,"border",!1,r)-.5)),c&&(o=ot.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),ie(0,n,c)}}})),C.cssHooks.marginLeft=Gt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Yt(t,"marginLeft"))||t.getBoundingClientRect().left-lt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+rt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(C.cssHooks[t+e].set=ie)})),C.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=Wt(t),o=e.length;s<o;s++)r[e[s]]=C.css(t,e[s],!1,i);return r}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=se,se.prototype={constructor:se,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(C.cssNumber[n]?"":"px")},cur:function(){var t=se.propHooks[this.prop];return t&&t.get?t.get(this):se.propHooks._default.get(this)},run:function(t){var e,n=se.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):se.propHooks._default.set(this),this}},se.prototype.init.prototype=se.prototype,se.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},se.propHooks.scrollTop=se.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=se.prototype.init,C.fx.step={};var ae,ce,ue=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function pe(){ce&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(pe):n.setTimeout(pe,C.fx.interval),C.fx.tick())}function de(){return n.setTimeout((function(){ae=void 0})),ae=Date.now()}function he(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=rt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function fe(t,e,n){for(var i,o=(me.tweeners[e]||[]).concat(me.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function me(t,e,n){var i,o,r=0,s=me.prefilters.length,a=C.Deferred().always((function(){delete c.elem})),c=function(){if(o)return!1;for(var e=ae||de(),n=Math.max(0,u.startTime+u.duration-e),i=1-(n/u.duration||0),r=0,s=u.tweens.length;r<s;r++)u.tweens[r].run(i);return a.notifyWith(t,[u,i,n]),i<1&&s?n:(s||a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||de(),duration:n.duration,tweens:[],createTween:function(e,n){var i=C.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),l=u.props;for(!function(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=K(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=C.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}(l,u.opts.specialEasing);r<s;r++)if(i=me.prefilters[r].call(u,t,l,u.opts))return b(i.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=i.stop.bind(i)),i;return C.map(l,fe,u),b(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(c,{elem:t,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(me,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return pt(n.elem,t,ot.exec(e),n),n}]},tweener:function(t,e){b(t)?(e=t,t=["*"]):t=t.match(L);for(var n,i=0,o=t.length;i<o;i++)n=t[i],me.tweeners[n]=me.tweeners[n]||[],me.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,c,u,l,p="width"in e||"height"in e,d=this,h={},f=t.style,m=t.nodeType&&ut(t),v=Q.get(t,"fxshow");for(i in n.queue||(null==(s=C._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(o=e[i],ue.test(o)){if(delete e[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!v||void 0===v[i])continue;m=!0}h[i]=v&&v[i]||C.style(t,i)}if((c=!C.isEmptyObject(e))||!C.isEmptyObject(h))for(i in p&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(u=v&&v.display)&&(u=Q.get(t,"display")),"none"===(l=C.css(t,"display"))&&(u?l=u:(ft([t],!0),u=t.style.display||u,l=C.css(t,"display"),ft([t]))),("inline"===l||"inline-block"===l&&null!=u)&&"none"===C.css(t,"float")&&(c||(d.done((function(){f.display=u})),null==u&&(l=f.display,u="none"===l?"":l)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),c=!1,h)c||(v?"hidden"in v&&(m=v.hidden):v=Q.access(t,"fxshow",{display:u}),r&&(v.hidden=!m),m&&ft([t],!0),d.done((function(){for(i in m||ft([t]),Q.remove(t,"fxshow"),h)C.style(t,i,h[i])}))),c=fe(m?v[i]:0,i,d),i in v||(v[i]=c.start,m&&(c.end=c.start,c.start=0))}],prefilter:function(t,e){e?me.prefilters.unshift(t):me.prefilters.push(t)}}),C.speed=function(t,e,n){var i=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||b(t)&&t,duration:t,easing:n&&e||e&&!b(e)&&e};return C.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in C.fx.speeds?i.duration=C.fx.speeds[i.duration]:i.duration=C.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){b(i.old)&&i.old.call(this),i.queue&&C.dequeue(this,i.queue)},i},C.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ut).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=C.isEmptyObject(t),r=C.speed(e,n,i),s=function(){var e=me(this,C.extend({},t),r);(o||Q.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",r=C.timers,s=Q.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&le.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=C.timers,s=i?i.length:0;for(n.finish=!0,C.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(he(e,!0),t,i,o)}})),C.each({slideDown:he("show"),slideUp:he("hide"),slideToggle:he("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),ae=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){ce||(ce=!0,pe())},C.fx.stop=function(){ce=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var o=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(o)}}))},function(){var t=s.createElement("input"),e=s.createElement("select").appendChild(s.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=s.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var ve,ge=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return W(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?C.prop(t,e,n):(1===r&&C.isXMLDoc(t)||(o=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?ve:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=C.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&P(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(L);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),ve={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ge[e]||C.find.attr;ge[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=ge[s],ge[s]=o,o=null!=n(t,e,i)?s:null,ge[s]=r),o}}));var be=/^(?:input|select|textarea|button)$/i,ye=/^(?:a|area)$/i;function we(t){return(t.match(L)||[]).join(" ")}function xe(t){return t.getAttribute&&t.getAttribute("class")||""}function Ne(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}C.fn.extend({prop:function(t,e){return W(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&C.isXMLDoc(t)||(e=C.propFix[e]||e,o=C.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):be.test(t.nodeName)||ye.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,c=0;if(b(t))return this.each((function(e){C(this).addClass(t.call(this,e,xe(this)))}));if((e=Ne(t)).length)for(;n=this[c++];)if(o=xe(n),i=1===n.nodeType&&" "+we(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=we(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,c=0;if(b(t))return this.each((function(e){C(this).removeClass(t.call(this,e,xe(this)))}));if(!arguments.length)return this.attr("class","");if((e=Ne(t)).length)for(;n=this[c++];)if(o=xe(n),i=1===n.nodeType&&" "+we(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=we(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):b(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,xe(this),e),e)})):this.each((function(){var e,o,r,s;if(i)for(o=0,r=C(this),s=Ne(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=xe(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+we(xe(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ce=/\r/g;C.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=b(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,C(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=C.map(o,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=C.valHooks[o.type]||C.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Ce,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:we(C.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],c=s?r+1:o.length;for(i=r<0?c:s?r:0;i<c;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=C.makeArray(e),s=o.length;s--;)((i=o[s]).selected=C.inArray(C.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},g.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in n;var Oe=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,i,o){var r,a,c,u,l,p,d,h,m=[i||s],v=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(a=h=c=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!Oe.test(v+C.event.triggered)&&(v.indexOf(".")>-1&&(g=v.split("."),v=g.shift(),g.sort()),l=v.indexOf(":")<0&&"on"+v,(t=t[C.expando]?t:new C.Event(v,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[v]||{},o||!d.trigger||!1!==d.trigger.apply(i,e))){if(!o&&!d.noBubble&&!y(i)){for(u=d.delegateType||v,Oe.test(u+v)||(a=a.parentNode);a;a=a.parentNode)m.push(a),c=a;c===(i.ownerDocument||s)&&m.push(c.defaultView||c.parentWindow||n)}for(r=0;(a=m[r++])&&!t.isPropagationStopped();)h=a,t.type=r>1?u:d.bindType||v,(p=(Q.get(a,"events")||{})[t.type]&&Q.get(a,"handle"))&&p.apply(a,e),(p=l&&a[l])&&p.apply&&X(a)&&(t.result=p.apply(a,e),!1===t.result&&t.preventDefault());return t.type=v,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(m.pop(),e)||!X(i)||l&&b(i[v])&&!y(i)&&((c=i[l])&&(i[l]=null),C.event.triggered=v,t.isPropagationStopped()&&h.addEventListener(v,Te),i[v](),t.isPropagationStopped()&&h.removeEventListener(v,Te),C.event.triggered=void 0,c&&(i[l]=c)),t.result}},simulate:function(t,e,n){var i=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(i,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),g.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=Q.access(i,e);o||i.addEventListener(t,n,!0),Q.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Q.access(i,e)-1;o?Q.access(i,e,o):(i.removeEventListener(t,n,!0),Q.remove(i,e))}}}));var ke=n.location,je=Date.now(),Se=/\?/;C.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+t),e};var Ae=/\[\]$/,Pe=/\r?\n/g,Ee=/^(?:submit|button|image|reset|file)$/i,De=/^(?:input|select|textarea|keygen)/i;function $e(t,e,n,i){var o;if(Array.isArray(e))C.each(e,(function(e,o){n||Ae.test(t)?i(t,o):$e(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)}));else if(n||"object"!==N(e))i(t,e);else for(o in e)$e(t+"["+o+"]",e[o],n,i)}C.param=function(t,e){var n,i=[],o=function(t,e){var n=b(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){o(this.name,this.value)}));else for(n in t)$e(n,t[n],e,o);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&De.test(this.nodeName)&&!Ee.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(Pe,"\r\n")}})):{name:e.name,value:n.replace(Pe,"\r\n")}})).get()}});var _e=/%20/g,Ie=/#.*$/,Me=/([?&])_=[^&]*/,Re=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Be=/^\/\//,He={},Ue={},Fe="*/".concat("*"),qe=s.createElement("a");function ze(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(L)||[];if(b(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function We(t,e,n,i){var o={},r=t===Ue;function s(a){var c;return o[a]=!0,C.each(t[a]||[],(function(t,a){var u=a(e,n,i);return"string"!=typeof u||r||o[u]?r?!(c=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),c}return s(e.dataTypes[0])||!o["*"]&&s("*")}function Ve(t,e){var n,i,o=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&C.extend(!0,t,i),t}qe.href=ke.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Fe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ve(Ve(t,C.ajaxSettings),e):Ve(C.ajaxSettings,t)},ajaxPrefilter:ze(He),ajaxTransport:ze(Ue),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,r,a,c,u,l,p,d,h,f=C.ajaxSetup({},e),m=f.context||f,v=f.context&&(m.nodeType||m.jquery)?C(m):C.event,g=C.Deferred(),b=C.Callbacks("once memory"),y=f.statusCode||{},w={},x={},N="canceled",O={readyState:0,getResponseHeader:function(t){var e;if(l){if(!a)for(a={};e=Re.exec(r);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(t,e){return null==l&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)O.always(t[O.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||N;return i&&i.abort(e),T(0,e),this}};if(g.promise(O),f.url=((t||f.url||ke.href)+"").replace(Be,ke.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){u=s.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=qe.protocol+"//"+qe.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=C.param(f.data,f.traditional)),We(He,f,e,O),l)return O;for(d in(p=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),o=f.url.replace(Ie,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(_e,"+")):(h=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Se.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Me,"$1"),h=(Se.test(o)?"&":"?")+"_="+je+++h),f.url=o+h),f.ifModified&&(C.lastModified[o]&&O.setRequestHeader("If-Modified-Since",C.lastModified[o]),C.etag[o]&&O.setRequestHeader("If-None-Match",C.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&O.setRequestHeader("Content-Type",f.contentType),O.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Fe+"; q=0.01":""):f.accepts["*"]),f.headers)O.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(m,O,f)||l))return O.abort();if(N="abort",b.add(f.complete),O.done(f.success),O.fail(f.error),i=We(Ue,f,e,O)){if(O.readyState=1,p&&v.trigger("ajaxSend",[O,f]),l)return O;f.async&&f.timeout>0&&(c=n.setTimeout((function(){O.abort("timeout")}),f.timeout));try{l=!1,i.send(w,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,a){var u,d,h,w,x,N=e;l||(l=!0,c&&n.clearTimeout(c),i=void 0,r=a||"",O.readyState=t>0?4:0,u=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var i,o,r,s,a=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){c.unshift(o);break}if(c[0]in n)r=c[0];else{for(o in n){if(!c[0]||t.converters[o+" "+c[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==c[0]&&c.unshift(r),n[r]}(f,O,s)),w=function(t,e,n,i){var o,r,s,a,c,u={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(r=l.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!c&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=r,r=l.shift())if("*"===r)r=c;else if("*"!==c&&c!==r){if(!(s=u[c+" "+r]||u["* "+r]))for(o in u)if((a=o.split(" "))[1]===r&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[o]:!0!==u[o]&&(r=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+c+" to "+r}}}return{state:"success",data:e}}(f,w,O,u),u?(f.ifModified&&((x=O.getResponseHeader("Last-Modified"))&&(C.lastModified[o]=x),(x=O.getResponseHeader("etag"))&&(C.etag[o]=x)),204===t||"HEAD"===f.type?N="nocontent":304===t?N="notmodified":(N=w.state,d=w.data,u=!(h=w.error))):(h=N,!t&&N||(N="error",t<0&&(t=0))),O.status=t,O.statusText=(e||N)+"",u?g.resolveWith(m,[d,N,O]):g.rejectWith(m,[O,N,h]),O.statusCode(y),y=void 0,p&&v.trigger(u?"ajaxSuccess":"ajaxError",[O,f,u?d:h]),b.fireWith(m,[O,N]),p&&(v.trigger("ajaxComplete",[O,f]),--C.active||C.event.trigger("ajaxStop")))}return O},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,i,o){return b(n)&&(o=o||i,i=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:o,data:n,success:i},C.isPlainObject(t)&&t))}})),C._evalUrl=function(t,e){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(b(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return b(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=b(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Ye={0:200,1223:204},Ge=C.ajaxSettings.xhr();g.cors=!!Ge&&"withCredentials"in Ge,g.ajax=Ge=!!Ge,C.ajaxTransport((function(t){var e,i;if(g.cors||Ge&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ye[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),s.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ke,Xe=[],Je=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Xe.pop()||C.expando+"_"+je++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,i){var o,r,s,a=!1!==t.jsonp&&(Je.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Je.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=b(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Je,"$1"+o):!1!==t.jsonp&&(t.url+=(Se.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||C.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=n[o],n[o]=function(){s=arguments},i.always((function(){void 0===r?C(n).removeProp(o):n[o]=r,t[o]&&(t.jsonpCallback=e.jsonpCallback,Xe.push(o)),s&&b(r)&&r(s[0]),s=r=void 0})),"script"})),g.createHTMLDocument=((Ke=s.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ke.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((i=(e=s.implementation.createHTMLDocument("")).createElement("base")).href=s.location.href,e.head.appendChild(i)):e=s),r=!n&&[],(o=E.exec(t))?[e.createElement(o[1])]:(o=Ot([t],e,r),r&&r.length&&C(r).remove(),C.merge([],o.childNodes)));var i,o,r},C.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=we(t.slice(a)),t=t.slice(0,a)),b(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&C.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(i?C("<div>").append(C.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,n){var i,o,r,s,a,c,u=C.css(t,"position"),l=C(t),p={};"static"===u&&(t.style.position="relative"),a=l.offset(),r=C.css(t,"top"),c=C.css(t,"left"),("absolute"===u||"fixed"===u)&&(r+c).indexOf("auto")>-1?(s=(i=l.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(c)||0),b(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+o),"using"in e?e.using.call(t,p):l.css(p)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],o={top:0,left:0};if("fixed"===C.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),o.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-C.css(i,"marginTop",!0),left:e.left-o.left-C.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||st}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;C.fn[t]=function(i){return W(this,(function(t,i,o){var r;if(y(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o}),t,i,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=Gt(g.pixelPosition,(function(t,n){if(n)return n=Yt(t,e),zt.test(n)?C(t).position()[e]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){C.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return W(this,(function(e,n,o){var r;return y(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?C.css(e,n,a):C.style(e,n,o,a)}),e,s?o:void 0,s)}}))})),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}})),C.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),C.proxy=function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),b(t))return i=c.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(c.call(arguments)))}).guid=t.guid=t.guid||C.guid++,o},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=P,C.isFunction=b,C.isWindow=y,C.camelCase=K,C.type=N,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},void 0===(i=function(){return C}.apply(e,[]))||(t.exports=i);var Qe=n.jQuery,Ze=n.$;return C.noConflict=function(t){return n.$===C&&(n.$=Ze),t&&n.jQuery===C&&(n.jQuery=Qe),C},o||(n.jQuery=n.$=C),C}))},function(t,e,n){(function(e){t.exports=e.m=n(71)}).call(this,n(26))},function(t,e,n){(function(e){t.exports=e.moment=n(83)}).call(this,n(26))},function(t,e,n){(function(e){t.exports=e.dayjs=n(84)}).call(this,n(26))},function(t,e,n){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",i="hour",o="day",r="week",s="month",a="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,p=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},d={s:p,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+p(i,2,"0")+":"+p(o,2,"0")},m:function(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,s),o=e-i<0,r=t.clone().add(n+(o?-1:1),s);return Number(-(n+(e-i)/(o?i-r:r-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(u){return{M:s,y:c,w:r,d:o,D:"date",h:i,m:n,s:e,ms:t,Q:a}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},h={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("_")},f="en",m={};m[f]=h;var v=function(t){return t instanceof w},g=function(t,e,n){var i;if(!t)return f;if("string"==typeof t)m[t]&&(i=t),e&&(m[t]=e,i=t);else{var o=t.name;m[o]=t,i=o}return!n&&i&&(f=i),i||!n&&f},b=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new w(n)},y=d;y.l=g,y.i=v,y.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,$offset:e.$offset})};var w=function(){function p(t){this.$L=this.$L||g(t.locale,null,!0),this.parse(t)}var d=p.prototype;return d.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(u);if(i)return n?new Date(Date.UTC(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)):new Date(i[1],i[2]-1,i[3]||1,i[4]||0,i[5]||0,i[6]||0,i[7]||0)}return new Date(e)}(t),this.init()},d.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()},d.$utils=function(){return y},d.isValid=function(){return!("Invalid Date"===this.$d.toString())},d.isSame=function(t,e){var n=b(t);return this.startOf(e)<=n&&n<=this.endOf(e)},d.isAfter=function(t,e){return b(t)<this.startOf(e)},d.isBefore=function(t,e){return this.endOf(e)<b(t)},d.$g=function(t,e,n){return y.u(t)?this[e]:this.set(n,t)},d.year=function(t){return this.$g(t,"$y",c)},d.month=function(t){return this.$g(t,"$M",s)},d.day=function(t){return this.$g(t,"$W",o)},d.date=function(t){return this.$g(t,"$D","date")},d.hour=function(t){return this.$g(t,"$H",i)},d.minute=function(t){return this.$g(t,"$m",n)},d.second=function(t){return this.$g(t,"$s",e)},d.millisecond=function(e){return this.$g(e,"$ms",t)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(t,a){var u=this,l=!!y.u(a)||a,p=y.p(t),d=function(t,e){var n=y.w(u.$u?Date.UTC(u.$y,e,t):new Date(u.$y,e,t),u);return l?n:n.endOf(o)},h=function(t,e){return y.w(u.toDate()[t].apply(u.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),u)},f=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(p){case c:return l?d(1,0):d(31,11);case s:return l?d(1,m):d(0,m+1);case r:var b=this.$locale().weekStart||0,w=(f<b?f+7:f)-b;return d(l?v-w:v+(6-w),m);case o:case"date":return h(g+"Hours",0);case i:return h(g+"Minutes",1);case n:return h(g+"Seconds",2);case e:return h(g+"Milliseconds",3);default:return this.clone()}},d.endOf=function(t){return this.startOf(t,!1)},d.$set=function(r,a){var u,l=y.p(r),p="set"+(this.$u?"UTC":""),d=(u={},u.day=p+"Date",u.date=p+"Date",u[s]=p+"Month",u[c]=p+"FullYear",u[i]=p+"Hours",u[n]=p+"Minutes",u[e]=p+"Seconds",u[t]=p+"Milliseconds",u)[l],h=l===o?this.$D+(a-this.$W):a;if(l===s||l===c){var f=this.clone().set("date",1);f.$d[d](h),f.init(),this.$d=f.set("date",Math.min(this.$D,f.daysInMonth())).toDate()}else d&&this.$d[d](h);return this.init(),this},d.set=function(t,e){return this.clone().$set(t,e)},d.get=function(t){return this[y.p(t)]()},d.add=function(t,a){var u,l=this;t=Number(t);var p=y.p(a),d=function(e){var n=b(l);return y.w(n.date(n.date()+Math.round(e*t)),l)};if(p===s)return this.set(s,this.$M+t);if(p===c)return this.set(c,this.$y+t);if(p===o)return d(1);if(p===r)return d(7);var h=(u={},u[n]=6e4,u[i]=36e5,u[e]=1e3,u)[p]||1,f=this.$d.getTime()+t*h;return y.w(f,this)},d.subtract=function(t,e){return this.add(-1*t,e)},d.format=function(t){var e=this;if(!this.isValid())return"Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=y.z(this),o=this.$locale(),r=this.$H,s=this.$m,a=this.$M,c=o.weekdays,u=o.months,p=function(t,i,o,r){return t&&(t[i]||t(e,n))||o[i].substr(0,r)},d=function(t){return y.s(r%12||12,t,"0")},h=o.meridiem||function(t,e,n){var i=t<12?"AM":"PM";return n?i.toLowerCase():i},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:y.s(a+1,2,"0"),MMM:p(o.monthsShort,a,u,3),MMMM:p(u,a),D:this.$D,DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:p(o.weekdaysMin,this.$W,c,2),ddd:p(o.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(r),HH:y.s(r,2,"0"),h:d(1),hh:d(2),a:h(r,s,!0),A:h(r,s,!1),m:String(s),mm:y.s(s,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:i};return n.replace(l,(function(t,e){return e||f[t]||i.replace(":","")}))},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(t,o,u){var l,p=y.p(o),d=b(t),h=6e4*(d.utcOffset()-this.utcOffset()),f=this-d,m=y.m(this,d);return m=(l={},l[c]=m/12,l[s]=m,l[a]=m/3,l[r]=(f-h)/6048e5,l.day=(f-h)/864e5,l[i]=f/36e5,l[n]=f/6e4,l[e]=f/1e3,l)[p]||f,u?m:y.a(m)},d.daysInMonth=function(){return this.endOf(s).$D},d.$locale=function(){return m[this.$L]},d.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),i=g(t,e,!0);return i&&(n.$L=i),n},d.clone=function(){return y.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},p}();return b.prototype=w.prototype,b.extend=function(t,e){return t(e,w,b),b},b.locale=g,b.isDayjs=v,b.unix=function(t){return b(1e3*t)},b.en=m[f],b.Ls=m,b}()},function(t,e,n){(function(e){e.m||(e.m={}),t.exports=e.m.bidi=n(86)}).call(this,n(26))},function(t,e,n){var i,o,r,s;s=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,i){return e(n,n.attrs.bidi)},t.attrs&&(t.attrs.bidi=e),t.bidi=e,e},o=[n(71)],void 0===(r="function"==typeof(i=s)?i.apply(e,o):i)||(t.exports=r)},function(t,e){!function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i);var o=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof n&&n;o||i.data("bs.affix",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=r.top)&&"bottom":!(o+s<=t-i)&&"bottom";var a=null==this.affixed,c=a?o:r.top;return null!=n&&o<=n?"top":null!=i&&c+(a?s:e)>=t-i&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,n,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var c="affix"+(a?"-"+a:""),u=t.Event(c+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-r})}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(jQuery)},function(t,e){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function o(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),o=i(e),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var r=i(o),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(e).trigger("focus"),o.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var c=a.index(n.target);38==n.which&&c>0&&c--,40==n.which&&c<a.length-1&&c++,~c||(c=0),a.eq(c).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new n(this)),"string"==typeof e&&o[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",o).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},function(t,e){!function(t){"use strict";var e=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,i){return this.each((function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof n&&n);r||o.data("bs.modal",r=new e(this,s)),"string"==typeof n?r[n](i):s.show&&r.show(i)}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(n){var i=this,o=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(o),this.isShown||o.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",(function(){i.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var o=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),o&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:n});o?i.$dialog.one("bsTransitionEnd",(function(){i.$element.trigger("focus").trigger(r)})).emulateTransitionEnd(e.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)})))},e.prototype.hide=function(n){n&&n.preventDefault(),n=t.Event("hide.bs.modal"),this.$element.trigger(n),this.isShown&&!n.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(n){var i=this,o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&o;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())}),this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;r?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),n&&n()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):s()}else n&&n()},e.prototype.handleUpdate=function(){this.adjustDialog()},e.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+n),t(this.fixedContent).each((function(e,i){var o=i.style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(r)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}))},e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var i=t(this),o=i.attr("href"),r=i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(r),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),i.data());i.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))})),n.call(s,a,this)}))}(jQuery)},function(t,e){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,r=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(o)||e.nodeValue.match(r));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),c=0,u=a.length;c<u;c++)if(s.match(a[c]))return!0;return!1}function a(e,n,i){if(0===e.length)return e;if(i&&"function"==typeof i)return i(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=e;for(var r=t.map(n,(function(t,e){return e})),a=t(o.body).find("*"),c=0,u=a.length;c<u;c++){var l=a[c],p=l.nodeName.toLowerCase();if(-1!==t.inArray(p,r))for(var d=t.map(l.attributes,(function(t){return t})),h=[].concat(n["*"]||[],n[p]||[]),f=0,m=d.length;f<m;f++)s(d[f],h)||l.removeAttribute(d[f].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var c=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};c.VERSION="3.4.1",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",c="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(c+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(n){var i=this.$element.data();for(var o in i)i.hasOwnProperty(o)&&-1!==t.inArray(o,e)&&delete i[o];return(n=t.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),p=o[0].offsetWidth,d=o[0].offsetHeight;if(u){var h=s,f=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>f.bottom?"top":"top"==s&&l.top-d<f.top?"bottom":"right"==s&&l.right+p>f.width?"left":"left"==s&&l.left-p<f.left?"right":s,o.removeClass(h).addClass(s)}var m=this.getCalculatedOffset(s,l,p,d);this.applyPlacement(m,s);var v=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",v).emulateTransitionEnd(c.TRANSITION_DURATION):v()}},c.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var c=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=r&&(e.top=e.top+r-u);var l=this.getViewportAdjustedDelta(n,e,c,u);l.left?e.left+=l.left:e.top+=l.top;var p=/top|bottom/.test(n),d=p?2*l.left-o+c:2*l.top-r+u,h=p?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(d,i[0][h],p)},c.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},c.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=a(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},c.prototype.hide=function(e){var n=this,i=t(this.$tip),o=t.Event("hide.bs."+this.type);function r(){"in"!=n.hoverState&&i.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r(),this.hoverState=null,this},c.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName,o=n.getBoundingClientRect();null==o.width&&(o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var r=window.SVGElement&&n instanceof window.SVGElement,s=i?{top:0,left:0}:r?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},c=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,c,s)},c.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},c.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,c=e.top+r-s.scroll+i;a<s.top?o.top=s.top-a:c>s.top+s.height&&(o.top=s.top+s.height-c)}else{var u=e.left-r,l=e.left+r+n;u<s.left?o.left=s.left-u:l>s.right&&(o.left=s.left+s.width-l)}return o},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},c.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),o="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new c(this,o)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},function(t,e){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).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){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,i=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],r=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&o!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.metaKey&&"meta"!==o&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),o?a[s+o]=!0:(a[s+r]=!0,a[s+t.hotkeys.shiftNums[r]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[r]]=!0));for(var c=0,u=i.length;c<u;c++)if(a[i[c]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},,function(t,e,n){(function(e){t.exports=e.punycode=n(95)}).call(this,n(26))},function(t,e,n){(function(t,i){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(r){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,u=/^xn--/,l=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(d[t])}function v(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function g(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+v((t=t.replace(p,".")).split("."),e).join(".")}function b(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function y(t){return v(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var i=0;for(t=n?h(t/700):t>>1,t+=h(t/e);t>455;i+=36)t=h(t/35);return h(i+36*t/(t+38))}function N(t){var e,n,i,o,r,s,a,u,l,p,d,f=[],v=t.length,g=0,b=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),f.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<v;){for(r=g,s=1,a=36;o>=v&&m("invalid-input"),((u=(d=t.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>h((c-g)/s))&&m("overflow"),g+=u*s,!(u<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>h(c/(p=36-l))&&m("overflow"),s*=p;w=x(g-r,e=f.length+1,0==r),h(g/e)>c-b&&m("overflow"),b+=h(g/e),g%=e,f.splice(g++,0,b)}return y(f)}function C(t){var e,n,i,o,r,s,a,u,l,p,d,v,g,y,N,C=[];for(v=(t=b(t)).length,e=128,n=0,r=72,s=0;s<v;++s)(d=t[s])<128&&C.push(f(d));for(i=o=C.length,o&&C.push("-");i<v;){for(a=c,s=0;s<v;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>h((c-n)/(g=i+1))&&m("overflow"),n+=(a-e)*g,e=a,s=0;s<v;++s)if((d=t[s])<e&&++n>c&&m("overflow"),d==e){for(u=n,l=36;!(u<(p=l<=r?1:l>=r+26?26:l-r));l+=36)N=u-p,y=36-p,C.push(f(w(p+N%y,0))),u=h(N/y);C.push(f(w(u,0))),r=x(n,g,i==o),n=0,++i}++n,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:b,encode:y},decode:N,encode:C,toASCII:function(t){return g(t,(function(t){return l.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return g(t,(function(t){return u.test(t)?N(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(77)(t),n(26))},function(t,e,n){(function(e){t.exports=e.ColorThief=n(97)}).call(this,n(26))},function(t,e){
|
||
/*!
|
||
* Color Thief v2.0
|
||
* by Lokesh Dhakar - http://www.lokeshdhakar.com
|
||
*
|
||
* Thanks
|
||
* ------
|
||
* Nick Rabinowitz - For creating quantize.js.
|
||
* John Schulz - For clean up and optimization. @JFSIII
|
||
* Nathan Spady - For adding drag and drop support to the demo page.
|
||
*
|
||
* License
|
||
* -------
|
||
* Copyright 2011, 2015 Lokesh Dhakar
|
||
* Released under the MIT license
|
||
* https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE
|
||
*
|
||
*/
|
||
var n=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.update=function(t){this.context.putImageData(t,0,0)},n.prototype.getPixelCount=function(){return this.width*this.height},n.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},n.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var i=function(){};
|
||
/*!
|
||
* quantize.js Copyright 2008 Nick Rabinowitz.
|
||
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||
*/
|
||
/*!
|
||
* Block below copied from Protovis: http://mbostock.github.com/protovis/
|
||
* Copyright 2010 Stanford Visualization Group
|
||
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
|
||
*/if(i.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},i.prototype.getPalette=function(t,e,i){void 0===e&&(e=10),(void 0===i||1>i)&&(i=10);for(var o,s,a,c,u=new n(t),l=u.getImageData().data,p=u.getPixelCount(),d=[],h=0;p>h;h+=i)s=l[(o=4*h)+0],a=l[o+1],c=l[o+2],l[o+3]>=125&&(s>250&&a>250&&c>250||d.push([s,a,c]));var f=r.quantize(d,e),m=f?f.palette():null;return u.removeCanvas(),m},!o)var o={map:function(t,e){var n={};return e?t.map((function(t,i){return n.index=i,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,i,o){return n.index=o,t+e.call(n,i)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?o.map(t,e):t)}};var r=function(){function t(t,e,n){return(t<<2*c)+(e<<c)+n}function e(t){function e(){n.sort(t),i=!0}var n=[],i=!1;return{push:function(t){n.push(t),i=!1},peek:function(t){return i||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return i||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return i||e(),n}}}function n(t,e,n,i,o,r,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=i,a.b1=o,a.b2=r,a.histo=s}function i(){this.vboxes=new e((function(t,e){return o.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function r(e){var n,i,o,r,s=new Array(1<<3*c);return e.forEach((function(e){i=e[0]>>u,o=e[1]>>u,r=e[2]>>u,n=t(i,o,r),s[n]=(s[n]||0)+1})),s}function s(t,e){var i,o,r,s=1e6,a=0,c=1e6,l=0,p=1e6,d=0;return t.forEach((function(t){i=t[0]>>u,o=t[1]>>u,r=t[2]>>u,s>i?s=i:i>a&&(a=i),c>o?c=o:o>l&&(l=o),p>r?p=r:r>d&&(d=r)})),new n(s,a,c,l,p,d,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,r=n.g2-n.g1+1,s=n.b2-n.b1+1,a=o.max([i,r,s]);if(1==n.count())return[n.copy()];var c,u,l,p,d=0,h=[],f=[];if(a==i)for(c=n.r1;c<=n.r2;c++){for(p=0,u=n.g1;u<=n.g2;u++)for(l=n.b1;l<=n.b2;l++)p+=e[t(c,u,l)]||0;d+=p,h[c]=d}else if(a==r)for(c=n.g1;c<=n.g2;c++){for(p=0,u=n.r1;u<=n.r2;u++)for(l=n.b1;l<=n.b2;l++)p+=e[t(u,c,l)]||0;d+=p,h[c]=d}else for(c=n.b1;c<=n.b2;c++){for(p=0,u=n.r1;u<=n.r2;u++)for(l=n.g1;l<=n.g2;l++)p+=e[t(u,l,c)]||0;d+=p,h[c]=d}return h.forEach((function(t,e){f[e]=d-t})),function(t){var e,i,o,r,s,a=t+"1",u=t+"2",l=0;for(c=n[a];c<=n[u];c++)if(h[c]>d/2){for(o=n.copy(),r=n.copy(),e=c-n[a],s=(i=n[u]-c)>=e?Math.min(n[u]-1,~~(c+i/2)):Math.max(n[a],~~(c-1-e/2));!h[s];)s++;for(l=f[s];!l&&h[s-1];)l=f[--s];return o[u]=s,r[a]=o[u]+1,[o,r]}}(a==i?"r":a==r?"g":"b")}}var c=5,u=8-c,l=1e3,p=.75;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,i=n.histo;if(!n._count_set||e){var o,r,s,a=0;for(o=n.r1;o<=n.r2;o++)for(r=n.g1;r<=n.g2;r++)for(s=n.b1;s<=n.b2;s++)index=t(o,r,s),a+=i[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,i=n.histo;if(!n._avg||e){var o,r,s,a,u=0,l=1<<8-c,p=0,d=0,h=0;for(r=n.r1;r<=n.r2;r++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)u+=o=i[t(r,s,a)]||0,p+=o*(r+.5)*l,d+=o*(s+.5)*l,h+=o*(a+.5)*l;n._avg=u?[~~(p/u),~~(d/u),~~(h/u)]:[~~(l*(n.r1+n.r2+1)/2),~~(l*(n.g1+n.g2+1)/2),~~(l*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>u;return gval=t[1]>>u,bval=t[2]>>u,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,i,o=this.vboxes,r=0;r<o.size();r++)(e>(n=Math.sqrt(Math.pow(t[0]-o.peek(r).color[0],2)+Math.pow(t[1]-o.peek(r).color[1],2)+Math.pow(t[2]-o.peek(r).color[2],2)))||void 0===e)&&(e=n,i=o.peek(r).color);return i},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return o.naturalOrder(o.sum(t.color),o.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function c(t,e){for(var n,i=1,o=0;l>o;)if((n=t.pop()).count()){var r=a(u,n),s=r[0],c=r[1];if(!s)return;if(t.push(s),c&&(t.push(c),i++),i>=e)return;if(o++>l)return}else t.push(n),o++}if(!t.length||2>n||n>256)return!1;var u=r(t);u.forEach((function(){0}));var d=s(t,u),h=new e((function(t,e){return o.naturalOrder(t.count(),e.count())}));h.push(d),c(h,p*n);for(var f=new e((function(t,e){return o.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));h.size();)f.push(h.pop());c(f,n-f.size());for(var m=new i;f.size();)m.push(f.pop());return m}}}();t.exports=i},function(t,e,n){"use strict";n.r(e),n.d(e,"Extend",(function(){return i.a})),n.d(e,"app",(function(){return Ie})),n.d(e,"compat",(function(){return _e}));var i=n(72),o=(n(94),n(96),n(28)),r=n(0),s=n(6),a=n(4),c=function(){function t(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());var i=this.stack[this.stack.length-2];i&&i.name===t&&this.stack.pop();var o=this.getCurrent();o&&o.name===t?Object(a.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(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),m.route("/")},t}(),u=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),l=n(19),p=n(5),d=n(3),h=n(8),f=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("header",{className:"Hero DiscussionHero"},m("div",{className:"container"},m("ul",{className:"DiscussionHero-items"},Object(h.a)(this.items().toArray()))))},n.items=function(){var t=new p.a,e=this.props.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},Object(h.a)(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(d.a),v=n(34),g=n(15),b=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Object(g.a)(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(d.a),y=n(16),w=n(14),x=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.config=function(t,e){var n=this;if(!t){var i=function(){return n.props.when()||void 0};$(window).on("beforeunload",i),e.onunload=function(){$(window).off("beforeunload",i)}}},n.view=function(){return this.props.children[0]},e}(d.a),N=function(){function t(t){this.el=t,this.$=$(t)}var e=t.prototype;return e.setValue=function(t){this.$.val(t).trigger("input")},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t),this.el.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){var i=this.el.value,o=i.slice(0,t),r=i.slice(e);this.setValue(""+o+n+r),this.moveCursorTo(t+n.length)},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.$.focus()},t}(),C=n(2),O=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.value=this.props.value||""},n.view=function(){return m("div",{className:"TextEditor"},m("textarea",{className:"FormControl Composer-flexible",config:this.configTextarea.bind(this),oninput:m.withAttr("value",this.oninput.bind(this)),placeholder:this.props.placeholder||"",disabled:!!this.props.disabled,value:this.value}),m("ul",{className:"TextEditor-controls Composer-footer"},Object(h.a)(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.configTextarea=function(t,e){var n=this;if(!e){var i=function(){n.onsubmit(),m.redraw()};$(t).bind("keydown","meta+return",i),$(t).bind("keydown","ctrl+return",i),this.props.composer.editor=new N(t)}},n.controlItems=function(){var t=new p.a;return t.add("submit",C.a.component({children:this.props.submitLabel,icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)})),this.props.preview&&t.add("preview",C.a.component({icon:"far fa-eye",className:"Button Button--icon",onclick:this.props.preview,title:app.translator.trans("core.forum.composer.preview_tooltip"),config:function(t){return $(t).tooltip()}})),t},n.toolbarItems=function(){return new p.a},n.oninput=function(t){this.value=t,this.props.onchange(this.value),m.redraw.strategy("none")},n.onsubmit=function(){this.props.onsubmit(this.value)},e}(d.a),T=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var t=this;this.composer=this.props.composer,this.loading=!1,this.props.confirmExit&&this.composer.preventClosingWhen((function(){return t.hasChanges()}),this.props.confirmExit),this.composer.fields.content(this.props.originalContent||""),this.content=this.composer.fields.content,this.editor=this.composer},n.view=function(){return m(x,{when:this.hasChanges.bind(this)},m("div",{className:"ComposerBody "+(this.props.className||"")},Object(g.a)(this.props.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},Object(h.a)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},O.component({submitLabel:this.props.submitLabel,placeholder:this.props.placeholder,disabled:this.loading||this.props.disabled,composer:this.composer,preview:this.jumpToPreview&&this.jumpToPreview.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),w.a.component({className:"ComposerBody-loading"+(this.loading?" active":"")})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.props.originalContent},n.headerItems=function(){return new p.a},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(d.a),k=n(7),j=n(9);function S(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var A=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.placeholder=e.placeholder||Object(j.a)(app.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||Object(j.a)(app.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.props.discussion;return e.add("title",m("h3",null,Object(k.a)("fas fa-reply")," ",m("a",{href:app.route.discussion(n),config:function(t,e){e||($(t).on("click",S),m.route.apply(this,arguments))}},n.title()))),e},n.jumpToPreview=function(t){S(t),m.route(app.route.discussion(this.props.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.props.discussion}}},n.onsubmit=function(){var t=this,e=this.props.discussion;this.loading=!0,m.redraw();var n=this.data();app.store.createRecord("posts").save(n).then((function(n){if(app.viewingDiscussion(e)){var i=app.current.get("stream");i.update().then((function(){return i.goToNumber(n.number())}))}else{var o,r=C.a.component({className:"Button Button--link",children:app.translator.trans("core.forum.composer_reply.view_button"),onclick:function(){m.route(app.route.post(n)),app.alerts.dismiss(o)}});o=app.alerts.show({type:"success",children:app.translator.trans("core.forum.composer_reply.posted_message"),controls:[r]})}t.composer.hide()}),this.loaded.bind(this))},e}(T),P=n(12),E=n(18),D=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.email=m.prop(this.props.email||""),this.success=!1},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(C.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.forgot_password.text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(j.a)(app.translator.trans("core.forum.forgot_password.email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading})),m("div",{className:"Form-group"},C.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.forgot_password.submit_button")}))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",data:{email:this.email()},errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alert=null})).catch((function(){})).then(this.loaded.bind(this))},n.onerror=function(e){404===e.status&&(e.alert.children=app.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(P.a),_=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new p.a},e}(d.a),I=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.username=m.prop(this.props.username||""),this.email=m.prop(this.props.email||""),this.password=m.prop(this.props.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return app.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){return this.props.provided&&-1!==this.props.provided.indexOf(t)},n.body=function(){return[this.props.token?"":m(_,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:Object(j.a)(app.translator.trans("core.forum.sign_up.username_placeholder")),value:this.username(),onchange:m.withAttr("value",this.username),disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:Object(j.a)(app.translator.trans("core.forum.sign_up.email_placeholder")),value:this.email(),onchange:m.withAttr("value",this.email),disabled:this.loading||this.isProvided("email")})),20),this.props.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",placeholder:Object(j.a)(app.translator.trans("core.forum.sign_up.password_placeholder")),value:this.password(),onchange:m.withAttr("value",this.password),disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(C.a,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},app.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},app.translator.trans("core.forum.sign_up.log_in_text",{a:m("a",{onclick:this.logIn.bind(this)})}))]},n.logIn=function(){var t={identification:this.email()||this.username(),password:this.password()};app.modal.show(M,t)},n.onready=function(){this.props.username&&!this.props.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();app.request({url:app.forum.attribute("baseUrl")+"/register",method:"POST",data:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t={username:this.username(),email:this.email()};return this.props.token?t.token=this.props.token:t.password=this.password(),t},e}(P.a),M=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),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.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(_,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new p.a;return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:Object(j.a)(app.translator.trans("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:Object(j.a)(app.translator.trans("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"},C.a.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(D,e)},n.signUp=function(){var t={password:this.password()},e=this.identification();t[-1!==e.indexOf("@")?"email":"username"]=e,app.modal.show(I,t)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.identification(),n=this.password(),i=this.remember();app.session.login({identification:e,password:n,remember:i},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&(e.alert.children=app.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(P.a),R=n(23),L=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.discussion=this.props.discussion,this.currentTitle=this.props.currentTitle,this.newTitle=m.prop(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},C.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.rename_discussion.submit_button")}))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle,i=this.currentTitle;if(n&&n!==i)return this.discussion.save({title:n}).then((function(){app.viewingDiscussion(e.discussion)&&app.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(P.a),B={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.a.component()))})),i},userControls:function(t,e){var n=new p.a;return e instanceof wt&&n.add("reply",!app.session.user||t.canReply()?C.a.component({icon:"fas fa-reply",children:app.translator.trans(app.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button"),onclick:this.replyAction.bind(t,!0,!1)}):C.a.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.cannot_reply_button"),className:"disabled",title:app.translator.trans("core.forum.discussion_controls.cannot_reply_text")})),n},moderationControls:function(t){var e=new p.a;return t.canRename()&&e.add("rename",C.a.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.discussion_controls.rename_button"),onclick:this.renameAction.bind(t)})),e},destructiveControls:function(t){var e=new p.a;return t.isHidden()?(t.canHide()&&e.add("restore",C.a.component({icon:"fas fa-reply",children:app.translator.trans("core.forum.discussion_controls.restore_button"),onclick:this.restoreAction.bind(t)})),t.canDelete()&&e.add("delete",C.a.component({icon:"fas fa-times",children:app.translator.trans("core.forum.discussion_controls.delete_forever_button"),onclick:this.deleteAction.bind(t)}))):t.canHide()&&e.add("hide",C.a.component({icon:"far fa-trash-alt",children:app.translator.trans("core.forum.discussion_controls.delete_button"),onclick:this.hideAction.bind(t)})),e},replyAction:function(t,e){var n=m.deferred();return app.session.user?this.canReply()?(app.composer.composingReplyTo(this)&&!e||app.composer.load(A,{user:app.session.user,discussion:this}),app.composer.show(),t&&app.viewingDiscussion(this)&&!app.composer.isFullScreen()&&app.current.get("stream").goToNumber("reply"),n.resolve(app.composer)):n.reject():(n.reject(),app.modal.show(M)),n.promise},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:app.session.user}),this.save({isHidden:!0})},restoreAction:function(){return this.pushAttributes({hiddenAt:null,hiddenUser:null}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(Object(j.a)(app.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return app.viewingDiscussion(this)&&app.history.back(),this.delete().then((function(){return app.discussions.removeDiscussion(t)}))},renameAction:function(){return app.modal.show(L,{currentTitle:this.title(),discussion:this})}},H=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this;if(app.composer.composingReplyTo(this.props.discussion))return m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,Object(g.a)(app.session.user,{className:"PostUser-avatar"}),Object(y.a)(app.session.user)))),m("div",{className:"Post-body",config:this.configPreview.bind(this)}));return m("article",{className:"Post ReplyPlaceholder",onclick:function(){B.replyAction.call(t.props.discussion,!0)}},m("header",{className:"Post-header"},Object(g.a)(app.session.user,{className:"PostUser-avatar"})," ",app.translator.trans("core.forum.post_stream.reply_placeholder")))},n.configPreview=function(t,e,n){if(!e){var i,o=setInterval((function(){if(app.composer.isVisible()){var e=app.composer.fields.content();if(i!==e){i=e;var n=$(window).scrollTop()+$(window).height()>=$(document).height();s9e.TextFormatter.preview(i||"",t),n&&$(window).scrollTop($(document).height())}}}),50);n.onunload=function(){return clearInterval(o)}}},e}(d.a),U=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.discussion=this.props.discussion,this.stream=this.props.stream,this.scrollListener=new v.a(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),i=this.stream.posts(),o=this.discussion.postIds(),r=i.map((function(n,i){var r,s={"data-index":e.stream.visibleStart+i};if(n){var c=n.createdAt(),u=app.postComponents[n.contentType()];r=u?u.component({post:n}):"",s.key="post"+n.id(),s["data-time"]=c.toISOString(),s["data-number"]=n.number(),s["data-id"]=n.id(),s["data-type"]=n.contentType();var l=c-t;l>3456e5&&(r=[m("div",{className:"PostStream-timeGap"},m("span",null,app.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(l,"ms").fromNow(!0)}))),r]),t=c}else s.key="post"+o[e.stream.visibleStart+i],r=b.component();return m("div",Object(a.a)({className:"PostStream-item"},s),r)}));return!n&&i[this.stream.visibleEnd-this.stream.visibleStart-1]&&r.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(C.a,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},app.translator.trans("core.forum.post_stream.load_more_button")))),!n||app.session.user&&!this.discussion.canReply()||r.push(m("div",{className:"PostStream-item",key:"reply"},H.component({discussion:this.discussion}))),m("div",{className:"PostStream"},r)},n.config=function(t,e){var n=this;this.triggerScroll(),t||(setTimeout((function(){return n.scrollListener.start()})),e.onunload=function(){n.scrollListener.stop(),clearTimeout(n.calculatePositionTimeout)})},n.triggerScroll=function(){if(this.props.targetPost){var t=this.prevTarget,e=this.props.targetPost;if(t){if("number"in t&&t.number===e.number)return;if("index"in t&&t.index===e.index)return}if("number"in e)this.scrollToNumber(e.number,this.stream.noAnimationScroll);else if("index"in e){var n=e.index===this.stream.count()-1;this.scrollToIndex(e.index,this.stream.noAnimationScroll,n)}this.prevTarget=e}},n.onscroll=function(t){if(void 0===t&&(t=window.pageYOffset),!this.stream.paused){var e=this.getMarginTop(),n=$(window).height()-e,i=t+e;if(this.stream.visibleStart>0){var o=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");o.length&&o.offset().top>i-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var r=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");r.length&&r.offset().top+r.outerHeight(!0)<i+n+300&&this.stream.loadNext()}clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100),this.updateScrubber(t)}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,i=t+e,o=this.$(".PostStream-item[data-index]"),r=o.first().data("index")||0,s=0,a="";o.each((function(){var t=$(this),e=t.offset().top,o=t.outerHeight(!0);if(e+o<i)return!0;if(e>i+n)return!1;var c=Math.max(0,i-e),u=Math.min(o,i+n-e)-c;e<=i&&(r=parseFloat(t.data("index"))+c/o),u>0&&(s+=u/o);var l=t.data("time");l&&(a=l)})),this.stream.index=r+1,this.stream.visible=s,a&&(this.stream.description=dayjs(a).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,i=this.getMarginTop(),o=$(window),r=o.height()-i,s=o.scrollTop()+i,a=t+i;this.$(".PostStream-item").each((function(){var t=$(this),i=t.offset().top,o=t.outerHeight(!0),c=Math.max(0,a-i);if(void 0===e&&(c/o<.75||(o-c)/r>.25)&&(e=t.data("number")),i+o>s){if(!(i+o<s+r))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.props.onPositionChange(e||1,n,e)},n.getMarginTop=function(){return this.$()&&$("#header").outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var i=this,o=this.$(".PostStream-item[data-index="+t+"]");return this.scrollToItem(o,e,!0,n).then((function(){t==i.stream.count()-1&&i.flashItem(i.$(".PostStream-item:last-child"))}))},n.scrollToItem=function(t,e,n,i){var o=this,r=$("html, body").stop(!0);if(t.length){var s=t.offset().top-this.getMarginTop(),a=t.offset().top+t.height(),c=$(document).scrollTop(),u=c+$(window).height();if(n||s<c||a>u){var l=i?a-$(window).height()+app.composer.computedHeight():t.is(":first-child")?0:s;e?l!==c&&r.animate({scrollTop:l},"fast"):r.scrollTop(l)}}return Promise.all([r.promise(),this.stream.loadPromise]).then((function(){o.updateScrubber();var e=t.data("index");m.redraw(!0);var n=0==e?0:$(".PostStream-item[data-index="+t.data("index")+"]").offset().top-o.getMarginTop();$(window).scrollTop(n),o.calculatePosition(),o.stream.paused=!1}))},n.flashItem=function(t){t.addClass("flash").one("animationend webkitAnimationEnd",(function(){return t.removeClass("flash")}))},e}(d.a),F=n(62),q=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.stream=this.props.stream,this.handlers={},this.scrollListener=new v.a(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=app.translator.transChoice("core.forum.post_scrubber.viewing_text",t,{index:m("span",{className:"Scrubber-index"}),count:m("span",{className:"Scrubber-count"},Object(F.a)(t))}),n=this.stream.discussion.unreadCount(),i=t?Math.min(t-this.stream.index,n)/t:0;var o=["PostStreamScrubber","Dropdown"];return this.props.className&&o.push(this.props.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",Object(k.a)("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},Object(k.a)("fas fa-angle-double-up")," ",app.translator.trans("core.forum.post_scrubber.original_post_link")),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"},this.stream.description))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",config:function(t,e,n){var o=$(t),r={top:100-100*i+"%",height:100*i+"%"};n.oldStyle?o.stop(!0).css(n.oldStyle).animate(r):o.css(r),n.oldStyle=r}},app.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},Object(k.a)("fas fa-angle-double-down")," ",app.translator.trans("core.forum.post_scrubber.now_link")))))},n.config=function(t,e){var n=this;this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!0,forceHeightChange:!0})})),t||(e.onunload=this.ondestroy.bind(this),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).css({cursor:"pointer","user-select":"none"}).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").css("cursor","move").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})))},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,i=this.stream.count(),o=this.stream.visible||1,r=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(Object(F.a)(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,r.index*Math.min(n-1,i-o)),a.handle=Math.min(100-a.before,r.visible*o),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var c=t.animate?"animate":"css";this.adjustingHeight=!0;var u=[];for(var l in a){var p=s.find(".Scrubber-"+l);u.push(p.stop(!0,!0)[c]({height:a[l]+"%"},"fast").promise()),"animate"===c&&p.css("overflow","visible")}Promise.all(u).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.ondestroy=function(){this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,i=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;i=Math.max(0,Math.min(this.stream.count()-1,i)),this.stream.goToIndex(Math.floor(i)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,i=Math.max(100/t,n/e),o=t===e?0:(100-i*e)/(t-e);return{index:o,visible:i}},e}(d.a),z=n(64),W=n(32),V=n(24),Y=n(65),G=n(13),K=n(37),X=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.props.discussion,e=this.props.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),i=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?Object(k.a)("fas fa-reply"):""," ",app.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:Object(K.a)(i)}))},e}(d.a),J=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var t=this.props.post,e=t.user(),n=Object(W.a)(t.contentPlain(),this.props.highlight,300);return m("a",{className:"PostPreview",href:app.route.post(t),config:m.route,onclick:this.props.onclick},m("span",{className:"PostPreview-content"},Object(g.a)(e),Object(y.a)(e)," ",m("span",{className:"PostPreview-excerpt"},n)))},e}(d.a),Q=n(46);function Z(t){var e,n,i,o,r=$(t),s=!1,a=!1,c=0,u=function(t,e){void 0===e&&(e={}),e.duration=e.duration||"fast",e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},r.find(".Slidable-content").animate({"background-position-x":t},e)},l=function(){u(0,{complete:function(){r.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return r.find(".Slidable-content").on("touchstart",(function(t){e=r.find(".Slidable-underneath--left:not(.disabled)"),n=r.find(".Slidable-underneath--right:not(.disabled)"),i=t.originalEvent.targetTouches[0].clientX,o=t.originalEvent.targetTouches[0].clientY,s=!0,c=0})).on("touchmove",(function(t){var u=t.originalEvent.targetTouches[0].clientX,l=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(u-i)>Math.abs(l-o)&&(a=!0),s=!1,a){c=u-i;var p=function(t,e){if(t.length){var n="left"===e?c>0:c<0;n&&t.hasClass("Slidable-underneath--elastic")&&(c-=.5*c),t.toggle(n);var i=Math.max(0,Math.min(1,(Math.abs(c)-25)/50));t.find(".icon").css("transform","scale("+i+")")}else c=Math["left"===e?"min":"max"](0,c)};p(e,"left"),p(n,"right"),$(this).css("transform","translate("+c+"px, 0)"),$(this).css("background-position-x",c+"px"),r.toggleClass("sliding",!!c),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?l():u((c>0?1:-1)*r.width())};n.length&&c<-50?t(n):e.length&&c>50?t(e):l(),s=!1,a=!1})),{reset:l}}var tt=n(27),et=n(21);var nt=function(t,e){for(var n=-1,i=null==t?0:t.length,o=Array(i);++n<i;)o[n]=e(t[n],n,t);return o},it=n(66),ot=n(70),rt=n(38);var st=function(t){return"symbol"==typeof t||Object(rt.a)(t)&&"[object Symbol]"==Object(ot.a)(t)},at=et.a?et.a.prototype:void 0,ct=at?at.toString:void 0;var ut=function t(e){if("string"==typeof e)return e;if(Object(it.a)(e))return nt(e,t)+"";if(st(e))return ct?ct.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};var lt=function(t){return null==t?"":ut(t)},pt=/[\\^$.*+?()[\]{}|]/g,dt=RegExp(pt.source);var ht=function(t){return(t=lt(t))&&dt.test(t)?t.replace(pt,"\\$&"):t},ft=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var t=this;this.subtree=new Q.a((function(){return t.props.discussion.freshness}),(function(){var t=app.session.user&&app.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return t.active()}))},n.attrs=function(){return{className:Object(tt.a)(["DiscussionListItem",this.active()?"active":"",this.props.discussion.isHidden()?"DiscussionListItem--hidden":""])}},n.view=function(){var t=this.subtree.retain();if(t)return t;var e=this.props.discussion,n=e.user(),i=e.isUnread(),o=e.isRead(),r=!this.showRepliesCount()&&i,s=0,a=B.controls(e,this).toArray(),c=this.attrs();if(this.props.params.q){var u=e.mostRelevantPost();u&&(s=u.number());var l=ht(this.props.params.q);this.highlightRegExp=new RegExp(l+"|"+l.trim().replace(/\s+/g,"|"),"gi")}else s=Math.min(e.lastPostNumber(),(e.lastReadPostNumber()||0)+1);return m("div",c,a.length?G.a.component({icon:"fas fa-ellipsis-v",children:a,className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right"}):"",m("a",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(i?"":" disabled"),onclick:this.markAsRead.bind(this)},Object(k.a)("fas fa-check")),m("div",{className:"DiscussionListItem-content Slidable-content"+(i?" unread":"")+(o?" read":"")},m("a",{href:n?app.route.user(n):"#",className:"DiscussionListItem-author",title:Object(j.a)(app.translator.trans("core.forum.discussion_list.started_text",{user:n,ago:Object(V.a)(e.createdAt())})),config:function(t){$(t).tooltip({placement:"right"}),m.route.apply(this,arguments)}},Object(g.a)(n,{title:""})),m("ul",{className:"DiscussionListItem-badges badges"},Object(h.a)(e.badges().toArray())),m("a",{href:app.route.discussion(e,s),config:m.route,className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},Object(W.a)(e.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},Object(h.a)(this.infoItems().toArray()))),m("span",{className:"DiscussionListItem-count",onclick:this.markAsRead.bind(this),title:r?app.translator.trans("core.forum.discussion_list.mark_as_read_tooltip"):""},Object(Y.a)(e[r?"unreadCount":"replyCount"]()))))},n.config=function(t){if(!t&&"ontouchstart"in window){var e=Z(this.$().addClass("Slidable"));this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return e.reset()}))}},n.active=function(){var t=m.route.param("id");return t&&t.split("-")[0]===this.props.discussion.id()},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.props.params.sort)},n.showRepliesCount=function(){return"replies"===this.props.params.sort},n.markAsRead=function(){var t=this.props.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new p.a;if(this.props.params.q){var e=this.props.discussion.mostRelevantPost()||this.props.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=Object(W.a)(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",X.component({discussion:this.props.discussion,lastPost:!this.showFirstPost()}));return t},e}(d.a),mt=n(47),vt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t,e=this.state,n=e.getParams();if(e.isLoading()?t=w.a.component():e.moreResults&&(t=C.a.component({children:app.translator.trans("core.forum.discussion_list.load_more_button"),className:"Button",onclick:e.loadMore.bind(e)})),e.empty()){var i=app.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},mt.a.component({text:i}))}return m("div",{className:"DiscussionList"+(e.isSearchResults()?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},e.discussions.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},ft.component({discussion:t,params:n}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(d.a),gt=n(67),bt=function(){function t(t,e){void 0===e&&(e=[]),this.discussion=t,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.description="",this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):m.deferred().resolve().promise},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){return void 0===e&&(e=!1),"reply"===t?this.goToLast():(this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.targetPost={number:t},this.noAnimationScroll=e,this.number=t,this.loadPromise.then((function(){return m.redraw()})))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.targetPost={index:t},this.noAnimationScroll=e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?m.deferred().resolve().promise:(this.reset(),app.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(t){if(t>=this.visibleStart&&t<=this.visibleEnd)return m.deferred().resolve().promise;var e=this.sanitizeIndex(t-this.constructor.loadCount/2),n=e+this.constructor.loadCount;return this.reset(e,n),this.loadRange(e,n).then(this.show.bind(this))},e.loadNext=function(){var t=this.visibleEnd,e=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+this.constructor.loadCount),n=t-2*this.constructor.loadCount;n>this.visibleStart&&n>=0&&(this.visibleStart=n+this.constructor.loadCount+1,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(t,e)},e.loadPrevious=function(){var t=this.visibleStart,e=this.visibleStart=this.sanitizeIndex(this.visibleStart-this.constructor.loadCount),n=e+2*this.constructor.loadCount;n<this.visibleEnd&&n<=this.count()&&(this.visibleEnd=n,this.loadPageTimeouts[n]&&(clearTimeout(this.loadPageTimeouts[n]),this.loadPageTimeouts[n]=null,this.pagesLoading--)),this.loadPage(e,t,!0)},e.loadPage=function(t,e,n){var i=this;void 0===n&&(n=!1),m.redraw(),this.loadPageTimeouts[t]=setTimeout((function(){i.loadRange(t,e).then((function(){if(t>=i.visibleStart&&e<=i.visibleEnd){var o=n?i.visibleEnd-1:i.visibleStart;Object(gt.a)('.PostStream-item[data-index="'+o+'"]',(function(){return m.redraw(!0)}))}i.pagesLoading--})),i.loadPageTimeouts[t]=null}),this.pagesLoading?1e3:0),this.pagesLoading++},e.loadRange=function(t,e){var n=[],i=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=app.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?i.push(e):n.push(t)})),n.length?app.store.find("posts",n):m.deferred().resolve(i).promise},e.show=function(t){this.visibleStart=t.length?this.discussion.postIds().indexOf(t[0].id()):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(t,e){this.visibleStart=t||0,this.visibleEnd=this.sanitizeIndex(e||this.constructor.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=app.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return this.visibleEnd===this.count()},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();bt.loadCount=20;var yt=bt,wt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.discussion=null,this.near=m.route.param("near")||0,this.load(),app.discussions.hasDiscussions()&&(app.pane.enable(),app.pane.hide(),app.previous.matches(e)&&m.redraw.strategy("diff")),app.history.push("discussion"),this.bodyClass="App--discussion"},n.onunload=function(t){if(this.discussion){var e=m.route.param("id");if(e&&e.split("-")[0]===this.discussion.id()){t.preventDefault();var n=m.route.param("near")||"1";return n!==String(this.near)&&this.stream.goToNumber(n),void(this.near=null)}}app.pane.disable(),app.composer.composingReplyTo(this.discussion)&&!app.composer.fields.content()?app.composer.hide():app.composer.minimize()},n.view=function(){var t=this.discussion;return m("div",{className:"DiscussionPage"},app.discussions.hasDiscussions()?m("div",{className:"DiscussionPage-list",config:this.configPane.bind(this)},!$(".App-navigation").is(":visible")&&m(vt,{state:app.discussions})):"",m("div",{className:"DiscussionPage-discussion"},t?[f.component({discussion:t}),m("div",{className:"container"},m("nav",{className:"DiscussionPage-nav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"DiscussionPage-stream"},U.component({discussion:t,stream:this.stream,targetPost:this.stream.targetPost,onPositionChange:this.positionChanged.bind(this)})))]:w.a.component({className:"LoadingIndicator--block"})))},n.config=function(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];(e=t.prototype.config).call.apply(e,[this].concat(i)),this.discussion&&app.setTitle(this.discussion.title())},n.load=function(){var t=app.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();app.store.find("discussions",m.route.param("id").split("-")[0],e).then(this.show.bind(this))}m.lazyRedraw()},n.requestParams=function(){return{page:{near:this.near}}},n.show=function(t){this.discussion=t,app.history.push("discussion",t.title()),app.setTitleCount(0);var e=[];if(t.payload&&t.payload.included){var n=t.id();e=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&t.relationships.discussion.data.id===n})).map((function(t){return app.store.getById("posts",t.id)})).sort((function(t,e){return t.id()-e.id()})).slice(0,20)}this.stream=new yt(t,e),this.stream.goToNumber(m.route.param("near")||e[0]&&e[0].number(),!0),app.current.set("discussion",t),app.current.set("stream",this.stream)},n.configPane=function(t,e,n){if(!e){n.retain=!0;var i=$(t),o=app.pane;i.hover(o.show.bind(o),o.onmouseleave.bind(o));var r=function(t){t.pageX<10&&o.show()};$(document).on("mousemove",r),n.onunload=function(){return $(document).off("mousemove",r)};var s=i.find(".DiscussionListItem.active");if(s.length){var a=i.offset().top,c=a+i.outerHeight(),u=s.offset().top,l=u+s.outerHeight();(u<a||l>c)&&i.scrollTop(i.scrollTop()-a+u)}}},n.sidebarItems=function(){var t=new p.a;return t.add("controls",z.a.component({children:B.controls(this.discussion,this).toArray(),icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary"})),t.add("scrubber",q.component({stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion,i=app.route.discussion(n,this.near=t);m.route(i,!0),window.history.replaceState(null,document.title,i),app.history.push("discussion",n.title()),app.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())},e}(l.a),xt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.config=function(t,e){e.retain=!0},n.items=function(){return new p.a},e}(d.a),Nt=n(20),Ct=n(11),Ot=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(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[Object(g.a)(t)," ",m("span",{className:"Button-label"},Object(y.a)(t))]},n.items=function(){var t=new p.a,e=app.session.user;return t.add("profile",Nt.a.component({icon:"fas fa-user",children:app.translator.trans("core.forum.header.profile_button"),href:app.route.user(e)}),100),t.add("settings",Nt.a.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",Nt.a.component({icon:"fas fa-wrench",children:app.translator.trans("core.forum.header.admin_button"),href:app.forum.attribute("adminUrl"),target:"_blank",config:function(){}}),0),t.add("separator",R.a.component(),-90),t.add("logOut",C.a.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}(G.a),Tt=n(30),kt=n(39),jt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state},n.view=function(){var t=this.state.getNotificationPages();return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("div",{className:"App-primaryControl"},C.a.component({className:"Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:this.state.markAllAsRead.bind(this.state)})),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 i=t.subject();if(void 0!==i){var o=!1;i instanceof kt.a?o=i:i&&i.discussion&&(o=i.discussion());var r=o?o.id():0;n[r]=n[r]||{discussion:o,notifications:[]},n[r].notifications.push(t),-1===e.indexOf(n[r])&&e.push(n[r])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m("a",{className:"NotificationGroup-header",href:app.route.discussion(t.discussion),config:m.route},e&&e.length?m("ul",{className:"NotificationGroup-badges badges"},Object(h.a)(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.state.isLoading()?m(w.a,{className:"LoadingIndicator--block"}):t.length?"":m("div",{className:"NotificationList-empty"},app.translator.trans("core.forum.notifications.empty_text"))))},n.config=function(t,e){var n=this;if(!t){var i=this.$(".NotificationList-content"),o="auto"===i.css("overflow")?i:$(window),r=function(){var t=o.scrollTop(),e=o.height(),r=o===i?0:i.offset().top,s=i[0].scrollHeight;n.state.hasMoreResults()&&!n.state.isLoading()&&t+e>=r+s&&n.state.loadMore()};o.on("scroll",r),e.onunload=function(){o.off("scroll",r)}}},e}(d.a),St=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(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[Object(k.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?jt.component({state:this.props.state}):"")},n.onclick=function(){app.drawer.isOpen()?this.goToRoute():this.props.state.load()},n.goToRoute=function(){m.route(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}(G.a),At=function(){function t(){this.callbacks={},this.whenCallback=function(t){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}(),Pt=function(){function t(){this.results={}}var e=t.prototype;return e.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}))},e.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,Nt.a.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("a",{href:app.route.discussion(e,n&&n.number()),config:m.route},m("div",{className:"DiscussionSearchResult-title"},Object(W.a)(e.title(),t)),n?m("div",{className:"DiscussionSearchResult-excerpt"},Object(W.a)(n.contentPlain(),t,100)):""))}))]},t}(),Et=function(){function t(){this.results={}}var e=t.prototype;return e.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()}))},e.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=Object(y.a)(e);return n.children[0]=Object(W.a)(n.children[0],t),m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m("a",{href:app.route.user(e),config:m.route},Object(g.a)(e),n))}))]:""},t}(),Dt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state,this.hasFocus=!1,this.sources=null,this.loadingSources=0,this.index=0},n.view=function(){var t=this,e=this.state.getInitialSearch();return this.sources||(this.sources=this.sourceItems().toArray()),this.sources.length?m("div",{className:"Search "+Object(tt.a)({open:this.state.getValue()&&this.hasFocus,focused:this.hasFocus,active:!!e,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{className:"FormControl",type:"search",placeholder:Object(j.a)(app.translator.trans("core.forum.header.search_placeholder")),value:this.state.getValue(),oninput:m.withAttr("value",this.state.setValue.bind(this.state)),onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),this.loadingSources?w.a.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)},Object(k.a)("fas fa-times-circle")):""),m("ul",{className:"Dropdown-menu Search-results"},this.state.getValue()&&this.hasFocus?this.sources.map((function(e){return e.view(t.state.getValue())})):"")):m("div",null)},n.config=function(t){var e=this;if(this.setIndex(this.getCurrentNumericIndex()),!t){var n=this,i=this.state;this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return e.$("input").blur()})).on("mouseenter","> li:not(.Dropdown-header)",(function(){n.setIndex(n.selectableItems().index(this))}));var o=this.$("input");this.navigator=new At,this.navigator.onUp((function(){return e.setIndex(e.getCurrentNumericIndex()-1,!0)})).onDown((function(){return e.setIndex(e.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(n.searchTimeout),n.searchTimeout=setTimeout((function(){i.isCached(t)||(t.length>=3&&n.sources.map((function(e){e.search&&(n.loadingSources++,e.search(t).then((function(){n.loadingSources=Math.max(0,n.loadingSources-1),m.redraw()})))})),i.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).select()}))}},n.selectResult=function(){clearTimeout(this.searchTimeout),this.loadingSources=0,this.state.getValue()?m.route(this.getItem(this.index).find("a").attr("href")):this.clear(),this.$("input").blur()},n.clear=function(){this.state.clear()},n.sourceItems=function(){var t=new p.a;return app.forum.attribute("canViewDiscussions")&&t.add("discussions",new Pt),app.forum.attribute("canViewUserList")&&t.add("users",new Et),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(),i=n.parent(),o=t;t<0?o=n.length-1:t>=n.length&&(o=0);var r=n.removeClass("active").eq(o).addClass("active");if(this.index=r.attr("data-index")||o,e){var s,a=i.scrollTop(),c=i.offset().top,u=c+i.outerHeight(),l=r.offset().top,p=l+r.outerHeight();l<c?s=a-c+l-parseInt(i.css("padding-top"),10):p>u&&(s=a-u+p+parseInt(i.css("padding-bottom"),10)),void 0!==s&&i.stop(!0).animate({scrollTop:s},100)}},e}(d.a),$t=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},Object(h.a)(this.items().toArray()))},n.config=function(t,e){e.retain=!0},n.items=function(){var t=new p.a;if(t.add("search",Dt.component({state:app.search}),30),app.forum.attribute("showLanguageSelector")&&Object.keys(app.data.locales).length>1){var e=[],n=function(t){e.push(C.a.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 i in app.data.locales)n(i);t.add("locale",Tt.a.component({children:e,buttonClassName:"Button Button--link"}),20)}return app.session.user?(t.add("notifications",St.component({state:app.notifications}),10),t.add("session",Ot.component(),0)):(app.forum.attribute("allowSignUp")&&t.add("signUp",C.a.component({children:app.translator.trans("core.forum.header.sign_up_link"),className:"Button Button--link",onclick:function(){return app.modal.show(I)}}),10),t.add("logIn",C.a.component({children:app.translator.trans("core.forum.header.log_in_link"),className:"Button Button--link",onclick:function(){return app.modal.show(M)}}),0)),t},e}(d.a),_t=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(C.a),It=n(63),Mt=function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear(),this.component=this}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw(!0)),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.editor=null,this.onExit=null,this.fields={content:m.prop("")},this.content=this.fields.content,this.value=this.fields.content},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw(!0))},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!Object(It.a)(this.body.componentClass,t)&&Object.keys(e).every((function(t){return n.body.attrs[t]===e[t]}))},e.isVisible=function(){return this.position!==t.Position.HIDDEN},e.isFullScreen=function(){return this.position===t.Position.FULLSCREEN||"phone"===app.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(A,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Mt.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};var Rt=Mt,Lt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.state=this.props.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Rt.Position.NORMAL,minimized:this.state.position===Rt.Position.MINIMIZED,fullScreen:this.state.position===Rt.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Rt.Position.MINIMIZED?this.state.show.bind(this.state):void 0;return m("div",{className:"Composer "+Object(tt.a)(e)},m("div",{className:"Composer-handle",config:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},Object(h.a)(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},t.componentClass?t.componentClass.component(Object(a.a)({},t.attrs,{composer:this.state,disabled:e.minimized})):""))},n.config=function(t,e){var n=this;if(this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position),!t){e.retain=!0,this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input","esc",(function(){return n.state.close()}));var i={};$(window).on("resize",i.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",i.onmousemove=this.onmousemove.bind(this)).on("mouseup",i.onmouseup=this.onmouseup.bind(this)),e.onunload=function(){$(window).off("resize",i.onresize),$(document).off("mousemove",i.onmousemove).off("mouseup",i.onmouseup)}}},n.configHandle=function(t,e){if(!e){var n=this;$(t).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){n.mouseStart=t.clientY,n.heightStart=n.$().height(),n.handle=$(this),$("body").css("cursor","row-resize")}))}},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),i=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(i)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible:first").focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,i=parseInt(e.css("padding-bottom"),10),o=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-i-o)}},n.updateBodyPadding=function(){var t=this.state.position!==Rt.Position.HIDDEN&&this.state.position!==Rt.Position.MINIMIZED&&"phone"!==app.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Rt.Position.FULLSCREEN)switch(this.state.position){case Rt.Position.HIDDEN:return this.hide();case Rt.Position.MINIMIZED:return this.minimize();case Rt.Position.FULLSCREEN:return this.focus();case Rt.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var i=t.outerHeight();this.prevPosition===Rt.Position.HIDDEN?t.css({bottom:-i,height:i}):t.css({height:e});var o=t.animate({bottom:0,height:i},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),o},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;this.animateHeightChange().then((function(){return t.focus()})),"phone"===app.screen()&&(this.$().css("top",$(window).scrollTop()),this.showBackdrop())},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new p.a;return this.state.position===Rt.Position.FULLSCREEN?t.add("exitFullScreen",_t.component({icon:"fas fa-compress",title:app.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Rt.Position.MINIMIZED&&(t.add("minimize",_t.component({icon:"fas fa-minus minimize",title:app.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",_t.component({icon:"fas fa-expand",title:app.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",_t.component({icon:"fas fa-times",title:app.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(d.a),Bt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.props.notification,n=this.href();return m("a",{className:"Notification Notification--"+e.contentType()+" "+(e.isRead()?"":"unread"),href:n,config:function(t,e){-1===n.indexOf("://")&&m.route.apply(this,arguments),e||$(t).click(this.markAsRead.bind(this))}},!e.isRead()&&C.a.component({className:"Notification-action Button Button--icon Button--link",icon:"fas fa-check",title:app.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(e){e.preventDefault(),e.stopPropagation(),t.markAsRead()}}),Object(g.a)(e.fromUser()),Object(k.a)(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-content"},this.content()),Object(K.a)(e.createdAt()),m("div",{className:"Notification-excerpt"},this.excerpt()))},n.icon=function(){},n.href=function(){},n.content=function(){},n.excerpt=function(){},n.markAsRead=function(){this.props.notification.isRead()||(app.session.user.pushAttributes({unreadNotificationCount:app.session.user.unreadNotificationCount()-1}),this.props.notification.save({isRead:!0}))},e}(d.a),Ht=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.props.notification;return app.route.discussion(t.subject(),t.content().postNumber)},n.content=function(){return app.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.props.notification.fromUser()})},e}(Bt);function Ut(t){app.composer.isFullScreen()&&(app.composer.minimize(),t.stopPropagation())}var Ft=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||app.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.props.post;return e.add("title",m("h3",null,Object(k.a)("fas fa-pencil-alt")," ",m("a",{href:app.route.discussion(n.discussion(),n.number()),config:function(t,e){e||($(t).on("click",Ut),m.route.apply(this,arguments))}},app.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){Ut(t),m.route(app.route.post(this.props.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.props.post.discussion();this.loading=!0;var n=this.data();this.props.post.save(n).then((function(n){if(app.viewingDiscussion(e))app.current.get("stream").goToNumber(n.number());else{var i,o=C.a.component({className:"Button Button--link",children:app.translator.trans("core.forum.composer_edit.view_button"),onclick:function(){m.route(app.route.post(n)),app.alerts.dismiss(i)}});i=app.alerts.show({type:"success",children:app.translator.trans("core.forum.composer_edit.edited_message"),controls:[o]})}t.composer.hide()}),this.loaded.bind(this))},e}(T),qt={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.a.component()))})),i},userControls:function(t,e){return new p.a},moderationControls:function(t,e){var n=new p.a;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",C.a.component({icon:"fas fa-pencil-alt",children:app.translator.trans("core.forum.post_controls.edit_button"),onclick:this.editAction.bind(t)}))),n},destructiveControls:function(t,e){var n=new p.a;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",C.a.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",C.a.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",C.a.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=m.deferred();return app.composer.load(Ft,{post:this}),app.composer.show(),t.resolve(app.composer),t.promise},hideAction:function(){if(confirm(Object(j.a)(app.translator.trans("core.forum.post_controls.hide_confirmation"))))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;if(confirm(Object(j.a)(app.translator.trans("core.forum.post_controls.delete_confirmation"))))return t&&(t.loading=!0),this.delete().then((function(){var t=e.discussion();t.removePost(e.id()),t.postIds().length||(app.discussions.removeDiscussion(t),app.viewingDiscussion(t)&&app.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}},zt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var t=this;this.loading=!1,this.subtree=new Q.a((function(){return t.props.post.freshness}),(function(){var e=t.props.post.user();return e&&e.freshness}),(function(){return t.controlsOpen}))},n.view=function(){var t,e=this,n=this.attrs();return n.className=this.classes(n.className).join(" "),m("article",n,this.subtree.retain()||(t=qt.controls(e.props.post,e).toArray(),m("div",null,e.content(),m("aside",{className:"Post-actions"},m("ul",null,Object(h.a)(e.actionItems().toArray()),t.length?m("li",null,m(G.a,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return e.$(".Post-actions").addClass("open")},onhide:function(){return e.$(".Post-actions").removeClass("open")}},t)):"")),m("footer",{className:"Post-footer"},m("ul",null,Object(h.a)(e.footerItems().toArray()))))))},n.config=function(t){var e=this.$(".Post-actions"),n=this.$(".Post-controls");e.toggleClass("open",n.hasClass("open"))},n.attrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.props.post.user(),i=this.props.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===app.session.user&&e.push("Post--by-actor"),n&&n===i.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new p.a},n.footerItems=function(){return new p.a},e}(d.a),Wt=n(31),Vt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this);var n=this.props.user;this.username=m.prop(n.username()||""),this.email=m.prop(n.email()||""),this.isEmailConfirmed=m.prop(n.isEmailConfirmed()||!1),this.setPassword=m.prop(!1),this.password=m.prop(n.password()||""),this.groups={},app.store.all("groups").filter((function(t){return-1===[Ct.a.GUEST_ID,Ct.a.MEMBER_ID].indexOf(t.id())})).forEach((function(t){return e.groups[t.id()]=m.prop(-1!==n.groups().indexOf(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.edit_user.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form"},this.fields().toArray()))},n.fields=function(){var t=this,e=new p.a;return e.add("username",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:Object(j.a)(app.translator.trans("core.forum.edit_user.username_label")),bidi:this.username})),40),app.session.user!==this.props.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:Object(j.a)(app.translator.trans("core.forum.edit_user.email_label")),bidi:this.email})),this.isEmailConfirmed()?"":m("div",null,C.a.component({className:"Button Button--block",children:app.translator.trans("core.forum.edit_user.activate_button"),loading:this.loading,onclick:this.activate.bind(this)}))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,app.translator.trans("core.forum.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){t.setPassword(e.target.checked),m.redraw(!0),e.target.checked&&t.$("[name=password]").select(),m.redraw.strategy("none")}}),app.translator.trans("core.forum.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:Object(j.a)(app.translator.trans("core.forum.edit_user.password_label")),bidi:this.password}):"")),20)),e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,app.translator.trans("core.forum.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return app.store.getById("groups",t)})).map((function(e){return m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:"1"===t.props.user.id()&&e.id()===Ct.a.ADMINISTRATOR_ID}),Wt.a.component({group:e,label:""})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},C.a.component({className:"Button Button--primary",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.edit_user.submit_button")})),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.props.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return app.store.getById("groups",t)})),n={username:this.username(),relationships:{groups:e}};return app.session.user!==this.props.user&&(n.email=this.email()),this.setPassword()&&(n.password=this.password()),n},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.props.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},e}(P.a);function Yt(t,e,n){var i=this;if(!e){var o=function(){var e=$(t),n=$("#header"),o=$("#footer"),r=e.find("> ul");$(window).off(".affix"),r.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||r.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return i.bottom=o.outerHeight(!0)}}})};$(window).on("resize",o).resize(),n.onunload=function(){$(window).off("resize",o)}}}var Gt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[Jt.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:Yt},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[w.a.component({className:"LoadingIndicator--block"})])},n.content=function(){},n.show=function(t){this.user=t,app.current.set("user",t),app.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();app.preloadedApiDocument(),app.store.all("users").some((function(i){if((i.username().toLowerCase()===n||i.id()===t)&&i.joinTime())return e.show(i),!0})),this.user||app.store.find("users",t).then(this.show.bind(this))},n.sidebarItems=function(){var t=new p.a;return t.add("nav",Tt.a.component({children:this.navItems().toArray(),className:"App-titleControl",buttonClassName:"Button"})),t},n.navItems=function(){var t=new p.a,e=this.user;return t.add("posts",Nt.a.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",Nt.a.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",R.a.component(),-90),t.add("settings",Nt.a.component({href:app.route("settings"),children:app.translator.trans("core.forum.user.settings_link"),icon:"fas fa-cog"}),-100)),t},e}(l.a),Kt={controls:function(t,e){var n=this,i=new p.a;return["user","moderation","destructive"].forEach((function(o){var r=n[o+"Controls"](t,e).toArray();r.length&&(r.forEach((function(t){return i.add(t.itemName,t)})),i.add(o+"Separator",R.a.component()))})),i},userControls:function(){return new p.a},moderationControls:function(t){var e=new p.a;return t.canEdit()&&e.add("edit",C.a.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 p.a;return"1"!==t.id()&&t.canDelete()&&e.add("delete",C.a.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.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),app.current.matches(Gt,{user:t})?app.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n=t.data.attributes,i=n.username,o=n.email,r={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];app.alerts.show({type:e,children:app.translator.trans(r,{username:i,email:o})})},editAction:function(t){app.modal.show(Vt,{user:t})}},Xt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.loading=!1,this.isDraggedOver=!1},e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||""},n.view=function(){var t=this.props.user;return m("div",{className:"AvatarEditor Dropdown "+this.props.className+(this.loading?" loading":"")+(this.isDraggedOver?" dragover":"")},Object(g.a)(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?w.a.component():t.avatarUrl()?Object(k.a)("fas fa-pencil-alt"):Object(k.a)("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},Object(h.a)(this.controlItems().toArray())))},n.controlItems=function(){var t=new p.a;return t.add("upload",C.a.component({icon:"fas fa-upload",children:app.translator.trans("core.forum.user.avatar_upload_button"),onclick:this.openPicker.bind(this)})),t.add("remove",C.a.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("input",(function(e){t.upload($(e.target)[0].files[0])}))}},n.upload=function(t){if(!this.loading){var e=this.props.user,n=new FormData;n.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},data: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}(d.a),Jt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.props.user,e=Kt.controls(t,this).toArray(),n=t.color(),i=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?G.a.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?[Xt.component({user:t,className:"UserCard-avatar"}),Object(y.a)(t)]:m("a",{href:app.route.user(t),config:m.route},m("div",{className:"UserCard-avatar"},Object(g.a)(t)),Object(y.a)(t))),i.length?m("ul",{className:"UserCard-badges badges"},Object(h.a)(i)):"",m("ul",{className:"UserCard-info"},Object(h.a)(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new p.a,e=this.props.user,n=e.lastSeenAt();if(n){var i=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(i?" online":"")},i?[Object(k.a)("fas fa-circle")," ",app.translator.trans("core.forum.user.online_text")]:[Object(k.a)("far fa-clock")," ",Object(V.a)(n)]))}return t.add("joined",app.translator.trans("core.forum.user.joined_date_text",{ago:Object(V.a)(e.joinTime())})),t},e}(d.a),Qt=n(68),Zt=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(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,Object(g.a)(e,{className:"PostUser-avatar"})," ",Object(y.a)(e)));var n="";return!t.isHidden()&&this.props.cardVisible&&(n=Jt.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m("a",{href:app.route.user(e),config:m.route},Object(g.a)(e,{className:"PostUser-avatar"}),Object(Qt.a)(e),Object(y.a)(e))),m("ul",{className:"PostUser-badges badges"},Object(h.a)(e.badges().toArray())),n)},n.config=function(t){var e,n=this;t||this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(e),e=setTimeout(n.showCard.bind(n),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(e),e=setTimeout(n.hideCard.bind(n),250)}))},n.showCard=function(){var t=this;this.props.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.props.oncardhide()}))},e}(d.a),te=n(69),ee=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.view=function(){var t=this.props.post,e=t.createdAt(),n=this.getPermalink(t),i="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:function(){var t=this;setTimeout((function(){return $(t).parent().find(".PostMeta-permalink").select()})),m.redraw.strategy("none")},"data-toggle":"dropdown"},Object(K.a)(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},app.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Object(te.a)(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),i?m("a",{className:"Button PostMeta-permalink",href:n},n):m("input",{className:"FormControl PostMeta-permalink",value:n,onclick:function(t){return t.stopPropagation()}})))},n.getPermalink=function(t){return window.location.origin+app.route.post(t)},e}(d.a),ne=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.shouldUpdateTooltip=!1,this.oldEditedInfo=null},n.view=function(){var t=this.props.post,e=t.editedUser(),n=Object(j.a)(app.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:Object(V.a)(t.editedAt())}));return n!==this.oldEditedInfo&&(this.shouldUpdateTooltip=!0,this.oldEditedInfo=n),m("span",{className:"PostEdited",title:n},app.translator.trans("core.forum.post.edited_text"))},n.config=function(t){this.shouldUpdateTooltip&&(this.$().tooltip("destroy").tooltip(),this.shouldUpdateTooltip=!1)},e}(d.a),ie=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){var e=this;t.prototype.init.call(this),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return e.cardVisible}),(function(){return e.isEditing()}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",Object(h.a)(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.config=function(e,n){t.prototype.config.apply(this,arguments);var i=this.isEditing()?"":this.props.post.contentHtml();n.contentHtml!==i&&this.$(".Post-body script").each((function(){eval.call(window,$(this).text())})),n.contentHtml=i},n.isEditing=function(){return app.composer.bodyMatches(Ft,{post:this.props.post})},n.attrs=function(){var e=this.props.post,n=t.prototype.attrs.call(this);return n.className=(n.className||"")+" "+Object(tt.a)({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 i,o=function(){var e=app.composer.fields.content();i!==e&&(i=e,s9e.TextFormatter.preview(i||"",t))};o();var r=setInterval(o,50);n.onunload=function(){return clearInterval(r)}}},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new p.a,n=this.props.post;return e.add("user",Zt.component({post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",ee.component({post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",ne.component({post:n})),n.isHidden()&&e.add("toggle",C.a.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(zt),oe=n(29),re=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.attrs=function(){var e=t.prototype.attrs.call(this);return e.className=(e.className||"")+" EventPost "+Object(oe.ucfirst)(this.props.post.contentType())+"Post",e},n.content=function(){var e=this.props.post.user(),n=Object(y.a)(e),i=Object(a.a)(this.descriptionData(),{user:e,username:e?m("a",{className:"EventPost-user",href:app.route.user(e),config:m.route},n):n});return t.prototype.content.call(this).concat([Object(k.a)(this.icon(),{className:"EventPost-icon"}),m("div",{class:"EventPost-info"},this.description(i))])},n.icon=function(){return""},n.description=function(t){return app.translator.transChoice(this.descriptionKey(),t.count,t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(zt),se=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=app.translator.trans("core.forum.post_stream.discussion_renamed_text",t),n=app.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",t);return m("span",{title:Object(j.a)(n)},e)},n.descriptionData=function(){var t=this.props.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(re),ae=n(35),ce=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.hidden=localStorage.getItem("welcomeHidden")},n.view=function(){var t=this;if(this.hidden)return m("div",null);return m("header",{className:"Hero WelcomeHero"},m("div",{class:"container"},C.a.component({icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link"}),m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},app.forum.attribute("welcomeTitle")),m("div",{className:"Hero-subtitle"},m.trust(app.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem("welcomeHidden","true"),this.hidden=!0},e}(d.a),ue=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.composer.fields.title=this.composer.fields.title||m.prop(""),this.title=this.composer.fields.title},e.initProps=function(e){t.initProps.call(this,e),e.placeholder=e.placeholder||Object(j.a)(app.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||app.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||Object(j.a)(app.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||Object(j.a)(app.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,app.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",value:this.title(),oninput:m.withAttr("value",this.title),placeholder:this.props.titlePlaceholder,disabled:!!this.props.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),m.redraw.strategy("none")},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();app.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),app.discussions.refresh(),m.route(app.route.discussion(e))}),this.loaded.bind(this))},e}(T),le=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),app.previous.matches(wt)&&(this.lastDiscussion=app.previous.get("discussion")),app.previous.matches(e)&&app.discussions.clear(),app.discussions.refreshParams(app.search.params()),app.history.push("index",app.translator.trans("core.forum.header.back_to_index_tooltip")),this.bodyClass="App--index"},n.onunload=function(){app.cache.scrollTop=$(window).scrollTop()},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,Object(h.a)(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},Object(h.a)(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},Object(h.a)(this.actionItems().toArray()))),m(vt,{state:app.discussions})))))},n.config=function(e,n){if(t.prototype.config.apply(this,arguments),!e){Object(ae.extend)(n,"onunload",(function(){return $("#app").css("min-height","")})),app.setTitle(app.translator.trans("core.forum.index.meta_title_text")),app.setTitleCount(0);var i=app.cache.heroHeight,o=app.cache.heroHeight=this.$(".Hero").outerHeight()||0,r=app.cache.scrollTop;$("#app").css("min-height",$(window).height()+o);var s=function(){return $(window).scrollTop(r-i+o)};if(s(),setTimeout(s,1),this.lastDiscussion){var a=this.$('.DiscussionListItem[data-id="'+this.lastDiscussion.id()+'"]');if(a.length){var c=$("#header").outerHeight(),u=$(window).height(),l=a.offset().top,p=l+a.outerHeight();(l<r+c||p>r+u)&&$(window).scrollTop(l-c)}}}},n.hero=function(){return ce.component()},n.sidebarItems=function(){var t=new p.a,e=app.forum.attribute("canStartDiscussion")||!app.session.user;return t.add("newDiscussion",C.a.component({children:app.translator.trans(e?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"),icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:this.newDiscussionAction.bind(this),disabled:!e})),t.add("nav",Tt.a.component({children:this.navItems(this).toArray(),buttonClassName:"Button",className:"App-titleControl"})),t},n.navItems=function(){var t=new p.a,e=app.search.stickyParams();return t.add("allDiscussions",Nt.a.component({href:app.route("index",e),children:app.translator.trans("core.forum.index.all_discussions_link"),icon:"far fa-comments"}),100),t},n.viewItems=function(){var t=new p.a,e=app.discussions.sortMap(),n={};for(var i in e)n[i]=app.translator.trans("core.forum.index_sort."+i+"_button");return t.add("sort",G.a.component({buttonClassName:"Button",label:n[app.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],children:Object.keys(n).map((function(t){var i=n[t],o=(app.search.params().sort||Object.keys(e)[0])===t;return C.a.component({children:i,icon:!o||"fas fa-check",onclick:app.search.changeSort.bind(app.search,t),active:o})}))})),t},n.actionItems=function(){var t=new p.a;return t.add("refresh",C.a.component({title:app.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){app.discussions.refresh(),app.session.user&&(app.store.find("users",app.session.user.id()),m.redraw())}})),app.session.user&&t.add("markAllAsRead",C.a.component({title:app.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){var t=m.deferred();return app.session.user?(app.composer.load(ue,{user:app.session.user}),app.composer.show(),t.resolve(app.composer)):(t.reject(),app.modal.show(M)),t.promise},n.markAllAsRead=function(){confirm(app.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&app.session.user.save({markedAllAsReadAt:new Date})},e}(l.a);Object(s.a)(le,"providesInitialSearch",!0);var pe=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.loading=!0,this.moreResults=!1,this.posts=[],this.loadLimit=20,this.loadUser(m.route.param("username"))},n.content=function(){return 0!==this.posts.length||this.loading?(this.loading?t=w.a.component():this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},C.a.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("a",{href:app.route.post(t),config:m.route},t.discussion().title())})),ie.component({post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(mt.a,{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.lazyRedraw(),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}(Gt),de=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=window.app),this.params=t,this.app=e,this.discussions=[],this.moreResults=!1,this.loading=!1}var e=t.prototype;return e.requestParams=function(){var t={include:["user","lastPostedUser"],filter:{}};return t.sort=this.sortMap()[this.params.sort],this.params.q&&(t.filter.q=this.params.q,t.include.push("mostRelevantPost","mostRelevantPost.user")),t},e.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},e.getParams=function(){return this.params},e.clear=function(){this.discussions=[],m.redraw()},e.refreshParams=function(t){var e=this;this.hasDiscussions()&&!Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))||(this.params=t,this.refresh())},e.refresh=function(t){var e=this,n=(void 0===t?{}:t).clear,i=void 0===n||n;return this.loading=!0,i&&this.clear(),this.loadResults().then((function(t){e.parseResults(t)}),(function(){e.loading=!1,m.redraw()}))},e.loadResults=function(t){var e=this.app.preloadedApiDocument();if(e)return Promise.resolve(e);var n=this.requestParams();return n.page={offset:t},n.include=n.include.join(","),this.app.store.find("discussions",n)},e.loadMore=function(){this.loading=!0,this.loadResults(this.discussions.length).then(this.parseResults.bind(this))},e.parseResults=function(t){var e;return(e=this.discussions).push.apply(e,t),this.loading=!1,this.moreResults=!!t.payload.links&&!!t.payload.links.next,m.redraw(),t},e.removeDiscussion=function(t){var e=this.discussions.indexOf(t);-1!==e&&this.discussions.splice(e,1),m.redraw()},e.addDiscussion=function(t){this.discussions.unshift(t),m.redraw()},e.hasDiscussions=function(){return this.discussions.length>0},e.isLoading=function(){return this.loading},e.isSearchResults=function(){return!!this.params.q},e.empty=function(){return!this.hasDiscussions()&&!this.isLoading()},t}(),he=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new de({q:"author:"+e.username(),sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},vt.component({state:this.state}))},e}(Gt),fe=n(33),me=n(22),ve=n(40),ge=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.props.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},Object(k.a)(e.icon)," ",e.label)})))),m("tbody",null,this.types.map((function(n){return m("tr",null,m("td",{className:"NotificationGrid-groupToggle",onclick:t.toggleType.bind(t,n.name)},Object(k.a)(n.icon)," ",n.label),t.methods.map((function(i){var o=t.preferenceKey(n.name,i.name);return m("td",{className:"NotificationGrid-checkbox"},ve.a.component({state:!!e[o],loading:t.loading[o],disabled:!(o in e),onchange:function(){return t.toggle([o])}}))})))}))))},n.config=function(t){t||(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,i=n.preferences(),o=!i[t[0]];t.forEach((function(t){e.loading[t]=!0,i[t]=o})),m.redraw(),n.save({preferences:i}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.props.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.props.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new p.a;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 p.a;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:app.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(d.a),be=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},C.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.change_password.send_button")}))))},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,app.request({method:"POST",url:app.forum.attribute("apiUrl")+"/forgot",data:{email:app.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(P.a),ye=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.success=!1,this.email=m.prop(app.session.user.email()),this.password=m.prop("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return app.translator.trans("core.forum.change_email.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},app.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())})),m("div",{className:"Form-group"},m(C.a,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},app.translator.trans("core.forum.change_email.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:app.session.user.email(),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",placeholder:app.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading})),m("div",{className:"Form-group"},C.a.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading,children:app.translator.trans("core.forum.change_email.submit_button")}))))},n.onsubmit=function(t){var e=this;if(t.preventDefault(),this.email()!==app.session.user.email()){app.session.user.email();this.loading=!0,app.session.user.save({email:this.email()},{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){return e.success=!0})).catch((function(){})).then(this.loaded.bind(this))}else this.hide()},n.onerror=function(e){401===e.status&&(e.alert.children=app.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(P.a),we=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),this.show(app.session.user),app.setTitle(app.translator.trans("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,Object(h.a)(this.settingsItems().toArray())))},n.settingsItems=function(){var t=new p.a;return t.add("account",me.a.component({label:app.translator.trans("core.forum.settings.account_heading"),className:"Settings-account",children:this.accountItems().toArray()})),t.add("notifications",me.a.component({label:app.translator.trans("core.forum.settings.notifications_heading"),className:"Settings-notifications",children:this.notificationsItems().toArray()})),t.add("privacy",me.a.component({label:app.translator.trans("core.forum.settings.privacy_heading"),className:"Settings-privacy",children:this.privacyItems().toArray()})),t},n.accountItems=function(){var t=new p.a;return t.add("changePassword",C.a.component({children:app.translator.trans("core.forum.settings.change_password_button"),className:"Button",onclick:function(){return app.modal.show(be)}})),t.add("changeEmail",C.a.component({children:app.translator.trans("core.forum.settings.change_email_button"),className:"Button",onclick:function(){return app.modal.show(ye)}})),t},n.notificationsItems=function(){var t=new p.a;return t.add("notificationGrid",ge.component({user:this.user})),t},n.preferenceSaver=function(t){var e=this;return function(n,i){var o;i&&(i.props.loading=!0),m.redraw(),e.user.savePreferences((o={},o[t]=n,o)).then((function(){i&&(i.props.loading=!1),m.redraw()}))}},n.privacyItems=function(){var t=this,e=new p.a;return e.add("discloseOnline",fe.a.component({children:app.translator.trans("core.forum.settings.privacy_disclose_online_label"),state:this.user.preferences().discloseOnline,onchange:function(e){t.discloseOnlineLoading=!0,t.user.savePreferences({discloseOnline:e}).then((function(){t.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading})),e},e}(Gt),xe=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.init=function(){t.prototype.init.call(this),app.history.push("notifications"),app.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(jt,{state:app.notifications}))},e}(l.a),Ne=function(t){t.routes={index:{path:"/all",component:le.component()},"index.filter":{path:"/:filter",component:le.component()},discussion:{path:"/d/:id",component:wt.component()},"discussion.near":{path:"/d/:id/:near",component:wt.component()},user:{path:"/u/:username",component:pe.component()},"user.posts":{path:"/u/:username",component:pe.component()},"user.discussions":{path:"/u/:username/discussions",component:he.component()},settings:{path:"/settings",component:we.component()},notifications:{path:"/notifications",component:xe.component()}},t.route.discussion=function(e,n){var i=e.slug();return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.id()+(i.trim()?"-"+i:""),near:n&&1!==n?n:void 0})},t.route.post=function(e){return t.route.discussion(e.discussion(),e.number())},t.route.user=function(e){return t.route("user",{username:e.username()})}};function Ce(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=C.a.component({className:"Button Button--link",children:t.translator.trans("core.forum.user_email_confirmation.resend_button"),onclick:function(){n.props.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.props.loading=!1,n.props.children=[Object(k.a)("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")],n.props.disabled=!0,m.redraw()})).catch((function(){n.props.loading=!1,m.redraw()}))}}),i=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.view=function(){var e=t.prototype.view.call(this);return e.children=[m("div",{className:"container"},e.children)],e},e}(E.a);m.mount($("<div/>").insertBefore("#content")[0],i.component({dismissible:!1,children:t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}),controls:[n]}))}}var Oe=n(61),Te=n(43),ke=function(){function t(t){this.app=t,this.notificationPages=[],this.loading=!1,this.moreResults=!1}var e=t.prototype;return e.clear=function(){this.notificationPages=[]},e.getNotificationPages=function(){return this.notificationPages},e.isLoading=function(){return this.loading},e.hasMoreResults=function(){return this.moreResults},e.load=function(){this.app.session.user.newNotificationCount()&&(this.notificationPages=[]),this.notificationPages.length>0||(this.app.session.user.pushAttributes({newNotificationCount:0}),this.loadMore())},e.loadMore=function(){var t=this;this.loading=!0,m.redraw();var e=this.notificationPages.length>0?{page:{offset:10*this.notificationPages.length}}:null;return this.app.store.find("notifications",e).then(this.parseResults.bind(this)).catch((function(){})).then((function(){t.loading=!1,m.redraw()}))},e.parseResults=function(t){return t.length&&this.notificationPages.push(t),this.moreResults=!!t.payload.links.next,t},e.markAllAsRead=function(){0!==this.notificationPages.length&&(this.app.session.user.pushAttributes({unreadNotificationCount:0}),this.notificationPages.forEach((function(t){t.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),this.app.request({url:this.app.forum.attribute("apiUrl")+"/notifications/read",method:"POST"}))},t}(),je=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=t}var e=t.prototype;return e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.push(t)},e.isCached=function(t){return-1!==this.cachedSearches.indexOf(t)},t}(),Se=function(t){function e(e,n){var i;return void 0===e&&(e=[]),void 0===n&&(n="index"),(i=t.call(this,e)||this).searchRoute=n,i}Object(r.a)(e,t);var n=e.prototype;return n.getValue=function(){return void 0===this.value&&(this.value=this.getInitialSearch()||""),t.prototype.getValue.call(this)},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(app.discussions.sortMap())[0]?delete e.sort:e.sort=t,m.route(app.route(this.searchRoute,e))},n.getInitialSearch=function(){return app.current.type.providesInitialSearch&&this.params().q},n.clearInitialSearch=function(){var t=this.params();delete t.q,m.route(app.route(this.searchRoute,t))},e}(je),Ae=function(t){function e(){var e;return e=t.call(this)||this,Object(s.a)(Object(o.a)(e),"notificationComponents",{discussionRenamed:Ht}),Object(s.a)(Object(o.a)(e),"postComponents",{comment:ie,discussionRenamed:se}),Object(s.a)(Object(o.a)(e),"pane",null),Object(s.a)(Object(o.a)(e),"drawer",null),Object(s.a)(Object(o.a)(e),"history",new c),Object(s.a)(Object(o.a)(e),"notifications",new ke(Object(o.a)(e))),Object(s.a)(Object(o.a)(e),"search",new Se),Object(s.a)(Object(o.a)(e),"composer",new Rt),Ne(Object(o.a)(e)),e.discussions=new de({},Object(o.a)(e)),e.cache.discussionList=e.discussions,e}Object(r.a)(e,t);var n=e.prototype;return n.mount=function(){var e=this.forum.attribute("defaultRoute"),n="index";for(var i in this.routes)this.routes[i].path===e&&(n=i);this.routes[n].path="/",this.history.push(n,this.translator.trans("core.forum.header.back_to_index_tooltip"),"/"),m.mount(document.getElementById("app-navigation"),Te.a.component({className:"App-backControl",drawer:!0})),m.mount(document.getElementById("header-navigation"),Te.a.component()),m.mount(document.getElementById("header-primary"),xt.component()),m.mount(document.getElementById("header-secondary"),$t.component()),m.mount(document.getElementById("composer"),Lt.component({state:this.composer})),this.pane=new u(document.getElementById("app")),m.route.mode="pathname",t.prototype.mount.call(this,this.forum.attribute("basePath")),Ce(this),$("#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.viewingDiscussion=function(t){return this.current.matches(wt,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(I,t)},e}(Oe.a),Pe=n(76),Ee=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=$(window);window.open(app.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initProps.call(this,e)},e}(C.a),De=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.initProps=function(e){t.initProps.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e.prototype.config=function(e,n){t.prototype.config.call(this,e,n),e||this.$().tooltip()},e}(C.a),$e=function(){function t(){}var e=t.prototype;return e.search=function(){},e.view=function(){},t}(),_e=Object(a.a)(Pe.a,{"utils/PostControls":qt,"utils/KeyboardNavigatable":At,"utils/slidable":Z,"utils/affixSidebar":Yt,"utils/History":c,"utils/DiscussionControls":B,"utils/alertEmailConfirmation":Ce,"utils/UserControls":Kt,"utils/Pane":u,"states/DiscussionListState":de,"states/GlobalSearchState":Se,"states/NotificationListState":ke,"states/SearchState":je,"components/DiscussionPage":wt,"components/LogInModal":M,"components/ComposerBody":T,"components/ForgotPasswordModal":D,"components/Notification":Bt,"components/LogInButton":Ee,"components/DiscussionsUserPage":he,"components/Composer":Lt,"components/SessionDropdown":Ot,"components/HeaderPrimary":xt,"components/PostEdited":ne,"components/PostStream":U,"components/ChangePasswordModal":be,"components/IndexPage":le,"components/DiscussionRenamedNotification":Ht,"components/DiscussionsSearchSource":Pt,"components/HeaderSecondary":$t,"components/ComposerButton":_t,"components/DiscussionList":vt,"components/ReplyPlaceholder":H,"components/TextEditor":O,"components/TextEditorButton":De,"components/AvatarEditor":Xt,"components/Post":zt,"components/SettingsPage":we,"components/TerminalPost":X,"components/ChangeEmailModal":ye,"components/NotificationsDropdown":St,"components/UserPage":Gt,"components/PostUser":Zt,"components/UserCard":Jt,"components/UsersSearchSource":Et,"components/NotificationGrid":ge,"components/PostPreview":J,"components/EventPost":re,"components/DiscussionHero":f,"components/PostMeta":ee,"components/EditUserModal":Vt,"components/SearchSource":$e,"components/DiscussionRenamedPost":se,"components/DiscussionComposer":ue,"components/LogInButtons":_,"components/NotificationList":jt,"components/WelcomeHero":ce,"components/SignUpModal":I,"components/CommentPost":ie,"components/ReplyComposer":A,"components/NotificationsPage":xe,"components/PostStreamScrubber":q,"components/EditPostComposer":Ft,"components/RenameDiscussionModal":L,"components/Search":Dt,"components/DiscussionListItem":ft,"components/LoadingPost":b,"components/PostsUserPage":pe,routes:Ne,ForumApplication:Ae}),Ie=new Ae;window.app=Ie,_e.app=Ie}]);
|
||
//# sourceMappingURL=forum.js.map
|