mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 03:13:26 +08:00
3 lines
382 KiB
JavaScript
Generated
3 lines
382 KiB
JavaScript
Generated
/*! For license information please see forum.js.LICENSE.txt */
|
|
(()=>{var t={195:(t,e,n)=>{t.exports=n(236)},423:()=>{!function(t){"use strict";var e=function e(n,r){this.options=t.extend({},e.DEFAULTS,r);var i=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=t(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new e(this,o)),"string"==typeof n&&i[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=o.top)&&"bottom":!(i+s<=t-r)&&"bottom";var a=null==this.affixed,u=a?i:o.top;return null!=n&&i<=n?"top":null!=r&&u+(a?s:e)>=t-r&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),l=t.Event(u+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),r=e.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(e,r)}))}))}(jQuery)},298:()=>{!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function r(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?t(document).find(n):null;return r&&r.length?r:e.parent()}function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),i=r(e),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var o=r(n),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=r(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(e).trigger("focus"),i.trigger("click");var a=o.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var u=a.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<a.length-1&&u++,~u||(u=0),a.eq(u).trigger("focus")}}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var r=t(this),i=r.data("bs.dropdown");i||r.data("bs.dropdown",i=new n(this)),"string"==typeof e&&i[e].call(r)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery)},892:()=>{!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,r){return this.each((function(){var i=t(this),o=i.data("bs.modal"),s=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n);o||i.data("bs.modal",o=new e(this,s)),"string"==typeof n?o[n](r):s.show&&o.show(r)}))}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 r=this,i=t.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(i),this.isShown||i.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(){r.$element.one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(r.$element)&&(r.ignoreBackdropClick=!0)}))})),this.backdrop((function(){var i=t.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),i&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:n});i?r.$dialog.one("bsTransitionEnd",(function(){r.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(e.TRANSITION_DURATION):r.$element.trigger("focus").trigger(o)})))},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 r=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&i;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+i).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)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;o?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):n()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){r.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,r){var i=r.style.paddingRight,o=t(r).css("padding-right");t(r).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")})))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),t(this.fixedContent).each((function(e,n){var r=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=r||""}))},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 r=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=r,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var r=t(this),i=r.attr("href"),o=r.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),s=t(document).find(o),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(i)&&i},s.data(),r.data());r.is("a")&&e.preventDefault(),s.one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){r.is(":visible")&&r.trigger("focus")}))})),n.call(s,a,this)}))}(jQuery)},478:()=>{!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,i=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function o(e,o){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,o))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(r)||e.nodeValue.match(i));for(var a=t(o).filter((function(t,e){return e instanceof RegExp})),u=0,l=a.length;u<l;u++)if(s.match(a[u]))return!0;return!1}function s(e,n,r){if(0===e.length)return e;if(r&&"function"==typeof r)return r(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var i=document.implementation.createHTMLDocument("sanitization");i.body.innerHTML=e;for(var s=t.map(n,(function(t,e){return e})),a=t(i.body).find("*"),u=0,l=a.length;u<l;u++){var c=a[u],d=c.nodeName.toLowerCase();if(-1!==t.inArray(d,s))for(var h=t.map(c.attributes,(function(t){return t})),f=[].concat(n["*"]||[],n[d]||[]),p=0,m=h.length;p<m;p++)o(h[p],f)||c.removeAttribute(h[p].nodeName);else c.parentNode.removeChild(c)}return i.body.innerHTML}var a=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},a.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==t.inArray(i,e)&&delete r[i];return(n=t.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=s(n.template,n.whiteList,n.sanitizeFn)),n},a.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,r){n[t]!=r&&(e[t]=r)})),e},a.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},a.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},a.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},a.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,l=u.test(s);l&&(s=s.replace(u,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(t(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=i[0].offsetWidth,h=i[0].offsetHeight;if(l){var f=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-h<p.top?"bottom":"right"==s&&c.right+d>p.width?"left":"left"==s&&c.left-d<p.left?"right":s,i.removeClass(f).addClass(s)}var m=this.getCalculatedOffset(s,c,d,h);this.applyPlacement(m,s);var v=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",v).emulateTransitionEnd(a.TRANSITION_DURATION):v()}},a.prototype.applyPlacement=function(e,n){var r=this.tip(),i=r[0].offsetWidth,o=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),a=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(r[0],t.extend({using:function(t){r.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),r.addClass("in");var u=r[0].offsetWidth,l=r[0].offsetHeight;"top"==n&&l!=o&&(e.top=e.top+o-l);var c=this.getViewportAdjustedDelta(n,e,u,l);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),h=d?2*c.left-i+u:2*c.top-o+l,f=d?"offsetWidth":"offsetHeight";r.offset(e),this.replaceArrow(h,r[0][f],d)},a.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},a.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=s(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},a.prototype.hide=function(e){var n=this,r=t(this.$tip),i=t.Event("hide.bs."+this.type);function o(){"in"!=n.hoverState&&r.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}if(this.$element.trigger(i),!i.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",o).emulateTransitionEnd(a.TRANSITION_DURATION):o(),this.hoverState=null,this},a.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},a.prototype.hasContent=function(){return this.getTitle()},a.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],r="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=t.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var o=window.SVGElement&&n instanceof window.SVGElement,s=r?{top:0,left:0}:o?null:e.offset(),a={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},u=r?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},i,a,u,s)},a.prototype.getCalculatedOffset=function(t,e,n,r){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-r,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-r/2,left:e.left-n}:{top:e.top+e.height/2-r/2,left:e.left+e.width}},a.prototype.getViewportAdjustedDelta=function(t,e,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,u=e.top+o-s.scroll+r;a<s.top?i.top=s.top-a:u>s.top+s.height&&(i.top=s.top+s.height-u)}else{var l=e.left-o,c=e.left+o+n;l<s.left?i.left=s.left-l:c>s.right&&(i.left=s.left+s.width-c)}return i},a.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},a.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},a.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},a.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},a.prototype.sanitizeHtml=function(t){return s(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new a(this,i)),"string"==typeof e&&r[e]())}))},t.fn.tooltip.Constructor=a,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery)},646:()=>{!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;return t(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||t(r).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(jQuery)},28:t=>{var e=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)};e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.update=function(t){this.context.putImageData(t,0,0)},e.prototype.getPixelCount=function(){return this.width*this.height},e.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},e.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var n=function(){};if(n.prototype.getColor=function(t,e){return this.getPalette(t,5,e)[0]},n.prototype.getPalette=function(t,n,r){void 0===n&&(n=10),(void 0===r||1>r)&&(r=10);for(var o,s,a,u,l=new e(t),c=l.getImageData().data,d=l.getPixelCount(),h=[],f=0;d>f;f+=r)s=c[0+(o=4*f)],a=c[o+1],u=c[o+2],c[o+3]>=125&&(s>250&&a>250&&u>250||h.push([s,a,u]));var p=i.quantize(h,n),m=p?p.palette():null;return l.removeCanvas(),m},!r)var r={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return e>t?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,r,i){return n.index=i,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,e){return Math.max.apply(null,e?r.map(t,e):t)}};var i=function(){function t(t,e,n){return(t<<2*u)+(e<<u)+n}function e(t){function e(){n.sort(t),r=!0}var n=[],r=!1;return{push:function(t){n.push(t),r=!1},peek:function(t){return r||e(),void 0===t&&(t=n.length-1),n[t]},pop:function(){return r||e(),n.pop()},size:function(){return n.length},map:function(t){return n.map(t)},debug:function(){return r||e(),n}}}function n(t,e,n,r,i,o,s){var a=this;a.r1=t,a.r2=e,a.g1=n,a.g2=r,a.b1=i,a.b2=o,a.histo=s}function i(){this.vboxes=new e((function(t,e){return r.naturalOrder(t.vbox.count()*t.vbox.volume(),e.vbox.count()*e.vbox.volume())}))}function o(e){var n,r,i,o,s=new Array(1<<3*u);return e.forEach((function(e){r=e[0]>>l,i=e[1]>>l,o=e[2]>>l,n=t(r,i,o),s[n]=(s[n]||0)+1})),s}function s(t,e){var r,i,o,s=1e6,a=0,u=1e6,c=0,d=1e6,h=0;return t.forEach((function(t){r=t[0]>>l,i=t[1]>>l,o=t[2]>>l,s>r?s=r:r>a&&(a=r),u>i?u=i:i>c&&(c=i),d>o?d=o:o>h&&(h=o)})),new n(s,a,u,c,d,h,e)}function a(e,n){if(n.count()){var i=n.r2-n.r1+1,o=n.g2-n.g1+1,s=n.b2-n.b1+1,a=r.max([i,o,s]);if(1==n.count())return[n.copy()];var u,l,c,d,h=0,f=[],p=[];if(a==i)for(u=n.r1;u<=n.r2;u++){for(d=0,l=n.g1;l<=n.g2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(u,l,c)]||0;h+=d,f[u]=h}else if(a==o)for(u=n.g1;u<=n.g2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.b1;c<=n.b2;c++)d+=e[t(l,u,c)]||0;h+=d,f[u]=h}else for(u=n.b1;u<=n.b2;u++){for(d=0,l=n.r1;l<=n.r2;l++)for(c=n.g1;c<=n.g2;c++)d+=e[t(l,c,u)]||0;h+=d,f[u]=h}return f.forEach((function(t,e){p[e]=h-t})),function(t){var e,r,i,o,s,a=t+"1",l=t+"2",c=0;for(u=n[a];u<=n[l];u++)if(f[u]>h/2){for(i=n.copy(),o=n.copy(),e=u-n[a],s=(r=n[l]-u)>=e?Math.min(n[l]-1,~~(u+r/2)):Math.max(n[a],~~(u-1-e/2));!f[s];)s++;for(c=p[s];!c&&f[s-1];)c=p[--s];return i[l]=s,o[a]=i[l]+1,[i,o]}}(a==i?"r":a==o?"g":"b")}}var u=5,l=8-u;return n.prototype={volume:function(t){var e=this;return(!e._volume||t)&&(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,r=n.histo;if(!n._count_set||e){var i,o,s,a=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(s=n.b1;s<=n.b2;s++)index=t(i,o,s),a+=r[index]||0;n._count=a,n._count_set=!0}return n._count},copy:function(){var t=this;return new n(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var i,o,s,a,l=0,c=1<<8-u,d=0,h=0,f=0;for(o=n.r1;o<=n.r2;o++)for(s=n.g1;s<=n.g2;s++)for(a=n.b1;a<=n.b2;a++)l+=i=r[t(o,s,a)]||0,d+=i*(o+.5)*c,h+=i*(s+.5)*c,f+=i*(a+.5)*c;n._avg=l?[~~(d/l),~~(h/l),~~(f/l)]:[~~(c*(n.r1+n.r2+1)/2),~~(c*(n.g1+n.g2+1)/2),~~(c*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>l;return gval=t[1]>>l,bval=t[2]>>l,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},i.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,r,i=this.vboxes,o=0;o<i.size();o++)(e>(n=Math.sqrt(Math.pow(t[0]-i.peek(o).color[0],2)+Math.pow(t[1]-i.peek(o).color[1],2)+Math.pow(t[2]-i.peek(o).color[2],2)))||void 0===e)&&(e=n,r=i.peek(o).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,e){return r.naturalOrder(r.sum(t.color),r.sum(e.color))}));var e=t[0].color;e[0]<5&&e[1]<5&&e[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,i=t[n].color;i[0]>251&&i[1]>251&&i[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(t,n){function u(t,e){for(var n,r=1,i=0;1e3>i;)if((n=t.pop()).count()){var o=a(l,n),s=o[0],u=o[1];if(!s)return;if(t.push(s),u&&(t.push(u),r++),r>=e)return;if(i++>1e3)return}else t.push(n),i++}if(!t.length||2>n||n>256)return!1;var l=o(t);l.forEach((function(){}));var c=s(t,l),d=new e((function(t,e){return r.naturalOrder(t.count(),e.count())}));d.push(c),u(d,.75*n);for(var h=new e((function(t,e){return r.naturalOrder(t.count()*t.volume(),e.count()*e.volume())}));d.size();)h.push(d.pop());u(h,n-h.size());for(var f=new i;h.size();)f.push(h.pop());return f}}}();t.exports=n},555:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof C},x=function(t,e,n){var r;if(!t)return y;if("string"==typeof t)b[t]&&(r=t),e&&(b[t]=e,r=t);else{var i=t.name;b[i]=t,r=i}return!n&&r&&(y=r),r||!n&&y},N=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new C(n)},S=g;S.l=x,S.i=w,S.w=function(t,e){return N(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var C=function(){function m(t){this.$L=x(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=N(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return N(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<N(t)},v.$g=function(t,e,n){return S.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,l=!!S.u(e)||e,h=S.p(t),f=function(t,e){var r=S.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return l?r:r.endOf(s)},p=function(t,e){return S.w(n.toDate()[t].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,v=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case c:return l?f(1,0):f(31,11);case u:return l?f(1,v):f(0,v+1);case a:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(l?g-w:g+(6-w),v);case s:case d:return p(y+"Hours",0);case o:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case r:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var a,l=S.p(t),h="set"+(this.$u?"UTC":""),f=(a={},a[s]=h+"Date",a[d]=h+"Date",a[u]=h+"Month",a[c]=h+"FullYear",a[o]=h+"Hours",a[i]=h+"Minutes",a[r]=h+"Seconds",a[n]=h+"Milliseconds",a)[l],p=l===s?this.$D+(e-this.$W):e;if(l===u||l===c){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[S.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=S.p(l),p=function(t){var e=N(h);return S.w(e.date(e.date()+Math.round(t*n)),h)};if(f===u)return this.set(u,this.$M+n);if(f===c)return this.set(c,this.$y+n);if(f===s)return p(1);if(f===a)return p(7);var m=(d={},d[i]=t,d[o]=e,d[r]=1e3,d)[f]||1,v=this.$d.getTime()+n*m;return S.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),o=this.$H,s=this.$m,a=this.$M,u=n.weekdays,l=n.months,c=function(t,n,i,o){return t&&(t[n]||t(e,r))||i[n].substr(0,o)},d=function(t){return S.s(o%12||12,t,"0")},f=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:S.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:S.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:S.s(s,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return r.replace(p,(function(t,e){return e||m[t]||i.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,h){var f,p=S.p(d),m=N(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=S.m(this,m);return y=(f={},f[c]=y/12,f[u]=y,f[l]=y/3,f[a]=(g-v)/6048e5,f[s]=(g-v)/864e5,f[o]=g/e,f[i]=g/t,f[r]=g/1e3,f)[p]||g,h?y:S.a(y)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),T=C.prototype;return N.prototype=T,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),N.extend=function(t,e){return t.$i||(t(e,C,N),t.$i=!0),N},N.locale=x,N.isDayjs=w,N.unix=function(t){return N(1e3*t)},N.en=b[y],N.Ls=b,N.p={},N}()},428:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,r){var i=n.prototype,o=i.format;r.en.formats=t,i.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(e,n){return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,i){var o=i&&i.toUpperCase();return r||n[i]||t[i]||n[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))}(e,void 0===n?{}:n);return o.call(this,r)}}}()},23:function(t){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var r=e.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(t,e,n,i){return r.fromToBase(t,e,n,i)}n.en.relativeTime=i,r.fromToBase=function(e,r,o,s,a){for(var u,l,c,d=o.$locale().relativeTime||i,h=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=h.length,p=0;p<f;p+=1){var m=h[p];m.d&&(u=s?n(e).diff(o,m.d,!0):o.diff(e,m.d,!0));var v=(t.rounding||Math.round)(Math.abs(u));if(c=u>0,v<=m.r||!m.r){v<=1&&p>0&&(m=h[p-1]);var g=d[m.l];a&&(v=a(""+v)),l="string"==typeof g?g.replace("%d",v):g(v,r,m.l,c);break}}if(r)return l;var y=c?d.future:d.past;return"function"==typeof y?y(l):y.replace("%s",l)},r.to=function(t,e){return o(t,e,this,!0)},r.from=function(t,e){return o(t,e,this)};var s=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(s(this),t)},r.fromNow=function(t){return this.from(s(this),t)}}}()},648:(t,e,n)=>{"use strict";t.exports=function(){if("object"==typeof globalThis)return globalThis;var t;try{t=this||new Function("return this")()}catch(t){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return t}()},426:function(){!function(t){function e(e){if("string"==typeof e.data&&(e.data={keys:e.data}),e.data&&e.data.keys&&"string"==typeof e.data.keys){var n=e.handler,r=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable")||t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1)){var i="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};t.each(["alt","ctrl","shift"],(function(t,n){e[n+"Key"]&&i!==n&&(s+=n+"+")})),e.metaKey&&!e.ctrlKey&&"meta"!==i&&(s+="meta+"),e.metaKey&&"meta"!==i&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),i?a[s+i]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var u=0,l=r.length;u<l;u++)if(a[r[u]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},t.each(["keydown","keyup","keypress"],(function(){t.event.special[this]={add:e}}))}(jQuery||this.jQuery||window.jQuery)},663:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function N(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var S="3.6.0",C=function t(e,n){return new t.fn.init(e,n)};function T(t){var e=!!t&&"length"in t&&t.length,n=N(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:S,constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=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(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:o.sort,splice:o.splice},C.extend=C.fn.extend=function(){var t,e,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||g(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(l&&r&&(C.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||C.isPlainObject(n)?n:{},i=!1,s[e]=C.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},C.extend({expando:"jQuery"+(S+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(T(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},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:c.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,s=!n;i<o;i++)!e(t[i],i)!==s&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,s=[];if(T(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&s.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&s.push(i);return u(s)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[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=function(t){var e,n,r,i,o,s,a,u,l,c,d,h,f,p,m,v,g,y,b,w="sizzle"+1*new Date,x=t.document,N=0,S=0,C=ut(),T=ut(),k=ut(),E=ut(),A=function(t,e){return t===e&&(d=!0),0},P={}.hasOwnProperty,_=[],D=_.pop,I=_.push,O=_.push,$=_.slice,L=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",H="\\[[\\x20\\t\\r\\n\\f]*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",B=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),z=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),W=new RegExp(M+"|>"),V=new RegExp(B),G=new RegExp("^"+R+"$"),Y={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","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-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){h()},st=wt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(_=$.call(x.childNodes),x.childNodes),_[x.childNodes.length].nodeType}catch(t){O={apply:_.length?function(t,e){I.apply(t,$.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function at(t,e,r,i){var o,a,l,c,d,p,g,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(e),e=e||f,m)){if(11!==x&&(d=Z.exec(t)))if(o=d[1]){if(9===x){if(!(l=e.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(y&&(l=y.getElementById(o))&&b(e,l)&&l.id===o)return r.push(l),r}else{if(d[2])return O.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!E[t+" "]&&(!v||!v.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===x&&(W.test(t)||z.test(t))){for((y=tt.test(t)&>(e.parentNode)||e)===e&&n.scope||((c=e.getAttribute("id"))?c=c.replace(rt,it):e.setAttribute("id",c=w)),a=(p=s(t)).length;a--;)p[a]=(c?"#"+c:":scope")+" "+bt(p[a]);g=p.join(",")}try{return O.apply(r,y.querySelectorAll(g)),r}catch(e){E(t,!0)}finally{c===w&&e.removeAttribute("id")}}}return u(t.replace(U,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function lt(t){return t[w]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ht(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(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 lt((function(e){return e=+e,lt((function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},o=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!K.test(e||n&&n.nodeName||"HTML")},h=at.setDocument=function(t){var e,i,s=t?t.ownerDocument||t:x;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),x!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=ct((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ct((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ct((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=ct((function(t){return p.appendChild(t).id=w,!f.getElementsByName||!f.getElementsByName(w).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(r.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}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.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,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(n.qsa=Q.test(f.querySelectorAll))&&(ct((function(t){var e;p.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+j+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ct((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",B)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=Q.test(p.compareDocumentPosition),b=e||Q.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},A=e?function(t,e){if(t===e)return d=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==f||t.ownerDocument==x&&b(x,t)?-1:e==f||e.ownerDocument==x&&b(x,e)?1:c?L(c,t)-L(c,e):0:4&r?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!i||!o)return t==f?-1:e==f?1:i?-1:o?1:c?L(c,t)-L(c,e):0;if(i===o)return ht(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?ht(s[r],a[r]):s[r]==x?-1:a[r]==x?1:0},f):f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(h(t),n.matchesSelector&&m&&!E[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var r=y.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){E(e,!0)}return at(e,f,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=f&&h(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=f&&h(t);var i=r.attrHandle[e.toLowerCase()],o=i&&P.call(r.attrHandle,e.toLowerCase())?i(t,e,!m):void 0;return void 0!==o?o:n.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(rt,it)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&t.slice(0),t.sort(A),d){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return c=null,t},i=at.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},r=at.selectors={cacheLength:50,createPseudo:lt,match:Y,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 Y.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=C[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&C(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=at.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,h,f,p,m=o!==s?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!u&&!a,b=!1;if(v){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?v.firstChild:v.lastChild],s&&y){for(b=(f=(l=(c=(d=(h=v)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&l[1])&&l[2],h=f&&v.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[N,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===N&&l[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++b||(y&&((c=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[N,b]),h!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return i[w]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?lt((function(t,n){for(var r,o=i(t,e),s=o.length;s--;)t[r=L(t,o[s])]=!(n[r]=o[s])})):function(t){return i(t,0,n)}):i}},pseudos:{not:lt((function(t){var e=[],n=[],r=a(t.replace(U,"$1"));return r[w]?lt((function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:lt((function(t){return function(e){return at(t,e).length>0}})),contains:lt((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:lt((function(t){return G.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===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.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!r.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 r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=pt(e);function yt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function wt(t,e,n){var r=e.dir,i=e.next,o=i||r,s=n&&"parentNode"===o,a=S++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,u){var l,c,d,h=[N,a];if(u){for(;e=e[r];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||s)if(c=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((l=c[o])&&l[0]===N&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function xt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function Nt(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(o=t[a])&&(n&&!n(o,r,i)||(s.push(o),l&&e.push(a)));return s}function St(t,e,n,r,i,o){return r&&!r[w]&&(r=St(r)),i&&!i[w]&&(i=St(i,o)),lt((function(o,s,a,u){var l,c,d,h=[],f=[],p=s.length,m=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)at(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!o&&e?m:Nt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=Nt(g,f),r(l,[],a,u),c=l.length;c--;)(d=l[c])&&(g[f[c]]=!(v[f[c]]=d));if(o){if(i||t){if(i){for(l=[],c=g.length;c--;)(d=g[c])&&l.push(v[c]=d);i(null,g=[],l,u)}for(c=g.length;c--;)(d=g[c])&&(l=i?L(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=Nt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):O.apply(s,g)}))}function Ct(t){for(var e,n,i,o=t.length,s=r.relative[t[0].type],a=s||r.relative[" "],u=s?1:0,c=wt((function(t){return t===e}),a,!0),d=wt((function(t){return L(e,t)>-1}),a,!0),h=[function(t,n,r){var i=!s&&(r||n!==l)||((e=n).nodeType?c(t,n,r):d(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])h=[wt(xt(h),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[w]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return St(u>1&&xt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&Ct(t.slice(u,i)),i<o&&Ct(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return xt(h)}return yt.prototype=r.filters=r.pseudos,r.setFilters=new yt,s=at.tokenize=function(t,e){var n,i,o,s,a,u,l,c=T[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=r.preFilter;a;){for(s in n&&!(i=q.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),n=!1,(i=z.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),a=a.slice(n.length)),r.filter)!(i=Y[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):T(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=k[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ct(e[n]))[w]?i.push(a):o.push(a);a=k(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,s,a,u,c){var d,p,v,g=0,y="0",b=o&&[],w=[],x=l,S=o||i&&r.find.TAG("*",c),C=N+=null==x?1:Math.random()||.1,T=S.length;for(c&&(l=s==f||s||c);y!==T&&null!=(d=S[y]);y++){if(i&&d){for(p=0,s||d.ownerDocument==f||(h(d),a=!m);v=t[p++];)if(v(d,s||f,a)){u.push(d);break}c&&(N=C)}n&&((d=!v&&d)&&g--,o&&b.push(d))}if(g+=y,n&&y!==g){for(p=0;v=e[p++];)v(b,w,s,a);if(o){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=D.call(u));w=Nt(w)}O.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(N=C,l=x),b};return n?lt(o):o}(o,i)),a.selector=t}return a},u=at.select=function(t,e,n,i){var o,u,l,c,d,h="function"==typeof t&&t,f=!i&&s(t=h.selector||t);if(n=n||[],1===f.length){if((u=f[0]=f[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===e.nodeType&&m&&r.relative[u[1].type]){if(!(e=(r.find.ID(l.matches[0].replace(et,nt),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=Y.needsContext.test(t)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(et,nt),tt.test(u[0].type)&>(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return O.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&>(e.parentNode)||e),n},n.sortStable=w.split("").sort(A).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ct((function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))})),ct((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ct((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ct((function(t){return null==t.getAttribute("disabled")}))||dt(j,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),at}(r);C.find=k,(C.expr=k.selectors)[":"]=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 E=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&C(t).is(n))break;r.push(t)}return r},A=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},P=C.expr.match.needsContext;function _(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(t,e,n){return g(e)?C.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return c.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?C.find.matchesSelector(r,t)?[r]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<r;e++)if(C.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)C.find(t,i[e],n);return r>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(I(this,t||[],!1))},not:function(t){return this.pushStack(I(this,t||[],!0))},is:function(t){return!!I(this,"string"==typeof t&&P.test(t)?C(t):t||[],!1).length}});var O,$=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||O,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:$.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),D.test(r[1])&&C.isPlainObject(e))for(r in e)g(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,O=C(b);var L=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function M(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,r=0,i=this.length,o=[],s="string"!=typeof t&&C(t);if(!P.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(C(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(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 E(t,"parentNode")},parentsUntil:function(t,e,n){return E(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,n){return E(t,"nextSibling",n)},prevUntil:function(t,e,n){return E(t,"previousSibling",n)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(_(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,r){var i=C.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=C.filter(r,i)),this.length>1&&(j[t]||C.uniqueSort(i),L.test(t)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function H(t){return t}function B(t){throw t}function F(t,e,n,r){var i;try{t&&g(i=t.promise)?i.call(t).done(e).fail(n):t&&g(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(R)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){C.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==N(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},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"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,r){var i=g(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&g(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var o=0;function s(t,e,n,i){return function(){var a=this,u=arguments,l=function(){var r,l;if(!(t<o)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(l)?i?l.call(r,s(o,e,H,i),s(o,e,B,i)):(o++,l.call(r,s(o,e,H,i),s(o,e,B,i),s(o,e,H,e.notifyWith))):(n!==H&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==B&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(C.Deferred.getStackHook&&(c.stackTrace=C.Deferred.getStackHook()),r.setTimeout(c))}}return C.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:H,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:H)),e[2][3].add(s(0,r,g(n)?n:B))})).promise()},promise:function(t){return null!=t?C.extend(t,i):i}},o={};return C.each(e,(function(t,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),o=C.Deferred(),s=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(F(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)F(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&U.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){r.setTimeout((function(){throw t}))};var q=C.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.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(b,[C]))}}),C.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(C.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var W=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===N(r))for(u in o=!0,r)t(e,n,u,r[u],!0,s,a);else if(void 0!==i&&(o=!0,g(i)||(a=!0),c&&(a?(n.call(e,i),n=null):(c=n,n=function(t,e,n){return c.call(C(t),n)})),n))for(;u<l;u++)n(e[u],r,a?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):s},V=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(V,"ms-").replace(G,Y)}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 r,i=this.cache(t);if("string"==typeof e)i[K(e)]=n;else for(r in e)i[K(r)]=e[r];return i},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,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(K):(e=K(e))in r?[e]:e.match(R)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||C.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!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 r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){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,r,i,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=K(r.slice(5)),nt(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){Z.set(this,t)})):W(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Z.get(o,t))||void 0!==(n=nt(o,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 r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=C.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=C._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){C.dequeue(t,e)}),o)),!r&&o&&o.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,r=1,i=C.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=Q.get(o[s],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],st=b.documentElement,at=function(t){return C.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var lt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===C.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return C.css(t,e,"")},u=a(),l=n&&n[3]||(C.cssNumber[e]?"":"px"),c=t.nodeType&&(C.cssNumber[e]||"px"!==l&&+u)&&it.exec(C.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)C.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;C.style(t,e,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var dt={};function ht(t){var e,n=t.ownerDocument,r=t.nodeName,i=dt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=C.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),dt[r]=i,i)}function ft(t,e){for(var n,r,i=[],o=0,s=t.length;o<s;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&<(r)&&(i[o]=ht(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(t[o].style.display=i[o]);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(){lt(this)?C(this).show():C(this).hide()}))}});var pt,mt,vt=/^(?:checkbox|radio)$/i,gt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,yt=/^$|^module$|\/(?:java|ecma)script/i;pt=b.createDocumentFragment().appendChild(b.createElement("div")),(mt=b.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),pt.appendChild(mt),v.checkClone=pt.cloneNode(!0).cloneNode(!0).lastChild.checked,pt.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pt.cloneNode(!0).lastChild.defaultValue,pt.innerHTML="<option></option>",v.option=!!pt.lastChild;var bt={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 wt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&_(t,e)?C.merge([t],n):n}function xt(t,e){for(var n=0,r=t.length;n<r;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var Nt=/<|&#?\w+;/;function St(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===N(o))C.merge(h,o.nodeType?[o]:o);else if(Nt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(gt.exec(o)||["",""])[1].toLowerCase(),u=bt[a]||bt._default,s.innerHTML=u[1]+C.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;C.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&C.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&xt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var Ct=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function kt(){return!1}function Et(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function At(t,e,n,r,i,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)At(t,a,n,r,e[a],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=kt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return C().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,i,r,n)}))}function Pt(t,e,n){n?(Q.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&C.event.add(t,e,Tt)}C.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(st,i),n.guid||(n.guid=C.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;l--;)f=m=(a=Ct.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=C.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=C.event.special[f]||{},c=C.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,s)||t.addEventListener&&t.addEventListener(f,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),C.event.global[f]=!0)},remove:function(t,e,n,r,i){var o,s,a,u,l,c,d,h,f,p,m,v=Q.hasData(t)&&Q.get(t);if(v&&(u=v.events)){for(l=(e=(e||"").match(R)||[""]).length;l--;)if(f=m=(a=Ct.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=C.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,v.handle)||C.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)C.event.remove(t,f+e[l],n,r,!0);C.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=C.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=C.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=C.event.handlers.call(this,u,l),e=0;(i=s[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((C.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=e[n]).selector+" "]&&(s[i]=r.needsContext?C(i,this).index(l)>-1:C.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&_(e,"input")&&Pt(e,"click",Tt),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&_(e,"input")&&Pt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&_(e,"input")&&Q.get(e,"click")||_(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?Tt:kt,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}).prototype={constructor:C.Event,isDefaultPrevented:kt,isPropagationStopped:kt,isImmediatePropagationStopped:kt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,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:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return Pt(this,t,Et),!1},trigger:function(){return Pt(this,t),!0},_default:function(){return!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,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||C.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,r){return At(this,t,e,n,r)},one:function(t,e,n,r){return At(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,C(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=kt),this.each((function(){C.event.remove(this,t,n,e)}))}});var _t=/<script|<style|<link/i,Dt=/checked\s*(?:[^=]|=\s*.checked.)/i,It=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ot(t,e){return _(t,"table")&&_(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function $t(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Lt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,s,a;if(1===e.nodeType){if(Q.hasData(t)&&(a=Q.get(t).events))for(i in Q.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)C.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=C.extend({},o),Z.set(e,s))}}function Mt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&vt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Rt(t,e,n,r){e=u(e);var i,o,s,a,l,c,d=0,h=t.length,f=h-1,p=e[0],m=g(p);if(m||h>1&&"string"==typeof p&&!v.checkClone&&Dt.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),Rt(o,e,n,r)}));if(h&&(o=(i=St(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=C.map(wt(i,"script"),$t)).length;d<h;d++)l=i,d!==f&&(l=C.clone(l,!0,!0),a&&C.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,C.map(s,Lt),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&C.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?C._evalUrl&&!l.noModule&&C._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):x(l.textContent.replace(It,""),l,c))}return t}function Ht(t,e,n){for(var r,i=e?C.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||C.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&xt(wt(r,"script")),r.parentNode.removeChild(r));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=at(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=wt(a),r=0,i=(o=wt(t)).length;r<i;r++)Mt(o[r],s[r]);if(e)if(n)for(o=o||wt(t),s=s||wt(a),r=0,i=o.length;r<i;r++)jt(o[r],s[r]);else jt(t,a);return(s=wt(a,"script")).length>0&&xt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=C.event.special,o=0;void 0!==(n=t[o]);o++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(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 Rt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)}))},prepend:function(){return Rt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Rt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Rt(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(wt(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,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!_t.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(wt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Rt(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(wt(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,r=[],i=C(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),C(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Bt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ft=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Ut=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},qt=new RegExp(ot.join("|"),"i");function zt(t,e,n){var r,i,o,s,a=t.style;return(n=n||Ft(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||at(t)||(s=C.style(t,e)),!v.pixelBoxStyles()&&Bt.test(s)&&qt.test(e)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function Wt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(l).appendChild(c);var t=r.getComputedStyle(c);n="1%"!==t.top,u=12===e(t.marginLeft),c.style.right="60%",s=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),st.removeChild(l),c=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,s,a,u,l=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=b.createElement("table"),e=b.createElement("tr"),n=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",st.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,st.removeChild(t)),a}}))}();var Vt=["Webkit","Moz","ms"],Gt=b.createElement("div").style,Yt={};function Kt(t){return C.cssProps[t]||Yt[t]||(t in Gt?t:Yt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Vt.length;n--;)if((t=Vt[n]+e)in Gt)return t}(t)||t)}var Xt=/^(none|table(?!-c[ea]).+)/,Jt=/^--/,Qt={position:"absolute",visibility:"hidden",display:"block"},Zt={letterSpacing:"0",fontWeight:"400"};function te(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ee(t,e,n,r,i,o){var s="width"===e?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=C.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=C.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=C.css(t,"border"+ot[s]+"Width",!0,i))):(u+=C.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=C.css(t,"border"+ot[s]+"Width",!0,i):a+=C.css(t,"border"+ot[s]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-a-.5))||0),u}function ne(t,e,n){var r=Ft(t),i=(!v.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,r),o=i,s=zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Bt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&_(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===C.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ee(t,e,n||(i?"border":"content"),o,r,s)+"px"}function re(t,e,n,r,i){return new re.prototype.init(t,e,n,r,i)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=zt(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,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,s,a=K(e),u=Jt.test(e),l=t.style;if(u||(e=Kt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,r))?i:l[e];"string"==(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=ct(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(C.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,r){var i,o,s,a=K(e);return Jt.test(e)||(e=Kt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=zt(t,e,r)),"normal"===i&&e in Zt&&(i=Zt[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,r){if(n)return!Xt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,r):Ut(t,Qt,(function(){return ne(t,e,r)}))},set:function(t,n,r){var i,o=Ft(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===C.css(t,"boxSizing",!1,o),u=r?ee(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ee(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),te(0,n,u)}}})),C.cssHooks.marginLeft=Wt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(zt(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(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 r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(C.cssHooks[t+e].set=te)})),C.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ft(t),i=e.length;s<i;s++)o[e[s]]=C.css(t,e[s],!1,r);return o}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=re,re.prototype={constructor:re,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.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):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.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[Kt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.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=re.prototype.init).step={};var ie,oe,se=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;function ue(){oe&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ue):r.setTimeout(ue,C.fx.interval),C.fx.tick())}function le(){return r.setTimeout((function(){ie=void 0})),ie=Date.now()}function ce(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function de(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function he(t,e,n){var r,i,o=0,s=he.prefilters.length,a=C.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=ie||le(),n=Math.max(0,l.startTime+l.duration-e),r=1-(n/l.duration||0),o=0,s=l.tweens.length;o<s;o++)l.tweens[o].run(r);return a.notifyWith(t,[l,r,n]),r<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||le(),duration:n.duration,tweens:[],createTween:function(e,n){var r=C.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(function(t,e){var n,r,i,o,s;for(n in t)if(i=e[r=K(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(s=C.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,l.opts.specialEasing);o<s;o++)if(r=he.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(C._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return C.map(c,de,l),g(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),C.fx.timer(C.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}C.Animation=C.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ct(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(R);for(var n,r=0,i=t.length;r<i;r++)n=t[r],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,s,a,u,l,c,d="width"in e||"height"in e,h=this,f={},p=t.style,m=t.nodeType&<(t),v=Q.get(t,"fxshow");for(r 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++,h.always((function(){h.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],se.test(i)){if(delete e[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;m=!0}f[r]=v&&v[r]||C.style(t,r)}if((u=!C.isEmptyObject(e))||!C.isEmptyObject(f))for(r in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=v&&v.display)&&(l=Q.get(t,"display")),"none"===(c=C.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=C.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===C.css(t,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(v?"hidden"in v&&(m=v.hidden):v=Q.access(t,"fxshow",{display:l}),o&&(v.hidden=!m),m&&ft([t],!0),h.done((function(){for(r in m||ft([t]),Q.remove(t,"fxshow"),f)C.style(t,r,f[r])}))),u=de(m?v[r]:0,r,h),r in v||(v[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),C.speed=function(t,e,n){var r=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return C.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in C.fx.speeds?r.duration=C.fx.speeds[r.duration]:r.duration=C.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&C.dequeue(this,r.queue)},r},C.fn.extend({fadeTo:function(t,e,n,r){return this.filter(lt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=C.isEmptyObject(t),o=C.speed(e,n,r),s=function(){var e=he(this,C.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=C.timers,s=Q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&ae.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=C.timers,s=r?r.length:0;for(n.finish=!0,C.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ce(e,!0),t,r,i)}})),C.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(ie=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),ie=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){oe||(oe=!0,ue())},C.fx.stop=function(){oe=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,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var fe,pe=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 r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(i=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?fe:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=C.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&_(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(R);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),fe={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=pe[e]||C.find.attr;pe[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=pe[s],pe[s]=i,i=null!=n(t,e,r)?s:null,pe[s]=o),i}}));var me=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;function ge(t){return(t.match(R)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(R)||[]}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 r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,i=C.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.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,r,i,o,s,a,u=0;if(g(t))return this.each((function(e){C(this).addClass(t.call(this,e,ye(this)))}));if((e=be(t)).length)for(;n=this[u++];)if(i=ye(n),r=1===n.nodeType&&" "+ge(i)+" "){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=ge(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,s,a,u=0;if(g(t))return this.each((function(e){C(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;n=this[u++];)if(i=ye(n),r=1===n.nodeType&&" "+ge(i)+" "){for(s=0;o=e[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=ge(r))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):g(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,i,o,s;if(r)for(i=0,o=C(this),s=be(t);e=s[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ge(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var we=/\r/g;C.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=g(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,C(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=C.map(i,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(we,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ge(C.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!_(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=C.makeArray(e),s=i.length;s--;)((r=i[s]).selected=C.inArray(C.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),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}},v.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ne=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,n,i){var o,s,a,u,l,c,d,h,p=[n||b],m=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!xe.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:C.makeArray(e,[t]),d=C.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||m,xe.test(u+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||b)&&p.push(a.defaultView||a.parentWindow||r)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)h=s,t.type=o>1?u:d.bindType||m,(c=(Q.get(s,"events")||Object.create(null))[t.type]&&Q.get(s,"handle"))&&c.apply(s,e),(c=l&&s[l])&&c.apply&&X(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!X(n)||l&&g(n[m])&&!y(n)&&((a=n[l])&&(n[l]=null),C.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ne),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ne),C.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(r,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)}}),v.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 r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}}));var Se=r.location,Ce={guid:Date.now()},Te=/\?/;C.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Ee=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))C.each(e,(function(e,i){n||ke.test(t)?r(t,i):_e(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==N(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}C.param=function(t,e){var n,r=[],i=function(t,e){var n=g(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.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")&&Pe.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!vt.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(Ee,"\r\n")}})):{name:e.name,value:n.replace(Ee,"\r\n")}})).get()}});var De=/%20/g,Ie=/#.*$/,Oe=/([?&])_=[^&]*/,$e=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,je=/^\/\//,Me={},Re={},He="*/".concat("*"),Be=b.createElement("a");function Fe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(R)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ue(t,e,n,r){var i={},o=t===Re;function s(a){var u;return i[a]=!0,C.each(t[a]||[],(function(t,a){var l=a(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),s(l),!1)})),u}return s(e.dataTypes[0])||!i["*"]&&s("*")}function qe(t,e){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&C.extend(!0,t,r),t}Be.href=Se.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,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?qe(qe(t,C.ajaxSettings),e):qe(C.ajaxSettings,t)},ajaxPrefilter:Fe(Me),ajaxTransport:Fe(Re),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=C.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?C(p):C.event,v=C.Deferred(),g=C.Callbacks("once memory"),y=f.statusCode||{},w={},x={},N="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=$e.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=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)S.always(t[S.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||N;return n&&n.abort(e),T(0,e),this}};if(v.promise(S),f.url=((t||f.url||Se.href)+"").replace(je,Se.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(R)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Be.protocol+"//"+Be.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)),Ue(Me,f,e,S),l)return S;for(d in(c=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Ie,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(De,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Te.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Oe,"$1"),h=(Te.test(i)?"&":"?")+"_="+Ce.guid+++h),f.url=i+h),f.ifModified&&(C.lastModified[i]&&S.setRequestHeader("If-Modified-Since",C.lastModified[i]),C.etag[i]&&S.setRequestHeader("If-None-Match",C.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&S.setRequestHeader("Content-Type",f.contentType),S.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+He+"; q=0.01":""):f.accepts["*"]),f.headers)S.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,S,f)||l))return S.abort();if(N="abort",g.add(f.complete),S.done(f.success),S.fail(f.error),n=Ue(Re,f,e,S)){if(S.readyState=1,c&&m.trigger("ajaxSend",[S,f]),l)return S;f.async&&f.timeout>0&&(a=r.setTimeout((function(){S.abort("timeout")}),f.timeout));try{l=!1,n.send(w,T)}catch(t){if(l)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,u){var d,h,b,w,x,N=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",S.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,S,s)),!d&&C.inArray("script",f.dataTypes)>-1&&C.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,S,d),d?(f.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(C.lastModified[i]=x),(x=S.getResponseHeader("etag"))&&(C.etag[i]=x)),204===t||"HEAD"===f.type?N="nocontent":304===t?N="notmodified":(N=w.state,h=w.data,d=!(b=w.error))):(b=N,!t&&N||(N="error",t<0&&(t=0))),S.status=t,S.statusText=(e||N)+"",d?v.resolveWith(p,[h,N,S]):v.rejectWith(p,[S,N,b]),S.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[S,f,d?h:b]),g.fireWith(p,[S,N]),c&&(m.trigger("ajaxComplete",[S,f]),--C.active||C.event.trigger("ajaxStop")))}return S},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,r,i){return g(n)&&(i=i||r,r=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:i,data:n,success:r},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){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,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(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 g(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=g(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 r.XMLHttpRequest}catch(t){}};var ze={0:200,1223:204},We=C.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,C.ajaxTransport((function(t){var e,n;if(v.cors||We&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),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(r,i){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ve,Ge=[],Ye=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ge.pop()||C.expando+"_"+Ce.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ye.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ye.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ye,"$1"+i):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||C.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){s=arguments},n.always((function(){void 0===o?C(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ge.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ve=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ve.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=D.exec(t))?[e.createElement(i[1])]:(i=St([t],e,o),o&&o.length&&C(o).remove(),C.merge([],i.childNodes)));var r,i,o},C.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ge(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&C.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?C("<div>").append(C.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},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 r,i,o,s,a,u,l=C.css(t,"position"),c=C(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=C.css(t,"top"),u=C.css(t,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),g(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+i),"using"in e?e.using.call(t,d):c.css(d)}},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,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===C.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),i.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-C.css(r,"marginTop",!0),left:e.left-i.left-C.css(r,"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(r){return W(this,(function(t,r,i){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=Wt(v.pixelPosition,(function(t,n){if(n)return n=zt(t,e),Bt.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,r){C.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return W(this,(function(e,n,i){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?C.css(e,n,a):C.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(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,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),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)}}));var Ke=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||C.guid++,i},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=_,C.isFunction=g,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))},C.trim=function(t){return null==t?"":(t+"").replace(Ke,"")},void 0===(n=function(){return C}.apply(e,[]))||(t.exports=n);var Xe=r.jQuery,Je=r.$;return C.noConflict=function(t){return r.$===C&&(r.$=Je),t&&r.jQuery===C&&(r.jQuery=Xe),C},void 0===i&&(r.jQuery=r.$=C),C}))},92:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t,e,n){var i=[],o=!1,s=!1;function a(){if(o)throw new Error("Nested m.redraw.sync() call");o=!0;for(var e=0;e<i.length;e+=2)try{t(i[e],r(i[e+1]),u)}catch(t){n.error(t)}o=!1}function u(){s||(s=!0,e((function(){s=!1,a()})))}return u.sync=a,{mount:function(e,n){if(null!=n&&null==n.view&&"function"!=typeof n)throw new TypeError("m.mount(element, component) expects a component, not a vnode");var o=i.indexOf(e);o>=0&&(i.splice(o,2),t(e,[],u)),null!=n&&(i.push(e,n),t(e,r(n),u))},redraw:u}}},4:(t,e,n)=>{"use strict";var r=n(640),i=n(922),o=n(363),s=n(822),a=n(56),u=n(757),l=n(202),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,x=0,N=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),S="function"==typeof setImmediate?setImmediate:setTimeout,C=o.resolve(),T=!1;if(n=null,null!=s){var k=a(s);if(!N.some((function(t){return t.check(k)})))throw new ReferenceError("Default route doesn't match any known routes")}function E(){T=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<N.length;n++)if(N[n].check(i)){var s=N[n].component,a=N[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===x?e.redraw():(x=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?C.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){T||(T=!0,S(E))},"function"==typeof t.history.pushState?(w=function(){t.removeEventListener("popstate",n,!1)},t.addEventListener("popstate",n,!1)):"#"===y.prefix[0]&&(n=null,w=function(){t.removeEventListener("hashchange",E,!1)},t.addEventListener("hashchange",E,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(x=x?2:1)||c===v)},oncreate:E,onremove:w,view:function(){if(x&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},479:(t,e,n)=>{"use strict";var r=n(922);r.trust=n(396),r.fragment=n(209),t.exports=r},872:(t,e,n)=>{"use strict";var r=n(479),i=n(105),o=n(49),s=function(){return r.apply(this,arguments)};s.m=r,s.trust=r.trust,s.fragment=r.fragment,s.mount=o.mount,s.route=n(438),s.render=n(534),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(402),s.buildQueryString=n(266),s.parsePathname=n(56),s.buildPathname=n(822),s.vnode=n(640),s.PromisePolyfill=n(529),t.exports=s},49:(t,e,n)=>{"use strict";var r=n(534);t.exports=n(92)(r,requestAnimationFrame,console)},202:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},822:(t,e,n)=>{"use strict";var r=n(266),i=n(202);t.exports=function(t,e){if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Template parameter names *must* be separated");if(null==e)return t;var n=t.indexOf("?"),o=t.indexOf("#"),s=o<0?t.length:o,a=n<0?s:n,u=t.slice(0,a),l={};i(l,e);var c=u.replace(/:([^\/\.-]+)(\.{3})?/g,(function(t,n,r){return delete l[n],null==e[n]?t:r?e[n]:encodeURIComponent(String(e[n]))})),d=c.indexOf("?"),h=c.indexOf("#"),f=h<0?c.length:h,p=d<0?f:d,m=c.slice(0,p);n>=0&&(m+=t.slice(n,s)),d>=0&&(m+=(n<0?"?":"&")+c.slice(d,f));var v=r(l);return v&&(m+=(n<0&&d<0?"?":"&")+v),o>=0&&(m+=t.slice(o)),h>=0&&(m+=(o<0?"":"&")+c.slice(h)),m}},757:(t,e,n)=>{"use strict";var r=n(56);t.exports=function(t){var e=r(t),n=Object.keys(e.params),i=[],o=new RegExp("^"+e.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,(function(t,e,n){return null==e?"\\"+t:(i.push({k:e,r:"..."===n}),"..."===n?"(.*)":"."===n?"([^/]+)\\.":"([^/]+)"+(n||""))}))+"$");return function(t){for(var r=0;r<n.length;r++)if(e.params[n[r]]!==t.params[n[r]])return!1;if(!i.length)return o.test(t.path);var s=o.exec(t.path);if(null==s)return!1;for(r=0;r<i.length;r++)t.params[i[r].k]=i[r].r?s[r+1]:decodeURIComponent(s[r+1]);return!0}}},56:(t,e,n)=>{"use strict";var r=n(402);t.exports=function(t){var e=t.indexOf("?"),n=t.indexOf("#"),i=n<0?t.length:n,o=e<0?i:e,s=t.slice(0,o).replace(/\/{2,}/g,"/");return s?("/"!==s[0]&&(s="/"+s),s.length>1&&"/"===s[s.length-1]&&(s=s.slice(0,-1))):s="/",{path:s,params:e<0?{}:r(t.slice(e+1,i))}}},529:t=>{"use strict";var e=function t(e){if(!(this instanceof t))throw new Error("Promise must be called with `new`");if("function"!=typeof e)throw new TypeError("executor must be a function");var n=this,r=[],i=[],o=l(r,!0),s=l(i,!1),a=n._instance={resolvers:r,rejectors:i},u="function"==typeof setImmediate?setImmediate:setTimeout;function l(t,e){return function o(l){var d;try{if(!e||null==l||"object"!=typeof l&&"function"!=typeof l||"function"!=typeof(d=l.then))u((function(){e||0!==t.length||console.error("Possible unhandled promise rejection:",l);for(var n=0;n<t.length;n++)t[n](l);r.length=0,i.length=0,a.state=e,a.retry=function(){o(l)}}));else{if(l===n)throw new TypeError("Promise can't be resolved w/ itself");c(d.bind(l))}}catch(t){s(t)}}}function c(t){var e=0;function n(t){return function(n){e++>0||t(n)}}var r=n(s);try{t(n(o),r)}catch(t){r(t)}}c(e)};e.prototype.then=function(t,n){var r,i,o=this._instance;function s(t,e,n,s){e.push((function(e){if("function"!=typeof t)n(e);else try{r(t(e))}catch(t){i&&i(t)}})),"function"==typeof o.retry&&s===o.state&&o.retry()}var a=new e((function(t,e){r=t,i=e}));return s(t,o.resolvers,r,!0),s(n,o.rejectors,i,!1),a},e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(t){return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},e.resolve=function(t){return t instanceof e?t:new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){return new e((function(e,n){var r=t.length,i=0,o=[];if(0===t.length)e([]);else for(var s=0;s<t.length;s++)!function(s){function a(t){i++,o[s]=t,i===r&&e(o)}null==t[s]||"object"!=typeof t[s]&&"function"!=typeof t[s]||"function"!=typeof t[s].then?a(t[s]):t[s].then(a,n)}(s)}))},e.race=function(t){return new e((function(e,n){for(var r=0;r<t.length;r++)t[r].then(e,n)}))},t.exports=e},363:(t,e,n)=>{"use strict";var r=n(529);"undefined"!=typeof window?(void 0===window.Promise?window.Promise=r:window.Promise.prototype.finally||(window.Promise.prototype.finally=r.prototype.finally),t.exports=window.Promise):void 0!==n.g?(void 0===n.g.Promise?n.g.Promise=r:n.g.Promise.prototype.finally||(n.g.Promise.prototype.finally=r.prototype.finally),t.exports=n.g.Promise):t.exports=r},266:t=>{"use strict";t.exports=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return"";var e=[];for(var n in t)r(n,t[n]);return e.join("&");function r(t,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)r(t+"["+i+"]",n[i]);else if("[object Object]"===Object.prototype.toString.call(n))for(var i in n)r(t+"["+i+"]",n[i]);else e.push(encodeURIComponent(t)+(null!=n&&""!==n?"="+encodeURIComponent(n):""))}}},402:t=>{"use strict";t.exports=function(t){if(""===t||null==t)return{};"?"===t.charAt(0)&&(t=t.slice(1));for(var e=t.split("&"),n={},r={},i=0;i<e.length;i++){var o=e[i].split("="),s=decodeURIComponent(o[0]),a=2===o.length?decodeURIComponent(o[1]):"";"true"===a?a=!0:"false"===a&&(a=!1);var u=s.split(/\]\[?|\[/),l=r;s.indexOf("[")>-1&&u.pop();for(var c=0;c<u.length;c++){var d=u[c],h=u[c+1],f=""==h||!isNaN(parseInt(h,10));if(""===d)null==n[s=u.slice(0,c).join()]&&(n[s]=Array.isArray(l)?l.length:0),d=n[s]++;else if("__proto__"===d)break;if(c===u.length-1)l[d]=a;else{var p=Object.getOwnPropertyDescriptor(l,d);null!=p&&(p=p.value),null==p&&(l[d]=p=f?[]:{}),l=p}}}return r}},534:(t,e,n)=>{"use strict";t.exports=n(324)(window)},209:(t,e,n)=>{"use strict";var r=n(640),i=n(69);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},922:(t,e,n)=>{"use strict";var r=n(640),i=n(69),o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,s={},a={}.hasOwnProperty;function u(t){for(var e in t)if(a.call(t,e))return!1;return!0}function l(t){for(var e,n="div",r=[],i={};e=o.exec(t);){var a=e[1],u=e[2];if(""===a&&""!==u)n=u;else if("#"===a)i.id=u;else if("."===a)r.push(u);else if("["===e[3][0]){var l=e[6];l&&(l=l.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")),"class"===e[4]?r.push(l):i[e[4]]=""===l?l:l||!0}}return r.length>0&&(i.className=r.join(" ")),s[t]={tag:n,attrs:i}}function c(t,e){var n=e.attrs,i=r.normalizeChildren(e.children),o=a.call(n,"class"),s=o?n.class:n.className;if(e.tag=t.tag,e.attrs=null,e.children=void 0,!u(t.attrs)&&!u(n)){var l={};for(var c in n)a.call(n,c)&&(l[c]=n[c]);n=l}for(var c in t.attrs)a.call(t.attrs,c)&&"className"!==c&&!a.call(n,c)&&(n[c]=t.attrs[c]);for(var c in null==s&&null==t.attrs.className||(n.className=null!=s?null!=t.attrs.className?String(t.attrs.className)+" "+String(s):s:null!=t.attrs.className?t.attrs.className:null),o&&(n.class=null),n)if(a.call(n,c)&&"key"!==c){e.attrs=n;break}return Array.isArray(i)&&1===i.length&&null!=i[0]&&"#"===i[0].tag?e.text=i[0].children:e.children=i,e}t.exports=function(t){if(null==t||"string"!=typeof t&&"function"!=typeof t&&"function"!=typeof t.view)throw Error("The selector must be either a string or a component.");var e=i.apply(1,arguments);return"string"==typeof t&&(e.children=r.normalizeChildren(e.children),"["!==t)?c(s[t]||l(t),e):(e.tag=t,e)}},69:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(){var t,e=arguments[this],n=this+1;if(null==e?e={}:("object"!=typeof e||null!=e.tag||Array.isArray(e))&&(e={},n=this),arguments.length===n+1)t=arguments[n],Array.isArray(t)||(t=[t]);else for(t=[];n<arguments.length;)t.push(arguments[n++]);return r("",e.key,e,t)}},324:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t){var e,n=t&&t.document,i={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"};function o(t){return t.attrs&&t.attrs.xmlns||i[t.tag]}function s(t,e){if(t.state!==e)throw new Error("`vnode.state` must not be modified")}function a(t){var e=t.state;try{return this.apply(e,arguments)}finally{s(t,e)}}function u(){try{return n.activeElement}catch(t){return null}}function l(t,e,n,r,i,o,s){for(var a=n;a<r;a++){var u=e[a];null!=u&&c(t,u,i,s,o)}}function c(t,e,i,s,u){var d=e.tag;if("string"==typeof d)switch(e.state={},null!=e.attrs&&M(e.attrs,e,i),d){case"#":!function(t,e,r){e.dom=n.createTextNode(e.children),w(t,e.dom,r)}(t,e,u);break;case"<":h(t,e,s,u);break;case"[":!function(t,e,r,i,o){var s=n.createDocumentFragment();if(null!=e.children){var a=e.children;l(s,a,0,a.length,r,null,i)}e.dom=s.firstChild,e.domSize=s.childNodes.length,w(t,s,o)}(t,e,i,s,u);break;default:!function(t,e,i,s,a){var u=e.tag,c=e.attrs,d=c&&c.is,h=(s=o(e)||s)?d?n.createElementNS(s,u,{is:d}):n.createElementNS(s,u):d?n.createElement(u,{is:d}):n.createElement(u);if(e.dom=h,null!=c&&function(t,e,n){for(var r in e)E(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!x(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&E(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)N(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)N(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,x,C=e.length-1,T=n.length-1;C>=d&&T>=u&&(b=e[C],w=n[T],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),C--,T--;for(;C>=d&&T>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;C>=d&&T>=u&&u!==T&&h.key===w.key&&b.key===f.key;)y(t,b,x=g(e,d,i)),b!==f&&p(t,b,f,r,x,o),++u<=--T&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--C],w=n[T],h=e[d],f=n[u];for(;C>=d&&T>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),T--,b=e[--C],w=n[T];if(u>T)N(t,e,d,C+1);else if(d>C)l(t,n,u,T+1,r,i,o);else{var k,E,A=i,P=T-u+1,_=new Array(P),D=0,I=0,O=2147483647,$=0;for(I=0;I<P;I++)_[I]=-1;for(I=T;I>=u;I--){null==k&&(k=m(e,d,C+1));var L=k[(w=n[I]).key];null!=L&&(O=L<O?L:-1,_[I-u]=L,b=e[L],e[L]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),$++)}if(i=A,$!==C-d+1&&N(t,e,d,C+1),0===$)l(t,n,u,T+1,r,i,o);else if(-1===O)for(E=function(t){var e=[0],n=0,r=0,i=0,o=v.length=t.length;for(i=0;i<o;i++)v[i]=t[i];for(i=0;i<o;++i)if(-1!==t[i]){var s=e[e.length-1];if(t[s]<t[i])v[i]=s,e.push(i);else{for(n=0,r=e.length-1;n<r;){var a=(n>>>1)+(r>>>1)+(n&r&1);t[e[a]]<t[i]?n=a+1:r=a}t[i]<t[e[n]]&&(n>0&&(v[i]=e[n-1]),e[n]=i)}}for(r=e[(n=e.length)-1];n-- >0;)e[n]=r,r=v[r];return v.length=0,e}(_),D=E.length-1,I=T;I>=u;I--)f=n[I],-1===_[I-u]?c(t,f,r,o,i):E[D]===I-u?D--:y(t,f,i),null!=f.dom&&(i=n[I].dom);else for(I=T;I>=u;I--)f=n[I],-1===_[I-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[I].dom)}}else{var j=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<j;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?S(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>j&&N(t,e,u,e.length),n.length>j&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&R(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(C(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)E(t,i,e&&e[i],n[i],r);var o;if(null!=e)for(var i in e)null==(o=e[i])||null!=n&&null!=n[i]||A(t,i,o,r)}(e,t.attrs,e.attrs,i),x(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");R(n.state,n,i),null!=n.attrs&&R(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(S(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else S(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function x(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function N(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&S(t,o)}}function S(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else k(e),T(t,e);function c(){s(e,u),k(e),T(t,e)}}function C(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function T(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)C(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&T(t,r)}}break}}function k(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&k(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&k(r)}}}function E(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!P(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return j(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)$(t.dom,r,i);else if(_(t,e,o)){if("value"===e){if(("input"===t.tag||"textarea"===t.tag)&&t.dom.value===""+i&&t.dom===u())return;if("select"===t.tag&&null!==r&&t.dom.value===""+i)return;if("option"===t.tag&&null!==r&&t.dom.value===""+i)return}"input"===t.tag&&"type"===e?t.dom.setAttribute(e,i):t.dom[e]=i}else"boolean"==typeof i?i?t.dom.setAttribute(e,""):t.dom.removeAttribute(e):t.dom.setAttribute("className"===e?"class":e,i)}}function A(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!P(e))if("o"!==e[0]||"n"!==e[1]||P(e))if("style"===e)$(t.dom,n,null);else if(!_(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else j(t,e,void 0)}function P(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function _(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var D=/[A-Z]/g;function I(t){return"-"+t.toLowerCase()}function O(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(D,I)}function $(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(O(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(O(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(O(r))}}function L(){this._=e}function j(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new L,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function R(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return L.prototype=Object.create(null),L.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},396:(t,e,n)=>{"use strict";var r=n(640);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},640:t=>{"use strict";function e(t,e,n,r,i,o){return{tag:t,key:e,attrs:n,children:r,text:i,dom:o,domSize:void 0,state:void 0,events:void 0,instance:void 0}}e.normalize=function(t){return Array.isArray(t)?e("[",void 0,void 0,e.normalizeChildren(t),void 0,void 0):null==t||"boolean"==typeof t?null:"object"==typeof t?t:e("#",void 0,void 0,String(t),void 0,void 0)},e.normalizeChildren=function(t){var n=[];if(t.length){for(var r=null!=t[0]&&null!=t[0].key,i=1;i<t.length;i++)if((null!=t[i]&&null!=t[i].key)!==r)throw new TypeError("Vnodes must either always have keys or never have keys!");for(i=0;i<t.length;i++)n[i]=e.normalize(t[i])}return n},t.exports=e},105:(t,e,n)=>{"use strict";var r=n(363),i=n(49);t.exports=n(858)(window,r,i.redraw)},858:(t,e,n)=>{"use strict";var r=n(822);t.exports=function(t,e,n){var i=0;function o(t){return new e(t)}function s(t){return function(i,s){"string"!=typeof i?(s=i,i=i.url):null==s&&(s={});var a=new e((function(e,n){t(r(i,s.params),s,(function(t){if("function"==typeof s.type)if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n]=new s.type(t[n]);else t=new s.type(t);e(t)}),n)}));if(!0===s.background)return a;var u=0;function l(){0==--u&&"function"==typeof n&&n()}return function t(e){var n=e.then;return e.constructor=o,e.then=function(){u++;var r=n.apply(e,arguments);return r.then(l,(function(t){if(l(),0===u)throw t})),t(r)},e}(a)}}function a(t,e){for(var n in t.headers)if({}.hasOwnProperty.call(t.headers,n)&&e.test(n))return!0;return!1}return o.prototype=e.prototype,o.__proto__=e,{request:s((function(e,n,r,i){var o,s=null!=n.method?n.method.toUpperCase():"GET",u=n.body,l=!(null!=n.serialize&&n.serialize!==JSON.serialize||u instanceof t.FormData),c=n.responseType||("function"==typeof n.extract?"":"json"),d=new t.XMLHttpRequest,h=!1,f=d,p=d.abort;for(var m in d.abort=function(){h=!0,p.call(this)},d.open(s,e,!1!==n.async,"string"==typeof n.user?n.user:void 0,"string"==typeof n.password?n.password:void 0),l&&null!=u&&!a(n,/^content-type$/i)&&d.setRequestHeader("Content-Type","application/json; charset=utf-8"),"function"==typeof n.deserialize||a(n,/^accept$/i)||d.setRequestHeader("Accept","application/json, text/*"),n.withCredentials&&(d.withCredentials=n.withCredentials),n.timeout&&(d.timeout=n.timeout),d.responseType=c,n.headers)({}).hasOwnProperty.call(n.headers,m)&&d.setRequestHeader(m,n.headers[m]);d.onreadystatechange=function(t){if(!h&&4===t.target.readyState)try{var o,s=t.target.status>=200&&t.target.status<300||304===t.target.status||/^file:\/\//i.test(e),a=t.target.response;if("json"===c?t.target.responseType||"function"==typeof n.extract||(a=JSON.parse(t.target.responseText)):c&&"text"!==c||null==a&&(a=t.target.responseText),"function"==typeof n.extract?(a=n.extract(t.target,n),s=!0):"function"==typeof n.deserialize&&(a=n.deserialize(a)),s)r(a);else{try{o=t.target.responseText}catch(t){o=a}var u=new Error(o);u.code=t.target.status,u.response=a,i(u)}}catch(t){i(t)}},"function"==typeof n.config&&(d=n.config(d,n,e)||d)!==f&&(o=d.abort,d.abort=function(){h=!0,o.call(this)}),null==u?d.send():"function"==typeof n.serialize?d.send(n.serialize(u)):u instanceof t.FormData?d.send(u):d.send(JSON.stringify(u))})),jsonp:s((function(e,n,r,o){var s=n.callbackName||"_mithril_"+Math.round(1e16*Math.random())+"_"+i++,a=t.document.createElement("script");t[s]=function(e){delete t[s],a.parentNode.removeChild(a),r(e)},a.onerror=function(){delete t[s],a.parentNode.removeChild(a),o(new Error("JSONP request failed"))},a.src=e+(e.indexOf("?")<0?"?":"&")+encodeURIComponent(n.callbackKey||"callback")+"="+encodeURIComponent(s),t.document.documentElement.appendChild(a)}))}}},438:(t,e,n)=>{"use strict";var r=n(49);t.exports=n(4)(window,r)},362:(t,e,n)=>{"use strict";t.exports=n(131)},131:t=>{!function(){"use strict";n.SKIP={},n.lift=function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return i(e).map((function(e){return t.apply(void 0,e)}))},n.scan=function(t,e,r){var i=r.map((function(r){var i=t(e,r);return i!==n.SKIP&&(e=i),i}));return i(e),i},n.merge=i,n.combine=r,n.scanMerge=function(t,e){var n=t.map((function(t){return t[0]})),i=r((function(){var r=arguments[arguments.length-1];return n.forEach((function(n,i){r.indexOf(n)>-1&&(e=t[i][1](e,n()))})),e}),n);return i(e),i},n["fantasy-land/of"]=n;var e=!1;function n(t){var e,i=[],s=[];function a(e){return arguments.length&&e!==n.SKIP&&(t=e,o(a)&&(a._changing(),a._state="active",i.forEach((function(e,n){e(s[n](t))})))),t}function u(){return(e=n()).map((function(t){return!0===t&&(a._parents.forEach((function(t){t._unregisterChild(a)})),a._state="ended",a._parents.length=i.length=s.length=0),t})),e}return a.constructor=n,a._state=arguments.length&&t!==n.SKIP?"active":"pending",a._parents=[],a._changing=function(){o(a)&&(a._state="changing"),i.forEach((function(t){t._changing()}))},a._map=function(e,r){var o=r?n():n(e(t));return o._parents.push(a),i.push(o),s.push(e),o},a.map=function(t){return a._map(t,"active"!==a._state)},a.toJSON=function(){return null!=t&&"function"==typeof t.toJSON?t.toJSON():t},a["fantasy-land/map"]=a.map,a["fantasy-land/ap"]=function(t){return r((function(t,e){return t()(e())}),[t,a])},a._unregisterChild=function(t){var e=i.indexOf(t);-1!==e&&(i.splice(e,1),s.splice(e,1))},Object.defineProperty(a,"end",{get:function(){return e||u()}}),a}function r(t,e){var r=e.every((function(t){if(t.constructor!==n)throw new Error("Ensure that each item passed to stream.combine/stream.merge/lift is a stream");return"active"===t._state})),i=r?n(t.apply(null,e.concat([e]))):n(),o=[],s=e.map((function(n){return n._map((function(s){return o.push(n),(r||e.every((function(t){return"pending"!==t._state})))&&(r=!0,i(t.apply(null,e.concat([o]))),o=[]),s}),!0)})),a=i.end.map((function(t){!0===t&&(s.forEach((function(t){t.end(!0)})),a.end(!0))}));return i}function i(t){return r((function(){return t.map((function(t){return t()}))}),t)}function o(t){return"pending"===t._state||"active"===t._state||"changing"===t._state}Object.defineProperty(n,"HALT",{get:function(){return e||console.log("HALT is deprecated and has been renamed to SKIP"),e=!0,n.SKIP}}),t.exports=n}()},231:(t,e,n)=>{"use strict";function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.r(e),n.d(e,{ucs2decode:()=>m,ucs2encode:()=>v,decode:()=>b,encode:()=>w,toASCII:()=>N,toUnicode:()=>x,default:()=>S});var o=2147483647,s=36,a=/^xn--/,u=/[^\0-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function f(t){throw new RangeError(c[t])}function p(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var i=function(t,e){for(var n=[],r=t.length;r--;)n[r]=e(t[r]);return n}((t=t.replace(l,".")).split("."),e).join(".");return r+i}function m(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e}var v=function(t){return String.fromCodePoint.apply(String,t)},g=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},y=function(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=s)t=d(t/35);return d(r+36*t/(t+38))},b=function(t){var e,n=[],r=t.length,i=0,a=128,u=72,l=t.lastIndexOf("-");l<0&&(l=0);for(var c=0;c<l;++c)t.charCodeAt(c)>=128&&f("not-basic"),n.push(t.charCodeAt(c));for(var h=l>0?l+1:0;h<r;){for(var p=i,m=1,v=s;;v+=s){h>=r&&f("invalid-input");var g=(e=t.charCodeAt(h++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:s;(g>=s||g>d((o-i)/m))&&f("overflow"),i+=g*m;var b=v<=u?1:v>=u+26?26:v-u;if(g<b)break;var w=s-b;m>d(o/w)&&f("overflow"),m*=w}var x=n.length+1;u=y(i-p,x,0==p),d(i/x)>o-a&&f("overflow"),a+=d(i/x),i%=x,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,x=o,N=r(t);!(w=N()).done;){var S=w.value;S>=a&&S<x&&(x=S)}var C=b+1;x-a>d((o-u)/C)&&f("overflow"),u+=(x-a)*C,a=x;for(var T,k=r(t);!(T=k()).done;){var E=T.value;if(E<a&&++u>o&&f("overflow"),E==a){for(var A=u,P=s;;P+=s){var _=P<=l?1:P>=l+26?26:P-l;if(A<_)break;var D=A-_,I=s-_;n.push(h(g(_+D%I,0))),A=d(D/I)}n.push(h(g(A,0))),l=y(u,C,b==v),u=0,++b}}++u,++a}return n.join("")},x=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},N=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const S={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:N,toUnicode:x}},236:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new A(r||[]);return o._invoke=function(t,e,n){var r=d;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return _()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=c(t,e,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",m={};function v(){}function g(){}function y(){}var b={};u(b,o,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==n&&r.call(x,o)&&(b=x);var N=y.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,o,s,a){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(d).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function P(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:_}}function _(){return{value:e,done:!0}}return g.prototype=y,u(N,"constructor",y),u(y,"constructor",g),g.displayName=u(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,a,"GeneratorFunction")),t.prototype=Object.create(N),t},t.awrap=function(t){return{__await:t}},S(C.prototype),u(C.prototype,s,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new C(l(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},S(N),u(N,a,"Generator"),u(N,o,(function(){return this})),u(N,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},887:t=>{!function(){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,r=n&&null!=window.mozInnerScreenX;function i(t,i,o){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=o&&o.debug||!1;if(s){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var u=document.createElement("div");u.id="input-textarea-caret-position-mirror-div",document.body.appendChild(u);var l=u.style,c=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,d="INPUT"===t.nodeName;l.whiteSpace="pre-wrap",d||(l.wordWrap="break-word"),l.position="absolute",s||(l.visibility="hidden"),e.forEach((function(t){d&&"lineHeight"===t?l.lineHeight=c.height:l[t]=c[t]})),r?t.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",u.textContent=t.value.substring(0,i),d&&(u.textContent=u.textContent.replace(/\s/g," "));var h=document.createElement("span");h.textContent=t.value.substring(i)||".",u.appendChild(h);var f={top:h.offsetTop+parseInt(c.borderTopWidth),left:h.offsetLeft+parseInt(c.borderLeftWidth),height:parseInt(c.lineHeight)};return s?h.style.backgroundColor="#aaa":document.body.removeChild(u),f}void 0!==t.exports?t.exports=i:n&&(window.getCaretCoordinates=i)}()},420:()=>{Array.prototype.flat||(Array.prototype.flat=function t(e){return(null!=e?e:1)>0?Array.prototype.reduce.call(this,(function(n,r){return n.concat(Array.isArray(r)?t.call(r,e-1):r)}),[]):[].concat(this)})},183:(t,e,n)=>{var r=n(663),i=n(648);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},449:(t,e,n)=>{var r=n(28),i=n(648);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},471:(t,e,n)=>{var r=n(555),i=n(648);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},928:(t,e,n)=>{var r=n(872),i=n(648);void 0===i.m&&(i.m=r),t.exports=r},296:(t,e,n)=>{var r=n(231),i=n(648);void 0===i.punycode&&(i.punycode=r),t.exports=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Extend:()=>t,app:()=>b,compat:()=>Ti});var t={};n.r(t),n.d(t,{Model:()=>p,PostTypes:()=>v,Routes:()=>g});var e={};n.r(e),n.d(e,{getPlainContent:()=>Z,slug:()=>Q,truncate:()=>J,ucfirst:()=>tt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>Wn});var o={};n.r(o),n.d(o,{extend:()=>Lr,override:()=>jr});var s={};n.r(s),n.d(s,{debounce:()=>ie,throttle:()=>re}),n(183),n(928),n(471),n(423),n(298),n(892),n(478),n(646),n(426);var a=n(23),u=n.n(a),l=n(428),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=function(){function t(t,e){void 0===e&&(e=null),this.type=void 0,this.attributes=[],this.hasOnes=[],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}(),v=function(){function t(){this.postComponents={}}var e=t.prototype;return e.add=function(t,e){return this.postComponents[t]=e,this},e.extend=function(t,e){Object.assign(t.postComponents,this.postComponents)},t}(),g=function(){function t(){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.assign(t.routes,this.routes)},t}(),y=window;const b=new Proxy({},{get:function(t,e){return Reflect.get(y.app,e,y.app)},set:function(t,e,n){return Reflect.set(y.app,e,n,y.app)}});n(420),dayjs.extend(u()),dayjs.extend(c()),f(window);var w=$.fn.tooltip;function x(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N(t,e){return N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},N(t,e)}function S(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,N(t,e)}function C(){return C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},C.apply(this,arguments)}function T(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=C({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),w.bind(this)(t)},n(296),n(449);var k=function(){function t(){this.stack=[]}var e=t.prototype;return e.getCurrent=function(){return this.stack[this.stack.length-1]},e.getPrevious=function(){return this.stack[this.stack.length-2]},e.push=function(t,e,n){void 0===n&&(n=m.route.get());var r=this.stack[this.stack.length-2];r&&r.name===t&&this.stack.pop();var i=this.getCurrent();i&&i.name===t?Object.assign(i,{url:n,title:e}):this.stack.push({name:t,url:n,title:e})},e.canGoBack=function(){return this.stack.length>1},e.back=function(){if(!this.canGoBack())return this.home();this.stack.pop(),m.route.set(this.getCurrent().url)},e.backUrl=function(){return this.stack[this.stack.length-2].url},e.home=function(){this.stack.splice(0),T("/")},t}(),E=function(){function t(t){this.pinnedKey="panePinned",this.$element=$(t),this.pinned="true"===localStorage.getItem(this.pinnedKey),this.active=!1,this.showing=!1,this.render()}var e=t.prototype;return e.enable=function(){this.active=!0,this.render()},e.disable=function(){this.active=!1,this.showing=!1,this.render()},e.show=function(){clearTimeout(this.hideTimeout),this.showing=!0,this.render()},e.hide=function(){this.showing=!1,this.render()},e.onmouseleave=function(){this.hideTimeout=setTimeout(this.hide.bind(this),250)},e.togglePinned=function(){this.pinned=!this.pinned,localStorage.setItem(this.pinnedKey,this.pinned?"true":"false"),this.render()},e.render=function(){this.$element.toggleClass("panePinned",this.pinned).toggleClass("hasPane",this.active).toggleClass("paneShowing",this.showing)},t}(),A=function(){function t(){this.element=void 0,this.attrs=void 0,this.state=void 0}var e=t.prototype;return e.oninit=function(t){this.setAttrs(t.attrs)},e.oncreate=function(t){this.element=t.dom},e.onbeforeupdate=function(t){this.setAttrs(t.attrs)},e.onupdate=function(t){},e.onbeforeremove=function(t){},e.onremove=function(t){},e.$=function(t){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})),t.component=function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=C({},t);return m(this,n,e)},e.setAttrs=function(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("["+this.constructor.name+'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute');if("tag"in t)throw new Error("["+this.constructor.name+'] You cannot use the "tag" attribute name with Mithril 2.')}this.attrs=t},t.initAttrs=function(t){},t}();function P(t,e){return t&&(t===e||t.prototype instanceof e)}var _=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={}),!!P(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}(),D=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).bodyClass="",e.scrollTopOnCreate=!0,e.useBrowserScrollRestoration=!0,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),b.previous=b.current,b.current=new _(this.constructor,{routeName:this.attrs.routeName}),b.drawer.hide(),b.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(A);function I(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O(t,e,n){return e&&I(t.prototype,e),n&&I(t,n),t}function L(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var j=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},M=function(){function t(){this._items={}}var e=t.prototype;return e.isEmpty=function(){return 0===Object.keys(this._items).length},e.has=function(t){return Object.keys(this._items).includes(t)},e.get=function(t){return this._items[t].content},e.getPriority=function(t){return this._items[t].priority},e.add=function(t,e,n){return void 0===n&&(n=0),this._items[t]=new j(e,n),this},e.replace=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),this.has(t)?(null!==e&&(this._items[t].content=e),null!==n&&(this._items[t].priority=n),this):this},e.setContent=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set content of Item. Key `"+t+"` is not present.");return this.replace(t,e)},e.setPriority=function(t,e){if(!this.has(t))throw new Error("[ItemList] Cannot set priority of Item. Key `"+t+"` is not present.");return this._items[t].priority=e,this},e.remove=function(t){return delete this._items[t],this},e.merge=function(t){var e=this;return Object.keys(t._items).forEach((function(n){var r=t._items[n];r instanceof j&&(e._items[n]=r)})),this},e.toArray=function(t){var e=this;return void 0===t&&(t=!1),Object.keys(this._items).map((function(n,r){var i=e._items[n];return!t||L(i.content)?C({},i,{content:e.createItemContentProxy(L(i.content)?i.content:Object(i.content),n)}):C({},i)})).sort((function(t,e){return e.priority-t.priority})).map((function(t){return t.content}))},e.toObject=function(){var t=this;return Object.keys(this._items).reduce((function(e,n){var r={content:t.get(n),itemName:n,priority:t.getPriority(n)};return e[n]=r,e}),{})},e.createItemContentProxy=function(t,e){return new Proxy(t,{get:function(t,n,r){return"itemName"===n?e:Reflect.get(t,n,r)},set:function(t,n,r,i){if(null!==e&&"itemName"===n)throw new Error("`itemName` property is read-only");return Reflect.set(t,n,r,i)}})},O(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),R=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(A);R.isListItem=!0;const H=R;function B(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=B(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const F=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=B(t))&&(r&&(r+=" "),r+=e);return r};function U(t){return"object"==typeof t&&null!==t&&"tag"in t}function q(t){return U(t)&&t.tag===H}function z(t,e,n){void 0===e&&(e="li"),void 0===n&&(n={});var r,i,o,s=e;return(r=t instanceof Array?t:[t],o=[],r.filter(Boolean).forEach((function(t,e){(!q(t)||i&&!q(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(U(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;U(t)&&(i.push((null==(r=t.attrs)?void 0:r.itemClassName)||t.itemClassName),null!=t.tag.isActive&&t.tag.isActive(t.attrs)&&i.push("active"));var o=U(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:F(i),key:o},n),t)}))}var W=function(t){function e(){return t.apply(this,arguments)||this}S(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"},z(this.items().toArray()))))},n.items=function(){var t=new M,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},z(n)),10),t.add("title",m("h2",{className:"DiscussionHero-title"},e.title())),t},e}(A);function V(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function G(t,e){var n=t[e];return delete t[e],n}var Y=["options"],K=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=V(e,Y);i.href=i.href||"";var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),G(i,"force")&&("state"in r||(r.state={}),"key"in r.state||(r.state.key=Date.now())),i.options=r,m(m.route.Link,i,o))},e}(A);function X(t,e){void 0===e&&(e={}),e.className="Avatar "+(e.className||"");var n="",r="undefined"===e.title||e.title;if(r||delete e.title,t){var i=t.displayName()||"?",o=t.avatarUrl();if(r&&(e.title=e.title||i),o)return m("img",Object.assign({},e,{src:o,alt:""}));n=i.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,n)}function J(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function Q(t){return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}function Z(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 ").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return Z.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function tt(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function et(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(e,"gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=J(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function nt(t,e){return void 0===e&&(e={}),e.className="icon "+t+" "+(e.className||""),m("i",Object.assign({"aria-hidden":"true"},e))}Z.removeSelectors=["blockquote","script"];var rt=n(555),it=n.n(rt);function ot(t){var e=it()(t),n=it()();return e.isAfter(n)&&(e=n),e.diff(it()())<-2592e6?e.year()===it()().year()?e.format("D MMM"):e.format("ll"):e.fromNow()}function st(t){return t instanceof Array?t.map((function(t){return st(t)})).join(""):"object"==typeof t&&null!==t?t.children?st(t.children):String(t.text):String(t)}function at(t){return t>=1e6?Math.floor(t/1e6)+st(b.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+st(b.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var ut=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(t){t.className=t.className||"",t.buttonClassName=t.buttonClassName||"",t.menuClassName=t.menuClassName||"",t.label=t.label||"",t.caretIcon=void 0!==t.caretIcon?t.caretIcon:"fas fa-caret-down",t.accessibleToggleLabel=t.accessibleToggleLabel||b.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.showing=!1},n.view=function(t){var e=t.children?z(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t=n.attrs,e=t.lazyDraw,r=t.onshow;n.showing=!0,e&&m.redraw.sync(),"function"==typeof r&&r(),e||m.redraw();var i=n.$(".Dropdown-menu"),o=i.hasClass("Dropdown-menu--right");i.removeClass("Dropdown-menu--top Dropdown-menu--right"),i.toggleClass("Dropdown-menu--top",i.offset().top+i.height()>$(window).scrollTop()+$(window).height()),i.offset().top<0&&i.removeClass("Dropdown-menu--top"),i.toggleClass("Dropdown-menu--right",o||i.offset().left+i.width()>$(window).scrollLeft()+$(window).width())})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?nt(this.attrs.caretIcon,{className:"Button-caret"}):""]},n.getMenu=function(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)},e}(A);function lt(t){var e=it()(t),n=e.format(),r=e.format("LLLL"),i=ot(t);return m("time",{pubdate:!0,datetime:n,title:r,"data-humantime":!0},i)}var ct=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t=this.attrs.discussion,e=this.attrs.lastPost&&t.replyCount(),n=t[e?"lastPostedUser":"user"](),r=t[e?"lastPostedAt":"createdAt"]();return m("span",null,e?nt("fas fa-reply"):""," ",ni.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:lt(r)}))},e}(A),dt=function(){function t(){this.callbacks=void 0,this.data=void 0;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=e,this.data={},this.needsRebuild()}var e=t.prototype;return e.needsRebuild=function(){var t=this,e=!1;return this.callbacks.forEach((function(n,r){var i=n();i!==t.data[r]&&(t.data[r]=i,e=!0)})),e},e.check=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.callbacks=this.callbacks.concat(e),this.needsRebuild()},e.invalidate=function(){this.data={}},t}(),ht=["display","size","containerClassName","className"],ft=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t=this.attrs,e=t.display,n=void 0===e?"block":e,r=t.size,i=void 0===r?"medium":r,o=t.containerClassName,s=t.className,a=V(t,ht),u=F("LoadingIndicator",s),l=F("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":b.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(A),pt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return t.children[0]},e}(A);function mt(){var t;b.forum.attribute("debug")&&(t=console).warn.apply(t,arguments)}function vt(t,e,n,r){void 0===n&&(n="2.0"),void 0===r&&(r="flarum/core"),mt("[Flarum "+n+" Deprecation] "+t+"\n\nSee: https://github.com/"+r+"/pull/"+e)}var gt=["type","title","aria-label","icon","disabled","loading","className","class"],yt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs,n=e.type,r=e.title,i=e["aria-label"],o=e.icon,s=e.disabled,a=e.loading,u=e.className,l=e.class,c=V(e,gt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=st(i)),(s||a)&&delete c.onclick;var d=C({disabled:s,className:u=F(l,u,{hasIcon:o,disabled:s||a,loading:a}),type:n,"aria-label":i},c);return m("button",d,this.getButtonContent(t.children))},n.oncreate=function(n){var r;t.prototype.oncreate.call(this,n);var i=this.attrs["aria-label"];this.view!==e.prototype.view||i||st(n.children)||null!=(r=this.element)&&null!=r.getAttribute&&r.getAttribute("aria-label")||mt('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)},n.getButtonContent=function(t){var e=this.attrs.icon;return[e&&nt(e,{className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(ft,{size:"small",display:"inline"})]},e}(A),bt=n(887),wt=n.n(bt),xt=null;function Nt(t,e){var n=e.text,r=e.selectionStart,i=e.selectionEnd,o=t.selectionStart,s=t.value.slice(0,o),a=t.value.slice(t.selectionEnd);if(null===xt||!0===xt){t.contentEditable="true";try{xt=document.execCommand("insertText",!1,n)}catch(t){xt=!1}t.contentEditable="false"}xt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(xt=!1),xt||(t.value=s+n+a,t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))),null!=r&&null!=i?t.setSelectionRange(r,i):t.setSelectionRange(o,t.selectionEnd)}var St=function(){function t(t,e){this.el=void 0,this.el=document.createElement("textarea"),this.build(t,e)}var e=t.prototype;return e.build=function(t,e){var n=this;this.el.className=e.classNames.join(" "),this.el.disabled=e.disabled,this.el.placeholder=e.placeholder,this.el.value=e.value;var r=function(t){e.inputListeners.forEach((function(t){t()})),t.redraw=!1};this.el.oninput=function(t){e.oninput(n.el.value),r(t)},this.el.onclick=r,this.el.onkeyup=r,this.el.addEventListener("keydown",(function(t){n.keyHandlers(e).toArray().forEach((function(e){return e(t)}))})),t.append(this.el)},e.keyHandlers=function(t){var e=new M;return e.add("submit",(function(e){(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&t.onsubmit()})),e},e.moveCursorTo=function(t){this.setSelectionRange(t,t)},e.getSelectionRange=function(){return[this.el.selectionStart,this.el.selectionEnd]},e.getLastNChars=function(t){return this.el.value.slice(Math.max(0,this.el.selectionStart-t),this.el.selectionStart)},e.insertAtCursor=function(t){this.insertAt(this.el.selectionStart,t)},e.insertAt=function(t,e){this.insertBetween(t,t,e)},e.insertBetween=function(t,e,n){this.setSelectionRange(t,e);var r=t+n.length;Nt(this.el,{text:n,selectionStart:r,selectionEnd:r})},e.replaceBeforeCursor=function(t,e){this.insertBetween(t,this.el.selectionStart,e)},e.setSelectionRange=function(t,e){this.el.setSelectionRange(t,e),this.focus()},e.getCaretCoordinates=function(t){var e=wt()(this.el,t);return{top:e.top-this.el.scrollTop,left:e.left}},e.disabled=function(t){this.el.disabled=t},e.focus=function(){this.el.focus()},e.destroy=function(){this.el.remove()},t}(),Ct=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Tt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).firstChild=null,e.childDomNode=null,e.oldText="",e.oldVisibility=void 0,e.shouldRecreateTooltip=!1,e.shouldChangeTooltipVisibility=!1,e}S(e,t);var n=e.prototype;return n.view=function(t){var e=t.children,n=this.attrs,r=(n.text,n.tooltipVisible),i=(n.showOnFocus,n.position,n.ignoreTitleWarning),o=void 0!==i&&i;n.html,n.delay,V(n,Ct),this.attrs.title&&!o&&console.warn("`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.");var s=this.getRealText();if(s!==this.oldText&&(this.oldText=s,this.shouldRecreateTooltip=!0),r!==this.oldVisibility&&(this.oldVisibility=this.attrs.tooltipVisible,this.shouldChangeTooltipVisibility=!0),void 0===e)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if(1!==e.length)throw new Error("Tooltip component was either passed more than one or no child node.\n\nPlease wrap multiple children in another element, such as a <div> or <span>.");var a=e[0];if("object"!=typeof a||Array.isArray(a)||null===a)throw new Error("Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.");if("string"==typeof a.tag&&["#","[","<"].includes(a.tag))throw new Error('Tooltip component with provided with a vnode with tag "'+a.tag+'". This is not a DOM element, so is not a valid child element. Please wrap this vnode in another element, such as a <div> or <span>.');return this.firstChild=a,e},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.checkDomNodeChanged(),this.recreateTooltip()},n.recreateTooltip=function(){this.shouldRecreateTooltip&&null!==this.childDomNode&&($(this.childDomNode).tooltip("destroy","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"),this.createTooltip(),this.shouldRecreateTooltip=!1),this.shouldChangeTooltipVisibility&&(this.shouldChangeTooltipVisibility=!1,this.updateVisibility())},n.updateVisibility=function(){null!==this.childDomNode&&(!0===this.attrs.tooltipVisible?$(this.childDomNode).tooltip("show","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"):!1===this.attrs.tooltipVisible&&$(this.childDomNode).tooltip("hide","DANGEROUS_tooltip_jquery_fn_deprecation_exempt"))},n.createTooltip=function(){if(null!==this.childDomNode){var t=this.attrs,e=t.showOnFocus,n=void 0===e||e,r=t.position,i=void 0===r?"top":r,o=t.delay,s=t.html,a=void 0!==s&&s,u=t.tooltipVisible,l=(t.text,"boolean"==typeof u?"manual":F("hover",[n&&"focus"])),c=this.getRealText();this.childDomNode.setAttribute("title",c),this.childDomNode.setAttribute("aria-label",c),$(this.childDomNode).tooltip({html:a,delay:o,placement:i,trigger:l},"DANGEROUS_tooltip_jquery_fn_deprecation_exempt")}},n.getRealText=function(){var t=this.attrs.text;return Array.isArray(t)?st(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(A),kt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.value=this.attrs.value||"",this.disabled=!!this.attrs.disabled},n.view=function(){return m("div",{className:"TextEditor"},m("div",{className:"TextEditor-editorContainer"}),m("ul",{className:"TextEditor-controls Composer-footer"},z(this.controlItems().toArray()),m("li",{className:"TextEditor-toolbar"},this.toolbarItems().toArray())))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.attrs.composer.editor=this.buildEditor(this.$(".TextEditor-editorContainer")[0])},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=!!this.attrs.disabled;this.disabled!==n&&(this.disabled=n,this.attrs.composer.editor.disabled(n))},n.buildEditorParams=function(){var t=this;return{classNames:["FormControl","Composer-flexible","TextEditor-editor"],disabled:this.disabled,placeholder:this.attrs.placeholder||"",value:this.value,oninput:this.oninput.bind(this),inputListeners:[],onsubmit:function(){t.onsubmit(),m.redraw()}}},n.buildEditor=function(t){return new St(t,this.buildEditorParams())},n.controlItems=function(){var t=new M;return t.add("submit",yt.component({icon:"fas fa-paper-plane",className:"Button Button--primary",itemClassName:"App-primaryControl",onclick:this.onsubmit.bind(this)},this.attrs.submitLabel)),this.attrs.preview&&t.add("preview",m(Tt,{text:b.translator.trans("core.forum.composer.preview_tooltip")},m(yt,{icon:"far fa-eye",className:"Button Button--icon",onclick:this.attrs.preview}))),t},n.toolbarItems=function(){return new M},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(A),Et=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){return m(pt,{when:this.hasChanges.bind(this)},m("div",{className:"ComposerBody "+(this.attrs.className||"")},X(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},z(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},kt.component({submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.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()}))),m(ft,{display:"unset",containerClassName:F("ComposerBody-loading",this.loading&&"active"),size:"large"})))},n.hasChanges=function(){var t=this.composer.fields.content();return t&&t!==this.attrs.originalContent},n.headerItems=function(){return new M},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(A);function At(t){ni.composer.isFullScreen()&&(ni.composer.minimize(),t.stopPropagation())}var Pt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||st(ni.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||ni.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||st(ni.translator.trans("core.forum.composer_reply.discard_confirmation"))};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.discussion;return e.add("title",m("h3",null,nt("fas fa-reply")," ",m(K,{href:ni.route.discussion(n),onclick:At},n.title()))),e},n.jumpToPreview=function(t){At(t),m.route.set(ni.route.discussion(this.attrs.discussion,"reply"))},n.data=function(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}},n.onsubmit=function(){var t=this,e=this.attrs.discussion;this.loading=!0,m.redraw();var n=this.data();ni.store.createRecord("posts").save(n).then((function(n){if(ni.viewingDiscussion(e)){var r=ni.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=yt.component({className:"Button Button--link",onclick:function(){m.route.set(ni.route.post(n)),ni.alerts.dismiss(i)}},ni.translator.trans("core.forum.composer_reply.view_button"));i=ni.alerts.show({type:"success",controls:[o]},ni.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(Et),_t=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=G(e,"type");e.className=F("Alert","Alert--"+n,e.className);var r=G(e,"content")||t.children,i=G(e,"controls")||[],o=G(e,"dismissible"),s=G(e,"ondismiss"),a=[];return(o||void 0===o)&&a.push(m(yt,{"aria-label":b.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",class:"Button Button--link Button--icon Alert-dismiss",onclick:s})),m("div",e,m("span",{class:"Alert-body"},r),m("ul",{class:"Alert-controls"},z(i.concat(a))))},e}(A),Dt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!1,e.alertAttrs=null,e}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=[];["className","title","content","onsubmit"].forEach((function(t){n[t]||(n[t]=function(){},r.push(t))})),r.length>0&&mt("Modal `"+this.constructor.name+"` does not implement all abstract methods of the Modal super class. Missing methods: "+r.join(", ")+".")},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.attrs.animateShow((function(){return n.onready()}))},n.onbeforeremove=function(e){if(t.prototype.onbeforeremove.call(this,e),!this.attrs.state.modal)return this.attrs.animateHide(),new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;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"},yt.component({icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":b.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),this.alertAttrs?m("div",{className:"Modal-alert"},_t.component(this.alertAttrs)):"",this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.state.close()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},e}(A);Dt.isDismissible=!0;var It=n(362);const Ot=n.n(It)();var $t=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.success=!1,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Ot(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return ni.translator.trans("core.forum.forgot_password.title")},n.content=function(){if(this.success)return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},ni.translator.trans("core.forum.forgot_password.email_sent_message")),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},ni.translator.trans("core.forum.forgot_password.dismiss_button")))));var t=st(ni.translator.trans("core.forum.forgot_password.email_placeholder"));return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},ni.translator.trans("core.forum.forgot_password.text")),m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:t,"aria-label":t,bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},yt.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.translator.trans("core.forum.forgot_password.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,ni.request({method:"POST",url:ni.forum.attribute("apiUrl")+"/forgot",body:{email:this.email()},errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=ni.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(Dt),Lt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new M},e}(A),jt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Ot(this.attrs.username||""),this.email=Ot(this.attrs.email||""),this.password=Ot(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return ni.translator.trans("core.forum.sign_up.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.isProvided=function(t){var e,n;return null!=(e=null==(n=this.attrs.provided)?void 0:n.includes(t))&&e},n.body=function(){return[!this.attrs.token&&m(Lt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new M,e=st(ni.translator.trans("core.forum.sign_up.username_placeholder")),n=st(ni.translator.trans("core.forum.sign_up.email_placeholder")),r=st(ni.translator.trans("core.forum.sign_up.password_placeholder"));return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:e,"aria-label":e,bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:n,"aria-label":n,bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:r,"aria-label":r,bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},ni.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()};ni.modal.show(Mt,t)},n.onready=function(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()},n.onsubmit=function(t){t.preventDefault(),this.loading=!0;var e=this.submitData();ni.request({url:ni.forum.attribute("baseUrl")+"/register",method:"POST",body:e,errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.submitData=function(){var t=this.attrs.token?{token:this.attrs.token}:{password:this.password()};return C({username:this.username(),email:this.email()},t)},e}(Dt),Mt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).identification=void 0,e.password=void 0,e.remember=void 0,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Ot(this.attrs.identification||""),this.password=Ot(this.attrs.password||""),this.remember=Ot(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return ni.translator.trans("core.forum.log_in.title")},n.content=function(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]},n.body=function(){return[m(Lt,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new M,e=st(ni.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=st(ni.translator.trans("core.forum.log_in.password_placeholder"));return t.add("identification",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"identification",type:"text",placeholder:e,"aria-label":e,bidi:this.identification,disabled:this.loading})),30),t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"current-password",placeholder:n,"aria-label":n,bidi:this.password,disabled:this.loading})),20),t.add("remember",m("div",{className:"Form-group"},m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:this.remember,disabled:this.loading}),ni.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},yt.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.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)},ni.translator.trans("core.forum.log_in.forgot_password_link"))),ni.forum.attribute("allowSignUp")?m("p",{className:"LogInModal-signUp"},ni.translator.trans("core.forum.log_in.sign_up_text",{a:m("a",{onclick:this.signUp.bind(this)})})):""]},n.forgotPassword=function(){var t=this.identification(),e=t.includes("@")?{email:t}:void 0;ni.modal.show($t,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t.password=this.password(),t);ni.modal.show(jt,n)},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(),r=this.remember();ni.session.login({identification:e,password:n,remember:r},{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=ni.translator.trans("core.forum.log_in.invalid_login_message")),t.prototype.onerror.call(this,e)},e}(Dt),Rt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.currentTitle=this.attrs.currentTitle,this.newTitle=Ot(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return ni.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"},yt.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.translator.trans("core.forum.rename_discussion.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0;var n=this.newTitle(),r=this.currentTitle;if(n&&n!==r)return this.discussion.save({title:n}).then((function(){ni.viewingDiscussion(e.discussion)&&ni.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(Dt);const Ht={controls:function(t,e){var n=this,r=new M;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",H.component()))})),r},userControls:function(t,e){var n=this,r=new M;return e instanceof ue&&r.add("reply",!ni.session.user||t.canReply()?yt.component({icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},ni.translator.trans(ni.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):yt.component({icon:"fas fa-reply",className:"disabled",title:ni.translator.trans("core.forum.discussion_controls.cannot_reply_text")},ni.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new M;return t.canRename()&&e.add("rename",yt.component({icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},ni.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new M;return t.isHidden()?(t.canHide()&&e.add("restore",yt.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},ni.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",yt.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t)},ni.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",yt.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},ni.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return ni.session.user?n.canReply()?(ni.composer.composingReplyTo(n)&&!e||ni.composer.load(Pt,{user:ni.session.user,discussion:n}),ni.composer.show(),t&&ni.viewingDiscussion(n)&&!ni.composer.isFullScreen()&&ni.current.get("stream").goToNumber("reply"),r(ni.composer)):i():(ni.modal.show(Mt),i())}))},hideAction:function(){return this.pushAttributes({hiddenAt:new Date,hiddenUser:ni.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(st(ni.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return ni.viewingDiscussion(this)&&ni.history.back(),this.delete().then((function(){return ni.discussions.removeDiscussion(t)}))},renameAction:function(){return ni.modal.show(Rt,{currentTitle:this.title(),discussion:this})}};function Bt(t){var e,n,r,i,o=$(t),s=!1,a=!1,u=0,l=function(t,e){var n;void 0===e&&(e={}),(n=e).duration||(n.duration="fast"),e.step=function(t){$(this).css("transform","translate("+t+"px, 0)")},o.find(".Slidable-content").animate({"background-position-x":t},e)},c=function(){l(0,{complete:function(){o.removeClass("sliding"),e.hide(),n.hide(),a=!1}})};return o.find(".Slidable-content").on("touchstart",(function(t){e=o.find(".Slidable-underneath--left:not(.disabled)"),n=o.find(".Slidable-underneath--right:not(.disabled)"),r=t.originalEvent.targetTouches[0].clientX,i=t.originalEvent.targetTouches[0].clientY,s=!0,u=0})).on("touchmove",(function(t){var l=t.originalEvent.targetTouches[0].clientX,c=t.originalEvent.targetTouches[0].clientY;if(s&&Math.abs(l-r)>Math.abs(c-i)&&(a=!0),s=!1,a){u=l-r;var d=function(t,e){if(t.length){var n="left"===e?u>0:u<0;n&&t.hasClass("Slidable-underneath--elastic")&&(u-=.5*u),t.toggle(n);var r=Math.max(0,Math.min(1,(Math.abs(u)-25)/50));t.find(".icon").css("transform","scale("+r+")")}else u=Math["left"===e?"min":"max"](0,u)};d(e,"left"),d(n,"right"),$(this).css("transform","translate("+u+"px, 0)"),$(this).css("background-position-x",u+"px"),o.toggleClass("sliding",!!u),t.preventDefault()}})).on("touchend",(function(){var t=function(t){t.click(),t.hasClass("Slidable-underneath--elastic")?c():l((u>0?1:-1)*o.width())};n.length&&u<-50?t(n):e.length&&u>50?t(e):c(),s=!1,a=!1})),{reset:c}}var Ft=/[.*+?^${}()|[\]\\]/g;function Ut(t){return t.replace(Ft,"\\$&")}var qt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.subtree=new dt((function(){return n.attrs.discussion.freshness}),(function(){var t=ni.session.user&&ni.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:F("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.attrs.discussion,e=t.user(),n=t.isUnread(),r=t.isRead(),i=0,o=Ht.controls(t,this).toArray(),s=this.elementAttrs();if(this.attrs.params.q){var a=t.mostRelevantPost();a&&(i=a.number());var u=Ut(this.attrs.params.q);this.highlightRegExp=new RegExp(u+"|"+u.trim().replace(/\s+/g,"|"),"gi")}else i=Math.min(t.lastPostNumber(),(t.lastReadPostNumber()||0)+1);return m("div",s,o.length>0&&ut.component({icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:ni.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},o),m("span",{className:"Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic"+(n?"":" disabled"),onclick:this.markAsRead.bind(this)},nt("fas fa-check")),m("div",{className:F("DiscussionListItem-content","Slidable-content",{unread:n,read:r})},m(Tt,{text:ni.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:ot(t.createdAt())}),position:"right"},m(K,{className:"DiscussionListItem-author",href:e?ni.route.user(e):"#"},X(e,{title:""}))),m("ul",{className:"DiscussionListItem-badges badges"},z(t.badges().toArray())),m(K,{href:ni.route.discussion(t,i),className:"DiscussionListItem-main"},m("h3",{className:"DiscussionListItem-title"},et(t.title(),this.highlightRegExp)),m("ul",{className:"DiscussionListItem-info"},z(this.infoItems().toArray()))),this.replyCountItem()))},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Bt(this.$());this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e,n){return t.prototype.onbeforeupdate.call(this,e,n),this.subtree.needsRebuild()},n.active=function(){return ni.current.matches(ue,{discussion:this.attrs.discussion})},n.showFirstPost=function(){return-1!==["newest","oldest"].indexOf(this.attrs.params.sort)},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new M;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n=et(e.contentPlain(),this.highlightRegExp,175);t.add("excerpt",n,-100)}}else t.add("terminalPost",ct.component({discussion:this.attrs.discussion,lastPost:!this.showFirstPost()}));return t},n.replyCountItem=function(){var t=this.attrs.discussion;return!this.showRepliesCount()&&t.isUnread()?m("button",{className:"Button--ua-reset DiscussionListItem-count",onclick:this.markAsRead.bind(this)},m("span",{"aria-hidden":"true"},at(t.unreadCount())),m("span",{class:"visually-hidden"},ni.translator.trans("core.forum.discussion_list.unread_replies_a11y_label",{count:t.replyCount()}))):m("span",{className:"DiscussionListItem-count"},m("span",{"aria-hidden":"true"},at(t.replyCount())),m("span",{class:"visually-hidden"},ni.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(A),zt=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(A),Wt=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams();if(e.isInitialLoading()||e.isLoadingNext()?t=m(ft,null):e.hasNext()&&(t=yt.component({className:"Button",onclick:e.loadNext.bind(e)},ni.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var r=ni.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},zt.component({text:r}))}return m("div",{className:"DiscussionList"+(e.isSearchResults()?" DiscussionList--searchResults":"")},m("ul",{className:"DiscussionList-discussions"},e.getPages().map((function(t){return t.items.map((function(t){return m("li",{key:t.id(),"data-id":t.id()},qt.component({discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(A),Vt=function(t){t.pageX<10&&ni.pane.show()},Gt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("div",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Wt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=ni.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Vt),ni.previous.matches(ue)){var i=ni.cache.discussionListPaneScrollTop||0;n.scrollTop(i)}else{var o=n.find(".DiscussionListItem.active");if(o.length){var s=n.offset().top,a=s+n.outerHeight(),u=o.offset().top,l=u+o.outerHeight();(u<s||l>a)&&n.scrollTop(n.scrollTop()-s+u)}}},n.onremove=function(t){ni.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Vt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(A),Yt=function(){function t(t){this.callback=t,this.ticking=!1}var e=t.prototype;return e.loop=function(){var t=this;this.ticking||(requestAnimationFrame((function(){t.update(),t.ticking=!1})),this.ticking=!0)},e.update=function(){this.callback(window.pageYOffset)},e.start=function(){this.active||window.addEventListener("scroll",this.active=this.loop.bind(this),{passive:!0})},e.stop=function(){window.removeEventListener("scroll",this.active),this.active=null},t}(),Kt=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},X(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(A);function Xt(t){var e=t&&t.displayName()||b.translator.trans("core.lib.username.deleted_text");return m("span",{className:"username"},e)}var Jt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(t){t.className=t.className||"",t.surround=t.surround||function(t){return t()}};var n=e.prototype;return n.view=function(){return m("div",{className:this.attrs.className})},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e);var i=function(){if(r.attrs.composer.isVisible()){var t=r.attrs.composer.fields.content();n!==t&&(n=t,r.attrs.surround((function(){return s9e.TextFormatter.preview(n||"",e.dom)})))}};i(),this.updateInterval=setInterval(i,50)},n.onremove=function(e){t.prototype.onremove.call(this,e),clearInterval(this.updateInterval)},e}(A),Qt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this;return ni.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",null,X(ni.session.user,{className:"PostUser-avatar"}),Xt(ni.session.user)),m("ul",{className:"PostUser-badges badges"},z(ni.session.user.badges().toArray())))),m(Jt,{className:"Post-body",composer:ni.composer,surround:this.anchorPreview.bind(this)})):m("article",{className:"Post ReplyPlaceholder",onclick:function(){Ht.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("header",{className:"Post-header"},X(ni.session.user,{className:"PostUser-avatar"})," ",ni.translator.trans("core.forum.post_stream.reply_placeholder")))},n.anchorPreview=function(t){var e=$(window).scrollTop()+$(window).height()>=$(document).height();t(),e&&$(window).scrollTop($(document).height())},e}(A),Zt=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.discussion=this.attrs.discussion,this.stream=this.attrs.stream,this.scrollListener=new Yt(this.onscroll.bind(this))},n.view=function(){var t,e=this,n=this.stream.viewingEnd(),r=this.stream.posts(),i=this.discussion.postIds(),o=function(t){$(t.dom).addClass("fadeIn"),setTimeout((function(){return $(t.dom).removeClass("fadeIn")}),500)},s=r.map((function(n,r){var s,a={"data-index":e.stream.visibleStart+r};if(n){var u=n.createdAt(),l=ni.postComponents[n.contentType()];s=l?l.component({post:n}):"",a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,ni.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=Kt.component();return m("div",Object.assign({className:"PostStream-item"},a),s)}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(yt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},ni.translator.trans("core.forum.post_stream.load_more_button")))),!n||ni.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},Qt.component({discussion:this.discussion}))),m("div",{className:"PostStream"},s)},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.triggerScroll()},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.triggerScroll(),setTimeout((function(){return n.scrollListener.start()}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),clearTimeout(this.calculatePositionTimeout)},n.triggerScroll=function(){if(this.stream.needsScroll){var t=this.stream.targetPost;this.stream.needsScroll=!1,"number"in t?this.scrollToNumber(t.number,this.stream.animateScroll):"index"in t&&this.scrollToIndex(t.index,this.stream.animateScroll,t.reply)}},n.onscroll=function(t){void 0===t&&(t=window.pageYOffset),this.stream.paused||this.stream.pagesLoading||(this.updateScrubber(t),this.loadPostsIfNeeded(t),clearTimeout(this.calculatePositionTimeout),this.calculatePositionTimeout=setTimeout(this.calculatePosition.bind(this,t),100))},n.loadPostsIfNeeded=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e;if(this.stream.visibleStart>0){var i=this.$(".PostStream-item[data-index="+this.stream.visibleStart+"]");i.length&&i.offset().top>r-300&&this.stream.loadPrevious()}if(this.stream.visibleEnd<this.stream.count()){var o=this.$(".PostStream-item[data-index="+(this.stream.visibleEnd-1)+"]");o.length&&o.offset().top+o.outerHeight(!0)<r+n+300&&this.stream.loadNext()}},n.updateScrubber=function(t){void 0===t&&(t=window.pageYOffset);var e=this.getMarginTop(),n=$(window).height()-e,r=t+e,i=this.$(".PostStream-item[data-index]"),o=0,s="",a=null;i.each((function(){var t=$(this),e=t.offset().top,i=t.outerHeight(!0);if(e+i<r)return!0;if(e>r+n)return!1;var u=Math.max(0,r-e),l=Math.min(i,r+n-e)-u;null===a&&(a=parseFloat(t.data("index"))+u/i),l>0&&(o+=l/i);var c=t.data("time");c&&(s=c)})),this.stream.index=null!==a?a+1:this.stream.count(),this.stream.visible=o,s&&(this.stream.description=dayjs(s).format("MMMM YYYY"))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===ni.screen()?"#app-navigation":"#header";return this.$()&&$(t).outerHeight()+parseInt(this.$().css("margin-top"),10)},n.scrollToNumber=function(t,e){var n=this.$(".PostStream-item[data-number="+t+"]");return this.scrollToItem(n,e).then(this.flashItem.bind(this,n))},n.scrollToIndex=function(t,e,n){var r=n?$(".PostStream-item:last-child"):this.$(".PostStream-item[data-index="+t+"]");this.scrollToItem(r,e,!0,n),n&&this.flashItem(r)},n.scrollToItem=function(t,e,n,r){var i=this,o=$("html, body").stop(!0),s=t.data("index");if(t.length){var a=t.offset().top-this.getMarginTop(),u=t.offset().top+t.height(),l=$(document).scrollTop(),c=l+$(window).height();if(n||a<l||u>c){var d=r?u-$(window).height()+ni.composer.computedHeight():t.is(":first-child")?0:a;e?d!==l&&o.animate({scrollTop:d},"fast"):o.scrollTop(d)}}var h=function(){i.updateScrubber(),void 0!==s&&(i.stream.index=s+1)};return h(),this.stream.forceUpdateScrubber=!0,Promise.all([o.promise(),this.stream.loadPromise]).then((function(){var t;if(m.redraw.sync(),r){var e=$(".PostStream-item:last-child");$(window).scrollTop(e.offset().top+e.height()-$(window).height()+ni.composer.computedHeight())}else 0===s?$(window).scrollTop(0):(t=$(".PostStream-item[data-index="+s+"]").offset())&&$(window).scrollTop(t.top-i.getMarginTop());h(),i.calculatePosition(),i.stream.paused=!1,i.loadPostsIfNeeded()}))},n.flashItem=function(t){t.removeClass("fadeIn"),t.addClass("flash").on("animationend webkitAnimationEnd",(function(e){t.removeClass("flash")}))},e}(A);function te(t,e){return void 0===e&&(e=b.data.locale),new Intl.NumberFormat(e).format(t)}var ee=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.stream=this.attrs.stream,this.handlers={},this.scrollListener=new Yt(this.updateScrubberValues.bind(this,{fromScroll:!0,forceHeightChange:!0}))},n.view=function(){var t=this.stream.count(),e=ni.translator.trans("core.forum.post_scrubber.viewing_text",{count:t,index:m("span",{className:"Scrubber-index"}),formattedCount:m("span",{className:"Scrubber-count"},te(t))}),n=this.stream.discussion.unreadCount(),r=t?Math.min(t-this.stream.index,n)/t:0;function i(t){var e=$(t.dom),n={top:100-100*r+"%",height:100*r+"%"};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",nt("fas fa-sort")),m("div",{className:"Dropdown-menu dropdown-menu"},m("div",{className:"Scrubber"},m("a",{className:"Scrubber-first",onclick:this.goToFirst.bind(this)},nt("fas fa-angle-double-up")," ",ni.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"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},ni.translator.trans("core.forum.post_scrubber.unread_text",{count:n}))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},nt("fas fa-angle-double-down")," ",ni.translator.trans("core.forum.post_scrubber.now_link")))))},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),this.stream.forceUpdateScrubber&&(this.stream.forceUpdateScrubber=!1,this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!0,forceHeightChange:!0})})))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),$(window).on("resize",this.handlers.onresize=this.onresize.bind(this)).resize(),this.$(".Scrubber-scrollbar").bind("click",this.onclick.bind(this)).bind("dragstart mousedown touchstart",(function(t){return t.preventDefault()})),this.dragging=!1,this.mouseStart=0,this.indexStart=0,this.$(".Scrubber-handle").bind("mousedown touchstart",this.onmousedown.bind(this)).click((function(t){return t.stopPropagation()})),$(document).on("mousemove touchmove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup touchend",this.handlers.onmouseup=this.onmouseup.bind(this)),setTimeout((function(){return n.scrollListener.start()})),this.stream.loadPromise.then((function(){return n.updateScrubberValues({animate:!1,forceHeightChange:!0})}))},n.onremove=function(e){t.prototype.onremove.call(this,e),this.scrollListener.stop(),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove touchmove",this.handlers.onmousemove).off("mouseup touchend",this.handlers.onmouseup)},n.updateScrubberValues=function(t){var e=this;void 0===t&&(t={});var n=this.stream.index,r=this.stream.count(),i=this.stream.visible||1,o=this.percentPerPost(),s=this.$();s.find(".Scrubber-index").text(te(this.stream.sanitizeIndex(Math.max(1,n)))),s.find(".Scrubber-description").text(this.stream.description),s.toggleClass("disabled",this.stream.disabled());var a={};if(a.before=Math.max(0,o.index*Math.min(n-1,r-i)),a.handle=Math.min(100-a.before,o.visible*i),a.after=100-a.before-a.handle,!(t.fromScroll&&this.stream.paused||this.adjustingHeight&&!t.forceHeightChange)){var u=t.animate?"animate":"css";this.adjustingHeight=!0;var l=[];for(var c in a){var d=s.find(".Scrubber-"+c);l.push(d.stop(!0,!0)[u]({height:a[c]+"%"},"fast").promise()),"animate"===u&&d.css("overflow","visible")}Promise.all(l).then((function(){return e.adjustingHeight=!1}))}},n.goToFirst=function(){this.stream.goToFirst(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.goToLast=function(){this.stream.goToLast(),this.updateScrubberValues({animate:!0,forceHeightChange:!0})},n.onresize=function(){var t=this.$(),e=this.$(".Scrubber-scrollbar");e.css("max-height",$(window).height()-t.offset().top+$(window).scrollTop()-parseInt($("#app").css("padding-bottom"),10)-(t.outerHeight()-e.outerHeight()))},n.onmousedown=function(t){t.redraw=!1,this.mouseStart=t.clientY||t.originalEvent.touches[0].clientY,this.indexStart=this.stream.index,this.dragging=!0,$("body").css("cursor","move"),this.$().toggleClass("dragging",this.dragging)},n.onmousemove=function(t){if(this.dragging){var e=((t.clientY||t.originalEvent.touches[0].clientY)-this.mouseStart)/this.$(".Scrubber-scrollbar").outerHeight()*100/this.percentPerPost().index||0,n=Math.min(this.indexStart+e,this.stream.count()-1);this.stream.index=Math.max(0,n),this.updateScrubberValues()}},n.onmouseup=function(){if(this.$().toggleClass("dragging",this.dragging),this.dragging){this.mouseStart=0,this.indexStart=0,this.dragging=!1,$("body").css("cursor",""),this.$().removeClass("open");var t=Math.floor(this.stream.index);this.stream.goToIndex(t)}},n.onclick=function(t){var e=this.$(".Scrubber-scrollbar"),n=((t.pageY||t.originalEvent.touches[0].pageY)-e.offset().top+$("body").scrollTop())/e.outerHeight()*100,r=(n-=parseFloat(e.find(".Scrubber-handle")[0].style.height)/2)/this.percentPerPost().index;r=Math.max(0,Math.min(this.stream.count()-1,r)),this.stream.goToIndex(Math.floor(r)),this.updateScrubberValues({animate:!0,forceHeightChange:!0}),this.$().removeClass("open")},n.percentPerPost=function(){var t=this.stream.count()||1,e=this.stream.visible||1,n=50/this.$(".Scrubber-scrollbar").outerHeight()*100,r=Math.max(100/t,n/e);return{index:t===e?0:(100-r*e)/(t-e),visible:r}},e}(A),ne=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className+=" Dropdown--split",e.menuClassName+=" Dropdown-menu--right"};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},e.attrs);return n.className=(n.className||"")+" SplitDropdown-button Button "+this.attrs.buttonClassName,[yt.component(n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},nt(this.attrs.icon,{className:"Button-icon"}),nt("fas fa-caret-down",{className:"Button-caret"}))]},n.getFirstChild=function(t){for(var e=t;e instanceof Array;)e=e[0];return e},e}(ut);function re(t,e,n,r){var i,o=!1,s=0;function a(){i&&clearTimeout(i)}function u(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var d=this,h=Date.now()-s;function f(){s=Date.now(),n.apply(d,l)}function p(){i=void 0}o||(r&&!i&&f(),a(),void 0===r&&h>t?f():!0!==e&&(i=setTimeout(r?p:f,void 0===r?t-h:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),u.cancel=function(){a(),o=!0},u}function ie(t,e,n){return void 0===n?re(t,e,!1):re(t,n,!1!==e)}function oe(t,e){var n=$(window),r=$(t).offset().top-n.scrollTop();e(),n.scrollTop($(t).offset().top-r)}var se=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.forceUpdateScrubber=!1,this.loadNext=re(300,this._loadNext),this.loadPrevious=re(300,this._loadPrevious),this.show(e)}var e=t.prototype;return e.update=function(){return this.viewingEnd()?(this.visibleEnd=this.count(),this.loadRange(this.visibleStart,this.visibleEnd)):Promise.resolve()},e.goToFirst=function(){return this.goToIndex(0)},e.goToLast=function(){return this.goToIndex(this.count()-1,!0)},e.goToNumber=function(t,e){if(void 0===e&&(e=!1),"reply"===t){var n=this.goToLast();return this.targetPost.reply=!0,n}return this.paused=!0,this.loadPromise=this.loadNearNumber(t),this.needsScroll=!0,this.targetPost={number:t},this.animateScroll=!e,this.number=t,this.loadPromise.then((function(){return m.redraw()}))},e.goToIndex=function(t,e){return void 0===e&&(e=!1),this.paused=!0,this.loadPromise=this.loadNearIndex(t),this.needsScroll=!0,this.targetPost={index:t},this.animateScroll=!e,this.index=t,m.redraw(),this.loadPromise},e.loadNearNumber=function(t){return this.posts().some((function(e){return e&&Number(e.number())===Number(t)}))?Promise.resolve():(this.reset(),ni.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 Promise.resolve();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 r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||oe('.PostStream-item[data-index="'+(n?r.visibleEnd-1:r.visibleStart)+'"]',m.redraw.sync)};i(),this.loadPageTimeouts[t]=setTimeout((function(){r.loadRange(t,e).then((function(){i(),r.pagesLoading--})),r.loadPageTimeouts[t]=null}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=ni.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?ni.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.createdAt()-e.createdAt()}))})):Promise.resolve(r)},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=ni.store.getById("posts",t);return e&&e.discussion()&&void 0!==e.canEdit()?e:null}))},e.count=function(){return this.discussion.postIds().length},e.disabled=function(){return this.visible>=this.count()},e.viewingEnd=function(){return Math.abs(this.count()-this.visibleEnd)<=1},e.sanitizeIndex=function(t){return Math.max(0,Math.min(this.count(),Math.floor(t)))},t}();se.loadCount=20;const ae=se;var ue=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discussion=null,e.stream=null,e.near=0,e.useBrowserScrollRestoration=!0,e}S(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),ni.discussions.hasItems()&&(null==(n=ni.pane)||n.enable(),null==(r=ni.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=ni.pane)||n.disable(),!this.discussion||!ni.composer.composingReplyTo(this.discussion)||null!=(r=ni.composer)&&null!=(i=r.fields)&&i.content()?ni.composer.minimize():ni.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},m(Gt,{state:ni.discussions}),m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()))},n.loadingItems=function(){var t=new M;return t.add("spinner",m(ft,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,z(this.sidebarItems().toArray())))},n.hero=function(){return m(W,{discussion:this.discussion})},n.pageContent=function(){var t=new M;return t.add("hero",this.hero(),100),t.add("main",m("div",{className:"container"},this.mainContent().toArray()),10),t},n.mainContent=function(){var t=new M;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},Zt.component({discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=ni.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();ni.store.find("discussions",m.route.param("id"),e).then(this.show.bind(this))}m.redraw()},n.requestParams=function(){return{bySlug:!0,page:{near:this.near}}},n.show=function(t){var e,n,r=this;ni.history.push("discussion",t.title()),ni.setTitle(t.title()),ni.setTitleCount(0);var i=[];if(t.payload&&t.payload.included){var o=t.id();i=t.payload.included.filter((function(t){return"posts"===t.type&&t.relationships&&t.relationships.discussion&&!Array.isArray(t.relationships.discussion.data)&&t.relationships.discussion.data.id===o})).map((function(t){return ni.store.getById("posts",t.id)})).sort((function(t,e){var n,r,i,o;return(null!=(n=null==t||null==(r=t.createdAt())?void 0:r.getTime())?n:0)-(null!=(i=null==e||null==(o=e.createdAt())?void 0:o.getTime())?i:0)})).slice(0,20)}this.stream=new ae(t,i),this.stream.goToNumber(m.route.param("near")||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,ni.current.set("discussion",t),ni.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new M;return this.discussion&&t.add("controls",ne.component({icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:ni.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},Ht.controls(this.discussion,this).toArray()),100),t.add("scrubber",ee.component({stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=ni.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),ni.history.push("discussion",n.title()),ni.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(D),le=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},z(this.items().toArray()))},n.items=function(){return new M},e}(A),ce=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=K,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){return void 0!==t.active?t.active:m.route.get()===t.href},e}(yt),de=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className="SessionDropdown",e.buttonClassName="Button Button--user Button--flat",e.menuClassName="Dropdown-menu--right",e.accessibleToggleLabel=ni.translator.trans("core.forum.header.session_dropdown_accessible_label")};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,C({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=ni.session.user;return[X(t)," ",m("span",{className:"Button-label"},Xt(t))]},n.items=function(){var t=new M,e=ni.session.user;return t.add("profile",ce.component({icon:"fas fa-user",href:ni.route.user(e)},ni.translator.trans("core.forum.header.profile_button")),100),t.add("settings",ce.component({icon:"fas fa-cog",href:ni.route("settings")},ni.translator.trans("core.forum.header.settings_button")),50),ni.forum.attribute("adminUrl")&&t.add("administration",ce.component({icon:"fas fa-wrench",href:ni.forum.attribute("adminUrl"),target:"_blank"},ni.translator.trans("core.forum.header.admin_button")),0),t.add("separator",H.component(),-90),t.add("logOut",yt.component({icon:"fas fa-sign-out-alt",onclick:ni.session.logout.bind(ni.session)},ni.translator.trans("core.forum.header.log_out_button")),-100),t},e}(ut);function he(t){var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("initAttrs"in e&&e.initAttrs(t.attrs),"isActive"in e?e.isActive(t.attrs):t.attrs.active)}var fe=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){e.caretIcon=void 0!==e.caretIcon?e.caretIcon:"fas fa-sort",t.initAttrs.call(this,e),e.className+=" Dropdown--select"},e.prototype.getButtonContent=function(t){var e=t.find(he),n=e&&e.children||this.attrs.defaultLabel;return n instanceof Array&&(n=n[0]),[m("span",{className:"Button-label"},n),nt(this.attrs.caretIcon,{className:"Button-caret"})]},e}(ut),pe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=b.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e,n;return null==(e=this.data)||null==(n=e.attributes)?void 0:n[t]})),e.pushData=function(e){var n;if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e&&((n=this.data).attributes||(n.attributes={}),Object.assign(this.data.attributes,e.attributes)),"relationships"in e){var r,i=null!=(r=this.data.relationships)?r:{};for(var o in e.relationships){var s,a=e.relationships[o];s=a instanceof t?{data:t.getIdentifier(a)}:a instanceof Array?{data:a.map(t.getIdentifier)}:a,e.relationships[o]=s,i[o]=s}this.data.relationships=i}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)}}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return b.request(C({method:this.exists?"PATCH":"POST",url:b.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?b.request(C({method:"DELETE",url:b.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,n;return null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data},t.attribute=function(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}},t.hasOne=function(t){return function(){var e,n,r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&r instanceof Array)throw new Error("Relationship "+t+" on model "+this.data.type+" is plural, so the hasOne method cannot be used to access it.");return!!r&&this.store.getById(r.type,r.id)}},t.hasMany=function(t){return function(){var e,n,r=this,i=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(i&&!(i instanceof Array))throw new Error("Relationship "+t+" on model "+this.data.type+" is singular, so the hasMany method cannot be used to access it.");return!!i&&i.map((function(t){return r.store.getById(t.type,t.id)}))}},t.transformDate=function(t){return null!=t?new Date(t):t},t.getIdentifier=function(t){return t&&"id"in t.data?{type:t.data.type,id:t.data.id}:null},t}();function me(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}var ve,ge=["type","icon","label","color","style"],ye=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t=this.attrs,e=t.type,n=t.icon,r=t.label,i=t.color,o=t.style,s=void 0===o?{}:o,a=V(t,ge),u=F("Badge",[e&&"Badge--"+e],a.className),l=n?nt(n,{className:"Badge-icon"}):m.trust(" "),c=C({},s,{"--badge-bg":i}),d=C({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Tt,{text:r},h):h},e}(A),be=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.title=function(){return pe.attribute("title").call(this)},n.slug=function(){return pe.attribute("slug").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.firstPost=function(){return pe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return pe.attribute("lastPostedAt",pe.transformDate).call(this)},n.lastPostedUser=function(){return pe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return pe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return pe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return pe.attribute("commentCount").call(this)},n.replyCount=function(){return me("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return pe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return pe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return pe.attribute("lastReadAt",pe.transformDate).call(this)},n.lastReadPostNumber=function(){return pe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return me("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return me("unreadCount",(function(t){return!(!b.session.user||t)})).call(this)},n.hiddenAt=function(){return pe.attribute("hiddenAt",pe.transformDate).call(this)},n.hiddenUser=function(){return pe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return me("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return pe.attribute("canReply").call(this)},n.canRename=function(){return pe.attribute("canRename").call(this)},n.canHide=function(){return pe.attribute("canHide").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=b.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new M;return this.isHidden()&&t.add("hidden",m(ye,{type:"hidden",icon:"fas fa-trash",label:b.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(pe),we=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.state;return m("div",{className:"NotificationList"},m("div",{className:"NotificationList-header"},m("h4",{className:"App-titleControl App-titleControl--text"},ni.translator.trans("core.forum.notifications.title")),m("div",{className:"App-primaryControl"},this.controlItems().toArray())),m("div",{className:"NotificationList-content"},this.content(t)))},n.controlItems=function(){var t=new M,e=this.attrs.state;return t.add("mark_all_as_read",m(yt,{className:"Button Button--link",icon:"fas fa-check",title:ni.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)}),70),t},n.content=function(t){return t.isLoading()?m(ft,{className:"LoadingIndicator--block"}):t.hasItems()?t.getPages().map((function(t){var e=[],n={};return t.items.forEach((function(t){var r=t.subject();if(void 0!==r){var i=null;r instanceof be?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(K,{className:"NotificationGroup-header",href:ni.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},z(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},ni.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=ni.notificationComponents[t.contentType()];return e?m("li",null,e.component({notification:t})):""}))))}))})):m("div",{className:"NotificationList-empty"},ni.translator.trans("core.forum.notifications.empty_text"))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$notifications=this.$(".NotificationList-content"),this.$scrollParent=this.inPanel()?this.$notifications:$(window),this.boundScrollHandler=this.scrollHandler.bind(this),this.$scrollParent.on("scroll",this.boundScrollHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),this.$scrollParent.off("scroll",this.boundScrollHandler)},n.scrollHandler=function(){var t=this.attrs.state,e=this.inPanel()?this.$scrollParent[0]:document.documentElement,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<=1;t.hasNext()&&!t.isLoadingNext()&&n&&t.loadNext()},n.inPanel=function(){return"auto"===this.$notifications.css("overflow")},e}(A),xe=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){e.className=e.className||"NotificationsDropdown",e.buttonClassName=e.buttonClassName||"Button Button--flat",e.menuClassName=e.menuClassName||"Dropdown-menu--right",e.label=e.label||ni.translator.trans("core.forum.notifications.tooltip"),e.icon=e.icon||"fas fa-bell",e.accessibleToggleLabel=e.accessibleToggleLabel||ni.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"),t.initAttrs.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.attrs.label,n.attrs.className=F(n.attrs.className,[e&&"new"]),n.attrs.onclick=this.onclick.bind(this),n},n.getButtonContent=function(){var t=this.getUnreadCount();return[nt(this.attrs.icon,{className:"Button-icon"}),0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:F("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&we.component({state:this.attrs.state}))},n.onclick=function(){ni.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(ni.route("notifications"))},n.getUnreadCount=function(){return ni.session.user.unreadNotificationCount()},n.getNewCount=function(){return ni.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||2===t.which)&&t.stopPropagation()},e}(ut);!function(t){t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowDown=40]="ArrowDown",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowRight=39]="ArrowRight",t[t.Tab=9]="Tab",t[t.Backspace=8]="Backspace"}(ve||(ve={}));var Ne=function(){function t(){this.callbacks=new Map,this.whenCallback=function(t){return!0}}var e=t.prototype;return e.onUp=function(t){return this.callbacks.set(ve.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ve.ArrowDown,(function(e){e.preventDefault(),t(e)})),this},e.onSelect=function(t,e){void 0===e&&(e=!1);var n=function(e){e.preventDefault(),t(e)};return e||this.callbacks.set(ve.Tab,n),this.callbacks.set(ve.Enter,n),this},e.onTab=function(t){return this.callbacks.set(9,(function(e){e.preventDefault(),t(e)})),this},e.onCancel=function(t){return this.callbacks.set(ve.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ve.Backspace,(function(e){e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&0===e.target.selectionStart&&0===e.target.selectionEnd&&(t(e),e.preventDefault())})),this},e.when=function(t){return this.whenCallback=t,this},e.bindTo=function(t){t[0].addEventListener("keydown",this.navigate.bind(this))},e.navigate=function(t){if(this.whenCallback(t)){var e=this.callbacks.get(t.which);e&&e(t)}},t}();function Se(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function Ce(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Se(o,r,i,s,a,"next",t)}function a(t){Se(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Te=n(195),ke=n.n(Te),Ee=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ce(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),n={filter:{q:e},page:{limit:3},include:"mostRelevantPost"},t.abrupt("return",ni.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).map((function(e){var n,r=e.mostRelevantPost();return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+e.id()},m(K,{href:ni.route.discussion(e,r&&r.number()||0)},m("div",{className:"DiscussionSearchResult-title"},et(e.title(),t)),r?m("div",{className:"DiscussionSearchResult-excerpt"},et(null!=(n=r.contentPlain())?n:"",t,100)):""))}));return[m("li",{className:"Dropdown-header"},ni.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(ce,{icon:"fas fa-search",href:ni.route("index",{q:t})},ni.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},t}(),Ae=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ce(ke().mark((function t(e){var n=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ni.store.find("users",{filter:{q:e},page:{limit:5}}).then((function(t){n.results.set(e,t),m.redraw()})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).concat(ni.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"},ni.translator.trans("core.forum.search.users_heading"))].concat(e.map((function(e){var n=Xt(e),r=[et(n.text,t)];return m("li",{className:"UserSearchResult","data-index":"users"+e.id()},m(K,{href:ni.route.user(e)},X(e),C({},n,{text:void 0,children:r})))}))):[]},t}(),Pe=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).searchState=void 0,e.hasFocus=!1,e.sources=void 0,e.loadingSources=0,e.index=0,e.navigator=void 0,e.searchTimeout=void 0,e.updateMaxHeightHandler=void 0,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.searchState=this.attrs.state},n.view=function(){var t=this,e=this.searchState.getInitialSearch();if(this.sources||(this.sources=this.sourceItems().toArray()),!this.sources.length)return m("div",null);var n=st(ni.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(this.loadingSources||!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":ni.translator.trans("core.forum.header.search_role_label"),className:F("Search",{open:this.searchState.getValue()&&this.hasFocus,focused:this.hasFocus,active:r,loading:!!this.loadingSources})},m("div",{className:"Search-input"},m("input",{"aria-label":n,className:"FormControl",type:"search",placeholder:n,value:this.searchState.getValue(),oninput:function(e){var n;return t.searchState.setValue(null==e||null==(n=e.target)?void 0:n.value)},onfocus:function(){return t.hasFocus=!0},onblur:function(){return t.hasFocus=!1}}),!!this.loadingSources&&m(ft,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),o&&m("button",{className:"Search-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":ni.translator.trans("core.forum.header.search_clear_button_accessible_label")},nt("fas fa-times-circle"))),m("ul",{className:"Dropdown-menu Search-results","aria-hidden":!i||void 0,"aria-live":i?"polite":void 0},i&&this.sources.map((function(e){return e.view(t.searchState.getValue())}))))},n.updateMaxHeight=function(){var t,e,n=window.innerHeight-this.element.querySelector(".Search-input>.FormControl").getBoundingClientRect().bottom-14;null==(t=this.element.querySelector(".Search-results"))||null==(e=t.style)||e.setProperty("max-height",n+"px")},n.onupdate=function(e){var n;t.prototype.onupdate.call(this,e),this.setIndex(this.getCurrentNumericIndex()),null!=(n=this.sources)&&n.length&&this.updateMaxHeight()},n.oncreate=function(e){var n,r=this;if(t.prototype.oncreate.call(this,e),null!=(n=this.sources)&&n.length){var i=this,o=this.searchState;this.setIndex(this.getCurrentNumericIndex()),this.$(".Search-results").on("mousedown",(function(t){return t.preventDefault()})).on("click",(function(){return r.$("input").trigger("blur")})).on("mouseenter","> li:not(.Dropdown-header)",(function(){i.setIndex(i.selectableItems().index(this))}));var s=this.$("input");this.navigator=new Ne,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),250))})).on("focus",(function(){$(this).one("mouseup",(function(t){return t.preventDefault()})).trigger("select")})),this.updateMaxHeightHandler=this.updateMaxHeight.bind(this),window.addEventListener("resize",this.updateMaxHeightHandler)}},n.onremove=function(e){t.prototype.onremove.call(this,e),this.updateMaxHeightHandler&&window.removeEventListener("resize",this.updateMaxHeightHandler)},n.selectResult=function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.loadingSources=0;var t=this.getItem(this.index).find("a").attr("href");this.searchState.getValue()&&t?m.route.set(t):this.clear(),this.$("input").blur()},n.clear=function(){this.searchState.clear()},n.sourceItems=function(){var t=new M;return ni.forum.attribute("canViewForum")&&t.add("discussions",new Ee),ni.forum.attribute("canSearchUsers")&&t.add("users",new Ae),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){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},O(e,[{key:"state",get:function(){return vt("`state` property of the Search component is deprecated","3212"),this.searchState},set:function(t){void 0!==t&&vt("`state` property of the Search component is deprecated","3212"),this.searchState=t}}]),e}(A);Pe.MIN_SEARCH_LEN=3;var _e=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},z(this.items().toArray()))},n.items=function(){var t=new M;if(t.add("search",Pe.component({state:ni.search}),30),ni.forum.attribute("showLanguageSelector")&&Object.keys(ni.data.locales).length>1){var e=[],n=function(t){e.push(yt.component({active:ni.data.locale===t,icon:ni.data.locale!==t||"fas fa-check",onclick:function(){ni.session.user?ni.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())}},ni.data.locales[t]))};for(var r in ni.data.locales)n(r);t.add("locale",fe.component({buttonClassName:"Button Button--link",accessibleToggleLabel:ni.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return ni.session.user?(t.add("notifications",xe.component({state:ni.notifications}),10),t.add("session",de.component(),0)):(ni.forum.attribute("allowSignUp")&&t.add("signUp",yt.component({className:"Button Button--link",onclick:function(){return ni.modal.show(jt)}},ni.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",yt.component({className:"Button Button--link",onclick:function(){return ni.modal.show(Mt)}},ni.translator.trans("core.forum.header.log_in_link")),0)),t},e}(A),De=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link"},e}(yt),Ie=function(){function t(){this.position=t.Position.HIDDEN,this.height=null,this.body={attrs:{}},this.editor=null,this.clear()}var e=t.prototype;return e.load=function(t,e){var n={componentClass:t,attrs:e};this.preventExit()||(this.isVisible()&&(this.clear(),m.redraw.sync()),this.body=n)},e.clear=function(){this.position=t.Position.HIDDEN,this.body={attrs:{}},this.onExit=null,this.fields={content:Ot("")},this.editor&&this.editor.destroy(),this.editor=null},e.show=function(){this.position!==t.Position.NORMAL&&this.position!==t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw.sync())},e.hide=function(){this.clear(),m.redraw()},e.close=function(){this.preventExit()||this.hide()},e.minimize=function(){this.isVisible()&&(this.position=t.Position.MINIMIZED,m.redraw())},e.fullScreen=function(){this.isVisible()&&(this.position=t.Position.FULLSCREEN,m.redraw())},e.exitFullScreen=function(){this.position===t.Position.FULLSCREEN&&(this.position=t.Position.NORMAL,m.redraw())},e.bodyMatches=function(t,e){var n=this;return void 0===e&&(e={}),!!P(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"===ni.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Pt,{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}();Ie.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Oe=Ie;var $e=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state,this.active=!1,this.prevPosition=this.state.position},n.view=function(){var t=this.state.body,e={normal:this.state.position===Oe.Position.NORMAL,minimized:this.state.position===Oe.Position.MINIMIZED,fullScreen:this.state.position===Oe.Position.FULLSCREEN,active:this.active,visible:this.state.isVisible()},n=this.state.position===Oe.Position.MINIMIZED?this.state.show.bind(this.state):void 0;return m("div",{className:"Composer "+F(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},z(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},t.componentClass?t.componentClass.component(C({},t.attrs,{composer:this.state,disabled:e.minimized})):""))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Oe.Position.HIDDEN&&this.state.position!==Oe.Position.MINIMIZED&&"phone"!==ni.screen()?this.state.computedHeight()-parseInt($("#app").css("padding-bottom"),10):0;$("#content").css({paddingBottom:t})},n.animatePositionChange=function(){if(this.prevPosition!==Oe.Position.FULLSCREEN||this.state.position!==Oe.Position.NORMAL)switch(this.state.position){case Oe.Position.HIDDEN:return this.hide();case Oe.Position.MINIMIZED:return this.minimize();case Oe.Position.FULLSCREEN:return this.focus();case Oe.Position.NORMAL:return this.show()}else this.focus()},n.animateHeightChange=function(){var t=this.$().stop(!0),e=t.outerHeight(),n=$(window).scrollTop();t.show(),this.updateHeight();var r=t.outerHeight();this.prevPosition===Oe.Position.HIDDEN?t.css({bottom:-r,height:r}):t.css({height:e});var i=t.animate({bottom:0,height:r},"fast").promise();return this.updateBodyPadding(),$(window).scrollTop(n),i},n.showBackdrop=function(){this.$backdrop=$("<div/>").addClass("composer-backdrop").appendTo("body")},n.hideBackdrop=function(){this.$backdrop&&this.$backdrop.remove()},n.show=function(){var t=this;if(this.animateHeightChange().then((function(){return t.focus()})),"phone"===ni.screen()){var e=document.documentElement,n=Math.min(e.scrollTop,e.scrollHeight-e.clientHeight);this.$().css("top",$(".App").is(".mobile-safari")?n:0),this.showBackdrop()}},n.hide=function(){var t=this,e=this.$();e.stop(!0).animate({bottom:-e.height()},"fast",(function(){e.hide(),t.hideBackdrop(),t.updateBodyPadding()}))},n.minimize=function(){this.animateHeightChange(),this.$().css("top","auto"),this.hideBackdrop()},n.controlItems=function(){var t=new M;return this.state.position===Oe.Position.FULLSCREEN?t.add("exitFullScreen",De.component({icon:"fas fa-compress",title:ni.translator.trans("core.forum.composer.exit_full_screen_tooltip"),onclick:this.state.exitFullScreen.bind(this.state)})):(this.state.position!==Oe.Position.MINIMIZED&&(t.add("minimize",De.component({icon:"fas fa-minus minimize",title:ni.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",De.component({icon:"fas fa-expand",title:ni.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",De.component({icon:"fas fa-times",title:ni.translator.trans("core.forum.composer.close_tooltip"),onclick:this.state.close.bind(this.state)}))),t},n.initializeHeight=function(){this.state.height=localStorage.getItem("composerHeight"),this.state.height||(this.state.height=this.defaultHeight())},n.defaultHeight=function(){return this.$().height()},n.changeHeight=function(t){this.state.height=t,this.updateHeight(),localStorage.setItem("composerHeight",this.state.height)},e}(A),Le=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this,e=this.attrs.notification,n=this.href();return m(K,{className:F("Notification","Notification--"+e.contentType(),[!e.isRead()&&"unread"]),href:n,external:n.includes("://"),onclick:this.markAsRead.bind(this)},X(e.fromUser()),nt(this.icon(),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},this.content()),m("span",{className:"Notification-title-spring"}),lt(e.createdAt())),!e.isRead()&&m(yt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:ni.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(e){e.preventDefault(),e.stopPropagation(),t.markAsRead()}}),m("div",{className:"Notification-excerpt"},this.excerpt()))},n.icon=function(){},n.href=function(){},n.content=function(){},n.excerpt=function(){},n.markAsRead=function(){this.attrs.notification.isRead()||(ni.session.user.pushAttributes({unreadNotificationCount:ni.session.user.unreadNotificationCount()-1}),this.attrs.notification.save({isRead:!0}))},e}(A),je=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification;return ni.route.discussion(t.subject(),t.content().postNumber)},n.content=function(){return ni.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},e}(Le);function Me(t){ni.composer.isFullScreen()&&(ni.composer.minimize(),t.stopPropagation())}var Re=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||ni.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||ni.translator.trans("core.forum.composer_edit.discard_confirmation"),e.originalContent=e.originalContent||e.post.content(),e.user=e.user||e.post.user(),e.post.editedContent=e.originalContent};var n=e.prototype;return n.headerItems=function(){var e=t.prototype.headerItems.call(this),n=this.attrs.post;return e.add("title",m("h3",null,nt("fas fa-pencil-alt")," ",m(K,{href:ni.route.discussion(n.discussion(),n.number()),onclick:Me},ni.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){Me(t),m.route.set(ni.route.post(this.attrs.post))},n.data=function(){return{content:this.composer.fields.content()}},n.onsubmit=function(){var t=this,e=this.attrs.post.discussion();this.loading=!0;var n=this.data();this.attrs.post.save(n).then((function(n){if(ni.viewingDiscussion(e))ni.current.get("stream").goToNumber(n.number());else{var r,i=yt.component({className:"Button Button--link",onclick:function(){m.route.set(ni.route.post(n)),ni.alerts.dismiss(r)}},ni.translator.trans("core.forum.composer_edit.view_button"));r=ni.alerts.show({type:"success",controls:[i]},ni.translator.trans("core.forum.composer_edit.edited_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(Et);const He={controls:function(t,e){var n=this,r=new M;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",H.component()))})),r},userControls:function(t,e){return new M},moderationControls:function(t,e){var n=new M;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",yt.component({icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},ni.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new M;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",yt.component({icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},ni.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",yt.component({icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},ni.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",yt.component({icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},ni.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return ni.composer.load(Re,{post:t}),ni.composer.show(),e()}))},hideAction:function(){if(confirm(st(ni.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushAttributes({hiddenAt:new Date,hiddenUser:ni.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(st(ni.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||(ni.discussions.removeDiscussion(t),ni.viewingDiscussion(t)&&ni.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};var Be=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.loading=!1,this.subtree=new dt((function(){return n.loading}),(function(){return n.attrs.post.freshness}),(function(){var t=n.attrs.post.user();return t&&t.freshness}),(function(){return n.controlsOpen}))},n.view=function(){var t=this,e=this.elementAttrs();e.className=this.classes(e.className).join(" ");var n=He.controls(this.attrs.post,this).toArray(),r=this.footerItems().toArray();return m("article",e,m("div",null,this.loading?m(ft,null):this.content(),m("aside",{className:"Post-actions"},m("ul",null,z(this.actionItems().toArray()),n.length?m("li",null,m(ut,{className:"Post-controls",buttonClassName:"Button Button--icon Button--flat",menuClassName:"Dropdown-menu--right",icon:"fas fa-ellipsis-h",onshow:function(){return t.$(".Post-controls").addClass("open")},onhide:function(){return t.$(".Post-controls").removeClass("open")},accessibleToggleLabel:ni.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},n)):"")),m("footer",{className:"Post-footer"},r.length?m("ul",null,z(r)):null)))},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("open",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===ni.session.user&&e.push("Post--by-actor"),(null==n?void 0:n.id())===r.attribute("startUserId")&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new M},n.footerItems=function(){return new M},e}(A),Fe=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon(),e.color=e.group.color(),e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(ye),Ue=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.nameSingular=function(){return pe.attribute("nameSingular").call(this)},n.namePlural=function(){return pe.attribute("namePlural").call(this)},n.color=function(){return pe.attribute("color").call(this)},n.icon=function(){return pe.attribute("icon").call(this)},n.isHidden=function(){return pe.attribute("isHidden").call(this)},e}(pe);Ue.ADMINISTRATOR_ID="1",Ue.GUEST_ID="2",Ue.MEMBER_ID="3";var qe=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.isEmailConfirmed=void 0,e.setPassword=void 0,e.password=void 0,e.groups={},e}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e);var r=this.attrs.user;this.username=Ot(r.username()||""),this.email=Ot(r.email()||""),this.isEmailConfirmed=Ot(r.isEmailConfirmed()||!1),this.setPassword=Ot(!1),this.password=Ot(r.password()||"");var i=r.groups()||[];b.store.all("groups").filter((function(t){return![Ue.GUEST_ID,Ue.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Ot(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return b.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):b.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t,e,n=this,r=new M;return null!=(t=b.session.user)&&t.canEditCredentials()&&(r.add("username",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:st(b.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),b.session.user!==this.attrs.user&&(r.add("email",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:st(b.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(b.session.user)?m("div",null,yt.component({className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},b.translator.trans("core.lib.edit_user.activate_button"))):""),30),r.add("password",m("div",{className:"Form-group"},m("label",null,b.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(t){var e=t.target;n.setPassword(e.checked),m.redraw.sync(),e.checked&&n.$("[name=password]").select(),t.redraw=!1},disabled:this.nonAdminEditingAdmin()}),b.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()?m("input",{className:"FormControl",type:"password",name:"password",placeholder:st(b.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}):"")),20))),null!=(e=b.session.user)&&e.canEditGroups()&&r.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,b.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return b.store.getById("groups",t)})).filter(Boolean).map((function(t){return t&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:n.groups[t.id()],disabled:t.id()===Ue.ADMINISTRATOR_ID&&(n.attrs.user===b.session.user||!n.userIsAdmin(b.session.user))}),Fe.component({group:t,label:""})," ",t.nameSingular())})))),10),r.add("submit",m("div",{className:"Form-group"},yt.component({className:"Button Button--primary",type:"submit",loading:this.loading},b.translator.trans("core.lib.edit_user.submit_button"))),-10),r},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),b.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return b.store.getById("groups",t)})).filter((function(t){return t instanceof Ue}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(b.session.user)},n.userIsAdmin=function(t){return t&&(t.groups()||[]).some((function(t){return(null==t?void 0:t.id())===Ue.ADMINISTRATOR_ID}))},e}(Dt),ze=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(t){return t.children[0]},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundOnresize=this.onresize.bind(this),$(window).on("resize",this.boundOnresize).resize()},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.boundOnresize)},n.onresize=function(){var t=this,e=this.$(),n=$("#header"),r=$("#footer"),i=e.find("> ul");$(window).off(".affix"),i.removeClass("affix affix-top affix-bottom").removeData("bs.affix"),e.outerHeight(!0)>$(window).height()-n.outerHeight(!0)||i.affix({offset:{top:function(){return e.offset().top-n.outerHeight(!0)-parseInt(e.css("margin-top"),10)},bottom:function(){return t.bottom=r.outerHeight(!0)}}})},e}(A),We=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.user=null,this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Ye,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===ni.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(ze,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,z(this.sidebarItems().toArray())))),m("div",{className:"sideNavOffset UserPage-content"},this.content())))]:[m(ft,{display:"block"})])},n.content=function(){},n.show=function(t){this.user=t,ni.current.set("user",t),ni.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();ni.preloadedApiDocument(),ni.store.all("users").some((function(r){if((r.username().toLowerCase()===n||r.id()===t)&&r.joinTime())return e.show(r),!0})),this.user||ni.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new M;return t.add("nav",m(fe,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new M,e=this.user;return t.add("posts",m(ce,{href:ni.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},ni.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(ce,{href:ni.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},ni.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),ni.session.user===e&&(t.add("separator",m(H,null),-90),t.add("settings",m(ce,{href:ni.route("settings"),icon:"fas fa-cog"},ni.translator.trans("core.forum.user.settings_link")),-100)),t},e}(D);const Ve={controls:function(t,e){var n=this,r=new M;return["user","moderation","destructive"].forEach((function(i){var o=n[i+"Controls"](t,e).toArray();o.length&&(o.forEach((function(t){return r.add(t.itemName,t)})),r.add(i+"Separator",m(H,null)))})),r},userControls:function(){return new M},moderationControls:function(t){var e=new M;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},ni.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new M;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},ni.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(ni.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),ni.current.matches(We,{user:t})?ni.history.back():window.location.reload()})).catch((function(){return e.showDeletionAlert(t,"error")}))},showDeletionAlert:function(t,e){var n={success:"core.forum.user_controls.delete_success_message",error:"core.forum.user_controls.delete_error_message"}[e];ni.alerts.show({type:e},ni.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){ni.modal.show(qe,{user:t})}};var Ge=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loading=!1,this.isDraggedOver=!1},n.view=function(){var t=this.attrs.user;return m("div",{className:F(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},X(t),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:ni.translator.trans("core.forum.user.avatar_upload_tooltip"),"data-toggle":"dropdown",onclick:this.quickUpload.bind(this),ondragover:this.enableDragover.bind(this),ondragenter:this.enableDragover.bind(this),ondragleave:this.disableDragover.bind(this),ondragend:this.disableDragover.bind(this),ondrop:this.dropUpload.bind(this)},this.loading?m(ft,{display:"unset",size:"large"}):t.avatarUrl()?nt("fas fa-pencil-alt"):nt("fas fa-plus-circle")),m("ul",{className:"Dropdown-menu Menu"},z(this.controlItems().toArray())))},n.controlItems=function(){var t=new M;return t.add("upload",m(yt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},ni.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(yt,{icon:"fas fa-times",onclick:this.remove.bind(this)},ni.translator.trans("core.forum.user.avatar_remove_button"))),t},n.enableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!0},n.disableDragover=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1},n.dropUpload=function(t){t.preventDefault(),t.stopPropagation(),this.isDraggedOver=!1,this.upload(t.dataTransfer.files[0])},n.quickUpload=function(t){this.attrs.user.avatarUrl()||(t.preventDefault(),t.stopPropagation(),this.openPicker())},n.openPicker=function(){var t=this;this.loading||$('<input type="file" accept=".jpg, .jpeg, .png, .bmp, .gif">').appendTo("body").hide().click().on("input",(function(e){t.upload($(e.target)[0].files[0])}))},n.upload=function(t){if(!this.loading){var e=this.attrs.user,n=new FormData;n.append("avatar",t),this.loading=!0,m.redraw(),ni.request({method:"POST",url:ni.forum.attribute("apiUrl")+"/users/"+e.id()+"/avatar",serialize:function(t){return t},body:n}).then(this.success.bind(this),this.failure.bind(this))}},n.remove=function(){var t=this.attrs.user;this.loading=!0,m.redraw(),ni.request({method:"DELETE",url:ni.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){ni.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(A),Ye=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ve.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:"UserCard "+(this.attrs.className||""),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},e.length?ut.component({className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:ni.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:ni.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e):"",m("div",{className:"UserCard-profile"},m("h2",{className:"UserCard-identity"},this.attrs.editable?[Ge.component({user:t,className:"UserCard-avatar"}),Xt(t)]:m(K,{href:ni.route.user(t)},m("div",{className:"UserCard-avatar"},X(t)),Xt(t))),r.length?m("ul",{className:"UserCard-badges badges"},z(r)):"",m("ul",{className:"UserCard-info"},z(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new M,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:"UserCard-lastSeen"+(r?" online":"")},r?[nt("fas fa-circle")," ",ni.translator.trans("core.forum.user.online_text")]:[nt("far fa-clock")," ",ot(n)]))}return t.add("joined",ni.translator.trans("core.forum.user.joined_date_text",{ago:ot(e.joinTime())})),t},e}(A);function Ke(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},nt("fas fa-circle")):null}var Xe=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();if(!e)return m("div",{className:"PostUser"},m("h3",null,X(e,{className:"PostUser-avatar"})," ",Xt(e)));var n="";return!t.isHidden()&&this.attrs.cardVisible&&(n=Ye.component({user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m("div",{className:"PostUser"},m("h3",null,m(K,{href:ni.route.user(e)},X(e,{className:"PostUser-avatar"}),Ke(e),Xt(e))),m("ul",{className:"PostUser-badges badges"},z(e.badges().toArray())),n)},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout","h3 a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(A);function Je(t){var e=it()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var Qe=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.createdAt(),n=this.getPermalink(t),r="ontouchstart"in document.documentElement;return m("div",{className:"Dropdown PostMeta"},m("a",{className:"Dropdown-toggle",onclick:function(t){var e=this;setTimeout((function(){return $(e).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},"data-toggle":"dropdown"},lt(e)),m("div",{className:"Dropdown-menu dropdown-menu"},m("span",{className:"PostMeta-number"},ni.translator.trans("core.forum.post.number_tooltip",{number:t.number()}))," ",m("span",{className:"PostMeta-time"},Je(e))," ",m("span",{className:"PostMeta-ip"},t.data.attributes.ipAddress),r?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 ni.forum.attribute("baseUrl")+ni.route.post(t)},e}(A),Ze=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(){var t=this.attrs.post,e=t.editedUser(),n=ni.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:ot(t.editedAt())});return m(Tt,{text:n},m("span",{class:"PostEdited"},ni.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(A),tn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat([m("header",{className:"Post-header"},m("ul",null,z(this.headerItems().toArray()))),m("div",{className:"Post-body"},this.isEditing()?m(Jt,{className:"Post-preview",composer:ni.composer}):m.trust(this.attrs.post.contentHtml()))])},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return ni.composer.bodyMatches(Re,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=(n.className||"")+" "+F({CommentPost:!0,"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new M,n=this.attrs.post;return e.add("user",Xe.component({post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",Qe.component({post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",Ze.component({post:n})),n.isHidden()&&e.add("toggle",yt.component({className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Be),en=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=(e.className||"")+" EventPost "+tt(this.attrs.post.contentType())+"Post",e},n.content=function(){var e=this.attrs.post.user(),n=Xt(e),r=Object.assign(this.descriptionData(),{user:e,username:e?m(K,{className:"EventPost-user",href:ni.route.user(e)},n):n});return t.prototype.content.call(this).concat([nt(this.icon(),{className:"EventPost-icon"}),m("div",{class:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return ni.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Be),nn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=ni.translator.trans("core.forum.post_stream.discussion_renamed_text",t),n=ni.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",t);return m("span",{title:st(n)},e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{old:e,new:m("strong",{className:"DiscussionRenamedPost-new"},n)}},e}(en),rn="welcomeHidden",on=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).hidden=!1,e}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){var e=this;return this.isHidden()?null:m("header",{class:"Hero WelcomeHero"},m("div",{class:"container"},m(yt,{icon:"fas fa-times",onclick:function(){e.$().slideUp(e.hide.bind(e))},className:"Hero-close Button Button--icon Button--link","aria-label":ni.translator.trans("core.forum.welcome_hero.hide")}),m("div",{class:"containerNarrow"},m("h2",{class:"Hero-title"},ni.forum.attribute("welcomeTitle")),m("div",{class:"Hero-subtitle"},m.trust(ni.forum.attribute("welcomeMessage"))))))},n.hide=function(){localStorage.setItem(rn,"true")},n.isHidden=function(){var t;return null==(t=ni.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(rn)||!!this.hidden},e}(A),sn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||st(ni.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||ni.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||st(ni.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||st(ni.translator.trans("core.forum.composer_discussion.title_placeholder")),e.className="ComposerBody--discussion"};var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.composer.fields.title=this.composer.fields.title||Ot(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,ni.translator.trans("core.forum.composer_discussion.title")),100),e.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),e},n.onkeydown=function(t){13===t.which&&(t.preventDefault(),this.composer.editor.moveCursorTo(0)),t.redraw=!1},n.hasChanges=function(){return this.title()||this.composer.fields.content()},n.data=function(){return{title:this.title(),content:this.composer.fields.content()}},n.onsubmit=function(){var t=this;this.loading=!0;var e=this.data();ni.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),ni.discussions.refresh({deferClear:!0}),m.route.set(ni.route.discussion(e))}),this.loaded.bind(this))},e}(Et),an=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),ni.previous.matches(ue)&&(this.lastDiscussion=ni.previous.get("discussion")),ni.previous.matches(e)&&ni.discussions.clear(),ni.discussions.refreshParams(ni.search.params(),m.route.param("page")),ni.history.push("index",ni.translator.trans("core.forum.header.back_to_index_tooltip")),this.bodyClass="App--index",this.scrollTopOnCreate=!1},n.view=function(){return m("div",{className:"IndexPage"},this.hero(),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m("nav",{className:"IndexPage-nav sideNav"},m("ul",null,z(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},m("div",{className:"IndexPage-toolbar"},m("ul",{className:"IndexPage-toolbar-view"},z(this.viewItems().toArray())),m("ul",{className:"IndexPage-toolbar-action"},z(this.actionItems().toArray()))),m(Wt,{state:ni.discussions})))))},n.setTitle=function(){ni.setTitle(ni.translator.trans("core.forum.index.meta_title_text")),ni.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=ni.cache.heroHeight,r=ni.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=ni.cache.scrollTop;if($("#app").css("min-height",$(window).height()+r),null!=ni.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight(),a=$(window).height(),u=o.offset().top,l=u+o.outerHeight();(u<i+s||l>i+a)&&$(window).scrollTop(u-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),ni.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return on.component()},n.sidebarItems=function(){var t=this,e=new M,n=ni.forum.attribute("canStartDiscussion")||!ni.session.user;return e.add("newDiscussion",yt.component({icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},ni.translator.trans(n?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button"))),e.add("nav",fe.component({buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:ni.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems(this).toArray())),e},n.navItems=function(){var t=new M,e=ni.search.stickyParams();return t.add("allDiscussions",ce.component({href:ni.route("index",e),icon:"far fa-comments"},ni.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new M,e=ni.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=ni.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",ut.component({buttonClassName:"Button",label:n[ni.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:ni.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(ni.search.params().sort||Object.keys(e)[0])===t;return yt.component({icon:!i||"fas fa-check",onclick:ni.search.changeSort.bind(ni.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new M;return t.add("refresh",yt.component({title:ni.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){ni.discussions.refresh(),ni.session.user&&(ni.store.find("users",ni.session.user.id()),m.redraw())}})),ni.session.user&&t.add("markAllAsRead",yt.component({title:ni.translator.trans("core.forum.index.mark_all_as_read_tooltip"),icon:"fas fa-check",className:"Button Button--icon",onclick:this.markAllAsRead.bind(this)})),t},n.newDiscussionAction=function(){return new Promise((function(t,e){return ni.session.user?(ni.composer.load(sn,{user:ni.session.user}),ni.composer.show(),t(ni.composer)):(ni.modal.show(Mt),e())}))},n.markAllAsRead=function(){confirm(ni.translator.trans("core.forum.index.mark_all_as_read_confirmation"))&&ni.session.user.save({markedAllAsReadAt:new Date})},e}(D);an.providesInitialSearch=!0;var un=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),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=m(ft,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(yt,{className:"Button",onclick:this.loadMore.bind(this)},ni.translator.trans("core.forum.user.posts_load_more_button")))),m("div",{className:"PostsUserPage"},m("ul",{className:"PostsUserPage-list"},this.posts.map((function(t){return m("li",null,m("div",{className:"PostsUserPage-discussion"},ni.translator.trans("core.forum.user.in_discussion_text",{discussion:m(K,{href:ni.route.post(t)},t.discussion().title())})),m(tn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(zt,{text:ni.translator.trans("core.forum.user.posts_empty_text")}));var t},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return ni.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},e}(We),ln=function(){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e=1),void 0===n&&(n=20),this.location=void 0,this.pageSize=void 0,this.pages=[],this.params={},this.initialLoading=!1,this.loadingPrev=!1,this.loadingNext=!1,this.params=t,this.location={page:e},this.pageSize=n}var e=t.prototype;return e.clear=function(){this.pages=[],m.redraw()},e.loadPrev=function(){var t=this;if(this.loadingPrev||1===this.getLocation().page)return Promise.resolve();this.loadingPrev=!0;var e=this.getPrevPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingPrev=!1}))},e.loadNext=function(){var t=this;if(this.loadingNext)return Promise.resolve();this.loadingNext=!0;var e=this.getNextPageNumber();return this.loadPage(e).then(this.parseResults.bind(this,e)).finally((function(){return t.loadingNext=!1}))},e.parseResults=function(t,e){var n,r=Number(t),i=null==(n=e.payload)?void 0:n.links,o={number:r,items:e,hasNext:!(null==i||!i.next),hasPrev:!(null==i||!i.prev)};this.isEmpty()||r>this.getNextPageNumber()-1?this.pages.push(o):this.pages.unshift(o),this.location={page:r},m.redraw()},e.loadPage=function(t){void 0===t&&(t=1);var e=this.requestParams(),n=Array.isArray(e.include)?e.include.join(","):e.include,r=C({},e,{page:C({},e.page,{offset:this.pageSize*(t-1)}),include:n});return b.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}();function cn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var dn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r}S(e,t);var n=e.prototype;return n.requestParams=function(){var t,e={include:["user","lastPostedUser"],filter:this.params.filter||{},sort:this.sortMap()[null!=(t=this.params.sort)?t:""]};return this.params.q&&(e.filter.q=this.params.q,e.include.push("mostRelevantPost","mostRelevantPost.user")),e},n.loadPage=function(e){void 0===e&&(e=1);var n=ni.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return cn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.pages);!(e=n()).done;){var r=e.value,i=r.items.indexOf(t);if(-1!==i){r.items.splice(i,1);break}}var o=this.extraDiscussions.indexOf(t);-1!==o&&this.extraDiscussions.splice(o),m.redraw()},n.addDiscussion=function(t){this.removeDiscussion(t),this.extraDiscussions.unshift(t),m.redraw()},n.getAllItems=function(){return this.extraDiscussions.concat(t.prototype.getAllItems.call(this))},n.getPages=function(){var e=t.prototype.getPages.call(this);return this.extraDiscussions.length?[{number:-1,items:this.extraDiscussions}].concat(e):e},O(e,[{key:"type",get:function(){return"discussions"}}]),e}(ln),hn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.show=function(e){t.prototype.show.call(this,e),this.state=new dn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},Wt.component({state:this.state}))},e}(We);const fn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var pn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(t){"0"===this.attrs.state&&(this.attrs.state=!1);var e=F(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:fn("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display","aria-hidden":"true"},this.getDisplay()),t.children)},n.getDisplay=function(){return this.attrs.loading?m(ft,{display:"unset",size:"small"}):nt(this.attrs.state?"fas fa-check":"fas fa-times")},n.onchange=function(t){this.attrs.onchange&&this.attrs.onchange(t,this)},e}(A),mn=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=(e.className||"")+" Checkbox--switch"},e.prototype.getDisplay=function(){return this.attrs.loading?t.prototype.getDisplay.call(this):""},e}(pn),vn=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,z(t.children)))},e}(A),gn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.methods=this.notificationMethods().toArray(),this.loading={},this.types=this.notificationTypes().toArray()},n.view=function(){var t=this,e=this.attrs.user.preferences();return m("table",{className:"NotificationGrid"},m("thead",null,m("tr",null,m("td",null),this.methods.map((function(e){return m("th",{className:"NotificationGrid-groupToggle",onclick:t.toggleMethod.bind(t,e.name)},nt(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)},nt(n.icon)," ",n.label),t.methods.map((function(r){var i=t.preferenceKey(n.name,r.name);return m("td",{className:"NotificationGrid-checkbox"},m(pn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])}))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new M;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:ni.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:ni.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new M;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:ni.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(A),yn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return ni.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"},ni.translator.trans("core.forum.change_password.text")),m("div",{className:"Form-group"},yt.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.translator.trans("core.forum.change_password.send_button")))))},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,ni.request({method:"POST",url:ni.forum.attribute("apiUrl")+"/forgot",body:{email:ni.session.user.email()}}).then(this.hide.bind(this),this.loaded.bind(this))},e}(Dt),bn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.success=!1,this.email=Ot(ni.session.user.email()),this.password=Ot("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return ni.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"},ni.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},ni.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:ni.session.user.email(),bidi:this.email,disabled:this.loading})),m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:ni.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading})),m("div",{className:"Form-group"},yt.component({className:"Button Button--primary Button--block",type:"submit",loading:this.loading},ni.translator.trans("core.forum.change_email.submit_button")))))},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==ni.session.user.email()?(this.loading=!0,this.alertAttrs=null,ni.session.user.save({email:this.email()},{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.onerror=function(e){401===e.status&&(e.alert.content=ni.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(Dt),wn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(ni.session.user),ni.setTitle(ni.translator.trans("core.forum.settings.title"))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,z(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new M;return["account","notifications","privacy"].forEach((function(n){e.add(n,m(vn,{className:"Settings-"+n,label:ni.translator.trans("core.forum.settings."+n+"_heading")},t[n+"Items"]().toArray()))})),e},n.accountItems=function(){var t=new M;return t.add("changePassword",m(yt,{className:"Button",onclick:function(){return ni.modal.show(yn)}},ni.translator.trans("core.forum.settings.change_password_button"))),t.add("changeEmail",m(yt,{className:"Button",onclick:function(){return ni.modal.show(bn)}},ni.translator.trans("core.forum.settings.change_email_button"))),t},n.notificationsItems=function(){var t=new M;return t.add("notificationGrid",m(gn,{user:this.user})),t},n.privacyItems=function(){var t=this,e=new M;return e.add("discloseOnline",m(mn,{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},ni.translator.trans("core.forum.settings.privacy_disclose_online_label"))),e},e}(We),xn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),ni.history.push("notifications"),ni.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(we,{state:ni.notifications}))},e}(D),Nn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return C({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[C({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=C({},m.route.param());return"near"in t&&delete t.near,t.id=this.canonicalizeDiscussionSlug(t.id),this.routeName.replace(".near","")+JSON.stringify(t)},n.onmatch=function(n,r,i){return ni.current.matches(ue)&&this.canonicalizeDiscussionSlug(n.id)===this.canonicalizeDiscussionSlug(m.route.param("id"))&&(e.scrollToPostNumber=n.near||1),t.prototype.onmatch.call(this,n,r,i)},n.render=function(n){if(null!==e.scrollToPostNumber){var r=e.scrollToPostNumber;setTimeout((function(){return ni.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(Nn);function Cn(t){t.routes={index:{path:"/all",component:an},discussion:{path:"/d/:id",component:ue,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ue,resolverClass:Sn},user:{path:"/u/:username",component:un},"user.posts":{path:"/u/:username",component:un},"user.discussions":{path:"/u/:username/discussions",component:hn},settings:{path:"/settings",component:wn},notifications:{path:"/notifications",component:xn}}}function Tn(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}S(r,n);var i=r.prototype;return i.oninit=function(t){n.prototype.oninit.call(this,t),this.loading=!1,this.sent=!1},i.view=function(){return m(yt,{class:"Button Button--link",onclick:this.onclick.bind(this),loading:this.loading,disabled:this.sent},this.sent?[nt("fas fa-check")," ",t.translator.trans("core.forum.user_email_confirmation.sent_message")]:t.translator.trans("core.forum.user_email_confirmation.resend_button"))},i.onclick=function(){var n=this;this.loading=!0,m.redraw(),t.request({method:"POST",url:t.forum.attribute("apiUrl")+"/users/"+e.id()+"/send-confirmation"}).then((function(){n.loading=!1,n.sent=!0,m.redraw()})).catch((function(){n.loading=!1,m.redraw()}))},r}(A),r=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return C({},n,{children:[m("div",{className:"container"},n.children)]})},e}(_t);m.mount($("<div/>").insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)]},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}Sn.scrollToPostNumber=null;var kn=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],En=kn.join(","),An="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:"AUDIO"!==t.nodeName&&"VIDEO"!==t.nodeName&&"DETAILS"!==t.nodeName||null!==t.getAttribute("tabindex")?t.tabIndex:0:e},_n=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Dn=function(t){return"INPUT"===t.tagName},In=function(t,e){return!(e.disabled||function(t){return Dn(t)&&"hidden"===t.type}(e)||function(t,e){if("hidden"===getComputedStyle(t).visibility)return!0;var n=An.call(t,"details>summary:first-of-type")?t.parentElement:t;if(An.call(n,"details:not([open]) *"))return!0;if(e&&"full"!==e){if("non-zero-area"===e){var r=t.getBoundingClientRect(),i=r.width,o=r.height;return 0===i&&0===o}}else for(;t;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e,t.displayCheck)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(Dn(t)||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||"BUTTON"===t.tagName)for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},On=function(t,e){return!(!In(t,e)||function(t){return function(t){return Dn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||t.ownerDocument,r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||Pn(e)<0)},$n=kn.concat("iframe").join(","),Ln=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==An.call(t,$n)&&In(e,t)};function jn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rn,Hn=(Rn=[],{activateTrap:function(t){if(Rn.length>0){var e=Rn[Rn.length-1];e!==t&&e.pause()}var n=Rn.indexOf(t);-1===n||Rn.splice(n,1),Rn.push(t)},deactivateTrap:function(t){var e=Rn.indexOf(t);-1!==e&&Rn.splice(e,1),Rn.length>0&&Rn[Rn.length-1].unpause()}}),Bn=function(t){return setTimeout(t,0)},Fn=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},Un=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},qn=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},zn=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jn(Object(n),!0).forEach((function(e){Mn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return!(!t||!o.containers.some((function(e){return e.contains(t)})))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement))t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.tabbableGroups=o.containers.map((function(t){var e,n,r,i,o,s,a,u=(n=[],r=[],(i=t,o=(e=e||{}).includeContainer,s=On.bind(null,e),a=Array.prototype.slice.apply(i.querySelectorAll(En)),o&&An.call(i,En)&&a.unshift(i),a.filter(s)).forEach((function(t,e){var i=Pn(t);0===i?n.push(t):r.push({documentOrder:e,tabIndex:i,node:t})})),r.sort(_n).map((function(t){return t.node})).concat(n));if(u.length>0)return{container:t,firstTabbableNode:u[0],lastTabbableNode:u[u.length-1]}})).filter((function(t){return!!t})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=qn(t);a(e)||(Un(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!Ln(e)}):Un(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=qn(t),n=a(e);n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==Un(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=qn(t);c();var n=null;if(o.tabbableGroups.length>0){var r=Fn(o.tabbableGroups,(function(t){return t.container.contains(e)}));if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var i=Fn(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(i<0&&o.tabbableGroups[r].container===e&&(i=r),i>=0){var s=0===i?o.tabbableGroups.length-1:i-1;n=o.tabbableGroups[s].lastTabbableNode}}else{var a=Fn(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(a<0&&o.tabbableGroups[r].container===e&&(a=r),a>=0){var l=a===o.tabbableGroups.length-1?0:a+1;n=o.tabbableGroups[l].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){if(!Un(i.clickOutsideDeactivates,t)){var e=qn(t);a(e)||Un(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())}},g=function(){if(o.active)return Hn.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?Bn((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,Hn.deactivateTrap(n);var e=s(t,"onDeactivate"),r=s(t,"onPostDeactivate"),i=s(t,"checkCanReturnFocus");e&&e();var a=s(t,"returnFocus","returnFocusOnDeactivate"),u=function(){Bn((function(){a&&d(h(o.nodeFocusedBeforeActivation)),r&&r()}))};return a&&i?(i(h(o.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function Wn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=C({escapeDeactivates:!1},e[1]),zn.apply(void 0,e)}var Vn,Gn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.modalShown=!1,e}S(e,t);var n=e.prototype;return n.view=function(t){var e=this.attrs.state.modal,n=null==e?void 0:e.componentClass;return m("div",{className:"ModalManager modal fade"},!!n&&m(n,Object.assign({key:null==e?void 0:e.key},e.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$().on("hidden.bs.modal",this.attrs.state.close.bind(this.attrs.state)),this.focusTrap=Wn(this.element)},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{n.modalShown?null==n.focusTrap.activate||n.focusTrap.activate():null==n.focusTrap.deactivate||n.focusTrap.deactivate()}catch(t){}}))},n.animateShow=function(t){if(this.attrs.state.modal){var e=!!this.attrs.state.modal.componentClass.isDismissible;this.modalShown=!0,this.$().hasClass("in")?t():this.$().one("shown.bs.modal",t).modal({backdrop:e||"static",keyboard:e}).modal("show")}},n.animateHide=function(){this.$().modal("hide"),this.modalShown=!1},e}(A),Yn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this;return m("div",{class:"AlertManager"},Object.entries(this.state.getActiveAlerts()).map((function(e){var n=e[0],r=e[1],i="error"===r.attrs.type;return m("div",{class:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(A),Kn=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return this.attrs.error.xhr?this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText:""},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(Dt);function Xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}function Qn(t,e){if(e&&("object"===Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return x(t)}function Zn(t){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zn(t)}function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function er(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rr(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?rr(e):e)}),[])}function ir(t){var e={};return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.length?r.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(e,o))return e[o];var s=t.apply(void 0,r);return e[o]=s,s}}function or(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=sr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function sr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function ar(t){return ur(t.slice(1,-1),",",3)}function ur(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),ur(s,e,n-1,r)}function lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function cr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(n),!0).forEach((function(e){nr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var dr=0,hr="other";function fr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(dr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function pr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=or(e),s=o.args,a=o.cases,u=parseInt(t);s.forEach((function(t){t.startsWith("offset:")&&(u-=parseInt(t.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==Vn&&Vn.resolvedOptions().locale===n||(Vn=new Intl.PluralRules(n));var c=Vn.select(u);c!==hr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),hr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=fr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,cr(cr({},r),m))}}return t}var mr="other";function vr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=or(e),o=i.cases;return t in o?r(o[t],n):mr in o?r(o.other,n):t}function gr(t,e,n){return"<".concat(t,">").concat(n,"</").concat(t,">")}function yr(t,e,n){var r=[];return br(t,0,0,r,(function(i,o,s,a,u,l){if(o)return{break:!0};var c=function(t,e,n,r){var i,o=1;return br(t,n,r,[],(function(t,n,r,s,a,u){return r===e&&(n?o--:o++,0===o)?(i={segmentIndex:s,segmentStart:u,segmentEnd:a},{exit:!0}):{exit:!1}})),i}(t,s,a,u);if(!c)throw new Error("Unbalanced tags: no closing tag found for <".concat(s,">"));var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(i.slice(u+1,c.segmentStart));else{f.push(i.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return r.push(i.slice(0,l)),r.push(n(s,e,yr(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}})),r.filter((function(t){return""!==t}))}function br(t,e,n,r,i){for(var o,s=e;s<t.length;s++){var a=t[s];if("string"==typeof a){for(var u=!1,l=null,c=!1,d=!1,h=s===e?n:0;h<a.length;h++)if(c||"<"!==a[h])if(c&&">"===a[h]){var f=a.slice(l+1+u,h),p=i(a,u,f,s,h,l);if(p.exit)return;if(p.newSegmentIndex&&(s=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;u=!1,l=null,c=!1}else c&&(o=a[h],!/[a-zA-Z-_]/.test(o))&&(u=!1,l=null,c=!1);else l=h,c=!0,"/"===a[h+1]&&(u=!0,h++);d||r.push(a)}else r.push(a)}}function wr(t){return Object.keys(t).reduce((function(e,n){return e[n]=xr(t[n]),e}),{})}function xr(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):Array.isArray(t)?t.map(xr):t}var Nr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&N(t,e)}(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Zn(e);if(n){var i=Zn(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Qn(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Xn(this,i),(e=r.call(this,t,n)).richHandler=o||gr,e}return O(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=wr(e),r=rr(this.process(t,n));return yr(r,n,this.richHandler)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xn(this,t),nr(this,"format",ir((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return rr(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return O(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=sr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=ar(i),u=er(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function Sr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Cr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sr(Object(n),!0).forEach((function(e){nr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Tr(t,e,n){var r=e[t]||m(t),i=m.fragment(n).children;return Cr(Cr({},r),{},{children:i})}var kr=function(){function t(){this.translations={},this.formatter=new Nr(null,this.formatterTypeHandlers(),Tr)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:pr,select:vr}},e.preprocessParameters=function(t){if("user"in t){var e=G(t,"user");t.username||(t.username=Xt(e))}return t},e.trans=function(t,e){void 0===e&&(e={});var n=this.translations[t];return n?(e=this.preprocessParameters(e),this.formatter.rich(n,e)):t},t}();function Er(t){return Array.isArray(t.data)}var Ar=function(){function t(t){this.data={},this.models=void 0,this.models=t}var e=t.prototype;return e.pushPayload=function(t){var e=this;t.included&&t.included.map(this.pushObject.bind(this));var n=t.data instanceof Array?t.data.map((function(t){return e.pushObject(t,!1)})):this.pushObject(t.data,!1);return n.payload=t,n},e.pushObject=function(t,e){if(void 0===e&&(e=!0),!this.models[t.type])return e||setTimeout((function(){return vt("Pushing object of type `"+t.type+"` not allowed, as type not yet registered in the store.","3206")})),null;var n=this.data[t.type]=this.data[t.type]||{},r=n[t.id],i=r?r.pushData(t):this.createRecord(t.type,t);return n[t.id]=i,i.exists=!0,i},e.find=function(){var t=Ce(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=b.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",b.request(C({method:"GET",url:s,params:o},i)).then((function(t){return Er(t),a.pushPayload(t)})));case 6:case"end":return t.stop()}}),t)})));return function(e,n,r,i){return t.apply(this,arguments)}}(),e.getById=function(t,e){var n,r;return null==(n=this.data)||null==(r=n[t])?void 0:r[e]},e.getBy=function(t,e,n){return this.all(t).filter((function(t){return t[e]()===n}))[0]},e.all=function(t){var e=this.data[t];return e?Object.values(e):[]},e.remove=function(t){delete this.data[t.data.type][t.id()]},e.createRecord=function(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)},t}(),Pr=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),b.request(C({method:"POST",url:b.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=b.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),_r=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){console.log(t,e),!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=Wn("#drawer",{allowOutsideClick:!0,clickOutsideDeactivates:!0}),this.drawerAvailableMediaQuery=window.matchMedia("(max-width: "+getComputedStyle(document.documentElement).getPropertyValue("--screen-phone-max")+")")}var e=t.prototype;return e.isOpen=function(){return this.appElement.classList.contains("drawerOpen")},e.hide=function(){var t;if(this.focusTrap.deactivate(),this.drawerAvailableMediaQuery.removeListener(this.resizeHandler),this.isOpen()){var e=$("#drawer");e.css("visibility","visible").one("transitionend",(function(){return e.css("visibility","")})),this.appElement.classList.remove("drawerOpen"),null==(t=this.$backdrop)||null==t.remove||t.remove()}},e.show=function(){var t=this;this.appElement.classList.add("drawerOpen"),this.drawerAvailableMediaQuery.addListener(this.resizeHandler),this.$backdrop=$("<div/>").addClass("drawer-backdrop fade").appendTo("body").on("click",this.hide.bind(this)),requestAnimationFrame((function(){t.$backdrop.addClass("in"),t.focusTrap.activate()}))},t}();function Dr(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:Nn;n[e+i.path]=new o(i.component,r)}}return n}var Ir=function(t,e,n,r){this.status=void 0,this.options=void 0,this.xhr=void 0,this.responseText=void 0,this.response=void 0,this.alert=void 0,this.status=t,this.responseText=e,this.options=n,this.xhr=r;try{this.response=JSON.parse(null!=e?e:"null")}catch(t){this.response=null}this.alert=null};function Or(){$("[data-humantime]").each((function(){var t=$(this),e=ot(t.attr("datetime"));t.html(e)}))}function $r(){setInterval(Or,1e4)}function Lr(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=r?r.apply(this,e):void 0;return n.apply(this,[o].concat(e)),o},Object.assign(t[e],r)}))}function jr(t,e,n){(Array.isArray(e)?e:[e]).forEach((function(e){var r=t[e];t[e]=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n.apply(this,[r.bind(this)].concat(e))},Object.assign(t[e],r)}))}var Mr=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(pe),Rr=n(28),Hr=n.n(Rr);function Br(t){for(var e=0,n=0;n<t.length;n++)e+=t.charCodeAt(n);var r=function(t,e,n){var r,i,o,s=Math.floor(6*t),a=6*t-s,u=.63,l=n*(1-.3*a),c=n*(1-.3*(1-a));switch(s%6){case 0:r=n,i=c,o=u;break;case 1:r=l,i=n,o=u;break;case 2:r=u,i=n,o=c;break;case 3:r=u,i=l,o=n;break;case 4:r=c,i=u,o=n;break;case 5:r=n,i=u,o=l}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*o)}}(e%360/360,0,.9);return""+r.r.toString(16)+r.g.toString(16)+r.b.toString(16)}var Fr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).avatarColor=null,e}S(e,t);var n=e.prototype;return n.username=function(){return pe.attribute("username").call(this)},n.slug=function(){return pe.attribute("slug").call(this)},n.displayName=function(){return pe.attribute("displayName").call(this)},n.email=function(){return pe.attribute("email").call(this)},n.isEmailConfirmed=function(){return pe.attribute("isEmailConfirmed").call(this)},n.password=function(){return pe.attribute("password").call(this)},n.avatarUrl=function(){return pe.attribute("avatarUrl").call(this)},n.preferences=function(){return pe.attribute("preferences").call(this)},n.groups=function(){return pe.hasMany("groups").call(this)},n.joinTime=function(){return pe.attribute("joinTime",pe.transformDate).call(this)},n.lastSeenAt=function(){return pe.attribute("lastSeenAt",pe.transformDate).call(this)},n.markedAllAsReadAt=function(){return pe.attribute("markedAllAsReadAt",pe.transformDate).call(this)},n.unreadNotificationCount=function(){return pe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return pe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return pe.attribute("discussionCount").call(this)},n.commentCount=function(){return pe.attribute("commentCount").call(this)},n.canEdit=function(){return pe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return pe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return pe.attribute("canEditGroups").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},n.color=function(){var t=this;return me("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+Br(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new M,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(Fe,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Hr());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(e,t),this.save({preferences:e})},e}(pe),Ur=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.number=function(){return pe.attribute("number").call(this)},n.discussion=function(){return pe.hasOne("discussion").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.contentType=function(){return pe.attribute("contentType").call(this)},n.content=function(){return pe.attribute("content").call(this)},n.contentHtml=function(){return pe.attribute("contentHtml").call(this)},n.renderFailed=function(){return pe.attribute("renderFailed").call(this)},n.contentPlain=function(){return me("contentHtml",(function(t){return"string"==typeof t?Z(t):t})).call(this)},n.editedAt=function(){return pe.attribute("editedAt",pe.transformDate).call(this)},n.editedUser=function(){return pe.hasOne("editedUser").call(this)},n.isEdited=function(){return me("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return pe.attribute("hiddenAt",pe.transformDate).call(this)},n.hiddenUser=function(){return pe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return me("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return pe.attribute("canEdit").call(this)},n.canHide=function(){return pe.attribute("canHide").call(this)},n.canDelete=function(){return pe.attribute("canDelete").call(this)},e}(pe),qr=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.contentType=function(){return pe.attribute("contentType").call(this)},n.content=function(){return pe.attribute("content").call(this)},n.createdAt=function(){return pe.attribute("createdAt",pe.transformDate).call(this)},n.isRead=function(){return pe.attribute("isRead").call(this)},n.user=function(){return pe.hasOne("user").call(this)},n.fromUser=function(){return pe.hasOne("fromUser").call(this)},n.subject=function(){return pe.hasOne("subject").call(this)},e}(pe),zr=function(){function t(){this.modal=null,this.key=0,this.closeTimeout=void 0}var e=t.prototype;return e.show=function(t,e){if(void 0===e&&(e={}),!(t.prototype instanceof Dt)){var n="The ModalManager can only show Modals.";throw console.error(n),new Error(n)}this.closeTimeout&&clearTimeout(this.closeTimeout),this.modal={componentClass:t,attrs:e,key:this.key++},m.redraw.sync()},e.close=function(){var t=this;this.modal&&(this.closeTimeout=setTimeout((function(){t.modal=null,m.redraw()})))},e.isModalOpen=function(){return!!this.modal},t}(),Wr=function(){function t(){this.activeAlerts={},this.alertId=0}var e=t.prototype;return e.getActiveAlerts=function(){return this.activeAlerts},e.show=function(t,e,n){var r,i=_t,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}(),Vr=["background","deserialize","extract","modifyText"];function Gr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Yr=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new M,this.session=void 0,this.translator=new kr,this.store=new Ar({forums:Mr,users:Fr,discussions:be,posts:Ur,groups:Ue,notifications:qr}),this.cache={},this.booted=!1,this.current=new _(null),this.previous=new _(null),this.modal=new zr,this.alerts=new Wr,this.drawer=void 0,this.data=void 0,this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this;this.initializers.toArray().forEach((function(t){return t(e)})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new Pr(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return Gn.component({state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return Yn.component({state:e.alerts})}}),this.drawer=new _r,m.route(document.getElementById("content"),t+"/",Dr(this.routes,t));var n=document.getElementById("app"),r=document.querySelector(".App-header"),i=new Yt((function(t){var e=n.getBoundingClientRect().top+document.body.scrollTop;n.classList.toggle("affix",t>=e),n.classList.toggle("scrolled",t>e),r.classList.toggle("navbar-fixed-top",t>=e)}));i.start(),i.update(),document.body.classList.add("ontouchstart"in window?"touch":"no-touch"),$r()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(Er(this.data.apiDocument),this.store.pushPayload(this.data.apiDocument));return this.data.apiDocument=null,t}return null},e.screen=function(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")},e.setTitle=function(t){this.title=t,this.updateTitle()},e.setTitleCount=function(t){this.titleCount=t,this.updateTitle()},e.updateTitle=function(){var t=this.titleCount?"("+this.titleCount+") ":"",e=m.route.get()===this.forum.attribute("basePath")+"/",n={pageTitle:this.title,forumName:this.forum.attribute("title"),pageNumber:1},r=e||!this.title?st(b.translator.trans("core.lib.meta_titles.without_page_title",n)):st(b.translator.trans("core.lib.meta_titles.with_page_title",n));document.title=t+r},e.transformRequestOptions=function(t){var e=this,n=C({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=V(n,Vr),u=s||o,l=C({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(Lr(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;Lr(l,"config",(function(t,e){e.setRequestHeader("X-HTTP-Method-Override",c)})),l.method="POST"}return l.extract=function(t){var e;e=u?u(t.responseText):t.responseText;var n=t.status;if(n<200||n>299)throw new Ir(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(b.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new Ir(500,""+e,l,t)}},l},e.request=function(t){var e=this,n=this.transformRequestOptions(t);return this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(n).catch((function(n){return e.requestErrorCatch(n,t.errorHandler)}))},e.requestErrorCatch=function(t,e){var n,r,i,o,s=null!=(n=null==(r=t.response)||null==(i=r.errors)?void 0:i.map((function(t){var e;return decodeURI(null!=(e=t.detail)?e:"")})))?n:[];switch(t.status){case 422:o=s.map((function(t){return[t,m("br",null)]})).flat().slice(0,-1);break;case 401:case 403:o=b.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=b.translator.trans("core.lib.error.not_found_message");break;case 413:o=b.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=b.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=b.translator.trans("core.lib.error.generic_message")}var a=b.forum.attribute("debug");return t.alert={type:"error",content:o,controls:a&&[m(yt,{className:"Button Button--link",onclick:this.showDebug.bind(this,t,s)},b.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof Ir))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),(r=console).error.apply(r,n||[t]),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(Kn,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+G(e,n)}));for(var i in e)e.hasOwnProperty(i)&&!e[i]&&delete e[i];var o=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(o?"?"+o:"")},O(t,[{key:"title",get:function(){return this._title},set:function(t){this._title=t}},{key:"titleCount",get:function(){return this._titleCount},set:function(t){this._titleCount=t}}]),t}(),Kr=function(t){function e(){return t.apply(this,arguments)||this}S(e,t);var n=e.prototype;return n.view=function(){var t=b.history,e=b.pane;return m("div",{className:"Navigation ButtonGroup "+(this.attrs.className||""),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=b.history,e=t.getPrevious()||{};return ce.component({className:"Button Navigation-back Button--icon",href:t.backUrl(),icon:"fas fa-chevron-left","aria-label":e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),t.back())}})},n.getPaneButton=function(){var t=b.pane;return t&&t.active?yt.component({className:"Button Button--icon Navigation-pin"+(t.pinned?" active":""),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):""},n.getDrawerButton=function(){if(!this.attrs.drawer)return"";var t=b.drawer,e=b.session.user;return yt.component({className:"Button Button--icon Navigation-drawer"+(e&&e.newNotificationCount()?" new":""),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":b.translator.trans("core.lib.nav.drawer_button")})},e}(A),Xr=function(t){function e(){return t.call(this,{},1,10)||this}S(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=ni.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=ni.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=ni.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),ni.request({url:ni.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},O(e,[{key:"type",get:function(){return"notifications"}}]),e}(ln),Jr=function(){function t(t){void 0===t&&(t=[]),this.cachedSearches=void 0,this.value="",this.cachedSearches=new Set(t)}var e=t.prototype;return e.getInitialSearch=function(){return""},e.getValue=function(){return this.value},e.setValue=function(t){this.value=t},e.clear=function(){this.setValue("")},e.cache=function(t){this.cachedSearches.add(t)},e.isCached=function(t){return this.cachedSearches.has(t)},t}(),Qr=["q"],Zr=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}S(e,t);var n=e.prototype;return n.getValue=function(){return!this.initialValueSet&&this.currPageProvidesSearch()&&this.intializeValue(),t.prototype.getValue.call(this)},n.intializeValue=function(){this.setValue(this.getInitialSearch()),this.initialValueSet=!0},n.currPageProvidesSearch=function(){return ni.current.type&&ni.current.type.providesInitialSearch},n.getInitialSearch=function(){return this.currPageProvidesSearch()?this.params().q:""},n.clear=function(){t.prototype.clear.call(this),this.getInitialSearch()?this.clearInitialSearch():m.redraw()},n.clearInitialSearch=function(){var t=this.params(),e=(t.q,V(t,Qr));T(ni.route(ni.current.get("routeName"),e))},n.stickyParams=function(){return{sort:m.route.param("sort"),q:m.route.param("q")}},n.params=function(){var t=this.stickyParams();return t.filter=m.route.param("filter"),t},n.changeSort=function(t){var e=this.params();t===Object.keys(ni.discussions.sortMap())[0]?delete e.sort:e.sort=t,T(ni.route(ni.current.get("routeName"),e))},e}(Jr),ti=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:je},e.postComponents={comment:tn,discussionRenamed:nn},e.pane=null,e.history=new k,e.notifications=new Xr,e.search=new Zr,e.composer=new Oe,e.discussions=new dn({}),e.route=void 0,Cn(x(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(x(e))).route.bind(x(e)),function(t){return{discussion:function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})},post:function(e){return t.route.discussion(e.discussion(),e.number())},user:function(e){return t.route("user",{username:e.slug()})}}}(x(e))),e}S(e,t);var n=e.prototype;return n.mount=function(){var e=this,n=this.forum.attribute("defaultRoute"),r="index";for(var i in this.routes)this.routes[i].path===n&&(r=i);this.routes[r].path="/",this.history.push(r,st(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new E(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return Kr.component({className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),Kr),m.mount(document.getElementById("header-primary"),le),m.mount(document.getElementById("header-secondary"),_e),m.mount(document.getElementById("composer"),{view:function(){return $e.component({state:e.composer})}}),Tn(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&2!==t.which){t.preventDefault(),ni.history.home();var n=null==(e=ni.session.user)?void 0:e.id();n&&(ni.store.find("users",n),m.redraw())}})),"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ue,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(jt,t)},e}(Yr),ei=new ti;window.app=ei;const ni=ei;var ri="The `evented` util is deprecated and no longer supported.",ii="2547";const oi={handlers:null,getHandlers:function(t){return vt(ri,ii),this.handlers=this.handlers||{},this.handlers[t]=this.handlers[t]||[],this.handlers[t]},trigger:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];vt(ri,ii),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){vt(ri,ii),this.getHandlers(t).push(e)},one:function(t,e){vt(ri,ii),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){vt(ri,ii);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var si,ai={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function ui(t){return t.trim().split("\n").length>1}function li(t,e){return Array(e+1).join(t)}function ci(t){var e,n,r=t.value.slice(0,t.selectionStart),i=t.value.slice(t.selectionEnd),o=r.match(/\n*$/),s=i.match(/^\n*/),a=o?o[0].length:0,u=s?s[0].length:0;return r.match(/\S/)&&a<2&&(e=li("\n",2-a)),i.match(/\S/)&&u<2&&(n=li("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function di(t){var e=t.split("\n"),n=/^\d+\.\s+/,r=e.every((function(t){return n.test(t)})),i=e;return r&&(i=e.map((function(t){return t.replace(n,"")}))),{text:i.join("\n"),processed:r}}function hi(t){var e=t.split("\n"),n=e.every((function(t){return t.startsWith("- ")})),r=e;return n&&(r=e.map((function(t){return t.slice("- ".length,t.length)}))),{text:r.join("\n"),processed:n}}function fi(t,e){return e?"- ":t+1+". "}function pi(t,e){var n,r,i=new RegExp(String.raw(si||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,si=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var mi=["className","class"],vi=["options","onchange","value","disabled","className","class","wrapperAttrs"],gi=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t=this.attrs,e=t.options,n=t.onchange,r=t.value,i=t.disabled,o=t.className,s=t.class,a=t.wrapperAttrs,u=(a=void 0===a?{}:a).className,l=a.class,c=V(a,mi),d=V(t,vi);return m("span",Object.assign({className:F("Select",u,l)},c),m("select",Object.assign({className:F("Select-input FormControl",o,s),onchange:n?fn("value",n.bind(this)):void 0,value:r,disabled:i},d),Object.keys(e).map((function(t){return m("option",{value:t},e[t])}))),nt("fas fa-sort",{className:"Select-caret"}))},e}(A),yi=["className"],bi=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).value=void 0,e}return S(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=V(e,yi),i=(null==r.bidi?void 0:r.bidi())||r.value;return r.type||(r.type="text"),m("div",{className:"ColorInput"},m("input",Object.assign({className:F("FormControl",n)},r)),m("span",{className:"ColorInput-icon",role:"presentation"},nt("fas fa-exclamation-circle")),m("div",{className:"ColorInput-preview",style:{"--input-value":i},role:"presentation"}))},e}(A),wi=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Tt,{text:this.attrs.tooltipText||st(e.children)},n)},e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=e.className||"Button Button--icon Button--link",e.tooltipText=e.title},e}(yt);const xi={extend:o,Session:Pr,Store:Ar,"utils/BasicEditorDriver":St,"utils/evented":oi,"utils/liveHumanTimes":$r,"utils/ItemList":M,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e}(t),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(t){Object.assign(e.prototype,t)})),e},"utils/humanTime":ot,"utils/computed":me,"utils/insertText":Nt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},ai,e);var n,r=t.value.slice(t.selectionStart,t.selectionEnd);n=e.orderedList||e.unorderedList?function(t,e){var n=t.selectionStart===t.selectionEnd,r=t.selectionStart,i=t.selectionEnd;!function(t){for(var e=t.value.split("\n"),n=0,r=0;r<e.length;r++){var i=e[r].length+1;t.selectionStart>=n&&t.selectionStart<n+i&&(t.selectionStart=n),t.selectionEnd>=n&&t.selectionEnd<n+i&&(t.selectionEnd=n+i-1),n+=i}}(t);var o=t.value.slice(t.selectionStart,t.selectionEnd),s=function(t,e){var n,r,i;return i=t.orderedList?(n=hi((r=di(e)).text)).text:(n=di((r=hi(e)).text)).text,[r,n,i]}(e,o),a=s[0],u=s[1],l=s[2],c=l.split("\n").map((function(t,n){return""+fi(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+fi(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+fi(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-fi(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=ci(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+fi(0,e.unorderedList).length+p.length,0):u.processed?(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+d-h):(r=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+d),{text:v,selectionStart:r,selectionEnd:i}}(t,e):e.multiline&&ui(r)?function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.surroundWithNewlines,a=t.value.slice(t.selectionStart,t.selectionEnd),u=t.selectionStart,l=t.selectionEnd,c=a.split("\n"),d=i.length>0?i:n,h=o.length>0?o:d==n?r:"";if(c.every((function(t){return t.startsWith(d)&&t.endsWith(h)})))l=u+(a=c.map((function(t){return t.slice(d.length,t.length-h.length)})).join("\n")).length;else if(a=c.map((function(t){return d+t+h})).join("\n"),s||""===h){var f=ci(t),p=f.newlinesToAppend,m=f.newlinesToPrepend;l=(u+=p.length)+a.length,a=p+a+m}return{text:a,selectionStart:u,selectionEnd:l}}(t,e):function(t,e){var n=e.prefix,r=e.suffix,i=e.blockPrefix,o=e.blockSuffix,s=e.replaceNext,a=e.prefixSpace,u=e.scanFor,l=e.surroundWithNewlines,c=t.selectionStart,d=t.selectionEnd,h=t.value.slice(t.selectionStart,t.selectionEnd),f=ui(h)&&i.length>0?i+"\n":n,p=ui(h)&&o.length>0?"\n"+o:f===n?r:"";if(a){var m=t.value[t.selectionStart-1];0===t.selectionStart||null==m||m.match(/\s/)||(f=" "+f)}h=function(t,e,n,r){if(void 0===r&&(r=!1),t.selectionStart===t.selectionEnd)t.selectionStart=function(t,e){for(var n=e;t[n]&&null!=t[n-1]&&!t[n-1].match(/\s/);)n--;return n}(t.value,t.selectionStart),t.selectionEnd=function(t,e,n){for(var r=e,i=n?/\n/:/\s/;t[r]&&!t[r].match(i);)r++;return r}(t.value,t.selectionEnd,r);else{var i=t.selectionStart-e.length,o=t.selectionEnd+n.length,s=t.value.slice(i,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,o)===n;s&&a&&(t.selectionStart=i,t.selectionEnd=o)}return t.value.slice(t.selectionStart,t.selectionEnd)}(t,f,p,e.multiline);var v=t.selectionStart,g=t.selectionEnd,y=s.length>0&&p.indexOf(s)>-1&&h.length>0;if(l){var b=ci(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var x=c-f.length;x=Math.max(x,v),v=g=x=Math.min(x,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var N=f+h+p;v=c+f.length,g=d+f.length;var S=h.match(/^\s*|\s*$/g);if(e.trimFirst&&S){var C=S[0]||"",T=S[1]||"";N=C+f+h.trim()+p+T,v+=C.length,g-=T.length}return{text:N,selectionStart:v,selectionEnd:g}}(t,e),Nt(t,n)},"utils/Drawer":_r,"utils/anchorScroll":oe,"utils/RequestError":Ir,"utils/abbreviateNumber":at,"utils/string":e,"utils/SubtreeRetainer":dt,"utils/escapeRegExp":Ut,"utils/extract":G,"utils/ScrollListener":Yt,"utils/stringToColor":Br,"utils/Stream":Ot,"utils/subclassOf":P,"utils/setRouteWithForcedRefresh":T,"utils/patchMithril":f,"utils/proxifyCompat":pi,"utils/classList":F,"utils/extractText":st,"utils/formatNumber":te,"utils/mapRoutes":Dr,"utils/withAttr":fn,"utils/throttleDebounce":s,"utils/isObject":L,"utils/focusTrap":i,"models/Notification":qr,"models/User":Fr,"models/Post":Ur,"models/Discussion":be,"models/Group":Ue,"models/Forum":Mr,Component:A,Fragment:function(){function t(){this.element=void 0}var e=t.prototype;return e.$=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=$(this.element);return t?e.find(t):e})),e.render=function(){var t=this,e=this.view();e.attrs=e.attrs||{};var n=e.attrs.oncreate;return e.attrs.oncreate=function(e){t.element=e.dom,n&&n.apply(t,[e])},e},t}(),Translator:kr,"components/AlertManager":Yn,"components/Page":D,"components/Switch":mn,"components/Badge":ye,"components/LoadingIndicator":ft,"components/Placeholder":zt,"components/Separator":H,"components/Dropdown":ut,"components/SplitDropdown":ne,"components/RequestErrorModal":Kn,"components/FieldSet":vn,"components/Select":gi,"components/Navigation":Kr,"components/Alert":_t,"components/Link":K,"components/LinkButton":ce,"components/Checkbox":pn,"components/ColorPreviewInput":bi,"components/SelectDropdown":fe,"components/ModalManager":Gn,"components/Button":yt,"components/Modal":Dt,"components/GroupBadge":Fe,"components/TextEditor":kt,"components/TextEditorButton":wi,"components/Tooltip":Tt,"components/EditUserModal":qe,Model:pe,Application:Yr,"helpers/fullTime":Je,"helpers/avatar":X,"helpers/icon":nt,"helpers/humanTime":lt,"helpers/punctuateSeries":function(t){if(2===t.length)return b.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,b.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return b.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":et,"helpers/username":Xt,"helpers/userOnline":Ke,"helpers/listItems":z,"resolvers/DefaultResolver":Nn,"states/PaginatedListState":ln};var Ni=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.initAttrs=function(e){e.className=(e.className||"")+" LogInButton",e.onclick=function(){var t=$(window);window.open(ni.forum.attribute("baseUrl")+e.path,"logInPopup","width=580,height=400,top="+(t.height()/2-200)+",left="+(t.width()/2-290)+",status=no,scrollbars=yes,resizable=no")},t.initAttrs.call(this,e)},e}(yt),Si=function(t){function e(){return t.apply(this,arguments)||this}return S(e,t),e.prototype.view=function(){var t=this.attrs.post,e=t.user(),n="comment"===t.contentType()&&t.contentPlain(),r=n?et(n,this.attrs.highlight,300):"";return m(K,{className:"PostPreview",href:ni.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},X(e),Xt(e)," ",m("span",{className:"PostPreview-excerpt"},r)))},e}(A);const Ci=Object.assign(xi,{"utils/PostControls":He,"utils/KeyboardNavigatable":Ne,"utils/slidable":Bt,"utils/History":k,"utils/DiscussionControls":Ht,"utils/alertEmailConfirmation":Tn,"utils/UserControls":Ve,"utils/Pane":E,"utils/BasicEditorDriver":St,"states/ComposerState":Oe,"states/DiscussionListState":dn,"states/GlobalSearchState":Zr,"states/NotificationListState":Xr,"states/PostStreamState":ae,"states/SearchState":Jr,"components/AffixedSidebar":ze,"components/DiscussionPage":ue,"components/DiscussionListPane":Gt,"components/LogInModal":Mt,"components/ComposerBody":Et,"components/ForgotPasswordModal":$t,"components/Notification":Le,"components/LogInButton":Ni,"components/DiscussionsUserPage":hn,"components/Composer":$e,"components/SessionDropdown":de,"components/HeaderPrimary":le,"components/PostEdited":Ze,"components/PostStream":Zt,"components/ChangePasswordModal":yn,"components/IndexPage":an,"components/DiscussionRenamedNotification":je,"components/DiscussionsSearchSource":Ee,"components/HeaderSecondary":_e,"components/ComposerButton":De,"components/DiscussionList":Wt,"components/ReplyPlaceholder":Qt,"components/AvatarEditor":Ge,"components/Post":Be,"components/SettingsPage":wn,"components/TerminalPost":ct,"components/ChangeEmailModal":bn,"components/NotificationsDropdown":xe,"components/UserPage":We,"components/PostUser":Xe,"components/UserCard":Ye,"components/UsersSearchSource":Ae,"components/NotificationGrid":gn,"components/PostPreview":Si,"components/EventPost":en,"components/DiscussionHero":W,"components/PostMeta":Qe,"components/DiscussionRenamedPost":nn,"components/DiscussionComposer":sn,"components/LogInButtons":Lt,"components/NotificationList":we,"components/WelcomeHero":on,"components/SignUpModal":jt,"components/CommentPost":tn,"components/ComposerPostPreview":Jt,"components/ReplyComposer":Pt,"components/NotificationsPage":xn,"components/PostStreamScrubber":ee,"components/EditPostComposer":Re,"components/RenameDiscussionModal":Rt,"components/Search":Pe,"components/DiscussionListItem":qt,"components/LoadingPost":Kt,"components/PostsUserPage":un,"resolvers/DiscussionPageResolver":Sn,routes:Cn,ForumApplication:ti});Ci.app=ni;var Ti=pi(Ci,"forum")})(),flarum.core=r})();
|
|
//# sourceMappingURL=forum.js.map
|